Пример #1
0
 function listDirectory()
 {
     global $osC_Language, $toC_Json, $osC_MessageStack;
     $directory = OSC_ADMIN_FILE_MANAGER_ROOT_PATH;
     if (isset($_REQUEST['directory']) && !empty($_REQUEST['directory'])) {
         $directory .= '/' . urldecode($_REQUEST['directory']);
     } elseif (isset($_REQUEST['goto']) && !empty($_REQUEST['goto'])) {
         $directory .= '/' . urldecode($_REQUEST['goto']);
     }
     $osC_DirectoryListing = new osC_DirectoryListing($directory);
     $osC_DirectoryListing->setStats(true);
     $records = array();
     foreach ($osC_DirectoryListing->getFiles() as $file) {
         $file_owner = function_exists('posix_getpwuid') ? posix_getpwuid($file['user_id']) : '-?-';
         $group_owner = function_exists('posix_getgrgid') ? posix_getgrgid($file['group_id']) : '-?-';
         if ($file['is_directory'] === true) {
             $entry_icon = osc_icon('folder_red.png');
             $action = array(array('class' => 'icon-empty-record', 'qtip' => ''), array('class' => 'icon-empty-record', 'qtip' => ''), array('class' => 'icon-delete-record', 'qtip' => $osC_Language->get('icon_trash')));
         } else {
             $entry_icon = osc_icon('file.png');
             $action = array(array('class' => 'icon-edit-record', 'qtip' => $osC_Language->get('icon_edit')), array('class' => 'icon-download-record', 'qtip' => $osC_Language->get('icon_download')), array('class' => 'icon-delete-record', 'qtip' => $osC_Language->get('icon_trash')));
         }
         $records[] = array('icon' => $entry_icon, 'file_name' => $file['name'], 'is_directory' => $file['is_directory'], 'size' => number_format($file['size']), 'permission' => osc_get_file_permissions($file['permissions']), 'file_owner' => $file_owner, 'group_owner' => $group_owner, 'writeable' => osc_icon(is_writable($osC_DirectoryListing->getDirectory() . '/' . $file['name']) ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif'), 'last_modified_date' => osC_DateTime::getShort(osC_DateTime::fromUnixTimestamp($file['last_modified']), true), 'action' => $action);
     }
     $response = array(EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
Пример #2
0
 public function __construct()
 {
     Registry::get('Language')->loadIniFile('modules/Dashboard/Customers.php');
     $this->_title = OSCOM::getDef('admin_indexmodules_customers_title');
     $this->_title_link = OSCOM::getLink(null, 'Customers');
     if (Access::hasAccess(OSCOM::getSite(), 'Customers')) {
         $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_customers') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_date') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_status') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
         $Qcustomers = Registry::get('Database')->query('select customers_id, customers_gender, customers_lastname, customers_firstname, customers_status, date_account_created from :table_customers order by date_account_created desc limit 6');
         $Qcustomers->execute();
         $counter = 0;
         while ($Qcustomers->next()) {
             $customer_icon = osc_icon('people.png');
             if (ACCOUNT_GENDER > -1) {
                 switch ($Qcustomers->value('customers_gender')) {
                     case 'm':
                         $customer_icon = osc_icon('user_male.png');
                         break;
                     case 'f':
                         $customer_icon = osc_icon('user_female.png');
                         break;
                 }
             }
             $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td>' . osc_link_object(OSCOM::getLink(null, 'Customers', 'cID=' . $Qcustomers->valueInt('customers_id') . '&action=save'), $customer_icon . '&nbsp;' . $Qcustomers->valueProtected('customers_firstname') . ' ' . $Qcustomers->valueProtected('customers_lastname')) . '</td>' . '      <td>' . $Qcustomers->value('date_account_created') . '</td>' . '      <td align="center">' . osc_icon($Qcustomers->valueInt('customers_status') === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '</td>' . '    </tr>';
             $counter++;
         }
         $this->_data .= '  </tbody>' . '</table>';
     }
 }
Пример #3
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_customers_table_heading_customers') . '</th>' . '      <th>' . $osC_Language->get('summary_customers_table_heading_date') . '</th>' . '      <th>' . $osC_Language->get('summary_customers_table_heading_status') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
     $Qcustomers = $osC_Database->query('select customers_id, customers_gender, customers_lastname, customers_firstname, customers_status, date_account_created from :table_customers order by date_account_created desc limit 6');
     $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qcustomers->execute();
     $counter = 0;
     while ($Qcustomers->next()) {
         $customer_icon = osc_icon('people.png');
         if (ACCOUNT_GENDER > -1) {
             switch ($Qcustomers->value('customers_gender')) {
                 case 'm':
                     $customer_icon = osc_icon('user_male.png');
                     break;
                 case 'f':
                     $customer_icon = osc_icon('user_female.png');
                     break;
             }
         }
         $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td>' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, 'customers&cID=' . $Qcustomers->valueInt('customers_id') . '&action=save'), $customer_icon . '&nbsp;' . $Qcustomers->valueProtected('customers_firstname') . ' ' . $Qcustomers->valueProtected('customers_lastname')) . '</td>' . '      <td>' . $Qcustomers->value('date_account_created') . '</td>' . '      <td align="center">' . osc_icon($Qcustomers->valueInt('customers_status') === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '</td>' . '    </tr>';
         $counter++;
     }
     $this->_data .= '  </tbody>' . '</table>';
     $Qcustomers->freeResult();
 }
Пример #4
0
 function _setData()
 {
     global $osC_Database, $osC_Language, $osC_Currencies;
     if (!isset($osC_Currencies)) {
         if (!class_exists('osC_Currencies')) {
             include '../includes/classes/currencies.php';
         }
         $osC_Currencies = new osC_Currencies();
     }
     $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . $osC_Language->get('summary_products_table_heading_products') . '</th>' . '      <th>' . $osC_Language->get('summary_products_table_heading_price') . '</th>' . '      <th>' . $osC_Language->get('summary_products_table_heading_date') . '</th>' . '      <th>' . $osC_Language->get('summary_products_table_heading_status') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
     $Qproducts = $osC_Database->query('select products_id, greatest(products_date_added, products_last_modified) as date_last_modified from :table_products where parent_id = 0 order by date_last_modified desc limit 6');
     $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);
     $Qproducts->execute();
     while ($Qproducts->next()) {
         $data = osC_Products_Admin::get($Qproducts->valueInt('products_id'));
         $products_icon = osc_icon('products.png');
         $products_price = $data['products_price'];
         if (!empty($data['variants'])) {
             $products_icon = osc_icon('attach.png');
             $products_price = null;
             foreach ($data['variants'] as $variant) {
                 if ($products_price === null || $variant['data']['price'] < $products_price) {
                     $products_price = $variant['data']['price'];
                 }
             }
             if ($products_price === null) {
                 $products_price = 0;
             }
         }
         $this->_data .= '    <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . '      <td>' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, 'products=' . (int) $data['products_id'] . '&action=save'), $products_icon . '&nbsp;' . osc_output_string_protected($data['products_name'])) . '</td>' . '      <td>' . (!empty($data['variants']) ? 'from ' : '') . $osC_Currencies->format($products_price) . '</td>' . '      <td>' . $Qproducts->value('date_last_modified') . '</td>' . '      <td align="center">' . osc_icon((int) $data['products_status'] === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '</td>' . '    </tr>';
     }
     $this->_data .= '  </tbody>' . '</table>';
     $Qproducts->freeResult();
 }
 function listAdministratorsLog()
 {
     global $toC_Json, $osC_Database;
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $Qlog = $osC_Database->query('select SQL_CALC_FOUND_ROWS count(al.id) as total, al.id, al.module, al.module_action, al.module_id, al.action, a.user_name, unix_timestamp(al.datestamp) as datestamp from :table_administrators_log al, :table_administrators a where');
     if (!empty($_REQUEST['fm']) && in_array($_REQUEST['fm'], $_SESSION['admin']['access'])) {
         $Qlog->appendQuery('al.module = :module');
         $Qlog->bindValue(':module', $_REQUEST['fm']);
     } else {
         $Qlog->appendQuery('al.module in (":modules")');
         $Qlog->bindRaw(':modules', implode('", "', $_SESSION['admin']['access']));
     }
     $Qlog->appendQuery('and');
     if (is_numeric($_REQUEST['fu']) && !empty($_REQUEST['fu'])) {
         $Qlog->appendQuery('al.administrators_id = :administrators_id and');
         $Qlog->bindInt(':administrators_id', $_REQUEST['fu']);
     }
     $Qlog->appendQuery('al.administrators_id = a.id group by al.id order by al.id desc');
     $Qlog->bindTable(':table_administrators_log', TABLE_ADMINISTRATORS_LOG);
     $Qlog->bindTable(':table_administrators', TABLE_ADMINISTRATORS);
     $Qlog->setExtBatchLimit($start, $limit);
     $Qlog->execute();
     $records = array();
     while ($Qlog->next()) {
         $records[] = array('administrators_log_id' => $Qlog->valueInt('id'), 'administrators_id' => $Qlog->valueInt('administrators_id'), 'module' => $Qlog->value('module') . ' (' . $Qlog->valueInt('total') . ')', 'module_id' => $Qlog->valueInt('module_id'), 'module_action' => $Qlog->valueProtected('module_action'), 'user_name' => $Qlog->valueProtected('user_name'), 'date' => osC_DateTime::getShort(osC_DateTime::fromUnixTimestamp($Qlog->value('datestamp')), true), 'logo_info_title' => osc_icon('info.png') . ' ' . $Qlog->valueProtected('user_name') . ' &raquo; ' . $Qlog->valueProtected('module_action') . ' &raquo; ' . $Qlog->value('module') . ' &raquo; ' . $Qlog->valueInt('module_id'));
     }
     $Qlog->freeResult();
     $response = array(EXT_JSON_READER_TOTAL => $Qlog->getBatchSize(), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
 function renderData()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $records = array();
     $Qcustomers = $osC_Database->query('select count(*) as total from :table_customers');
     $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qcustomers->execute();
     $records[] = array('class' => osc_icon('people.png') . '&nbsp;' . $osC_Language->get('summary_statistics_text_customers'), 'number' => $Qcustomers->valueInt('total'), 'module' => 'customers');
     $Qcustomers->freeResult();
     $Qorders = $osC_Database->query('select count(*) as total from :table_orders');
     $Qorders->bindTable(':table_orders', TABLE_ORDERS);
     $Qorders->execute();
     $records[] = array('class' => osc_icon('orders.png') . '&nbsp;' . $osC_Language->get('summary_statistics_text_orders'), 'number' => $Qorders->valueInt('total'), 'module' => 'orders');
     $Qorders->freeResult();
     $Qproducts = $osC_Database->query('select count(*) as total from :table_products');
     $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);
     $Qproducts->execute();
     $records[] = array('class' => osc_icon('product.png') . '&nbsp;' . $osC_Language->get('summary_statistics_text_products'), 'number' => $Qproducts->valueInt('total'), 'module' => 'products');
     $Qproducts->freeResult();
     $Qreviews = $osC_Database->query('select count(*) as total from :table_reviews');
     $Qreviews->bindTable(':table_reviews', TABLE_REVIEWS);
     $Qreviews->execute();
     $records[] = array('class' => osc_icon('reviews.png') . '&nbsp;' . $osC_Language->get('summary_statistics_text_reviews'), 'number' => $Qreviews->valueInt('total'), 'module' => 'reviews');
     $Qreviews->freeResult();
     $response = array(EXT_JSON_READER_TOTAL => sizeof($records), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
Пример #7
0
 function listBestOrders()
 {
     global $osC_Database, $toC_Json;
     $Qorders = $osC_Database->query('select o.orders_id, o.customers_id, o.customers_name, ot.value, o.date_purchased from :table_orders o, :table_orders_total ot where o.orders_id = ot.orders_id and ot.class = :class ');
     if (!empty($_REQUEST['start_date'])) {
         $Qorders->appendQuery('and o.date_purchased >= :start_date ');
         $Qorders->bindValue(':start_date', $_REQUEST['start_date']);
     }
     if (!empty($_REQUEST['end_date'])) {
         $Qorders->appendQuery('and o.date_purchased <= :end_date ');
         $Qorders->bindValue(':end_date', $_REQUEST['end_date']);
     }
     $Qorders->appendQuery(' order by value desc');
     $Qorders->bindTable(':table_orders', TABLE_ORDERS);
     $Qorders->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
     $Qorders->bindValue(':class', 'total');
     $Qorders->setExtBatchLimit($start, MAX_DISPLAY_SEARCH_RESULTS);
     $Qorders->execute();
     $records = array();
     while ($Qorders->next()) {
         $records[] = array('orders_id' => $Qorders->ValueInt('orders_id'), 'customers_id' => $Qorders->ValueInt('customers_id'), 'customers_name' => osc_icon('orders.png') . '&nbsp;' . $Qorders->Value('customers_name'), 'date_purchased' => osC_DateTime::getShort($Qorders->value('date_purchased'), true), 'value' => (double) $Qorders->Value('value'));
     }
     $response = array(EXT_JSON_READER_TOTAL => $Qorders->getBatchSize(), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
Пример #8
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>';
 }
Пример #9
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_reviews_table_heading_products') . '</th>' . '      <th>' . $osC_Language->get('summary_reviews_table_heading_language') . '</th>' . '      <th>' . $osC_Language->get('summary_reviews_table_heading_rating') . '</th>' . '      <th>' . $osC_Language->get('summary_reviews_table_heading_date') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
     $Qreviews = $osC_Database->query('select r.reviews_id, r.products_id, greatest(r.date_added, greatest(r.date_added, r.last_modified)) as date_last_modified, r.reviews_rating, pd.products_name, l.name as languages_name, l.code as languages_code from :table_reviews r left join :table_products_description pd on (r.products_id = pd.products_id and r.languages_id = pd.language_id), :table_languages l where r.languages_id = l.languages_id order by date_last_modified desc limit 6');
     $Qreviews->bindTable(':table_reviews', TABLE_REVIEWS);
     $Qreviews->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
     $Qreviews->bindTable(':table_languages', TABLE_LANGUAGES);
     $Qreviews->execute();
     while ($Qreviews->next()) {
         $this->_data .= '    <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . '      <td>' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, 'reviews&rID=' . $Qreviews->valueInt('reviews_id') . '&action=save'), osc_icon('reviews.png') . '&nbsp;' . $Qreviews->value('products_name')) . '</td>' . '      <td align="center">' . $osC_Language->showImage($Qreviews->value('languages_code')) . '</td>' . '      <td align="center">' . osc_image('../images/stars_' . $Qreviews->valueInt('reviews_rating') . '.png', $Qreviews->valueInt('reviews_rating') . '/5') . '</td>' . '      <td>' . $Qreviews->value('date_last_modified') . '</td>' . '    </tr>';
     }
     $this->_data .= '  </tbody>' . '</table>';
     $Qreviews->freeResult();
 }
Пример #10
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_administrators_log_table_heading_users') . '</th>' . '      <th>' . $osC_Language->get('summary_administrators_log_table_heading_module') . '</th>' . '      <th>' . $osC_Language->get('summary_administrators_log_table_heading_date') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
     $Qlog = $osC_Database->query('select count(al.id) as total, al.id, al.module, a.user_name, al.datestamp from :table_administrators_log al, :table_administrators a where al.module in (":modules") and al.administrators_id = a.id group by al.id order by al.id desc limit 6');
     $Qlog->bindTable(':table_administrators_log', TABLE_ADMINISTRATORS_LOG);
     $Qlog->bindTable(':table_administrators', TABLE_ADMINISTRATORS);
     $Qlog->bindRaw(':modules', implode('", "', $_SESSION['admin']['access']));
     $Qlog->execute();
     while ($Qlog->next()) {
         $this->_data .= '    <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . '      <td>' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, 'administrators_log&lID=' . $Qlog->valueInt('id') . '&action=info'), osc_icon('log.png') . '&nbsp;' . $Qlog->valueProtected('user_name')) . '</td>' . '      <td>' . $Qlog->value('module') . ' (' . $Qlog->valueInt('total') . ')</td>' . '      <td>' . $Qlog->value('datestamp') . '</td>' . '    </tr>';
     }
     $this->_data .= '  </tbody>' . '</table>';
     $Qlog->freeResult();
 }
Пример #11
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_orders_table_heading_orders') . '</th>' . '      <th>' . $osC_Language->get('summary_orders_table_heading_total') . '</th>' . '      <th>' . $osC_Language->get('summary_orders_table_heading_date') . '</th>' . '      <th>' . $osC_Language->get('summary_orders_table_heading_status') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
     $Qorders = $osC_Database->query('select o.orders_id, o.customers_name, greatest(o.date_purchased, ifnull(o.last_modified, "1970-01-01")) as date_last_modified, s.orders_status_name, ot.text as order_total from :table_orders o, :table_orders_total ot, :table_orders_status s where o.orders_id = ot.orders_id and ot.class = "total" and o.orders_status = s.orders_status_id and s.language_id = :language_id order by date_last_modified desc limit 6');
     $Qorders->bindTable(':table_orders', TABLE_ORDERS);
     $Qorders->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
     $Qorders->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
     $Qorders->bindInt(':language_id', $osC_Language->getID());
     $Qorders->execute();
     while ($Qorders->next()) {
         $this->_data .= '    <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . '      <td>' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, 'orders&oID=' . $Qorders->valueInt('orders_id') . '&action=save'), osc_icon('orders.png') . '&nbsp;' . $Qorders->valueProtected('customers_name')) . '</td>' . '      <td>' . strip_tags($Qorders->value('order_total')) . '</td>' . '      <td>' . $Qorders->value('date_last_modified') . '</td>' . '      <td>' . $Qorders->value('orders_status_name') . '</td>' . '    </tr>';
     }
     $this->_data .= '  </tbody>' . '</table>';
     $Qorders->freeResult();
 }
Пример #12
0
 public function __construct()
 {
     Registry::get('Language')->loadIniFile('modules/Dashboard/Reviews.php');
     $this->_title = OSCOM::getDef('admin_indexmodules_reviews_title');
     $this->_title_link = OSCOM::getLink(null, 'Reviews');
     if (Access::hasAccess(OSCOM::getSite(), 'Reviews')) {
         $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . OSCOM::getDef('admin_indexmodules_reviews_table_heading_products') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_reviews_table_heading_language') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_reviews_table_heading_rating') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_reviews_table_heading_date') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
         $Qreviews = Registry::get('Database')->query('select r.reviews_id, r.products_id, greatest(r.date_added, greatest(r.date_added, r.last_modified)) as date_last_modified, r.reviews_rating, pd.products_name, l.name as languages_name, l.code as languages_code from :table_reviews r left join :table_products_description pd on (r.products_id = pd.products_id and r.languages_id = pd.language_id), :table_languages l where r.languages_id = l.languages_id order by date_last_modified desc limit 6');
         $Qreviews->execute();
         $counter = 0;
         while ($Qreviews->next()) {
             $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td>' . osc_link_object(OSCOM::getLink(null, 'Reviews', 'rID=' . $Qreviews->valueInt('reviews_id') . '&action=save'), osc_icon('reviews.png') . '&nbsp;' . $Qreviews->value('products_name')) . '</td>' . '      <td align="center">' . Registry::get('Language')->showImage($Qreviews->value('languages_code')) . '</td>' . '      <td align="center">' . osc_image('../images/stars_' . $Qreviews->valueInt('reviews_rating') . '.png', $Qreviews->valueInt('reviews_rating') . '/5') . '</td>' . '      <td>' . $Qreviews->value('date_last_modified') . '</td>' . '    </tr>';
             $counter++;
         }
         $this->_data .= '  </tbody>' . '</table>';
     }
 }
