最近杂记,帝国cms

开启日志输出: error_reporting(E_ALL);
屏蔽所有js错误
<script language=’Javascript’>window.onerror=function(){return true;};</script>

开启登录验证码:if($public_r[‘loginkey_ok’])
{
?>注册验证码开启为  regkey_ok


数据字典:http://www.phome.net/doc/manual/extend/html/dbdoc/index.html
二次开发:http://www.phome.net/doc/manual/extend/
模板扩展变量:http://www.phome.net/doc/manual/mod/
rand()

[e:loop={“select a.ztpath,a.ztname from {$dbtbpre}enewszt a,{$dbtbpre}enewsztadd b where b.zcids like ‘%{$GLOBALS[class_r][$GLOBALS[‘navclassid’]][classname]}%’ and a.ztid=b.ztid order by rand() limit 16”,16,24,0}]
<li><a href=”/<?=$bqr[‘ztpath’]?>”><?=$bqr[‘ztname’]?></a></li>
[/e:loop]

列表页获取当前栏目:  [ecmsinfo]”select * from {$dbtbpre}ecms_news where mnewstime >=”.(time()-30*24*3600).” and classid={$GLOBALS[‘navclassid’]} order by onclick desc limit 29″,29,8,0,24,24,0[/ecmsinfo]
判断登录:

<?php
$lguserid=intval(getcvar(‘mluserid’));//登陆用户ID
$lgusername=RepPostVar(getcvar(‘mlusername’));//登陆用户
$lggroupid=intval(getcvar(‘mlgroupid’));//会员组ID
if($lguserid) //登陆会员显示菜单
{echo 222222;}
?>

select FROM_UNIXTIME(unix_timestamp(now()),’%Y%m%d’)