本文整理汇总了PHP中checkpower函数的典型用法代码示例。如果您正苦于以下问题:PHP checkpower函数的具体用法?PHP checkpower怎么用?PHP checkpower使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checkpower函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
switch ($operation) {
case '':
checkpower("menu_message");
$maxperpage = 20;
$total = $DreamCMS->db->get_var("SELECT count(*) FROM `#DC@__message` order by id DESC");
page($total, $maxperpage, "条留言");
$rs = $DreamCMS->db->get_results("SELECT * FROM `#DC@__message` order by id DESC LIMIT {$firstcount},{$maxperpage}");
$_count = count($rs);
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » 留言管理','');</script>
<div class="container" id="cpcontainer">
<h3>留言管理</h3><form action="admincp.php?do=message&operation=post" method="post">
<table class="tb tb2 ">
<?php
for ($i = 0; $i < $_count; $i++) {
$rs[$i]['user'] = unserialize($rs[$i]['user']);
if ($rs[$i]['reply']) {
$reply = explode('||', $rs[$i]['reply']);
$reply[0] == 'admin' && ($rs[$i]['reply'] = '<strong>管理员回复:</strong>' . $reply[1]);
示例2: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
switch ($operation) {
case '':
checkpower("menu_user_manage");
$maxperpage = 20;
$total = $DreamCMS->db->get_var("SELECT count(*) FROM `#DC@__members` WHERE `adminid`='0' order by uid DESC");
page($total, $maxperpage, "位会员");
$rs = $DreamCMS->db->get_results("SELECT * FROM `#DC@__members` WHERE `adminid`='0' order by uid DESC LIMIT {$firstcount},{$maxperpage}");
$_count = count($rs);
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » 会员管理','');</script>
<div class="container" id="cpcontainer">
<h3>会员管理</h3>
<table class="tb tb2 nobdb" id="tips">
<tr>
<th colspan="15" class="partition">技巧提示</th>
</tr>
<tr>
<td class="tipsblock"><ul id="tipslis">
<li>点击ID可查看该会员</li>
</ul></td>
示例3: checkpower
</tr>
<tr>
<td class="vtop tips2">按日期:</td>
<td class="vtop rowform">开始时间:<input type="text" class="txt" name="starttime" value="" onclick="showcalendar(event, this)" style="width:120px"><br />-<br />结束时间:<input type="text" class="txt" name="endtime" value="" onclick="showcalendar(event, this)" style="width:120px"></td>
</tr>
<tr>
<td colspan="2" class="td21"><input type="submit" class="btn" name="cleanupsubmit" value="提交" /></td>
</tr>
</table>
</form>
</div>
</body></html>
<?php
break;
case 'page':
checkpower(array("menu_html_all", "menu_html_page"));
da_admin_head();
catalogvars();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » HTML更新 » 更新独立页面','');</script>
<div class="container" id="cpcontainer">
<h3>更新独立页面</h3>
<form name="cpform" method="get" action="admincp.php" id="cpform" >
<input type="hidden" name="do" value="html" />
<input type="hidden" name="operation" value="create" />
<input type="hidden" name="action" value="page" />
<table class="tb tb2 ">
<tr>
<td class="vtop tips2" width="120">独立页面:</td>
示例4: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
switch ($operation) {
case '':
checkpower("menu_installhelper");
$ittype = save($_GET['ittype']);
$rs = $DreamCMS->db->get_row("SELECT * FROM `#DC@__installhelper` WHERE `ittype`='" . $ittype . "' order by itid DESC LIMIT 1", ARRAY_A);
include DCPATH . "include/fckeditor.php";
$editor = new FCKeditor('body');
$editor->Width = 800;
$editor->Value = $rs['body'];
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » 装机助手','');</script>
<div class="container" id="cpcontainer">
<h3>装机助手</h3>
<form action="admincp.php?do=installhelper&operation=post" method="post" enctype="multipart/form-data">
<input type="hidden" name="action" value="add" />
<input type="hidden" name="itid" value="<?php
echo $rs['itid'];
?>
" />
示例5: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
$contitle = '品牌或机型管理';
switch ($operation) {
case '':
checkpower("menu_brands");
$fid = intval($_GET['fid']);
$sql = " WHERE `fid`='{$fid}' AND `state`='0' ";
$maxperpage = 20;
$total = $DreamCMS->db->get_var("SELECT count(*) FROM `#DC@__brands`" . $sql);
$rs = $DreamCMS->db->get_results("SELECT * FROM `#DC@__brands` " . $sql . " order by `orders` ASC,`id` DESC ");
$_count = count($rs);
if ($fid) {
//查询所属上级分类
$prebrand = $DreamCMS->db->get_row("SELECT * FROM `#DC@__brands` WHERE `id`=" . $fid . " LIMIT 1 ", ARRAY_A);
}
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » <?php
echo $contitle;
if ($prebrand) {
echo "--" . $prebrand['name'];
示例6: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
checkpower("menu_events_livehall");
$contitle = '直播大厅';
switch ($operation) {
case 'manage':
$contitle .= "--列表";
$sql = '';
$title = $_GET['title'] ? save($_GET['title']) : '';
$title && ($sql .= " AND `title` LIKE '%" . $title . "%' ");
if ($sql) {
$sql = " WHERE " . trim(trim($sql), 'AND') . " ";
}
$maxperpage = 20;
$total = $DreamCMS->db->get_var("SELECT count(*) FROM `#DC@__events_livehall` " . $sql);
page($total, $maxperpage, "条数据");
$rs = $DreamCMS->db->get_results("SELECT * FROM `#DC@__events_livehall` " . $sql . " ORDER BY `id` DESC LIMIT {$firstcount},{$maxperpage}");
$_count = count($rs);
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » <?php
echo $contitle;
?>
示例7: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
unset($_catalog_array, $_parent_catalog_array);
switch ($operation) {
case '':
checkpower("menu_cache");
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » 更新缓存','');</script>
<div class="container" id="cpcontainer">
<h3>更新系统统计</h3>
<table class="tb tb2 nobdb" id="tips">
<tr>
<th colspan="15" class="partition">技巧提示</th>
</tr>
<tr>
<td class="tipsblock"><ul id="tipslis">
<li>清除模板缓存:影响清理后第一次访问速度,建议在未对模板进行修改时请勿进行清除模板缓存操作</li>
</ul></td>
</tr>
</table>
<form name="cpform" method="post" action="admincp.php?do=cache&operation=post" id="cpform" >
示例8: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
$types = intval($_GET['types']) ? intval($_GET['types']) : intval($_POST['types']);
checkpower("menu_events_wonderful" . $types);
if ($types == 1) {
$contitle = '精彩篮球';
} elseif ($types == 2) {
$contitle = '精彩足球';
} else {
alert('类型错误');
}
switch ($operation) {
case 'manage':
$contitle .= "--列表";
$sql = '';
$types && ($sql .= " AND `types`='" . $types . "' ");
$title = $_GET['title'] ? save($_GET['title']) : '';
$title && ($sql .= " AND `title` LIKE '%" . $title . "%' ");
if ($sql) {
$sql = " WHERE " . trim(trim($sql), 'AND') . " ";
}
$maxperpage = 20;
$total = $DreamCMS->db->get_var("SELECT count(*) FROM `#DC@__events_wonderful` " . $sql);
page($total, $maxperpage, "条数据");
示例9: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
switch ($operation) {
case 'manage':
checkpower("menu_template_manage");
$dir = trim($_GET["dir"]);
$L = GetFolderList($dir, "templates", "");
da_admin_head();
?>
<div class="container" id="cpcontainer">
<table class="tb tb2 nobdb" width="100%">
<tr>
<th height="20">当前路径:<strong><a href="admincp.php?do=template&operation=manage"><?php
echo $Folder . '/' . $dir;
?>
</a></strong></th>
</tr>
</table>
<table class="tb tb2 nobdb" width="100%">
<?php
if ($L['parentfolder']) {
?>
示例10: checkpower
<td colspan="2" class="vtop tips2"></td>
</tr>
<tr class="nobg">
<td colspan="3" class="td27">水印透明度:</td>
</tr>
<tr>
<td class="vtop rowform"><input name="waterpct" value="<?php
echo $DreamCMS->config['waterpct'];
?>
" size="10" maxlength="3" class="txt"/></td>
<td colspan="2" class="vtop tips2"></td>
</tr>
<?php
}
if (empty($operation) || $operation == "bbs") {
checkpower(array("menu_setting_all", "menu_setting_bbs"));
?>
<tr>
<th colspan="3" class="partition"> 调用论坛设置</th>
</tr>
<tr class="nobg">
<td colspan="3" class="td27">是否调用论坛:</td>
</tr>
<tr>
<td class="vtop rowform"><ul onmouseover="altStyle(this);">
<li> <input class="radio" type="radio" name="bbs[call]" value="1" /> 调用 </li>
<li> <input class="radio" type="radio" name="bbs[call]" value="0" /> 不调用 </li>
</ul></td>
<td colspan="2" class="vtop tips2"></td>
</tr>
示例11: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
checkpower("menu_events_liverecomment");
$contitle = '直播推荐';
switch ($operation) {
case 'manage':
$contitle .= "--列表";
$sql = '';
$sortname = $_GET['sortname'] ? save($_GET['sortname']) : '';
$sortname && ($sql .= " AND `sortname` LIKE '%" . $sortname . "%' ");
if ($sql) {
$sql = " WHERE " . trim(trim($sql), 'AND') . " ";
}
$maxperpage = 20;
$total = $DreamCMS->db->get_var("SELECT count(*) FROM `#DC@__events_liverecomment` " . $sql);
page($total, $maxperpage, "条数据");
$rs = $DreamCMS->db->get_results("SELECT * FROM `#DC@__events_liverecomment` " . $sql . " ORDER BY `id` DESC LIMIT {$firstcount},{$maxperpage}");
$_count = count($rs);
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » <?php
echo $contitle;
?>
示例12: trim
if ($action == "login") {
//checkverifycode(trim($_POST['verifycode']),'验证码错误!',"admin");
$username = trim($_POST['username']);
$password = md5(trim($_POST['password']));
strlen($username) > 20 && alert('字段长度才20,你想输入多长?');
if ($uid = checkadmin($username, $password)) {
set_cookie('adminid', $uid, $cookietime);
set_cookie('administrator', $username, $cookietime);
set_cookie('adminpassword', $password, $cookietime);
$DreamCMS->db->query("UPDATE `#DC@__members` SET `lastip`='" . getip() . "',`lastlogintime`='" . time() . "',`logintimes`=logintimes+1 WHERE `uid`='{$uid}'");
redirect('登陆成功, 请稍候......', "admincp.php");
} else {
redirect('登陆失败!', "admincp.php");
}
}
$administrator = get_cookie("administrator");
$adminpassword = get_cookie("adminpassword");
if ($administrator && $adminpassword) {
islogin($administrator, $adminpassword);
} else {
unset($_SESSION['admincode']);
set_cookie("admincode", '', time() - 31536000);
set_cookie("adminid", '', time() - 31536000);
set_cookie("administrator", '', time() - 31536000);
set_cookie("adminpassword", '', time() - 31536000);
da_admin_login();
}
$admin = get_admin_info($administrator, $adminpassword);
$menu_array = (include DCPATH . 'admin/menu.array.php');
checkpower("__ADMINCP__", "ADMINCP_Permission_Denied");
示例13: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
switch ($operation) {
case '':
checkpower("menu_articletype");
$maxperpage = 20;
$total = $DreamCMS->db->get_var("SELECT count(*) FROM `#DC@__articletype` order by id DESC");
$rs = $DreamCMS->db->get_results("SELECT * FROM `#DC@__articletype` order by id DESC ");
$_count = count($rs);
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » 文档自定义属性管理','');</script>
<div class="container" id="cpcontainer">
<h3>文档自定义属性管理</h3>
<table class="tb tb2 nobdb" id="tips">
<tr>
<th colspan="15" class="partition">技巧提示</th>
</tr>
<tr>
<td class="tipsblock"><ul id="tipslis">
<li>点击ID可查看该TAG</li>
</ul></td>
</tr>
示例14: checkpower
<td style="width:60px;">重新上传:</td>
<td class="vtop rowform"><input name="file" type="file" class="uploadbtn" id="pic" /><input name="fid" type="hidden" value="<?php
echo $fid;
?>
" /><input name="action" type="hidden" value="reupload" /> <input type="submit" value="上传" style="border:1px solid #999999;"/></td>
</form>
</tr>
</table>
</div>
<iframe width="100%" height="100" style="display:none" id="post" name="post"></iframe>
</body>
</html>
<?php
break;
case 'upload':
checkpower("menu_file_upload");
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » 文件管理 » 上传文件','');</script>
<div class="container" id="cpcontainer">
<h3>上传文件</h3>
<table class="tb tb2 nobdb" id="tips">
<tr>
<th colspan="15" class="partition">技巧提示</th>
</tr>
<tr>
<td class="tipsblock"><ul id="tipslis">
<li></li>
</ul></td>
</tr>
示例15: exit
<?php
/*
* DreamArticle Version3.0
* Copyright 2007-2008, iDreamSoft
* http://www.idreamsoft.cn
* By:coolmoo<idreamsoft@qq.com>
*/
!defined('DCPATH') && exit('What are you doing?');
checkpower("menu_events_playsource");
$types = intval($_GET['types']) ? intval($_GET['types']) : intval($_POST['types']);
!$types && alert('您没有选择类型');
$contitle = '来源管理';
switch ($operation) {
case 'manage':
$contitle .= "--列表";
$sql = " `state`='0' AND `types`='" . $types . "' ";
$maxperpage = 20;
$total = $DreamCMS->db->get_var("SELECT count(*) FROM `#DC@__events_playsource` WHERE " . $sql);
page($total, $maxperpage, "条数据");
$rs = $DreamCMS->db->get_results("SELECT * FROM `#DC@__events_playsource` WHERE " . $sql . " ORDER BY `orders` ASC,`id` ASC LIMIT {$firstcount},{$maxperpage}");
$_count = count($rs);
da_admin_head();
?>
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
<script type="text/JavaScript">admincpnav('首页 » <?php
echo $contitle;
?>
','');</script>
<div class="container" id="cpcontainer">
<div class="itemtitle">