百度
|
神马
|
搜狗
|
技术文档
|
学习资料分享
- 记录帝国CMS及运维技术的点点滴滴
首页
服务器管理
帝国cms技术
实用IT技术
更多
帝国cms技术资料分享
导航
本站搜索
服务器管理
帝国cms技术
实用IT技术
更多
你的位置:
首页
>
帝国cms技术
» 正文
帝国CMS二次开发参考功能文件
发布时间:2020-11-07
作品分类:
帝国CMS
二次开发
函数
PHP Code
复制内容到剪贴板
<?php
define(
'EmpireCMSAdmin'
,
'1'
);
require
(
"../../class/connect.php"
);
//引入数据库配置文件和公共函数文件
require
(ECMS_PATH.
"e/class/db_sql.php"
);
//引入数据库操作文件
require
(ECMS_PATH.
"e/class/functions.php"
);
//导入编译标签文件
require
(ECMS_PATH.
"e/class/userfun.php"
);
//引入自定义函数
require
(ECMS_PATH.
"e/class/com_functions.php"
);
require
(ECMS_PATH.
"e/data/dbcache/class.php"
);
//引入栏目缓存文件
require
(ECMS_PATH.
"e/member/class/user.php"
);
//引入会员文件
require
(ECMS_PATH.
"e/class/memberfun.php"
);
//会员处理文件
require
(ECMS_PATH.
"e/data/dbcache/MemberLevel.php"
);
//引入会员缓存文件
require
ECMS_PATH.
'e/data/'
.LoadLang(
'pub/fun.php'
);
//引入分页语言包文件
$link
=db_connect();
$empire
=
new
mysqlquery();
$editor
=1;
//-------- 分页参数 --------
$page
=(int)
$_GET
[
'page'
];
$start
=0;
$line
=30;
//每页显示记录数
$page_line
=8;
//每页显示分页链接数
$offset
=
$page
*
$line
;
//总偏移量
//-------- 查询SQL --------
//取得信息总数
$totalquery
=
"select count(*) as total from {$dbtbpre}release_money order by id desc"
;
$num
=
$empire
->gettotal(
$totalquery
);
//select查询SQL
$query
=
"select * from {$dbtbpre}release_money"
;
$query
.=
" order by id desc limit $offset,$line"
;
$sql
=
$empire
->query(
$query
);
$listpage
=page2(
$num
,
$line
,
$page_line
,
$start
,
$page
,
$search
);
//取得分页导航
?>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
用户消费记录预览
<link href=
"<?=$public_r['newsurl']?>e/admin/adminstyle/1/adminstyle.css"
rel=
"stylesheet"
type=
"text/css"
>
<body>
"100%"
border=
"0"
align=
"center"
cellpadding=
"3"
cellspacing=
"1"
>
"50%"
>位置:
"index.php"
>用户消费记录
"form1"
method=
"get"
action=
"?act=a"
>
"800"
border=
"0"
cellpadding=
"3"
cellspacing=
"1"
class
=
"tableborder"
>
"25"
bgcolor=
"#FFFFFF"
>会员名:
"keyboard"
type=
"text"
id=
"keyboard"
value=
""
>
"submit"
name=
"Submit"
value=
"搜索"
>
"sear"
type=
"hidden"
id=
"sear"
value=
"1"
>
"800"
class
=
"tableborder"
cellpadding=
"3"
>
class
=
"header"
height=
"30"
>
ID
用户名/用户ID
信息
扣款
时间
<?php
while
(
$row
=
$empire
->fetch(
$sql
))
//循环获取查询记录/与上面的$sql形成分页显示
{
?>
"30"
bgcolor=
"#FFFFFF"
>
<?=
$row
[
'id'
]?>
<?=
$row
[
'userid'
]?>
<?=
$row
[
'infoid'
]?>
<?=
$row
[
'money'
]?>
<?=
$row
[
'time'
]?>
<?php
}
?>
"#FFFFFF"
>
"5"
><?=
$listpage
?>