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


PHP osC_DateTime类代码示例

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


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

示例1: initialize

 function initialize()
 {
     global $osC_Database, $osC_Language, $osC_Currencies;
     $Qupcoming = $osC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, p.products_date_available as date_expected, pd.products_name, pd.products_keyword, s.specials_new_products_price, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag) left join :table_specials s on (p.products_id = s.products_id and s.status = 1), :table_products_description pd where to_days(p.products_date_available) >= to_days(now()) and p.products_status = :products_status and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_available limit :max_display_upcoming_products');
     $Qupcoming->bindTable(':table_products', TABLE_PRODUCTS);
     $Qupcoming->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
     $Qupcoming->bindTable(':table_specials', TABLE_SPECIALS);
     $Qupcoming->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
     $Qupcoming->bindInt(':default_flag', 1);
     $Qupcoming->bindInt(':products_status', 1);
     $Qupcoming->bindInt(':language_id', $osC_Language->getID());
     $Qupcoming->bindInt(':max_display_upcoming_products', MODULE_CONTENT_UPCOMING_PRODUCTS_MAX_DISPLAY);
     if (MODULE_CONTENT_UPCOMING_PRODUCTS_CACHE > 0) {
         $Qupcoming->setCache('upcoming_products-' . $osC_Language->getCode() . '-' . $osC_Currencies->getCode(), MODULE_CONTENT_UPCOMING_PRODUCTS_CACHE);
     }
     $Qupcoming->execute();
     if ($Qupcoming->numberOfRows() > 0) {
         $this->_content = '<ol style="list-style: none;">';
         while ($Qupcoming->next()) {
             $this->_content .= '<li>' . osC_DateTime::getLong($Qupcoming->value('date_expected')) . ': ' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qupcoming->value('products_id')), $Qupcoming->value('products_name')) . ' ';
             if (osc_empty($Qupcoming->value('specials_new_products_price'))) {
                 $this->_content .= '(' . $osC_Currencies->displayPrice($Qupcoming->value('products_price'), $Qupcoming->valueInt('products_tax_class_id')) . ')';
             } else {
                 $this->_content .= '(<s>' . $osC_Currencies->displayPrice($Qupcoming->value('products_price'), $Qupcoming->valueInt('products_tax_class_id')) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($Qupcoming->value('specials_new_products_price'), $Qupcoming->valueInt('products_tax_class_id')) . '</span>)';
             }
             $this->_content .= '</li>';
         }
         $this->_content .= '</ol>';
     }
     $Qupcoming->freeResult();
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:31,代码来源:upcoming_products.php

示例2: start

 function start()
 {
     global $osC_Database, $osC_MessageStack;
     $Qcounter = $osC_Database->query('select startdate, counter from :table_counter');
     $Qcounter->bindTable(':table_counter', TABLE_COUNTER);
     $Qcounter->execute();
     if ($Qcounter->numberOfRows()) {
         $counter_startdate = $Qcounter->value('startdate');
         $counter_now = $Qcounter->valueInt('counter') + 1;
         $Qcounterupdate = $osC_Database->query('update :table_counter set counter = counter+1');
         $Qcounterupdate->bindTable(':table_counter', TABLE_COUNTER);
         $Qcounterupdate->execute();
         $Qcounterupdate->freeResult();
     } else {
         $counter_startdate = osC_DateTime::getNow();
         $counter_now = 1;
         $Qcounterupdate = $osC_Database->query('insert into :table_counter (startdate, counter) values (:start_date, 1)');
         $Qcounterupdate->bindTable(':table_counter', TABLE_COUNTER);
         $Qcounterupdate->bindValue(':start_date', $counter_startdate);
         $Qcounterupdate->execute();
         $Qcounterupdate->freeResult();
     }
     $Qcounter->freeResult();
     return true;
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:25,代码来源:simple_counter.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: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: loadProductsExpected

 function loadProductsExpected()
 {
     global $toC_Json;
     $data = osC_Products_Admin::getData($_REQUEST['products_id']);
     $data['products_date_available'] = osC_DateTime::getDate($data['products_date_available']);
     $response = array('success' => true, 'data' => $data);
     echo $toC_Json->encode($response);
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:8,代码来源:products_expected.php

示例12: 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

示例13: 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

示例14: listBackup

 function listBackup()
 {
     global $toC_Json;
     $osC_DirectoryListing = new osC_DirectoryListing(DIR_FS_BACKUP);
     $osC_DirectoryListing->setIncludeDirectories(false);
     $osC_DirectoryListing->setExcludeEntries('.htaccess');
     $response = array();
     foreach ($osC_DirectoryListing->getFiles() as $file) {
         $response[] = array('file' => $file['name'], 'date' => osC_DateTime::getDate(osC_DateTime::fromUnixTimestamp(filemtime(DIR_FS_BACKUP . $file['name'])), true), 'size' => number_format(filesize(DIR_FS_BACKUP . $file['name'])));
     }
     $response = array(EXT_JSON_READER_ROOT => $response);
     echo $toC_Json->encode($response);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:13,代码来源:backup.php

示例15: getTimestamp

 function getTimestamp($date = '')
 {
     global $osC_Language;
     if (empty($date)) {
         $date = osC_DateTime::getNow();
     }
     $year = substr($date, 0, 4);
     $month = (int) substr($date, 5, 2);
     $day = (int) substr($date, 8, 2);
     $hour = (int) substr($date, 11, 2);
     $minute = (int) substr($date, 14, 2);
     $second = (int) substr($date, 17, 2);
     return mktime($hour, $minute, $second, $month, $day, $year);
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:14,代码来源:datetime.php


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