Posts Tagged ‘ECMS’
星期二, 十月 27th, 2009
后台管理员(前缀+)
Back-End:for Administrators(Back-End Prefixion+ )
ecmsdodbdata:empirecms //
eloginlic:empirecmslic //用户许可证书名称
loginadminstyleid:1 //风格ID
loginecmsckpass:e106107180eb2b343f5fcfc4acb569cdc //密码加密
loginlevel:1 //组ID
loginrnd:W2bng94vjyWAXfBuFKFq //认证码加密
loginuserid:1 //用户ID
loginusername:admin //用户名
logintime:1256575463 //登陆时间UNIX时间戳
前台会员(前缀+)
Front-End:for members( Front-End Prefixion+ )
mlgroupid:1 //会员组ID
mlrnd:c9tVw6bXikEZ //RND认证加密
mluserid:2 //会员ID
mlusername:test //会员用户名
在ECMS里怎样取得前台会员Cookie
How can i get those Cookies
Tags: Cookie, ECMS, ECMS 二次开发, 帝国CMS, 帝国CMS二次开发
Posted in php | 3 Comments »
星期一, 十月 26th, 2009
Tags: ECMS, php, 帝国 to_time()函数, 时间转换
Posted in php | No Comments »
星期六, 十月 24th, 2009
wm_chief_createpath($n_path);
}
$i=0;
while($file=@readdir($hand)){
$i++;
if ($file!="."&&$file!=".."){
//目录
if(is_dir($o_path."/".$file)){
$o_s_path=$o_path."/".$file;
$n_s_path=$n_path."/".$file;
$this->wm_chief_copypath($o_s_path,$n_s_path);
}
else{
$o_file=$o_path."/".$file;
$n_file=$n_path."/".$file;
$this->wm_chief_copyfile($o_file,$n_file);
}
}
}
@closedir($hand);
return true;
}
/*copy() PHP自带函数用于拷贝文件*/
function wm_chief_copyfile($o_file,$n_file){
@copy($o_file,$n_file);
}
/*
mkdir() PHP自带函数用于创建目录
chmod() PHP自带函数用于改改读写权限 貌似是mkdir()创建完目录权限不一定落实 所以补了个chmod()
*/
function wm_chief_createpath($n_path){
@mkdir($n_path,0777);
@chmod($n_path,0777);
}
}
//本程序由wm_chief原创,如要转载,请注明作者与来源(http://www.phome.net)
?>
Tags: copypath.php, e/class/copypath.php, ECMS, ECMS6.0, php
Posted in php | No Comments »
星期六, 十月 24th, 2009
下面是正常HTML网页代码内容
---------------------------------------------------------------------------------------
*/
/*
1.defined() 函数检查某常量是否存在;
2.exit();执行后下面的代码将不再执行
3.引用此文件的动态页面不能被其他程序所引用
*/
if(!defined('empirecms'))
{
exit();
}
//扣点
require_once($check_path."e/class/connect.php");
/*同上defined*/
if(!defined('InEmpireCMS'))
{
exit();
}
require_once(ECMS_PATH."e/class/db_sql.php");
require_once(ECMS_PATH."e/class/user.php");
require_once(ECMS_PATH.'e/data/dbcache/MemberLevel.php');
/*
所要看的栏目ID
需要的最低用户组ID
设置需要权限的动态页面直接传参得到
*/
$check_classid=(int)$check_classid;
$check_groupid=(int)$check_groupid;
/*
1.返回页面地址
2.$_SERVER['PHP_SELF'] 得到当前执行脚本的绝路径文件名
3.例如:http://www.phome.net/some/text.php 会得到/some/text.php
*/
$toreturnurl=$_SERVER['PHP_SELF'];
/*
$eloginurl 登陆地址
/e/class/user.php
*/
$gotourl=$eloginurl?$eloginurl:$public_r['newsurl']."e/member/login/"; //登陆地址
/*
1.getcvar() 自定义函数用于取得登陆信息
2.定义:e/class/connect.php
3.getcvar('mluserid')登陆ID
4.getcvar('mlgroupid')登陆用户组ID
*/
$loginuserid=(int)getcvar('mluserid');
$logingroupid=(int)getcvar('mlgroupid');
/*
1.printerror2()函数定义在/e/class/connect.php
2.用于直接打印提示信息
3.如果登录ID为FLASE 也就是说用户没有登录
3.$level_r 读取缓存文件中数组/e/data/dbcache/MemberLevel.php
*/
if(!$loginuserid)
{
printerror2("本栏目需要 ".$level_r[$check_groupid][groupname]." 会员级别以上才能查看","");
}
if($level_r[$logingroupid][level]<$level_r[$check_groupid][level])
{
printerror2("本栏目需要 ".$level_r[$check_groupid][groupname]." 会员级别以上才能查看","");
}
?>
Tags: /e/class/CheckClassLevel.php, CheckClassLevel.php, ECMS, php
Posted in php | No Comments »
星期六, 十月 24th, 2009
用于删除文件目录
应该是老大很早以前写的类了 版权上下都有
用于删除目录和文件
包含一个类3个方法
wm_chief_delpath()
wm_chief_file()
wm_chief_path()
如果目录中有目录就返回重新读新发现的目录 目录中的文件 然后删除目录,如此循环 目录和文件全删了
wm_chief_delpath($del_s_path);
}
/*其他情况 也就是不是目录的情况即为文件的情况 执行大括号中内容*/
else{
$del_file=$del_path."/".$file;
/* 使用本类中 wm_chief_file处理$del_file*/
$this->wm_chief_file($del_file);
}
}
}//while循环结束
/*关闭*/
@closedir($hand);
/*使用本类中的 wm_chief_path函数处理*/
$this->wm_chief_path($del_path);
/**/
return true;
}
// unlink() PHP自由函数,用于删除文件:若成功,则返回 true,失败则返回 false。
function wm_chief_file($del_file){
@unlink($del_file);
}
//删除目录 rmdir() 函数删除空的目录。若成功,则该函数返回 true。若失败,则返回 false。
function wm_chief_path($del_path){
@rmdir($del_path);
}
}
//本程序由wm_chief原创,如要转载,请注明作者与来源(http://www.phome.net)
?>
Tags: /e/class/delpath.php, closedir(), delpath.php, ECMS, ECMS6.0, file_exists(), opendir(), php, PHP删除目录, readdir(), redir(), unlink()
Posted in php | No Comments »