Пример #13
0
 public function __construct()
 {
     Registry::get('Language')->loadIniFile('modules/Dashboard/Orders.php');
     $this->_title = OSCOM::getDef('admin_indexmodules_orders_title');
     $this->_title_link = OSCOM::getLink(null, 'Orders');
     if (Access::hasAccess(OSCOM::getSite(), 'Orders')) {
         $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . OSCOM::getDef('admin_indexmodules_orders_table_heading_orders') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_orders_table_heading_total') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_orders_table_heading_date') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_orders_table_heading_status') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
         $Qorders = Registry::get('Database')->query('select o.orders_id, o.customers_name, greatest(o.date_purchased, ifnull(o.last_modified, "1970-01-01")) as date_last_modified, s.orders_status_name, ot.text as order_total from :table_orders o, :table_orders_total ot, :table_orders_status s where o.orders_id = ot.orders_id and ot.class = "total" and o.orders_status = s.orders_status_id and s.language_id = :language_id order by date_last_modified desc limit 6');
         $Qorders->bindInt(':language_id', Registry::get('Language')->getID());
         $Qorders->execute();
         $counter = 0;
         while ($Qorders->next()) {
             $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td>' . osc_link_object(OSCOM::getLink(null, 'Orders', 'oID=' . $Qorders->valueInt('orders_id') . '&action=save'), osc_icon('orders.png') . '&nbsp;' . $Qorders->valueProtected('customers_name')) . '</td>' . '      <td>' . strip_tags($Qorders->value('order_total')) . '</td>' . '      <td>' . $Qorders->value('date_last_modified') . '</td>' . '      <td>' . $Qorders->value('orders_status_name') . '</td>' . '    </tr>';
             $counter++;
         }
         $this->_data .= '  </tbody>' . '</table>';
     }
 }
