if ($mod_table == 'login' || $mod_table == 'history' || !in_array($mod_table, $filter_module_tables) || getPermission($module, 'access', $row['history_item'])) { ?> <tr> <td><a href="?m=history&a=addedit&history_id=<?php echo $row['history_id']; ?> "> <img src="./images/icons/pencil.gif" alt="<?php echo $AppUI->_('Edit History'); ?> " border="0" width="12" height="12"> </a></td> <td align="center"><?php echo $hd->format($df) . ' ' . $hd->format($tf); ?> </td> <td><?php echo show_history($row); ?> </td> <td align="center"><?php echo $row['user_username']; ?> </td> </tr> <?php } } ?> </table>
<!DOCTYPE html> <html> <head> <!-- <link rel="stylesheet" href="stylesheets/index.css"> --> <title> eShop | Purchase History </title> </head> <body> <table id="history"> <tr> <th id="login-p" style="font-weight: bold">Product Name</th> <th id="login-p" style="font-weight: bold">Product Price</th> <th id="login-p" style="font-weight: bold">Product Quantity</th> <th id="login-p" style="font-weight: bold">Purchase Time</th> </tr> <?php $results = show_history($_SESSION['id']); while ($record = mysqli_fetch_row($results)) { echo "<tr>"; echo "<td id='purchase'>"; echo "<p id=\"login-p\">" . $record[2] . "</p>"; echo "</td>"; echo "<td id='purchase'>"; echo "<p id=\"login-p\">" . $record[3] . "</p>"; echo "</td>"; echo "<td id='purchase'>"; echo "<p id=\"login-p\">" . $record[4] . "</p>"; echo "</td>"; echo "<td id='purchase'>"; echo "<p id=\"login-p\">" . $record[5] . "</p>"; echo "</td>"; echo "</tr>";
$cmbAction->addItem('showgraph', S_GRAPH); } $cmbAction->addItem('showvalues', S_VALUES); $cmbAction->addItem('showlatest', S_500_LATEST_VALUES); $form->addItem($cmbAction); if ($_REQUEST['action'] != 'showgraph') { $form->addItem(array(SPACE, new CButton('plaintext', S_AS_PLAIN_TEXT))); } show_table_header($l_header, $form); } $effectiveperiod = navigation_bar_calc(); $bstime = $_REQUEST['stime'] = get_request('stime', get_profile('web.item.graph.stime', date('YmdHi', time() - $_REQUEST['period']), PROFILE_TYPE_STR, $_REQUEST['itemid'])); update_profile('web.item.graph.stime', $_REQUEST['stime'], PROFILE_TYPE_STR); if ($_REQUEST['action'] == 'showgraph' && $item_type != ITEM_VALUE_TYPE_LOG) { $dom_graph_id = 'graph'; show_history($_REQUEST['itemid'], $_REQUEST['from'], $bstime, $effectiveperiod); } else { if ($_REQUEST['action'] == 'showvalues' || $_REQUEST['action'] == 'showlatest') { if ($_REQUEST['action'] == 'showvalues') { $time = mktime(substr($bstime, 8, 2), substr($bstime, 10, 2), 0, substr($bstime, 4, 2), substr($bstime, 6, 2), substr($bstime, 0, 4)); $till = $time + $effectiveperiod; } $l_header = null; if (!isset($_REQUEST['plaintext'])) { if ($item_type == ITEM_VALUE_TYPE_LOG) { $to_save_request = array('filter_task', 'filter', 'mark_color'); $filter_task = get_request('filter_task', 0); $filter = get_request('filter', ''); $mark_color = get_request('mark_color', 0); $r_header = new CForm(); $r_header->setMethod('get');
$cmbAction = new CComboBox("action", $_REQUEST["action"], "submit()"); if (str_in_array($item_type, array(ITEM_VALUE_TYPE_FLOAT, ITEM_VALUE_TYPE_UINT64))) { $cmbAction->AddItem("showgraph", S_GRAPH); } $cmbAction->AddItem("showvalues", S_VALUES); $cmbAction->AddItem("showlatest", S_500_LATEST_VALUES); $form->AddItem($cmbAction); if ($_REQUEST["action"] != "showgraph") { $form->AddItem(array(SPACE, new CButton("plaintext", S_AS_PLAIN_TEXT))); } show_table_header($l_header, $form); } if ($_REQUEST["action"] == "showgraph" && $item_type != ITEM_VALUE_TYPE_LOG) { $dom_graph_id = 'graph'; $bstime = isset($_REQUEST['stime']) ? $_REQUEST['stime'] : date('YmdHi', time() - $_REQUEST['period']); show_history($_REQUEST["itemid"], $_REQUEST["from"], $bstime, $effectiveperiod); } else { if ($_REQUEST["action"] == "showvalues" || $_REQUEST["action"] == "showlatest") { if ($_REQUEST["action"] == "showvalues") { $bstime = isset($_REQUEST['stime']) ? $_REQUEST['stime'] : date('YmdHi', time() - $_REQUEST['period']); $time = mktime(substr($bstime, 8, 2), substr($bstime, 10, 2), 0, substr($bstime, 4, 2), substr($bstime, 6, 2), substr($bstime, 0, 4)); $till = $time + $effectiveperiod; $l_header = array(S_SHOWING_HISTORY_OF . SPACE . zbx_date2age(0, $effectiveperiod), '[' . S_FROM_SMALL . ': ' . date('Y.M.d H:i:s', $time) . ']'); } else { $l_header = null; } if (!isset($_REQUEST["plaintext"])) { if ($item_type == ITEM_VALUE_TYPE_LOG) { $to_save_request = array("filter_task", "filter", "mark_color"); $filter_task = get_request("filter_task", 0); $filter = get_request("filter", "");
if (isset($auth) && !empty($auth->auth["perm"])) { page_close(); page_open(array("sess" => "SourceAgency_Session", "auth" => "SourceAgency_Auth", "perm" => "SourceAgency_Perm")); } require "include/header.inc"; require "include/historylib.inc"; $bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align); start_content(); $page = "history"; if (check_proid($proid)) { top_bar($proid, $page); htmlp_image("ic/e.png", 0, 60, 51, "Summary"); print $t->translate('This is the chronological list of all the actions ' . 'that have affected the current project') . ".<p>\n"; $i = 0; history_extract_table("description", "description_creation", "description_user", "project_title"); history_extract_table("consultants", "creation", "consultant", "Consultant offered"); history_extract_table("comments", "creation_cmt", "user_cmt", "subject_cmt"); history_extract_table("news", "creation_news", "user_news", "subject_news"); history_extract_table("tech_content", "creation", "content_user", "Content proposed"); history_extract_table("history", "creation", "history_user", "action"); history_extract_table("developing", "creation", "developer", "Developing Proposal"); history_extract_table("sponsoring", "creation", "sponsor", "Sponsoring wish"); history_extract_table("milestones", "creation", "milestone_user", "product"); history_extract_table("referees", "creation", "referee", "Referee offered"); bubblesort($history); show_history($history); lib_comment_it($proid, 'General', '0', '0', 'Comment on the Project History', $t->translate('General Comments')); } end_content(); require "include/footer.inc"; @page_close();