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


PHP global_common::formatDateTimeVN方法代码示例

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


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

示例1: array

 if (global_common::isCLogin()) {
     $c_userInfo = $_SESSION[global_common::SES_C_USERINFO];
     $commentID = $_pgR["id"];
     $isBad = $_pgR["isbad"];
     $strTableName = Model_CommentBad::TBL_SL_COMMENT_BAD;
     $comment = $objComment->getCommentByID($commentID);
     $user = $objUser->getUserByID($comment[global_mapping::CreatedBy]);
     if ($user && $comment) {
         $isSent = true;
         $description = "Restore Comment";
         if ($isBad) {
             $description = "Bad Comment";
             $userEmail = $user[global_mapping::Email];
             $fullName = $user[global_mapping::FullName];
             $linkArticle = global_common::getHostName() . '/article_detail.php?aid=' . $comment[global_mapping::ArticleID];
             $commentDate = global_common::formatDateTimeVN($comment[global_mapping::CreatedDate]);
             $commentContent = $comment[global_mapping::Content];
             $linkPolicy = global_common::getHostName() . '/' . global_common::PAGE_TERM_KM;
             $arrMailContent = global_common::formatMailContent(global_common::TEAMPLATE_BAD_COMMENT, null, array(global_common::formatOutputText($fullName), $linkArticle, $commentDate, $commentContent, $linkPolicy));
             $emailSubject = $arrMailContent[0];
             $emailContent = $arrMailContent[1];
             $isSent = global_mail::send($userEmail, $fullName, $emailSubject, $emailContent, null, global_common::SUPPORT_MAIL_USERNAME, global_common::SUPPORT_MAIL_PASSWORD, global_common::SUPPORT_MAIL_DISPLAY_NAME);
         }
         if ($isSent) {
             $badComment = $objCommentBad->getCommentBadByID($commentID);
             if (count($badComment) <= 0) {
                 $createdBy = $c_userInfo[global_mapping::UserID];
                 $resultID = $objCommentBad->insert($commentID, $description, $createdBy, $isBad);
             } else {
                 $updatedBy = $c_userInfo[global_mapping::UserID];
                 $resultID = $objCommentBad->activateBadComment($commentID, $description, $updatedBy, $isBad);
开发者ID:vietlethanh,项目名称:timkm20130929,代码行数:31,代码来源:bg_comment.php

示例2: foreach

    foreach ($allRetailers as $item) {
        echo '<tr>';
        echo '<td>';
        echo $item[global_mapping::ProductName];
        echo '</td>';
        echo '<td style="padding:0;width:200px">';
        echo global_common::FormatPrice($item[global_mapping::Price]);
        echo '</td>';
        echo '<td>';
        echo $item[global_mapping::CreatedBy][global_mapping::UserName];
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateTimeVN($item[global_mapping::CreatedDate]);
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateTimeVN($item[global_mapping::ModifiedDate]);
        echo '</td>';
        echo '<td style="padding:0;width:180px">';
        echo '<a href="' . global_common::buildRetailerLink($item[global_mapping::RetailerID], true) . '" target="_blank" class="btn btn-mini"> View</a> ';
        if ($item[global_mapping::StatusID] == global_common::STATUS_INACTIVE) {
            echo '<a href="javascript:retailer.activateRetailer(\'' . $item[global_mapping::RetailerID] . '\',' . global_common::STATUS_ACTIVE . ', retailer.AdminPage)" class="btn btn-mini">Bán lại</a>';
        } else {
            echo '<a href="javascript:retailer.activateRetailer(\'' . $item[global_mapping::RetailerID] . '\',' . global_common::STATUS_INACTIVE . ', retailer.AdminPage)" class="btn btn-mini">Dừng bán</a>';
        }
        echo '</td>';
        echo '</tr>';
    }
    echo '</table>';
    echo global_common::getPagingHTMLByNum($page, Model_Retailer::NUM_PER_PAGE, $total, 'core.util.changePage', 'admin_price');
}
?>
开发者ID:vietlethanh,项目名称:oceo,代码行数:31,代码来源:admin_price.php

示例3: getCommentHTMLByArticle

 public function getCommentHTMLByArticle($articleID)
 {
     $comments = Model_Comment::getCommentByArticle($articleID, 0, '*', '', 'ModifiedDate Desc');
     $commentHTML = '';
     foreach ($comments as $item) {
         $commentHTML .= '<div class="item">';
         $commentHTML .= '		<div class="avatar">';
         $commentHTML .= '			<img src="' . $item[global_mapping::CreatedBy][global_mapping::Avatar] . '" />';
         $commentHTML .= '		</div>';
         $commentHTML .= '		<div class="comment-detail">';
         $commentHTML .= '			<div class="username">';
         $commentHTML .= '				 <a href="#">' . $item[global_mapping::CreatedBy][global_mapping::FullName] . '</a>	';
         $commentHTML .= '				 <p class="created-date">' . global_common::formatDateTimeVN($item[global_mapping::CreatedDate]) . '</p>	';
         $commentHTML .= '			</div>';
         $commentHTML .= '			<div class="comment-detail-content">';
         $commentHTML .= '					' . $item[global_mapping::Content];
         $commentHTML .= '			</div>	';
         $commentHTML .= '		</div>';
         $commentHTML .= '</div>';
     }
     return $commentHTML;
 }
开发者ID:vietlethanh,项目名称:KooKooBackEnd,代码行数:22,代码来源:model_comment.php

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

示例5:

        echo $item[global_mapping::ArticleID][global_mapping::Title];
        echo '</td>';
        echo '<td style="padding:0;width:200px">';
        echo $item[global_mapping::Content];
        echo '</td>';
        echo '<td>';
        echo $item[global_mapping::CreatedBy][global_mapping::UserName];
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateTimeVN($item[global_mapping::CreatedDate]);
        echo '</td>';
        echo '<td>';
        echo $item[global_mapping::CommentBad][global_mapping::ReportedBy][global_mapping::UserName];
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateTimeVN($item[global_mapping::CommentBad][global_mapping::ReportedDate]);
        echo '</td>';
        echo '<td style="padding:0;width:180px">';
        echo '<a href="../article_detail.php?aid=' . $item[global_mapping::ArticleID][global_mapping::ArticleID] . '" target="_blank" class="btn btn-mini"> View Article</a> ';
        if (!$item[global_mapping::CommentBad][global_mapping::Status]) {
            echo '<a href="javascript:comment.badComment(\'' . $item[global_mapping::CommentID] . '\',1,true)" class="btn btn-mini">Delete</a> ';
        } else {
            echo '<a href="javascript:comment.badComment(\'' . $item[global_mapping::CommentID] . '\',0,true)" class="btn btn-mini">Restore</a>';
        }
        echo '</td>';
        echo '</tr>';
    }
    echo '</table>';
}
?>
				</div>
开发者ID:vietlethanh,项目名称:KooKooBackEnd,代码行数:31,代码来源:admin_commentbad.php

示例6: foreach

											<tr>
												<th class="span4">Tên sản phẩm</th>
												<th class="span2">Giá bán</th>
												<th style="width:120px">Tình trạng</th>
                                                <th style="width:100px">Cập nhật</th>
												<th style="width:120px"></th>
											</tr>
										</thead>
										<tbody>
<?php 
foreach ($allRetailers as $item) {
    echo '								<tr>';
    echo '									<td><a href="' . global_common::buildProductLink($item[global_mapping::ProductID]) . '" >' . $item[global_mapping::ProductName] . '</a></td>';
    echo '									<td class="">' . global_common::FormatPrice($item[global_mapping::Price]) . '</td>';
    echo '									<td class="">' . $item[global_mapping::ProductStatus] . ' ' . $item[global_mapping::StatusDetail] . '</td>';
    echo '									<td >' . global_common::formatDateTimeVN($item[global_mapping::ModifiedDate]) . '</td>';
    echo '									<td class="article-control">';
    echo '										<a href="post_price.php?pid=' . $item[global_mapping::ProductID] . '&rid=' . $item[global_mapping::RetailerID] . '" class="btn btn-mini">Sửa</a>';
    //echo '										<a href="javascript:article.refreshArticle(\''.$item[global_mapping::ArticleID].'\')" class="btn btn-mini">Làm mới</a>';
    echo '										<a href="javascript:retailer.deleteRetailer(\'' . $item[global_mapping::ProductName] . '\',\'' . $item[global_mapping::RetailerID] . '\')" class="btn btn-mini">Xóa</a>';
    if ($item[global_mapping::StatusID] == global_common::STATUS_INACTIVE) {
        echo '							        <a href="javascript:retailer.activateRetailer(\'' . $item[global_mapping::RetailerID] . '\',' . global_common::STATUS_INACTIVE . ')" class="btn btn-mini">Bán lại</a>';
    } else {
        echo '							        <a href="javascript:retailer.activateRetailer(\'' . $item[global_mapping::RetailerID] . '\',' . global_common::STATUS_ACTIVE . ')" class="btn btn-mini">Dừng bán</a>';
    }
    echo '									</td>';
    echo '								</tr>';
}
?>
										</tbody>
									</table>
开发者ID:vietlethanh,项目名称:oceo,代码行数:31,代码来源:profile_price.php

示例7: getCommentHTMLByArticle

 public function getCommentHTMLByArticle($articleID, $page)
 {
     if (!$page) {
         $page = 1;
     }
     $comments = $this->getCommentByArticle($articleID, $page, '*', '', 'ModifiedDate Desc');
     $condition = ' where `' . global_mapping::ArticleID . '` =  \'' . $articleID . '\'  AND CommentID NOT IN (SELECT CommentID FROM sl_comment_bad WHERE `STATUS` =\'1\')';
     $total = global_common::getTotalRecord(Model_Comment::TBL_SL_COMMENT, $this->_objConnection, $condition);
     $commentHTML = '';
     foreach ($comments as $item) {
         $commentHTML .= '<div class="item">';
         $commentHTML .= '		<div class="avatar">';
         $commentHTML .= '			<img src="' . $item[global_mapping::CreatedBy][global_mapping::Avatar] . '" />';
         $commentHTML .= '		</div>';
         $commentHTML .= '		<div class="comment-detail">';
         $commentHTML .= '			<div class="username">';
         $commentHTML .= '				 <a href="#">' . $item[global_mapping::CreatedBy][global_mapping::FullName] . '</a>	';
         $commentHTML .= '				 <p class="created-date">' . global_common::formatDateTimeVN($item[global_mapping::CreatedDate]) . '</p>	';
         $commentHTML .= '			</div>';
         $commentHTML .= '			<div class="comment-detail-content">';
         $commentHTML .= '					' . $item[global_mapping::Content];
         $commentHTML .= '			</div>	';
         if (global_common::isAdmin()) {
             $commentHTML .= '		<div class="comment-controls">';
             $commentHTML .= '			<a href="javascript:comment.badComment(\'' . $item[global_mapping::CommentID] . '\',1)">Delete</a>';
             $commentHTML .= '		</div>	';
         }
         $commentHTML .= '		</div>';
         $commentHTML .= '</div>';
     }
     $commentHTML .= global_common::getPagingHTMLByNum($page, Model_Comment::NUM_PER_PAGE, $total, 'comment.changePage');
     return $commentHTML;
 }
开发者ID:vietlethanh,项目名称:oceo,代码行数:33,代码来源:model_comment.php

示例8:

echo $currentUser[global_mapping::Avatar];
?>
" alt="" />
                            </div>
                            <ul class="unstyled " style="float:left">
                                <li><span>Tên đăng nhập:</span> <?php 
echo global_common::formatOutputText($currentUser[global_mapping::UserName]);
?>
</li>
                                <li><span>Họ và Tên:</span> <?php 
echo global_common::formatOutputText($currentUser[global_mapping::FullName]);
?>
</li>
								<li><span>Tham gia:</span> 
									<?php 
echo global_common::formatOutputText(global_common::formatDateTimeVN($currentUser[global_mapping::CreatedDate]));
?>
</li>
                                <li><span>Giới tính:</span> <?php 
echo $currentUser[global_mapping::UserName] ? 'Nam' : 'Nữ';
?>
</li>
                                <li><span>Email:</span> <a href="mailto:">  <?php 
echo global_common::formatOutputText($currentUser[global_mapping::Email]);
?>
</a></li>
	   						 <li><span>Số điện thoại:</span> <?php 
echo $currentUser[global_mapping::Phone];
?>
</li>                               
                                <li><span>Địa chỉ:</span>  <?php 
开发者ID:vietlethanh,项目名称:oceo,代码行数:31,代码来源:member.php


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