Пример #14
0
 public function __construct()
 {
     Registry::get('Language')->loadIniFile('modules/IndexModules/AdministratorsLog.php');
     $this->_title = OSCOM::getDef('admin_indexmodules_administratorslog_title');
     $this->_title_link = OSCOM::getLink(null, 'AdministratorsLog');
     if (Access::hasAccess(OSCOM::getSite(), 'AdministratorsLog')) {
         $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . OSCOM::getDef('admin_indexmodules_administratorslog_table_heading_users') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_administratorslog_table_heading_module') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_administratorslog_table_heading_date') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
         $Qlog = Registry::get('Database')->query('select count(al.id) as total, al.id, al.module, a.user_name, al.datestamp from :table_administrators_log al, :table_administrators a where al.module in (":modules") and al.administrators_id = a.id group by al.id order by al.id desc limit 6');
         $Qlog->bindRaw(':modules', implode('", "', array_keys($_SESSION[OSCOM::getSite()]['access'])));
         $Qlog->execute();
         $counter = 0;
         while ($Qlog->next()) {
             $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td>' . osc_link_object(OSCOM::getLink(null, 'AdministratorsLog&lID=' . $Qlog->valueInt('id') . '&action=info'), osc_icon('log.png') . '&nbsp;' . $Qlog->valueProtected('user_name')) . '</td>' . '      <td>' . $Qlog->value('module') . ' (' . $Qlog->valueInt('total') . ')</td>' . '      <td>' . $Qlog->value('datestamp') . '</td>' . '    </tr>';
             $counter++;
         }
         $this->_data .= '  </tbody>' . '</table>';
     }
 }
Пример #15
0
 public function __construct()
 {
     Registry::get('Language')->loadIniFile('modules/IndexModules/ErrorLog.php');
     $this->_title = OSCOM::getDef('admin_indexmodules_errorlog_title');
     $this->_title_link = OSCOM::getLink(null, 'ErrorLog');
     if (Access::hasAccess(OSCOM::getSite(), 'ErrorLog')) {
         $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . OSCOM::getDef('admin_indexmodules_errorlog_table_heading_date') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_errorlog_table_heading_message') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
         if (ErrorHandler::getTotalEntries() > 0) {
             $counter = 0;
             foreach (ErrorHandler::getAll(6) as $row) {
                 $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td style="white-space: nowrap;">' . Registry::get('Template')->getIcon(16, 'errorlog.png') . '&nbsp;' . DateTime::getShort(DateTime::fromUnixTimestamp($row['timestamp']), true) . '</td>' . '      <td>' . osc_output_string_protected(substr($row['message'], 0, 60)) . '..</td>' . '    </tr>';
                 $counter++;
             }
         } else {
             $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');">' . '      <td colspan="2">' . osc_icon('tick.png') . '&nbsp;' . OSCOM::getDef('admin_indexmodules_errorlog_no_errors_found') . '</td>' . '    </tr>';
         }
         $this->_data .= '  </tbody>' . '</table>';
     }
 }
Пример #16
0
 function renderData()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $QorderStatus = $osC_Database->query('select orders_status_id, orders_status_name from :table_orders_status where language_id = :language_id');
     $QorderStatus->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
     $QorderStatus->bindInt(':language_id', $osC_Language->getID());
     $QorderStatus->execute();
     $records = array();
     while ($QorderStatus->next()) {
         $QorderTotal = $osC_Database->query('select count(*) as total from :table_orders where orders_status = :orders_status');
         $QorderTotal->bindTable(':table_orders', TABLE_ORDERS);
         $QorderTotal->bindInt(':orders_status', $QorderStatus->valueInt('orders_status_id'));
         $QorderTotal->execute();
         $records[] = array('orders_status' => osc_icon('orders.png') . '&nbsp;' . $QorderStatus->value('orders_status_name'), 'number' => $QorderTotal->valueInt('total'));
         $QorderTotal->freeResult();
     }
     $QorderStatus->freeResult();
     $response = array(EXT_JSON_READER_TOTAL => sizeof($records), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
Пример #17
0
 public function get($group)
 {
     $result = false;
     if ($this->exists($group)) {
         $data = array();
         foreach ($this->_data[$group] as $message) {
             $data['messageStack' . ucfirst($message['type'])][] = $message['text'];
         }
         $result = '';
         foreach ($data as $type => $messages) {
             $result .= '<div class="' . osc_output_string_protected($type) . '" onmouseover="$(this).find(\'span:first\').show();" onmouseout="$(this).find(\'span:first\').hide();"><span style="float: right; display: none;"><a href="#" onclick="$(this).parent().parent().slideFadeToggle();">' . osc_icon('minimize.png', 'Hide') . '</a></span>';
             foreach ($messages as $message) {
                 $result .= '<p>' . osc_output_string_protected($message) . '</p>';
             }
             $result .= '</div>';
         }
         unset($this->_data[$group]);
     }
     return $result;
 }
Пример #18
0
 function listMessages()
 {
     global $toC_Json, $osC_Database;
     $max_execution_time = ini_get('max_execution_time');
     ini_set('max_execution_time', 1800);
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $toC_Email_Account = new toC_Email_Account($_REQUEST['accounts_id']);
     if (isset($_REQUEST['check_email']) && $_REQUEST['check_email'] == 'true' || $toC_Email_Account->isImap()) {
         $toC_Email_Account->fetchEmail($_REQUEST['folders_id']);
     }
     $Qmessages = $osC_Database->query('select * from :table_email_messages where accounts_id = :accounts_id and folders_id = :folders_id');
     $Qmessages->bindTable(':table_email_messages', TABLE_EMAIL_MESSAGES);
     $Qmessages->bindInt(':accounts_id', $toC_Email_Account->getAccountId());
     $Qmessages->bindInt(':folders_id', $_REQUEST['folders_id']);
     if (isset($_REQUEST['search']) && !empty($_REQUEST['search'])) {
         $Qmessages->appendQuery('and (subject like :subject or from_address like :from)');
         $Qmessages->bindValue(':subject', '%' . $_REQUEST['search'] . '%');
         $Qmessages->bindValue(':from', '%' . $_REQUEST['search'] . '%');
     }
     $Qmessages->appendQuery('order by id desc');
     $Qmessages->setExtBatchLimit($start, $limit);
     $Qmessages->execute();
     $day_start = mktime(0, 0, 0);
     $day_end = mktime(0, 0, 0, date('m'), date('d') + 1);
     $records = array();
     while ($Qmessages->next()) {
         $date = $Qmessages->value('udate');
         if ($date > $day_start && $date < $day_end) {
             $date = date('H:i', $date);
         } else {
             $date = osC_DateTime::getShort(osC_DateTime::fromUnixTimestamp($date));
         }
         $records[] = array('id' => $Qmessages->valueInt('id'), 'fetch_time' => $Qmessages->value('fetch_timestamp'), 'attachments' => $Qmessages->valueInt('attachments'), 'icon' => $Qmessages->valueInt('attachments') == 1 ? osc_icon('email_attachment.png') : '', 'new' => $Qmessages->valueInt('new'), 'subject' => $Qmessages->value('subject'), 'from_address' => htmlentities($Qmessages->value('from_address'), ENT_QUOTES, 'UTF-8'), 'size' => $Qmessages->valueInt('size'), 'sender' => $Qmessages->value('reply_to'), 'date' => $date, 'priority' => $Qmessages->valueInt('priority'), 'messages_flag' => $Qmessages->valueInt('messages_flag'));
     }
     $response = array(EXT_JSON_READER_TOTAL => $Qmessages->getBatchSize(), EXT_JSON_READER_ROOT => $records, 'unseen' => toC_Email_Accounts_Admin::getNewMessagesAmount($_REQUEST['accounts_id'], $_REQUEST['folders_id']));
     ini_set('max_execution_time', $max_execution_time);
     echo $toC_Json->encode($response);
 }
Пример #19
0
 public function __construct()
 {
     Registry::get('Language')->loadIniFile('modules/Dashboard/Products.php');
     $this->_title = OSCOM::getDef('admin_indexmodules_products_title');
     $this->_title_link = OSCOM::getLink(null, 'Products');
     if (Access::hasAccess(OSCOM::getSite(), 'Products')) {
         if (!isset($osC_Currencies)) {
             if (!class_exists('osC_Currencies')) {
                 include 'includes/classes/currencies.php';
             }
             $osC_Currencies = new osC_Currencies();
         }
         $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . OSCOM::getDef('admin_indexmodules_products_table_heading_products') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_products_table_heading_price') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_products_table_heading_date') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_products_table_heading_status') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
         $Qproducts = Registry::get('PDO')->query('select products_id, greatest(products_date_added, products_last_modified) as date_last_modified from :table_products where parent_id is null order by date_last_modified desc limit 6');
         $Qproducts->execute();
         $counter = 0;
         while ($Qproducts->fetch()) {
             $data = osC_Products_Admin::get($Qproducts->valueInt('products_id'));
             $products_icon = osc_icon('products.png');
             $products_price = $data['products_price'];
             if (!empty($data['variants'])) {
                 $products_icon = osc_icon('attach.png');
                 $products_price = null;
                 foreach ($data['variants'] as $variant) {
                     if ($products_price === null || $variant['data']['price'] < $products_price) {
                         $products_price = $variant['data']['price'];
                     }
                 }
                 if ($products_price === null) {
                     $products_price = 0;
                 }
             }
             $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td>' . osc_link_object(OSCOM::getLink(null, 'Products', 'id=' . (int) $data['products_id'] . '&action=save'), $products_icon . '&nbsp;' . osc_output_string_protected($data['products_name'])) . '</td>' . '      <td>' . (!empty($data['variants']) ? 'from ' : '') . $osC_Currencies->format($products_price) . '</td>' . '      <td>' . $Qproducts->value('date_last_modified') . '</td>' . '      <td align="center">' . osc_icon((int) $data['products_status'] === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '</td>' . '    </tr>';
             $counter++;
         }
         $this->_data .= '  </tbody>' . '</table>';
     }
 }
Пример #20
0
 function renderData()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $Qcustomers = $osC_Database->query('select customers_id, customers_gender, customers_lastname, customers_firstname, customers_status, date_account_created from :table_customers order by date_account_created desc limit 6');
     $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qcustomers->execute();
     $records = array();
     while ($Qcustomers->next()) {
         $customer_icon = osc_icon('people.png');
         if (ACCOUNT_GENDER > -1) {
             switch ($Qcustomers->value('customers_gender')) {
                 case 'm':
                     $customer_icon = osc_icon('user_male.png');
                     break;
                 case 'f':
                     $customer_icon = osc_icon('user_female.png');
                     break;
             }
         }
         $records[] = array('customers_name' => $customer_icon . '&nbsp;' . $Qcustomers->valueProtected('customers_firstname') . ' ' . $Qcustomers->valueProtected('customers_lastname'), 'date_account_created' => osC_DateTime::getShort($Qcustomers->value('date_account_created')), 'customers_status' => osc_icon($Qcustomers->valueInt('customers_status') === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif'));
     }
     $response = array(EXT_JSON_READER_TOTAL => sizeof($records), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
Пример #21
0
$module = new $module();
?>

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

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

<div class="infoBoxHeading"><?php 
echo osc_icon('edit.png') . ' ' . $module->getTitle();
?>
</div>
<div class="infoBoxContent">
  <form name="mEdit" action="<?php 
echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&module=' . $module->getCode() . '&action=save');
?>
" method="post">

  <p><?php 
echo $osC_Language->get('introduction_edit_shipping_module');
?>
</p>

<?php 
$keys = '';
Пример #22
0
 function getBatchNextPageLink($batch_keyword = 'page', $parameters = '')
 {
     global $osC_Language;
     $number_of_pages = ceil($this->batch_size / $this->batch_rows);
     $get_parameter = '';
     if (!empty($parameters)) {
         $parameters = explode('&', $parameters);
         foreach ($parameters as $parameter) {
             $keys = explode('=', $parameter, 2);
             if ($keys[0] != $batch_keyword) {
                 $get_parameter .= $keys[0] . (isset($keys[1]) ? '=' . $keys[1] : '') . '&';
             }
         }
     }
     if (defined('OSC_IN_ADMIN') && OSC_IN_ADMIN === true) {
         $forward_string = osc_icon('nav_forward.png');
         $forward_grey_string = osc_icon('nav_forward_grey.png');
     } else {
         $forward_string = $osC_Language->get('result_set_next_page');
         $forward_grey_string = $osC_Language->get('result_set_next_page');
     }
     $string = '&nbsp;';
     if ($this->batch_number < $number_of_pages && $number_of_pages != 1) {
         $string .= osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $get_parameter . $batch_keyword . '=' . ($this->batch_number + 1)), $forward_string);
     } else {
         $string .= $forward_grey_string;
     }
     return $string;
 }
Пример #23
0
?>

<h1><?php 
echo $OSCOM_Template->getIcon(32) . osc_link_object(OSCOM::getLink(), $OSCOM_Template->getPageTitle());
?>
</h1>

<?php 
if ($OSCOM_MessageStack->exists()) {
    echo $OSCOM_MessageStack->get();
}
?>

<div class="infoBox">
  <h3><?php 
echo osc_icon('trash.png') . ' ' . OSCOM::getDef('action_heading_batch_delete_administrators');
?>
</h3>

  <form name="aDeleteBatch" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'BatchDelete&Process');
