本文整理汇总了PHP中AddDay函数的典型用法代码示例。如果您正苦于以下问题:PHP AddDay函数的具体用法?PHP AddDay怎么用?PHP AddDay使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AddDay函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowMsg
exit;
}
if (!CheckChannel($typeid, $channelid)) {
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1");
exit;
}
if (!TestPurview('a_Edit')) {
if (TestPurview('a_AccEdit')) {
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!");
} else {
CheckArcAdmin($id, $cuserLogin->getUserID());
}
}
//对保存的内容进行处理
$pubdate = GetMkTime($pubdate);
$sortrank = AddDay($pubdate, $sortup);
$ismake = $ishtml == 0 ? -1 : 0;
$autokey = 1;
//$title = htmlspecialchars(cn_substrR($title,$cfg_title_maxlen,ENT_COMPAT ,"GB2312"));
$shorttitle = cn_substrR($shorttitle, 36);
$color = cn_substrR($color, 7);
$writer = cn_substrR($writer, 20);
$source = cn_substrR($source, 30);
$description = cn_substrR($description, 250);
$keywords = trim(cn_substrR($keywords, 60));
$filename = trim(cn_substrR($filename, 40));
$isremote = empty($isremote) ? 0 : $isremote;
$serviterm = empty($serviterm) ? "" : $serviterm;
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) {
$arcrank = -1;
}
示例2: CheckArcAdmin
if(!CheckChannel($typeid,$channelid) || !CheckChannel($typeid2,$channelid)){
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!","-1");
exit();
}
if(!TestPurview('a_Edit')) {
if(TestPurview('a_AccEdit')) CheckCatalog($typeid,"对不起,你没有操作栏目 {$typeid} 的文档权限!");
else CheckArcAdmin($ID,$cuserLogin->getUserID());
}
$arcrank = GetCoRank($arcrank,$typeid);
//对保存的内容进行处理
//--------------------------------
$iscommend = $iscommend + $isbold;
$pubdate = GetMkTime($pubdate);
$sortrank = AddDay($senddate,$sortup);
$endtime = $senddate + 3600 * 24 * $endtime;
$title = cn_substr($title,80);
if($keywords!="") $keywords = trim(cn_substr($keywords,60))." ";
//处理上传的缩略图
if(empty($ddisremote)) $ddisremote = 0;
$litpic = GetDDImage('none',$picname,$ddisremote);
$body = stripslashes($body);
//自动摘要
if($description=="" && $cfg_auot_description>0){
示例3: FillDay
if ($n < 6) {
$n = $n + 1;
} else {
$n = 0;
}
}
if ($calday == 1) {
if ($first == $n) {
$info = FillDay($db, $n, $calday, $month, $year);
AddDay($calday, $month, $year, $info);
$calday++;
} else {
AddDay('', '', '', '');
}
} else {
if ($calday > $lastday) {
AddDay('', '', '', '');
} else {
$info = FillDay($db, $n, $calday, $month, $year);
AddDay($calday, $month, $year, $info);
$calday++;
}
}
}
echo '</TR>';
}
echo '</TABLE>
</CENTER>
<P class=body ><center><A class=flink HREF="birthday.php">XMECian Birthdays this week</A> || <A class=flink HREF="addevent.php">Post Marriage Invitations or other XMEC Event</A>.<center></P><BR>';
/* <P>©2002 <a class="bottom" href="http://www.proverbs.biz">Proverbs</a>, LLC. All rights reserved.</P> '; */
include 'footer.php';
示例4: DedeSql
{
if(!empty(${"voteitem".$i})){
$j++;
$voteitems .= "<v:note id=\\'$j\\' count=\\'0\\'>".${"voteitem".$i}."</v:note>\r\n";
}
}
$dsql = new DedeSql(false);
$inQuery = "
insert into #@__vote(votename,starttime,endtime,totalcount,ismore,votenote)
Values('$votename','$starttime','$endtime','0','$ismore','$voteitems');
";
$dsql->SetQuery($inQuery);
if(!$dsql->ExecuteNoneQuery())
{
$dsql->Close();
ShowMsg("增加投票失败,请检查数据是否非法!","-1");
exit();
}
$dsql->Close();
ShowMsg("成功增加一组投票!","vote_main.php");
exit();
}
$startDay = time();
$endDay = AddDay($startDay,30);
$startDay = GetDateTimeMk($startDay);
$endDay = GetDateTimeMk($endDay);
require_once(dirname(__FILE__)."/templets/vote_add.htm");
ClearAllLink();
?>
示例5: pickOne
/**
* 获取一篇文章信息绝想
* @param int $id 日记id
*/
function pickOne($id)
{
$url = $GLOBALS['prefix'] . "/{$id}.html";
echo $url;
$dom = new simple_html_dom();
$dom->load_file($url);
$postHeader_title = $dom->find('.left h1[0]');
$pubtime = $dom->find('.pubtime');
$heart = $dom->find('.week a');
$info = $dom->find('.author a');
$content = $dom->find('.content');
$views = $dom->find('.views b');
$writer = $info[0]->innertext;
$title = $postHeader_title[0]->innertext;
$senddate = $pubdate = strtotime($pubtime[0]->innertext);
$body = $content[0]->innertext;
$views = $views[0]->innertext;
/* 释放资源 */
$dom->clear();
unset($dom);
$mp3 = preg_match_all('/\\?mp3=(.+\\.mp3).*autostart/Us', $body, $res);
if ($mp3 and isset($res) and count($res) > 0) {
$music = $res[1][0];
}
/* 去除超链接和开头的空白段落 */
$body = preg_replace('/<a.*>(.*)<\\/a>/isU', '$1', preg_replace('/<div.*>(.*)<\\/div>/isU', '', preg_replace('/^<p>\\s*<\\/p>/', '', preg_replace('/\\s*<style.+<\\/style>/s', '', $body))));
/* 本地化图片 */
saveImages($body, $res_img);
$obj = array('title' => $title, 'writer' => $writer, 'body' => $body, 'pubdate' => $pubdate, 'senddate' => $senddate, 'views' => $views);
$obj['sortrank'] = AddDay($senddate, 0);
/* 处理背景音乐 */
$obj['music'] = isset($music) ? $music : '';
return $obj;
}