示例#1
0
 public function __construct()
 {
     global $osC_Language, $osC_MessageStack;
     parent::__construct();
     $this->_page_contents = 'delete.php';
     if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
         if (osC_ErrorLog_Admin::delete()) {
             $osC_MessageStack->add($this->_module, $osC_Language->get('ms_success_action_performed'), 'success');
         } else {
             $osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_action_not_performed'), 'error');
         }
         osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module));
     }
 }
示例#2
0
 function _setData()
 {
     global $osC_Database, $osC_Language;
     $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . $osC_Language->get('summary_error_log_table_heading_date') . '</th>' . '      <th>' . $osC_Language->get('summary_error_log_table_heading_message') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
     $counter = 0;
     foreach (osc_toObjectInfo(osC_ErrorLog_Admin::getAll())->get('entries') as $log) {
         $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td style="white-space: nowrap;">' . osc_icon('error.png') . '&nbsp;' . osc_output_string_protected($log['date']) . '</td>' . '      <td>' . osc_output_string_protected(substr($log['message'], 0, 60)) . '..</td>' . '    </tr>';
         $counter++;
         if ($counter == 6) {
             break;
         }
     }
     $this->_data .= '  </tbody>' . '</table>';
 }
示例#3
0
 public static function getAll()
 {
     if (!isset($_GET['search'])) {
         $_GET['search'] = '';
     }
     if (!isset($_GET['page']) || !is_numeric($_GET['page'])) {
         $_GET['page'] = 1;
     }
     if (!empty($_GET['search'])) {
         $result = osC_ErrorLog_Admin::find($_GET['search'], $_GET['page']);
     } else {
         $result = osC_ErrorLog_Admin::getAll($_GET['page']);
     }
     $result['rpcStatus'] = RPC_STATUS_SUCCESS;
     echo json_encode($result);
 }
示例#4
0
<?php

/*
  $Id: $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2009 osCommerce

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/
$osC_ObjectInfo = new osC_ObjectInfo(osC_ErrorLog_Admin::getAll(-1));
?>

<h1><?php 
echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle());
?>
</h1>

<?php 
if ($osC_MessageStack->exists($osC_Template->getModule())) {
    echo $osC_MessageStack->get($osC_Template->getModule());
}
?>

<div class="infoBoxHeading"><?php 
echo osc_icon('trash.png') . ' ' . $osC_Language->get('title_delete_error_log');
?>