?>
" method="post">

  <p><?php 
echo OSCOM::getDef('introduction_batch_delete_administrators');
?>
</p>

<?php 
$Qadmins = $OSCOM_Database->query('select id, user_name from :table_administrators where id in (":id") order by user_name');
Пример #24
0
 function listOrdersStatus()
 {
     global $toC_Json;
     $osC_Order = new osC_Order($_REQUEST['orders_id']);
     $records = array();
     foreach ($osC_Order->getStatusHistory() as $status_history) {
         $records[] = array('date_added' => osC_DateTime::getShort($status_history['date_added'], true), 'status' => $status_history['status'], 'comments' => nl2br($status_history['comment']), 'customer_notified' => osc_icon($status_history['customer_notified'] === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif'), 'sms_customer_notified' => osc_icon($status_history['sms_customer_notified'] === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif'));
     }
     $response = array(EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
Пример #25
0
</td>
      <td align="right">

<?php 
        if ($module->isInstalled()) {
            echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&module=' . $module->getCode() . '&action=save'), osc_icon('edit.png')) . '&nbsp;' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&module=' . $module->getCode() . '&action=uninstall'), osc_icon('uninstall.png'));
        } else {
            echo osc_image('images/pixel_trans.gif', '', '16', '16') . '&nbsp;' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&module=' . $module->getCode() . '&action=install'), osc_icon('install.png'));
        }
        ?>

      </td>
    </tr>

