Advertisement
Guest User

Untitled

a guest
Sep 16th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. $errormessage .= 'Please login first.';
  2. }
  3. else
  4. {
  5. $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');
  6. if(is_object($items_history_received))
  7. {
  8. foreach($items_history_received as $item_received)
  9. {
  10. if($account_logged->getId() == $item_received['to_account'])
  11. $char_color = 'green';
  12. else
  13. $char_color = 'red';
  14. $items_received_text .= '<tr bgcolor="'.$config['site']['lightborder'].'"><td><font color="'.$char_color.'">'.htmlspecialchars($item_received['to_name']).'</font></td><td>';
  15. if($account_logged->getId() == $item_received['from_account'])
  16. $items_received_text .= '<i>Your account</i>';
  17. else
  18. $items_received_text .= htmlspecialchars($item_received['from_nick']);
  19. $items_received_text .= '</td><td>'.htmlspecialchars($item_received['offer_id']).'</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>';
  20. if($item_received['trans_real'] > 0)
  21. $items_received_text .= '<td>'.date("j F Y, H:i:s", $item_received['trans_real']).'</td>';
  22. else
  23. $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>';
  24. $items_received_text .= '</tr>';
  25. }
  26. }
  27. $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
  28. <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'"></TD></TR>
  29. <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><center><B>Transactions History</B></center></TD></TR>
  30. <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'"></TD></TR>
  31. </table><br>';
  32.  
  33. if(!empty($items_received_text))
  34. {
  35. $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
  36. <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white colspan="5"><B>Item Transactions</B></TD></TR>
  37. <tr bgcolor="'.$config['site']['darkborder'].'"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Bought on page</b></td><td><b>Received on OTS</b></td></tr>
  38. '.$items_received_text.'
  39. </table><br />';
  40. }
  41. if(empty($items_received_text))
  42. $errormessage .= 'You did not buy/receive any item.';
  43. }
  44. if(!empty($errormessage))
  45. {
  46. $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
  47. <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Informations</B></TD></TR>
  48. <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.$errormessage.'</b></TD></TR>
  49. </table>';
  50. }
  51. }
  52. $main_content .= '<br><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
  53. <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Premium Points</B></TD></TR>
  54. <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b><font color="green">You have premium points: </font></b>'.$user_premium_points.'</TD></TR>
  55. </table>';
  56. }
  57. else
  58. $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
  59. <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=center CLASS=white ><B>Shop Information</B></TD></TR>
  60. <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><center>Shop is currently closed. [to admin: edit it in \'config/config.php\']</TD></TR>
  61. </table>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement