public function display() { $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(ROLES_ASSIGNMENT_HTML); $dom->whereIdIs('message-container')->insertNode('Role Assignment for: ' . $this->data['user-name']); $dom->whereIdIs('roles-assignment-form')->removeAttribute('style="display: none;"'); $session = SessionFactory::create(); $dom->whereIdIs('login-user')->insertNode($session->get('session-user-name')); foreach ($this->data['user-roles'] as $userRole) { if ($userRole['status'] == 1) { $dom->whereIdIs('role-assignment-checkboxs')->insertNode('<div class="checkbox"> <input name="selected-roles-ids[]" type="checkbox" value="' . $userRole['id'] . '" checked > <label> <b>' . $userRole['name'] . '</b> ' . $userRole['description'] . '</label> </div>'); } elseif ($userRole['status'] == 0) { $dom->whereIdIs('role-assignment-checkboxs')->insertNode('<div class="checkbox"> <input name="selected-roles-ids[]" type="checkbox" value="' . $userRole['id'] . '"> <label> <b>' . $userRole['name'] . '</b> ' . $userRole['description'] . '</label> </div>'); } } $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'))->whereIdIs('log-file-loader-form')->removeAttribute('style="display: none;"'); $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name')); $tableFactory = HtmlElementsFactory::create("table"); $tableFactory->data = $this->data; $tableFactory->dataIds = array("date", "time", "transaction_time", "client_ip", "squid_result_code", "client_data", "request_method", "mime_type"); $tableFactory->openTable(); $tableFactory->addTheaderTitle("Date"); $tableFactory->addTheaderTitle("Time"); $tableFactory->addTheaderTitle("Transaction Time"); $tableFactory->addTheaderTitle("Client IP"); $tableFactory->addTheaderTitle("Squid Code"); $tableFactory->addTheaderTitle("Client Data"); $tableFactory->addTheaderTitle("Request Method"); $tableFactory->addTheaderTitle("Mime Type"); $tableFactory->renderTableData(); $tableFactory->closeTable(); $table = $tableFactory->render(); $dom->whereIdIs("squidDataContainer")->insertNode($table); $paginator = PaginatorFactory::create(); $paginator->action = "A_ReadAllSquidData"; $dom->whereIdIs('ul-pagination')->insertNode($paginator->paginationSelect); $dom->display(); }
public function display() { /*CHART*/ $chart = new VerticalBarChart(4500, 350); $dataSet = new XYDataSet(); foreach ($this->data as $key => $datum) { $dataSet->addPoint(new Point($datum['client_ip'], $datum['frequency'])); } $chart->setDataSet($dataSet); $chart->getPlot()->setLogoFileName(""); //clear the image logo $chart->setTitle(""); //clear the image title $chart->render("front-end/images/client_request_vertical_bar_plot.png"); /*CHART*/ $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name')); $selectedDate = $session->get("selected-date"); $title = "<h3>Bar Graph IP requests for the day: " . $selectedDate . " </h3>"; $dom->whereIdIs("body-title")->insertNode($title); $graph = '<div style="text-align: center;"> <img src="front-end/images/client_request_vertical_bar_plot.png" alt="" border="0"> </div>'; $dom->whereIdIs("squidDataContainer")->insertNode($graph); $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name')); //TITLE $selectedClientIp = $session->get("selected-client-ip"); $selectedDate = $session->get("selected-date"); $beginTime = $this->data[0]['time']; $endTime = end($this->data)['time']; $title = "<h3>Client (" . $selectedClientIp . ") Domains Request Frequency Table, \n at: " . $selectedDate . "</h3><br><h5>(Ordered from highest to lowest frequency)</h5>"; $dom->whereIdIs("body-title")->insertNode($title); //TITLE $tableFactory = HtmlElementsFactory::create("table"); $tableFactory->data = $this->data; $tableFactory->dataIds = array("time", "frequency", "url"); $tableFactory->openTable(); $tableFactory->addTheaderTitle("Time"); $tableFactory->addTheaderTitle("Frequency"); $tableFactory->addTheaderTitle("URL"); $tableFactory->renderTableData(); $tableFactory->closeTable(); $table = $tableFactory->render(); $dom->whereIdIs("squidDataContainer")->insertNode($table); $paginator = PaginatorFactory::create(); $paginator->action = "A_DomainsRequestTableOrdered"; $dom->whereIdIs('ul-pagination')->insertNode($paginator->paginationSelect); $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'))->whereIdIs('filter-data-form')->removeAttribute('style="display: none;"'); //CLIENT IP SELECT INPUT $selectedClientIp = $session->get("selected-client-ip"); $options = null; foreach ($this->data["client-ips"] as $datum) { if ($datum['client_ip'] == $selectedClientIp) { $options .= '<option selected value="' . $selectedClientIp . '">' . $selectedClientIp . '</option>'; } else { $options .= '<option value="' . $datum['client_ip'] . '">' . $datum['client_ip'] . '</option>'; } } $dom->whereIdIs('client-ip-select-input')->insertNode($options); //DATE SELECT INPUT $selectedDate = $session->get("selected-date"); $options = null; foreach ($this->data["dates"] as $datum) { if ($datum['date'] == $selectedDate) { $options .= '<option selected value="' . $selectedDate . '">' . $selectedDate . '</option>'; } else { $options .= '<option value="' . $datum['date'] . '">' . $datum['date'] . '</option>'; } } $dom->whereIdIs('date-select-input')->insertNode($options); //DISPLAY $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name')); //TITLE $selectedClientIp = $session->get("selected-client-ip"); $selectedDate = $session->get("selected-date"); $beginTime = $this->data[0]['time']; $endTime = end($this->data)['time']; $title = "<h3>Client (" . $selectedClientIp . ") Data Consumption Table, \n at: " . $selectedDate . " between: " . $beginTime . " and " . $endTime . "</h3>\n <br><a href='index.php?A_ClientDataConsumptionTableOrdered'>Order from highest to lowest consumption</a>"; $dom->whereIdIs("body-title")->insertNode($title); //TITLE $tableFactory = HtmlElementsFactory::create("table"); $tableFactory->data = $this->data; $tableFactory->dataIds = array("time", "client_data", "url"); $tableFactory->openTable(); $tableFactory->addTheaderTitle("Time"); $tableFactory->addTheaderTitle("Client Data Consumption In Kb"); $tableFactory->addTheaderTitle("URL"); $tableFactory->renderTableData(); $tableFactory->closeTable(); $table = $tableFactory->render(); $dom->whereIdIs("squidDataContainer")->insertNode($table); $paginator = PaginatorFactory::create(); $paginator->action = "A_ClientDataConsumptionTable"; $dom->whereIdIs('ul-pagination')->insertNode($paginator->paginationSelect); $dom->display(); }
public function display() { $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(MESSENGER_HTML)->whereIdIs('message')->insertNode($this->data); $session = SessionFactory::create(); $dom->whereIdIs('login-user')->insertNode($session->get('session-user-name')); $dom->display(); exit; }
public function display() { $session = SessionFactory::create(); $session->start(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(LOGIN_HTML); $rand = md5(rand(1, 100000)); $session->set('randLogin', $rand); $dom->whereIdIs('public_key')->insertAttribute('value="' . $rand . '"'); $dom->display(); }
public function display() { $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(ACTIONS_ASSIGNMENT_HTML); $session = SessionFactory::create(); $dom->whereIdIs('login-user')->insertNode($session->get('session-user-name')); $dom->whereIdIs('role-select-form')->removeAttribute('style="display: none;"'); $options = null; foreach ($this->data as $datum) { $options .= '<option value="' . $datum['id'] . '">' . $datum['name'] . '</option>'; } $dom->whereIdIs('role-select-input')->insertNode($options); $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(USERS_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'))->whereIdIs('table')->removeAttribute('style="display: none;"'); foreach ($this->data as $key => $datum) { $tr = "<tr><td>" . $datum["name"] . "</td>"; $tr .= "<td><a href='?user-id=" . $datum["id"] . "&A_UpdateUserForm'"; $tr .= "title='Update User' class='button'>"; $tr .= "<i class='glyphicon glyphicon-pencil'></i></a> "; $tr .= "<a href='?user-id=" . $datum["id"] . "&A_DeleteUserConfirmation'"; $tr .= "title='Delete User' class='button'>"; $tr .= "<i class='glyphicon glyphicon-trash'></i></a></td></tr>"; $dom->whereIdIs("tbody")->insertNode($tr); } $dom->display(); }
public function display() { $chart = new LineChart(4500, 350); $dataSet = new XYDataSet(); foreach ($this->data as $key => $datum) { $dataSet->addPoint(new Point($datum['client_ip'], $datum['frequency'])); } $chart->setDataSet($dataSet); $chart->setTitle("Client Request Frequency Line Plot"); $chart->render("front-end/images/client_request_vertical_bar_plot.png"); $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name')); $graph = '<div style="text-align: center;"> <img src="front-end/images/client_request_vertical_bar_plot.png" alt="" border="0"> </div>'; $dom->whereIdIs("squidDataContainer")->insertNode($graph); $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name')); $tableFactory = HtmlElementsFactory::create("table"); $tableFactory->data = $this->data; $tableFactory->dataIds = array("client_ip", "frequency"); $tableFactory->openTable(); $tableFactory->addTheaderTitle("Client IP"); $tableFactory->addTheaderTitle("Frequency"); $tableFactory->renderTableData(); $tableFactory->closeTable(); $table = $tableFactory->render(); $dom->whereIdIs("squidDataContainer")->insertNode($table); $paginator = PaginatorFactory::create(); $paginator->action = "A_ReadClientIpWithFrequency"; $dom->whereIdIs('ul-pagination')->insertNode($paginator->paginationSelect); $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(ROLES_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'))->whereIdIs('table')->removeAttribute('style="display: none;"'); $trs = null; foreach ($this->data['roles'] as $key => $role) { $trs .= "<tr><td>" . $role["name"] . "</td>"; $trs .= "<td>" . $role["description"] . "</td>"; $trs .= "<td><a href='?role-id=" . $role["id"] . "&A_UpdateRoleForm'"; $trs .= "title='Update Role' class='button'>"; $trs .= "<i class='glyphicon glyphicon-pencil'></i></a> "; $trs .= "<a href='?role-id=" . $role["id"] . "&A_DeleteRoleConfirmation'"; $trs .= "title='Delete Role' class='button'>"; $trs .= "<i class='glyphicon glyphicon-trash'></i></a></td></tr>"; } $dom->whereIdIs("tbody")->insertNode($trs); $paginator = PaginatorFactory::create(); $paginator->action = "A_ReadRolesPaginated"; $dom->whereIdIs('ul-pagination')->insertNode($paginator->paginationSelect); $dom->display(); }
public function display() { $session = SessionFactory::create(); $clientIp = $session->get("selected-client-ip"); $date = $session->get("selected-date"); $beginTime = $this->data[0]['time']; $endTime = end($this->data)['time']; /*CHART*/ // $chart = new HorizontalBarChart(800,30000); $chart = new LineChart(3000, 500); $dataSet = new XYDataSet(); // $protocols = array('http://', 'https://', 'ftp://', 'www.'); foreach ($this->data as $key => $datum) { // $domain = explode('/', str_replace($protocols, '', $datum['url'])); $dataSet->addPoint(new Point("", $datum['frequency'])); } $chart->setDataSet($dataSet); $chart->getPlot()->setGraphPadding(new Padding(5, 3, 20, 140)); $chart->getPlot()->setLogoFileName(""); //clear the image logo $chart->setTitle(""); //clear the image title $chart->render("front-end/images/domains_request_horizontal_bar_plot.png"); /*CHART*/ $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name')); //INSERT TITLE: $title = "<h3>Client (" . $clientIp . ") Domains Request Frequency Bar Plot, at: " . $date . " between: " . $beginTime . " and " . $endTime . "</h3>"; $dom->whereIdIs("body-title")->insertNode($title); $graph = '<div style="text-align: center;"> <img src="front-end/images/domains_request_horizontal_bar_plot.png" alt="" border="0"> </div>'; $dom->whereIdIs("squidDataContainer")->insertNode($graph); $dom->display(); }
public function display() { $session = SessionFactory::create(); $clientIp = $session->get("selected-client-ip"); $date = $session->get("selected-date"); $beginTime = $this->data[0]['time']; $endTime = end($this->data)['time']; /*CHART*/ $chart = new LineChart(1400, 500); $serie1 = new XYDataSet(); foreach ($this->data as $key => $datum) { $serie1->addPoint(new Point("", $datum['client_data'])); } $dataSet = new XYSeriesDataSet(); $dataSet->addSerie("Client: " . $clientIp . " at " . $date, $serie1); $chart->setDataSet($dataSet); $chart->getPlot()->setGraphPadding(new Padding(5, 3, 20, 140)); $chart->setTitle(""); //clear the image title $chart->getPlot()->setLogoFileName(""); //clear the image logo $chart->render("front-end/images/client_data_line_plot.png"); /*CHART*/ //DOM: $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name')); //INSERT TITLE: $title = "<h3>Client (" . $clientIp . ") Data Consumption Line Chart, \n at: " . $date . " between: " . $beginTime . " and " . $endTime . "</h3>"; $dom->whereIdIs("body-title")->insertNode($title); //INSERT GRAPH: $graph = '<div style="text-align: center;"> <img src="front-end/images/client_data_line_plot.png" alt="" border="0"> </div>'; $dom->whereIdIs("squidDataContainer")->insertNode($graph); $dom->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(ROLES_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'))->whereIdIs('create-update-form')->removeAttribute('style="display: none;"')->whereIdIs('save-button')->insertAttribute('name="A_CreateRole"')->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(ROLES_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'))->whereIdIs('delete-form')->removeAttribute('style="display: none;"')->whereIdIs('confirm-delete-message')->insertNode('Delete the role: ' . $this->data['name'])->display(); }
public function display() { $session = SessionFactory::create(); $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(ROLES_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'))->whereIdIs('create-update-form')->removeAttribute('style="display: none;"')->whereIdIs('role-name')->insertAttribute('value = "' . $this->data['name'] . '"')->whereIdIs('role-description-txtarea')->insertNode($this->data['description'])->whereIdIs('save-button')->insertAttribute('name="A_UpdateRole"')->display(); }
public function display() { $dom = DOMHandlerFactory::create(); $dom->setDocumentFromFile(ACTIONS_ASSIGNMENT_HTML); $session = SessionFactory::create(); $dom->whereIdIs('login-user')->insertNode($session->get('session-user-name')); $dom->whereIdIs('message-container')->insertNode('Actions Assignment for: ' . $this->data['role-name']); $dom->whereIdIs('actions-search-form')->removeAttribute('style="display: none;"'); $dom->whereIdIs('actions-assignment-form')->removeAttribute('style="display: none;"'); $trs = null; foreach ($this->data['role-actions'] as $actionRole) { if ($actionRole['status'] == 1) { $trs .= '<tr><td><div class="checkbox"> <label> <b>' . $actionRole['name'] . '</b> </label> </td> <td><input name="selected-actions-names[]" type="checkbox" value="' . $actionRole['name'] . '" checked ></td> </div></tr>'; } elseif ($actionRole['status'] == 0) { $trs .= '<tr><td><div class="checkbox"> <label> <b>' . $actionRole['name'] . '</b> </label> </td> <td><input name="selected-actions-names[]" type="checkbox" value="' . $actionRole['name'] . '"></td> </div></tr>'; } } $dom->whereIdIs('tbody')->insertNode($trs); // foreach($this->data['role-actions'] as $actionRole) // { // if ($actionRole['status'] == 1) // { // $dom->whereIdIs('tbody') // ->insertNode( // '<tr><td><div class="checkbox"> // <label> // <b>'.$actionRole['name'].'</b> // </label> // </td> // <td><input name="selected-actions-names[]" // type="checkbox" // value="'.$actionRole['name'].'" checked // ></td> // </div></tr>' // ); // } // elseif($actionRole['status'] == 0) // { // $dom->whereIdIs('tbody') // ->insertNode( // '<tr><td><div class="checkbox"> // <label> // <b>'.$actionRole['name'].'</b> // </label> // </td> // <td><input name="selected-actions-names[]" // type="checkbox" // value="'.$actionRole['name'].'"></td> // </div></tr>' // ); // } // } $id = $session->get('selected-role-id'); $paginator = PaginatorFactory::create(); $paginator->action = "selected-role-id=" . $id . "&A_ReadActionsWithStatus"; $dom->whereIdIs('ul-pagination')->insertNode($paginator->paginationSelect); $dom->display(); }