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


PHP global_common::getDate方法代码示例

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


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

示例1: refreshArticle

 public function refreshArticle($articleID, $currentUser)
 {
     $currentArticle = $this->getArticleByID($articleID);
     $renewNum = $currentArticle[global_mapping::RenewedNum];
     $renewedDate = $currentArticle[global_mapping::RenewedDate];
     $diffDay = global_common::datediff(global_common::getDate(), date('d-m-Y', strtotime($renewedDate)), d);
     if ($diffDay > 0) {
         $renewNum = 0;
     }
     if ($renewNum < self::NUM_REFRESH) {
         $renewNum += 1;
         $title = $currentArticle[global_mapping::Title];
         $fileName = $currentArticle[global_mapping::FileName];
         $catalogueID = $currentArticle[global_mapping::CatalogueID];
         $content = $currentArticle[global_mapping::Content];
         $tags = $currentArticle[global_mapping::Tags];
         $createdBy = $currentArticle[global_mapping::CreatedBy];
         $createdDate = global_common::formatDateTimeVN($currentArticle[global_mapping::CreatedDate]);
         $modifiedBy = $currentUser[global_mapping::UserID];
         $renewedDate = global_common::nowSQL();
         $companyName = $currentArticle[global_mapping::CompanyName];
         $companyAddress = $currentArticle[global_mapping::CompanyAddress];
         $companyWebsite = $currentArticle[global_mapping::CompanyWebsite];
         $companyPhone = $currentArticle[global_mapping::CompanyPhone];
         $adType = $currentArticle[global_mapping::AdType];
         $startDate = global_common::formatDateTimeVN($currentArticle[global_mapping::StartDate]);
         $endDate = global_common::formatDateTimeVN($currentArticle[global_mapping::EndDate]);
         $happyDays = $currentArticle[global_mapping::HappyDays];
         $startHappyHour = $currentArticle[global_mapping::StartHappyHour];
         $endHappyHour = $currentArticle[global_mapping::EndHappyHour];
         $addresses = $currentArticle[global_mapping::Addresses];
         $dictricts = $currentArticle[global_mapping::Dictricts];
         $cities = $currentArticle[global_mapping::Cities];
         $resultID = $this->update($articleID, null, $title, $fileName, $catalogueID, $content, null, $tags, $numView, $numComment, $createdBy, $createdDate, $modifiedBy, global_common::nowSQL(), null, null, 0, null, null, $renewedDate, $renewNum, $companyName, $companyAddress, $companyWebsite, $companyPhone, $adType, $startDate, $endDate, $happyDays, $startHappyHour, $endHappyHour, $addresses, $dictricts, $cities);
         if (!$resultID) {
             //echo $strSQL;
             global_common::writeLog('Error refreshArticle sl_article:' . $articleID, 1);
             return -1;
         }
         return self::NUM_REFRESH - $renewNum;
     }
     return -1;
 }
开发者ID:vietlethanh,项目名称:timkm20130929,代码行数:43,代码来源:model_article.php


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