<?php 
    }
}
?>

  </tbody>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
    <td style="opacity: 0.5; filter: alpha(opacity=50);"><?php 
echo '<b>' . $osC_Language->get('table_action_legend') . '</b> ' . osc_icon('edit.png') . '&nbsp;' . $osC_Language->get('icon_edit') . '&nbsp;&nbsp;' . osc_icon('install.png') . '&nbsp;' . $osC_Language->get('icon_install') . '&nbsp;&nbsp;' . osc_icon('uninstall.png') . '&nbsp;' . $osC_Language->get('icon_uninstall');
?>
</td>
  </tr>
</table>
Пример #26
0
 function listCustomers()
 {
     global $toC_Json, $osC_Database;
     $osC_Currencies = new osC_Currencies_Admin();
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $Qcustomers = $osC_Database->query('select * from :table_customers');
     if (isset($_REQUEST['filter']) && !empty($_REQUEST['filter'])) {
         $Qcustomers->appendQuery(' where customers_firstname like :customers_firstname or customers_lastname like :customers_lastname');
         $Qcustomers->bindValue(':customers_firstname', '%' . $_REQUEST['filter'] . '%');
         $Qcustomers->bindValue(':customers_lastname', '%' . $_REQUEST['filter'] . '%');
     }
     $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qcustomers->setExtBatchLimit($start, $limit);
     $Qcustomers->execute();
     $records = array();
     while ($Qcustomers->next()) {
         switch ($Qcustomers->value('customers_gender')) {
             case 'm':
                 $customer_icon = osc_icon('user_male.png');
                 break;
             case 'f':
                 $customer_icon = osc_icon('user_female.png');
                 break;
             default:
                 $customer_icon = osc_icon('people.png');
         }
         $records[] = array('customers_id' => $Qcustomers->value('customers_id'), 'customers_firstname' => $Qcustomers->value('customers_firstname'), 'customers_lastname' => $Qcustomers->value('customers_lastname'), 'customers_email_address' => $Qcustomers->value('customers_email_address'), 'customers_gender' => $customer_icon, 'customers_credits' => $osC_Currencies->format($Qcustomers->value('customers_credits')));
     }
     $response = array(EXT_JSON_READER_TOTAL => $Qcustomers->getBatchSize(), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
 function listLog()
 {
     global $toC_Json, $osC_Database;
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $Qlog = $osC_Database->query('select email_address, date_sent from :table_newsletters_log where newsletters_id = :newsletters_id order by date_sent desc');
     $Qlog->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
     $Qlog->bindInt(':newsletters_id', $_REQUEST['newsletters_id']);
     $Qlog->setExtBatchLimit($start, $limit);
     $Qlog->execute();
     $records = array();
     while ($Qlog->next()) {
         $records[] = array('email_address' => $Qlog->valueProtected('email_address'), 'sent' => osc_icon(!osc_empty($Qlog->value('date_sent')) ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null), 'date_sent' => osC_DateTime::getShort($Qlog->value('date_sent'), true));
     }
     $Qlog->freeResult();
     $response = array(EXT_JSON_READER_TOTAL => $Qlog->getBatchSize(), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
Пример #28
0
$osC_ObjectInfo = new osC_ObjectInfo(osC_ZoneGroups_Admin::get($_GET['zID']));
?>

<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('edit.png') . ' ' . $osC_ObjectInfo->getProtected('geo_zone_name');
?>
</div>
<div class="infoBoxContent">
  <form name="zEdit" class="dataForm" action="<?php 
echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&zID=' . $osC_ObjectInfo->getInt('geo_zone_id') . '&action=save');
?>
" method="post">

  <p><?php 
echo $osC_Language->get('introduction_edit_zone_group');
?>
</p>

  <fieldset>
    <div><label for="zone_name"><?php 
Пример #29
0
  var classEditLink = '<?php 
echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&tcID=CLASSID&action=save');
?>
';
  var classEditLinkIcon = '<?php 
echo osc_icon('edit.png');
?>
';

  var classDeleteLink = '<?php 
echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&tcID=CLASSID&action=delete');
?>
';
  var classDeleteLinkIcon = '<?php 
echo osc_icon('trash.png');
?>
';

  var osC_DataTable = new osC_DataTable();
  osC_DataTable.load();

  function feedDataTable(data) {
    var rowCounter = 0;

    for ( var r in data.entries ) {
      var record = data.entries[r];

      var newRow = $('#' + dataTableName)[0].tBodies[0].insertRow(rowCounter);
      newRow.id = 'row' + parseInt(record.tax_class_id);
Пример #30
0
$osC_ObjectInfo = new osC_ObjectInfo(osC_Currencies_Admin::get($_GET['cID']));
?>

<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_ObjectInfo->getProtected('title');
?>
</div>
<div class="infoBoxContent">

  <form name="cDelete" class="dataForm" action="<?php 
echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cID=' . $osC_ObjectInfo->getInt('currencies_id') . '&action=delete');
?>
" method="post">

<?php 
if ($osC_ObjectInfo->get('code') == DEFAULT_CURRENCY) {
    ?>

  <p><?php 
    echo '<b>' . $osC_Language->get('introduction_delete_currency_invalid') . '</b>';