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


PHP global_common::nowDateSQL方法代码示例

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


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

示例1: Model_Article

<?php

/* TODO: Add code here */
require 'config/globalconfig.php';
include_once 'include/_permission.inc';
include_once 'class/model_user.php';
include_once 'class/model_article.php';
$objArticle = new Model_Article($objConnection);
$objUser = new Model_User($objConnection);
if (global_common::isCLogin()) {
    //get user info
    $userInfo = $_SESSION[global_common::SES_C_USERINFO];
    $userID = $userInfo[global_mapping::UserID];
    $condidtion = '(' . global_mapping::EndDate . ' >= \'' . global_common::nowDateSQL() . '\' Or ' . global_mapping::EndDate . ' is null)';
    $articles = $objArticle->getArticleByUser($userID, 1, global_common::DEFAULT_PAGE_SIZE, null, $condidtion, '');
    $condidtion = global_mapping::EndDate . ' < \'' . global_common::nowDateSQL() . '\'';
    $expireArticles = $objArticle->getArticleByUser($userID, 1, global_common::DEFAULT_PAGE_SIZE, null, $condidtion, '');
    //print_r($articles);
}
?>

<?php 
include_once 'include/_header.inc';
include_once 'include/_menu.inc';
?>
<script type="text/javascript" src="<?php 
echo $_objSystem->locateJs('user_user.js');
?>
"></script>
<script type="text/javascript" src="<?php 
echo $_objSystem->locateJs('user_article.js');
开发者ID:vietlethanh,项目名称:timkm20130929,代码行数:31,代码来源:profile_article.php

示例2: updateDeleteFlag

 /**
  * Phương thức cập nhật delete_flag
  *
  * @param string $ContentID ID cần cập nhập
  * @param string $IDName Tên của ID cần cập nhập
  * @param string $strTableName Tên table cần cập nhật
  * @param int $status status của delete_flag
  * @param object $objConnection connect to db
  * @return int 1:Cập nhật thành công hay 0:thất bại
  *
  */
 public function updateDeleteFlag($ContentID, $IDName, $deletedBy, $strTableName, $status, $objConnection)
 {
     //const SQL_UPDATE_BY_CONDITION				= "UPDATE `{0}` SET {1} WHERE {2};";
     $strSQL = self::prepareQuery(self::SQL_UPDATE_BY_CONDITION, array($strTableName, 'IsDeleted=' . $status . ',' . global_mapping::DeletedBy . '=' . $deletedBy . ',' . global_mapping::DeletedDate . '=\'' . global_common::nowDateSQL() . '\'', $IDName . '=' . $ContentID));
     //echo $strSQL;
     if ($objConnection->executeSQL($strSQL) == -1) {
         return 0;
     }
     return 1;
 }
开发者ID:vietlethanh,项目名称:oceo,代码行数:21,代码来源:global_common.php

示例3: And

if ($catID == 0) {
    $allCatIDs = '';
} else {
    $allSubCats = $objArticleType->getAllArticleType(0, null, 'ParentID=' . $catID, null);
    //print_r($allSubCats);
    if (count($allSubCats) <= 0) {
        $allCatIDs = $catID;
    } else {
        $allCatIDs = global_common::getArrayColumn($allSubCats, global_mapping::ArticleTypeID);
    }
}
//print_r($allCatIDs);
if ($expired) {
    $condidtion = ' And ' . global_mapping::EndDate . ' < \'' . global_common::nowDateSQL() . '\'';
} else {
    $condidtion = ' And (' . global_mapping::EndDate . ' >= \'' . global_common::nowDateSQL() . '\' OR ' . global_mapping::EndDate . ' is null )';
}
if ($inactive == 'true') {
    $condidtion .= ' And `' . global_mapping::Status . '`=0';
} else {
    $condidtion .= ' And `' . global_mapping::Status . '`=1';
}
$articles = $objArticle->searchArticle($page, $allCatIDs, '', '', $condidtion, '', $total);
$_SESSION[global_common::SES_C_CUR_PAGE] = "admin/admin_article.php";
include_once 'include/_admin_header.inc';
?>
<script type="text/javascript" src="<?php 
echo $_objSystem->locateJs('user_article.js');
?>
"></script>
<script type="text/javascript" src="<?php 
开发者ID:vietlethanh,项目名称:timkm20130929,代码行数:31,代码来源:admin_article.php

示例4:

if ($catID == 0) {
    $allCatIDs = '';
} else {
    $allSubCats = $objArticleType->getAllArticleType(0, null, 'ParentID=' . $catID, null);
    //print_r($allSubCats);
    if (count($allSubCats) <= 0) {
        $allCatIDs = $catID;
    } else {
        $allCatIDs = global_common::getArrayColumn($allSubCats, global_mapping::ArticleTypeID);
    }
}
//print_r($allCatIDs);
if ($expired) {
    $condidtion = ' And ' . global_mapping::EndDate . ' < \'' . global_common::nowDateSQL() . '\'';
} else {
    $condidtion = ' And ' . global_mapping::StartDate . ' <= \'' . global_common::nowDateSQL() . '\'' . ' And ' . global_mapping::EndDate . ' >= \'' . global_common::nowDateSQL() . '\'';
}
if ($inactive == 'true') {
    $condidtion .= ' And `' . global_mapping::Status . '` = 0';
} else {
    $condidtion .= ' And `' . global_mapping::Status . '` = 1';
}
$articles = $objArticle->searchArticle(0, $allCatIDs, '', '', $condidtion);
$_SESSION[global_common::SES_C_CUR_PAGE] = "admin/admin_article.php";
include_once 'include/_admin_header.inc';
?>
<script type="text/javascript" src="<?php 
echo $_objSystem->locateJs('user_article.js');
?>
"></script>
<script type="text/javascript" src="<?php 
开发者ID:vietlethanh,项目名称:oceo,代码行数:31,代码来源:admin_article.php


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