Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $errormessage .= 'Please login first.';
- }
- else
- {
- $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()).';');
- if(is_object($items_history_received))
- {
- foreach($items_history_received as $item_received)
- {
- if($account_logged->getId() == $item_received['to_account'])
- $char_color = 'green';
- else
- $char_color = 'red';
- $items_received_text .= '<tr bgcolor="'.$config['site']['lightborder'].'"><td><font color="'.$char_color.'">'.htmlspecialchars($item_received['to_name']).'</font></td><td>';
- if($account_logged->getId() == $item_received['from_account'])
- $items_received_text .= '<i>Your account</i>';
- else
- $items_received_text .= htmlspecialchars($item_received['from_nick']);
- $items_received_text .= '</td><td>'.htmlspecialchars($item_received['offer_id']).'</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>';
- if($item_received['trans_real'] > 0)
- $items_received_text .= '<td>'.date("j F Y, H:i:s", $item_received['trans_real']).'</td>';
- else
- $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>';
- $items_received_text .= '</tr>';
- }
- }
- $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
- <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'"></TD></TR>
- <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><center><B>Transactions History</B></center></TD></TR>
- <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'"></TD></TR>
- </table><br>';
- if(!empty($items_received_text))
- {
- $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
- <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white colspan="5"><B>Item Transactions</B></TD></TR>
- <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>
- '.$items_received_text.'
- </table><br />';
- }
- if(empty($items_received_text))
- $errormessage .= 'You did not buy/receive any item.';
- }
- if(!empty($errormessage))
- {
- $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
- <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Informations</B></TD></TR>
- <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.$errormessage.'</b></TD></TR>
- </table>';
- }
- }
- $main_content .= '<br><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
- <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Premium Points</B></TD></TR>
- <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b><font color="green">You have premium points: </font></b>'.$user_premium_points.'</TD></TR>
- </table>';
- }
- else
- $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
- <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=center CLASS=white ><B>Shop Information</B></TD></TR>
- <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><center>Shop is currently closed. [to admin: edit it in \'config/config.php\']</TD></TR>
- </table>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement