当前位置: 首页>>代码示例>>PHP>>正文


PHP osC_DateTime::getShort方法代码示例

本文整理汇总了PHP中osC_DateTime::getShort方法的典型用法代码示例。如果您正苦于以下问题:PHP osC_DateTime::getShort方法的具体用法?PHP osC_DateTime::getShort怎么用?PHP osC_DateTime::getShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在osC_DateTime的用法示例。


在下文中一共展示了osC_DateTime::getShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: listPolls

 function listPolls()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $Qpolls = $osC_Database->query('select p.polls_id, p.polls_type, p.polls_status, p.votes_count, p.date_added, pd.polls_title from :table_polls p left join :table_polls_description pd on (p.polls_id = pd.polls_id and pd.languages_id = :languages_id)');
     $Qpolls->bindTable(':table_polls', TABLE_POLLS);
     $Qpolls->bindTable(':table_polls_description', TABLE_POLLS_DESCRIPTION);
     $Qpolls->bindInt(':languages_id', $osC_Language->getID());
     if (isset($_REQUEST['search']) && !empty($_REQUEST['search'])) {
         $Qpolls->appendQuery('where pd.polls_title like :polls_title');
         $Qpolls->bindValue(':polls_title', '%' . $_REQUEST['search'] . '%');
     }
     $Qpolls->appendQuery('order by pd.polls_title');
     $Qpolls->setExtBatchLimit($start, $limit);
     $Qpolls->execute();
     $records = array();
     while ($Qpolls->next()) {
         $polls_info = '<table width="100%" CELLSPACING="5" style="margin-left: 50px">' . '<tbody>' . '<tr>
             <td width="120">' . $osC_Language->get('field_polls_type') . '</td>
             <td>' . ($Qpolls->valueInt('polls_type') == '0' ? $osC_Language->get('field_polls_single_choice') : $osC_Language->get('field_polls_multiple_choice')) . '</td>
           </tr>' . '<tr>
             <td>' . $osC_Language->get('field_polls_number_of_responses') . '</td>
             <td>' . $Qpolls->value('votes_count') . '</td>
           </tr>' . '<tr>
             <td>' . $osC_Language->get('field_polls_date_created') . '</td>
             <td>' . osC_DateTime::getShort($Qpolls->value('date_added')) . '</td>
           </tr>' . '</tbody>' . '</table>';
         $records[] = array('polls_id' => $Qpolls->valueInt('polls_id'), 'polls_title' => $Qpolls->value('polls_title'), 'polls_status' => $Qpolls->valueInt('polls_status'), 'polls_info' => $polls_info);
     }
     $Qpolls->freeResult();
     $response = array(EXT_JSON_READER_TOTAL => $Qpolls->getBatchSize(), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:34,代码来源:polls.php

示例2: buildMessage

 function buildMessage()
 {
     global $osC_Database, $osC_Language, $osC_Currencies;
     $Qorder = $osC_Database->query('select * from :table_orders where orders_id = :orders_id limit 1');
     $Qorder->bindTable(':table_orders', TABLE_ORDERS);
     $Qorder->bindInt(':orders_id', $this->_order_id);
     $Qorder->execute();
     if ($Qorder->numberOfRows() === 1) {
         $order_number = $this->_order_id;
         $date_ordered = osC_DateTime::getShort();
         $payment_method = $Qorder->value('payment_method');
         $customer_name = $Qorder->value('billing_name');
         $customer_phone = $Qorder->value('billing_telephone');
         $Qstatus = $osC_Database->query('select orders_status_name from :table_orders_status where orders_status_id = :orders_status_id and language_id = :language_id');
         $Qstatus->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
         $Qstatus->bindInt(':orders_status_id', $Qorder->valueInt('orders_status'));
         $Qstatus->bindInt(':language_id', $osC_Language->getID());
         $Qstatus->execute();
         $order_status = $Qstatus->value('orders_status_name');
         unset($Qstatus);
         $replaces = array($order_number, $date_ordered, $payment_method, $customer_name, $order_status, STORE_NAME);
         $this->_sms_text = str_replace($this->_keywords, $replaces, $this->_content);
         $this->addRecipient($customer_phone);
     }
     unset($Qorder);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:26,代码来源:new_order_created.php

示例3: listPurchasedDownloadables

 function listPurchasedDownloadables()
 {
     global $osC_Database, $toC_Json, $osC_Language, $osC_Currencies;
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $Qdownloadables = $osC_Database->query('select opd.orders_products_download_id, op.products_name, opd.orders_products_filename, o.customers_name, o.date_purchased, opd.status from :table_orders o, :table_orders_products op, :table_orders_products_download opd where o.orders_id =  op.orders_id and op.orders_products_id = opd.orders_products_id ');
     if (!empty($_REQUEST['search'])) {
         $Qdownloadables->appendQuery('and o.customers_name like :customers_name');
         $Qdownloadables->bindValue(':customers_name', '%' . $_REQUEST['search'] . '%');
     }
     $Qdownloadables->bindTable(':table_orders', TABLE_ORDERS);
     $Qdownloadables->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
     $Qdownloadables->bindTable(':table_orders_products_download', TABLE_ORDERS_PRODUCTS_DOWNLOAD);
     $Qdownloadables->setExtBatchLimit($start, $limit);
     $Qdownloadables->execute();
     $records = array();
     while ($Qdownloadables->next()) {
         $Qhistory = $osC_Database->query('select * from :table_products_download_history where orders_products_download_id = :orders_products_download_id');
         $Qhistory->bindTable(':table_products_download_history', TABLE_PRODUCTS_DOWNLOAD_HISTORY);
         $Qhistory->bindInt(':orders_products_download_id', $Qdownloadables->ValueInt('orders_products_download_id'));
         $Qhistory->execute();
         $total_downloads = 0;
         $history = '<table style="padding-left: 20px;" cellspacing="5">
                  <tr><td>' . $osC_Language->get('table_heading_download_date') . '</td></tr>';
         while ($Qhistory->next()) {
             $history .= '<tr><td>' . osC_DateTime::getShort($Qhistory->Value('download_date')) . '</td></tr>';
             $total_downloads++;
         }
         $history .= '</table>';
         $Qhistory->freeResult();
         $records[] = array('orders_products_download_id' => $Qdownloadables->ValueInt('orders_products_download_id'), 'products_name' => $Qdownloadables->Value('products_name'), 'file_name' => $Qdownloadables->Value('orders_products_filename'), 'customer' => $Qdownloadables->Value('customers_name'), 'date_purchased' => osC_DateTime::getShort($Qdownloadables->Value('date_purchased'), true), 'total_downloads' => $total_downloads, 'status' => $Qdownloadables->Value('status'), 'history' => $history);
     }
     $response = array(EXT_JSON_READER_TOTAL => $Qdownloadables->getBatchSize(), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:35,代码来源:purchased_downloadables.php

示例4: listCache

 function listCache()
 {
     global $toC_Json;
     $osC_DirectoryListing = new osC_DirectoryListing(DIR_FS_WORK);
     $osC_DirectoryListing->setIncludeDirectories(false);
     $osC_DirectoryListing->setCheckExtension('cache');
     $response = array();
     foreach ($osC_DirectoryListing->getFiles() as $file) {
         $last_modified = filemtime(DIR_FS_WORK . '/' . $file['name']);
         if (strpos($file['name'], '-') !== false) {
             $code = substr($file['name'], 0, strpos($file['name'], '-'));
         } else {
             $code = substr($file['name'], 0, strpos($file['name'], '.'));
         }
         if (isset($cached_files[$code])) {
             $cached_files[$code]['total']++;
             if ($last_modified > $cached_files[$code]['last_modified']) {
                 $cached_files[$code]['last_modified'] = $last_modified;
             }
         } else {
             $cached_files[$code] = array('total' => 1, 'last_modified' => $last_modified);
         }
         $response[] = array('code' => $code, 'total' => $cached_files[$code]['total'], 'last_modified' => osC_DateTime::getShort(osC_DateTime::fromUnixTimestamp($cached_files[$code]['last_modified']), true));
     }
     $response = array(EXT_JSON_READER_ROOT => $response);
     echo $toC_Json->encode($response);
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:27,代码来源:cache.php

示例5: listAbandonedCart

 function listAbandonedCart()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $osC_Currencies = new osC_Currencies();
     $customers_id = osc_get_session_customers_id();
     $Qcustomers = $osC_Database->query("select SQL_CALC_FOUND_ROWS DISTINCT cb.customers_id, cb.products_id, cb.customers_basket_quantity, max(cb.customers_basket_date_added) date_added, c.customers_firstname, c.customers_lastname, c.customers_telephone phone, c.customers_email_address email, c.abandoned_cart_last_contact_date date_contacted from " . TABLE_CUSTOMERS_BASKET . " cb, " . TABLE_CUSTOMERS . " c where c.customers_id not in ('" . implode(',', $customers_id) . "') and cb.customers_id = c.customers_id  group by cb.customers_id order by cb.customers_id, cb.customers_basket_date_added desc ");
     $Qcustomers->setExtBatchLimit($start, $limit);
     $Qcustomers->execute();
     $records = array();
     while ($Qcustomers->next()) {
         $action = array();
         $action[] = array('class' => 'icon-send-email-record', 'qtip' => $osC_Language->get('icon_email_send'));
         $action[] = array('class' => 'icon-delete-record', 'qtip' => $osC_Language->get('icon_trash'));
         $cart_contents = toC_Abandoned_Cart_Admin::getCartContents($Qcustomers->valueInt('customers_id'));
         $total = 0;
         $products = array();
         foreach ($cart_contents as $product) {
             $total += $product['price'] * $product['qty'];
             $products[] = $product['qty'] . '&nbsp;x&nbsp;' . $product['name'];
         }
         $date_contacted = $Qcustomers->value('date_contacted');
         $records[] = array('customers_id' => $Qcustomers->valueInt('customers_id'), 'products' => implode('<br />', $products), 'date_contacted' => empty($date_contacted) ? '---' : osC_DateTime::getShort($date_contacted), 'date_added' => osC_DateTime::getShort($Qcustomers->value('date_added')), 'customers_name' => $Qcustomers->value('customers_firstname') . '&nbsp;' . $Qcustomers->value('customers_lastname'), 'email' => $Qcustomers->value('email'), 'action' => $action, 'total' => $osC_Currencies->format($total));
     }
     $Qcustomers->freeResult();
     $response = array(EXT_JSON_READER_TOTAL => sizeof($records), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:29,代码来源:abandoned_cart.php

示例6: listDirectory

 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);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:27,代码来源:file_manager.php

示例7: listAdministratorsLog

 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);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:31,代码来源:administrators_log.php

示例8: listBestOrders

 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);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:25,代码来源:reports_customers.php

示例9: loadReviews

 function loadReviews()
 {
     global $toC_Json;
     $data = osC_Reviews_Admin::getData($_REQUEST['reviews_id']);
     $data['date_added'] = osC_DateTime::getShort($data['date_added']);
     $response = array('success' => true, 'data' => $data);
     echo $toC_Json->encode($response);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:8,代码来源:reviews.php

示例10: osc_get_system_information

/**
 * Retrieve web server and database server information
 *
 * @access public
 */
function osc_get_system_information()
{
    global $osC_Database;
    $Qdb_date = $osC_Database->query('select now() as datetime');
    $Qdb_uptime = $osC_Database->query('show status like "Uptime"');
    @(list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5));
    $db_uptime = intval($Qdb_uptime->valueInt('Value') / 3600) . ':' . str_pad(intval($Qdb_uptime->valueInt('Value') / 60 % 60), 2, '0', STR_PAD_LEFT);
    return array('date' => osC_DateTime::getShort(null, true), 'system' => $system, 'kernel' => $kernel, 'host' => $host, 'ip' => gethostbyname($host), 'uptime' => @exec('uptime'), 'http_server' => $_SERVER['SERVER_SOFTWARE'], 'php' => PHP_VERSION, 'zend' => function_exists('zend_version') ? zend_version() : '', 'db_server' => DB_SERVER, 'db_ip' => gethostbyname(DB_SERVER), 'db_version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''), 'db_date' => osC_DateTime::getShort($Qdb_date->value('datetime'), true), 'db_uptime' => $db_uptime);
}
开发者ID:heshuai64,项目名称:gamestore,代码行数:14,代码来源:general.php

示例11: listGiftCertificates

 function listGiftCertificates()
 {
     global $osC_Database, $toC_Json, $osC_Language, $osC_Currencies;
     $osC_Currencies = new osC_Currencies_Admin();
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $Qcertificates = $osC_Database->query('select gc.*, o.customers_name, o.date_purchased from :table_gift_certificates gc, :table_orders o, :table_orders_products op where gc.orders_products_id = op.orders_products_id and op.orders_id = o.orders_id ');
     if (!empty($_REQUEST['search'])) {
         $Qcertificates->appendQuery('and o.customers_name like :customers_name');
         $Qcertificates->bindValue(':customers_name', '%' . $_REQUEST['search'] . '%');
     }
     $Qcertificates->bindTable(':table_gift_certificates', TABLE_GIFT_CERTIFICATES);
     $Qcertificates->bindTable(':table_orders', TABLE_ORDERS);
     $Qcertificates->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
     $Qcertificates->setExtBatchLimit($start, $limit);
     $Qcertificates->execute();
     $records = array();
     while ($Qcertificates->next()) {
         $Qhistory = $osC_Database->query('select gcrh.*, o.customers_name from :table_gift_certificates_redeem_history gcrh, :table_orders o where gcrh.orders_id = o.orders_id and gcrh.gift_certificates_id = :gift_certificates_id');
         $Qhistory->bindTable(':table_gift_certificates_redeem_history', TABLE_GIFT_CERTIFICATES_REDEEM_HISTORY);
         $Qhistory->bindTable(':table_orders', TABLE_ORDERS);
         $Qhistory->bindInt(':gift_certificates_id', $Qcertificates->ValueInt('gift_certificates_id'));
         $Qhistory->execute();
         $history = '<table style="padding-left: 20px;" cellspacing="5">
                  <tr>
                    <td>' . $osC_Language->get('table_heading_customer') . '</td>
                    <td>' . $osC_Language->get('table_heading_redeem_date') . '</td>
                    <td>' . $osC_Language->get('table_heading_redeem_amount') . '</td>
                  </tr>';
         $redeem_amount = 0;
         while ($Qhistory->next()) {
             $redeem_amount += $Qhistory->Value('redeem_amount');
             $history .= '<tr><td>' . $Qhistory->Value('customers_name') . '</td>
                        <td>' . osC_DateTime::getShort($Qhistory->Value('redeem_date')) . '</td>
                        <td>' . $osC_Currencies->format($Qhistory->Value('redeem_amount')) . '</td></tr>';
         }
         $history .= '</table>';
         $Qhistory->freeResult();
         $certificate_details = '<table style="padding-left: 20px" cellspacing="5">';
         $certificate_details .= '<tr><td>' . $osC_Language->get('field_recipient_name') . '</td><td>' . $Qcertificates->Value('recipients_name') . '</td></tr>';
         if ($Qcertificates->valueInt('gift_certificates_type') == GIFT_CERTIFICATE_TYPE_EMAIL) {
             $certificate_details .= '<tr><td>' . $osC_Language->get('field_recipient_email') . '</td><td>' . $Qcertificates->Value('recipients_email') . '</td></tr>';
         }
         $certificate_details .= '<tr><td>' . $osC_Language->get('field_recipient_sender_name') . '</td><td>' . $Qcertificates->Value('senders_name') . '</td></tr>';
         if ($Qcertificates->valueInt('gift_certificates_type') == GIFT_CERTIFICATE_TYPE_EMAIL) {
             $certificate_details .= '<tr><td>' . $osC_Language->get('field_recipient_sender_email') . '</td><td>' . $Qcertificates->Value('senders_email') . '</td></tr>';
         }
         $certificate_details .= '<tr><td>' . $osC_Language->get('field_message') . '</td><td>' . $Qcertificates->Value('messages') . '</td></tr>';
         $certificate_details .= '</table>';
         $records[] = array('gift_certificates_id' => $Qcertificates->ValueInt('gift_certificates_id'), 'orders_products_id' => $Qcertificates->ValueInt('orders_products_id'), 'gift_certificates_code' => $Qcertificates->Value('gift_certificates_code'), 'gift_certificates_customer' => $Qcertificates->Value('customers_name'), 'gift_certificates_amount' => $osC_Currencies->format($Qcertificates->Value('amount')), 'gift_certificates_balance' => $osC_Currencies->format($Qcertificates->Value('amount') - $redeem_amount), 'gift_certificates_date_purchased' => osC_DateTime::getShort($Qcertificates->Value('date_purchased')), 'gift_certificates_date_status' => $Qcertificates->Value('status'), 'recipients_name' => $Qcertificates->Value('recipients_name'), 'recipients_email' => $Qcertificates->Value('recipients_email'), 'senders_name' => $Qcertificates->Value('senders_name'), 'senders_email' => $Qcertificates->Value('senders_email'), 'messages' => $Qcertificates->Value('messages'), 'certificate_details' => $certificate_details, 'history' => $history);
     }
     $response = array(EXT_JSON_READER_TOTAL => $Qcertificates->getBatchSize(), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:54,代码来源:gift_certificates.php

示例12: renderData

 function renderData()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $Qreviews = $osC_Database->query('select r.reviews_id, r.products_id, greatest(r.date_added, ifnull(r.last_modified, 0)) 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();
     $records = array();
     while ($Qreviews->next()) {
         $records[] = array('reviews_id' => $Qreviews->valueInt('reviews_id'), 'products_name' => $Qreviews->value('products_name'), 'languages_code' => $osC_Language->showImage($Qreviews->value('languages_code')), 'reviews_rating' => osc_image('../images/stars_' . $Qreviews->valueInt('reviews_rating') . '.png', $Qreviews->valueInt('reviews_rating') . '/5'), 'date_last_modified' => osC_DateTime::getShort($Qreviews->value('date_last_modified')));
     }
     $response = array(EXT_JSON_READER_TOTAL => sizeof($records), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:15,代码来源:new_reviews.php

示例13: renderData

 function renderData()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $Qorders = $osC_Database->query('select o.orders_id, o.customers_name, greatest(o.date_purchased, ifnull(o.last_modified, 0)) 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 4');
     $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();
     $records = array();
     while ($Qorders->next()) {
         $records[] = array('orders_id' => $Qorders->valueInt('orders_id'), 'customers_name' => $Qorders->valueProtected('customers_name'), 'order_total' => strip_tags($Qorders->value('order_total')), 'date_purchased' => osC_DateTime::getShort($Qorders->value('date_last_modified')), 'orders_status_name' => $Qorders->value('orders_status_name'));
     }
     $response = array(EXT_JSON_READER_TOTAL => sizeof($records), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:16,代码来源:new_orders.php

示例14: setData

 function setData($data)
 {
     global $osC_Currencies;
     $x_labels = array();
     foreach ($data as $date => $order_total) {
         $this->_bar->add($order_total);
         $x_labels[] = osC_DateTime::getShort($date);
     }
     $this->_graph->set_x_labels($x_labels);
     if (!is_object($osC_Currencies)) {
         $osC_Currencies = new osC_Currencies();
     }
     $this->_graph->set_tool_tip(' #x_label# <br>' . $osC_Currencies->getSymbolLeft() . ' #val#');
     $max_total = (int) (floor(max($this->_bar->data) / 100 + 1) * 100);
     $this->_graph->set_y_min(0);
     $this->_graph->set_y_max($max_total);
     $this->_graph->data_sets[] = $this->_bar;
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:18,代码来源:flash_bar.php

示例15: listProductsExpected

 function listProductsExpected()
 {
     global $toC_Json, $osC_Language, $osC_Database;
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $Qproducts = $osC_Database->query('select p.products_id, p.products_date_available, pd.products_name from :table_products p, :table_products_description pd where p.products_date_available is not null and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_available');
     $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);
     $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
     $Qproducts->bindInt(':language_id', $osC_Language->getID());
     $Qproducts->setExtBatchLimit($start, $limit);
     $Qproducts->execute();
     $record = array();
     while ($Qproducts->next()) {
         $record[] = array('products_id' => $Qproducts->valueInt('products_id'), 'products_name' => $Qproducts->value('products_name'), 'products_date_available' => osC_DateTime::getShort($Qproducts->value('products_date_available')));
     }
     $response = array(EXT_JSON_READER_TOTAL => $Qproducts->getBatchSize(), EXT_JSON_READER_ROOT => $record);
     echo $toC_Json->encode($response);
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:18,代码来源:products_expected.php


注:本文中的osC_DateTime::getShort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。