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


PHP osC_DateTime::getDate方法代码示例

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


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

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

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

示例3: listGuestBook

 function listGuestBook()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
     $limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
     $QguestBook = $osC_Database->query('select guest_books_id, title, email, url, guest_books_status, languages_id, content, date_added from :table_guest_books order by guest_books_id desc');
     $QguestBook->bindTable(':table_guest_books', TABLE_GUEST_BOOKS);
     $QguestBook->setExtBatchLimit($start, $limit);
     $QguestBook->execute();
     $records = array();
     while ($QguestBook->next()) {
         $records[] = array('guest_books_id' => $QguestBook->valueInt('guest_books_id'), 'title' => $QguestBook->value('title'), 'email' => $QguestBook->value('email'), 'url' => $QguestBook->value('url'), 'guest_books_status' => $QguestBook->value('guest_books_status'), 'languages' => $osC_Language->showImage(osC_Language_Admin::getData($QguestBook->valueInt('languages_id'), 'code')), 'content' => $QguestBook->value('content'), 'date_added' => osC_DateTime::getDate($QguestBook->value('date_added')));
     }
     $QguestBook->freeResult();
     $response = array(EXT_JSON_READER_TOTAL => $QguestBook->getBatchSize(), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:17,代码来源:guest_book.php

示例4: loadBanner

 function loadBanner()
 {
     global $toC_Json;
     $banner = osC_BannerManager_Admin::getData($_REQUEST['banner_id']);
     $data = array('title' => $banner['banners_title'], 'url' => $banner['banners_url'], 'banners_group' => $banner['banners_group'], 'html_text' => $banner['banners_html_text'], 'date_scheduled' => empty($banner['date_scheduled']) ? '' : osC_DateTime::getDate($banner['date_scheduled']), 'expires_date' => empty($banner['expires_date']) ? '' : osC_DateTime::getDate($banner['expires_date']), 'expires_impressions' => $banner['expires_impressions'], 'status' => $banner['status'] == '1' ? true : false);
     if (isset($banner['banners_image']) && !empty($banner['banners_image'])) {
         $data['banners_image'] = $banner['banners_image'];
     }
     $response = array('success' => true, 'data' => $data);
     echo $toC_Json->encode($response);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:11,代码来源:banner_manager.php

示例5: loadSpecials

 function loadSpecials()
 {
     global $toC_Json;
     $data = osC_Specials_Admin::getData($_REQUEST['specials_id']);
     $data['start_date'] = osC_DateTime::getDate($data['start_date']);
     $data['expires_date'] = osC_DateTime::getDate($data['expires_date']);
     $response = array('success' => true, 'data' => $data);
     echo $toC_Json->encode($response);
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:9,代码来源:specials.php

示例6: loadPoll

 function loadPoll()
 {
     global $toC_Json, $osC_Database;
     $data = toC_Polls_Admin::getData($_REQUEST['polls_id']);
     $data['date_added'] = osC_DateTime::getDate($data['date_added']);
     $Qdescription = $osC_Database->query('select polls_title, languages_id from :table_polls_description where polls_id = :polls_id');
     $Qdescription->bindTable(':table_polls_description', TABLE_POLLS_DESCRIPTION);
     $Qdescription->bindInt(':polls_id', $_REQUEST['polls_id']);
     $Qdescription->execute();
     while ($Qdescription->next()) {
         $data['question_title[' . $Qdescription->valueInt('languages_id') . ']'] = $Qdescription->value('polls_title');
     }
     $Qdescription->freeResult();
     $response = array('success' => true, 'data' => $data);
     echo $toC_Json->encode($response);
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:16,代码来源:polls.php

示例7: loadCustomer

 function loadCustomer()
 {
     global $toC_Json;
     $data = osC_Customers_Admin::getData($_REQUEST['customers_id']);
     $data['customers_dob'] = osC_DateTime::getDate($data['customers_dob']);
     $data['customers_password'] = '';
     $data['confirm_password'] = '';
     $response = array('success' => true, 'data' => $data);
     echo $toC_Json->encode($response);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:10,代码来源:customers.php

示例8: loadCoupons

 function loadCoupons()
 {
     global $toC_Json, $osC_Database, $osC_Language;
     $coupons_id = isset($_REQUEST['coupons_id']) && is_numeric($_REQUEST['coupons_id']) ? $_REQUEST['coupons_id'] : null;
     if ($coupons_id > 0) {
         $data = toC_Coupons_Admin::getData($coupons_id);
         $data['start_date'] = osC_DateTime::getDate($data['start_date']);
         $data['expires_date'] = osC_DateTime::getDate($data['expires_date']);
         $Qcoupons = $osC_Database->query('select * from :table_coupons_description  where coupons_id = :coupons_id ');
         $Qcoupons->bindTable(':table_coupons_description', TABLE_COUPONS_DESCRIPTION);
         $Qcoupons->bindInt(':coupons_id', $coupons_id);
         $Qcoupons->execute();
         while ($Qcoupons->next()) {
             $data['coupons_name[' . $Qcoupons->value('language_id') . ']'] = $Qcoupons->value('coupons_name');
             $data['coupons_description[' . $Qcoupons->value('language_id') . ']'] = $Qcoupons->value('coupons_description');
         }
         $Qcoupons->freeResult();
         $data['coupons_restrictions'] = COUPONS_RESTRICTION_NONE;
         $Qctoc = $osC_Database->query('select ctoc.*,cd.categories_name from :table_coupons_to_categories ctoc left join :table_categories_description cd on ctoc.categories_id=cd.categories_id  where ctoc.coupons_id = :coupons_id and cd.language_id = :language_id ');
         $Qctoc->bindTable(':table_coupons_to_categories', TABLE_COUPONS_TO_CATEGORIES);
         $Qctoc->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
         $Qctoc->bindInt(':language_id', $osC_Language->getID());
         $Qctoc->bindInt(':coupons_id', $coupons_id);
         $Qctoc->execute();
         if ($Qctoc->numberOfRows() > 0) {
             $data['coupons_restrictions'] = COUPONS_RESTRICTION_CATEGOREIS;
             while ($Qctoc->next()) {
                 $data['categories'][] = array('id' => $Qctoc->value('categories_id'), 'name' => $Qctoc->value('categories_name'));
             }
         }
         $Qctop = $osC_Database->query('select ctop.*,pd.products_name from :table_coupons_to_products ctop left join :table_products_description pd on ctop.products_id=pd.products_id  where ctop.coupons_id = :coupons_id and pd.language_id = :language_id ');
         $Qctop->bindTable(':table_coupons_to_products', TABLE_COUPONS_TO_PRODUCTS);
         $Qctop->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
         $Qctop->bindInt(':language_id', $osC_Language->getID());
         $Qctop->bindInt(':coupons_id', $coupons_id);
         $Qctop->execute();
         if ($Qctop->numberOfRows() > 0) {
             $data['coupons_restrictions'] = COUPONS_RESTRICTION_PRODUCTS;
             while ($Qctop->next()) {
                 $data['products'][] = array('id' => $Qctop->value('products_id'), 'name' => $Qctop->value('products_name'));
             }
         }
         $response = array('success' => true, 'data' => $data);
     } else {
         $response = array('success' => false);
     }
     echo $toC_Json->encode($response);
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:48,代码来源:coupons.php


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