本文整理汇总了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;
}