本文整理汇总了PHP中cpheader函数的典型用法代码示例。如果您正苦于以下问题:PHP cpheader函数的具体用法?PHP cpheader怎么用?PHP cpheader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cpheader函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: acpmsg
function acpmsg($message, $url = '', $type = '', $extra = '')
{
if (defined('IN_ADMINCP')) {
!defined('CPHEADER_SHOWN') && cpheader();
cpmsg($message, $url, $type, $extra);
} else {
showmessage($message, $url, $extra);
}
}
示例2: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: admincp_recyclebin.php 31045 2012-07-12 01:55:00Z chenmengshu $
*/
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}
require_once libfile('function/post');
require_once libfile('function/discuzcode');
cpheader();
if (!$operation) {
shownav('topic', 'nav_recyclebin');
if (!submitcheck('delsubmit') && !submitcheck('undelsubmit')) {
showsubmenu('nav_recyclebin', array(array('recyclebin_list', 'recyclebin', 1), array('search', 'recyclebin&operation=search', 0), array('clean', 'recyclebin&operation=clean', 0)));
$lpp = empty($_GET['lpp']) ? 20 : $_GET['lpp'];
$start = ($page - 1) * $lpp;
$start_limit = ($page - 1) * $lpp;
$checklpp = array();
$checklpp[$lpp] = 'selected="selected"';
showformheader('recyclebin');
showtableheader($lang['recyclebin_list'] . ' <select onchange="if(this.options[this.selectedIndex].value != \'\') {window.location=\'' . ADMINSCRIPT . '?action=recyclebin&lpp=\'+this.options[this.selectedIndex].value }">
<option value="20" ' . $checklpp[20] . '> ' . $lang[perpage_20] . ' </option><option value="50" ' . $checklpp[50] . '>' . $lang[perpage_50] . '</option><option value="100" ' . $checklpp[100] . '>' . $lang[perpage_100] . '</option></select>');
showsubtitle(array('', 'thread', 'recyclebin_list_thread', 'recyclebin_list_author', 'recyclebin_list_status', 'recyclebin_list_lastpost', 'recyclebin_list_operation', 'reason'));
$fids = $threadlist = array();
$threads = C::t('forum_thread')->fetch_all_by_tid_fid_displayorder(0, 0, -1, 'dateline', $start_limit, $lpp, '=');
foreach ($threads as $tid => $value) {
$fids[$value['fid']] = $value['fid'];
示例3: do_request
function do_request($action)
{
global $_G;
$lang = lang('admincp');
$title = 'cplog_' . getgpc('action') . (getgpc('operation') ? '_' . getgpc('operation') : '');
$operation = getgpc('operation');
$do = getgpc('do');
$sid = $_G['sid'];
$isfounder = $this->isfounder;
if ($action == 'main' || $this->allow($action, $operation, $do)) {
require './source/admincp/admincp_' . $action . '.php';
} else {
cpheader();
cpmsg('action_noaccess', '', 'error');
}
}
示例4: ifchecked
ifchecked($settings['sitemap'], 'sitemap');
ifchecked($settings['watermark'], 'watermark');
ifchecked($settings['wap_enable'], 'wap_enable');
ifchecked($settings['banip_enable'], 'banip_enable');
ifchecked($settings['spam_enable'], 'spam_enable');
ifchecked($settings['rss_enable'], 'rss_enable');
ifchecked($settings['use_html'], 'use_html');
ifchecked($settings['permalink'], 'permalink');
ifchecked($settings['jumpwww'], 'jumpwww');
ifchecked($settings['comment_email_reply'], 'comment_email_reply');
ifchecked($settings['seccode'], 'seccode');
ifchecked($settings['seccode_adulterate'], 'seccode_adulterate');
ifchecked($settings['seccode_ttf'], 'seccode_ttf');
ifchecked($settings['seccode_angle'], 'seccode_angle');
ifchecked($settings['seccode_color'], 'seccode_color');
ifchecked($settings['seccode_size'], 'seccode_size');
ifchecked($settings['seccode_shadow'], 'seccode_shadow');
ifchecked($settings['dateconvert'], 'dateconvert');
$waterpos = $tb_spam_level = array();
$settings['server_timezone'] < 0 ? ${'zone_0' . str_replace('.', '_', abs($settings['server_timezone']))} = 'checked' : (${'zone_' . str_replace('.', '_', $settings['server_timezone'])} = 'selected');
$waterpos[$settings['waterpos']] = 'checked';
$tb_spam_level[$settings['tb_spam_level']] = 'checked';
$avatar_level[$settings['avatar_level']] = 'checked';
$gd_version = gd_version();
$gd_version = $gd_version ? '服务器GD版本:' . $gd_version : '服务器不支持GD,因此该功能无法正常使用.';
if (in_array($action, array_flip($settingsmenu))) {
$subnav = $settingsmenu[$action];
}
$navlink_L = $subnav ? ' » <span>' . $subnav . '</span>' : '';
cpheader($subnav);
include template('configurate');
示例5: cpmsgexport
function cpmsgexport($message, $url_forward = '') {
extract($GLOBALS, EXTR_SKIP);
cpheader(0);
$message = "<form method=\"post\" name=\"exportpara\" id=\"exportpara\" action=\"$url_forward\">".
"<br /><br /><br />$message<br /><br /><br />\n";
$message .= "<a href=\"javascript:exportsubmit('exportpara');\">如果您的浏览器没有自动跳转,请点击这里</a>";
$message .= "<script>setTimeout(\"exportsubmit('exportpara');\", 2000);</script>";
$message .= "<input type='hidden' name='type' value='".$type."' />";
$message .= "<input type='hidden' name='saveto' value='server' />";
$message .= "<input type='hidden' name='filename' value='".$filename."' />";
$message .= "<input type='hidden' name='method' value='multivol' />";
$message .= "<input type='hidden' name='sizelimit' value='".$sizelimit."' />";
$message .= "<input type='hidden' name='volume' value='".$volume."' />";
$message .= "<input type='hidden' name='tableid' value='".$tableid."' />";
$message .= "<input type='hidden' name='startfrom' value='".$startrow."' />";
$message .= "<input type='hidden' name='extendins' value='".$extendins."' />";
$message .= "<input type='hidden' name='sqlcharset' value='".$sqlcharset."' />";
$message .= "<input type='hidden' name='sqlcompat' value='".$sqlcompat."' />";
$message .= "<input type='hidden' name='exportsubmit' value='yes' />";
$message .= "<input type='hidden' name='usehex' value='".$usehex."' />";
$message .= "<input type='hidden' name='usezip' value='".$usezip."' />";
$message .= "<input type='hidden' name='customtables' value='".$customtablesnew."' />";
$message .= "</form><br />";
?>
<br /><br /><br /><br /><br /><br />
<table width="500" border="0" cellpadding="0" cellspacing="0" align="center" class="tableborder">
<tr class="header"><td>Discuz! 提示</td></tr><tr><td class="altbg2"><div align="center">
<?=$message?></div><br /><br />
</td></tr></table>
<br /><br /><br />
<?
cpfooter();
exit;
}
function cpmsg($message, $url_forward = '', $msgtype = 'message', $extra = '', $cancelurl = '') {
cpheader(0);
if($msgtype == 'form') {
$message = "<form method=\"post\" action=\"$url_forward\">".
"<br />$message$extra<br /><br /><br /><br />\n".
"<input class=\"button\" type=\"submit\" name=\"confirmed\" value=\" 确 定 \"> \n".
"<input class=\"button\" type=\"button\" value=\" 取 消 \" onClick=\"".
($cancelurl == '' ? 'history.go(-1)' : 'location.href=\''.$cancelurl.'\'').
";\"></form><br />";
} else {
if($url_forward) {
$message .= "<br /><br /><a href=\"$url_forward\">如果您的浏览器没有自动跳转,请点击这里</a>";
$message .= "<script>setTimeout(\"redirect('$url_forward');\", 2000);</script>";
} elseif(strpos($message, "返回")) {
$message .= "<br /><br /><a href=\"javascript:history.go(-1);\" class=\"mediumtxt\">[ 点击这里返回上一页 ]</a>";
}
$message = "<br />$message$extra<br />";
}
?>
<br /><br /><br /><br /><br /><br />
<table width="500" border="0" cellpadding="0" cellspacing="0" align="center" class="tableborder">
<tr class="header"><td>Discuz! 提示</td></tr><tr><td class="altbg2"><div align="center">
<?=$message?></div><br /><br />
</td></tr></table>
<br /><br /><br />
<?
cpfooter();
exit;
}
function cpheader($showmenu = 1){
extract($GLOBALS, EXTR_SKIP);
if($db){
$query = $db->query("select database()");
$title = "PNBAKMYSQL备份/恢复 - ".$db->result($query, 0);
}else{
$title = "PNBAKMYSQL备份/恢复";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title><?=$title?></title>
<link href="pnbak.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="pnbak.js"></script>
</head>
<body leftmargin="10" topmargin="10">
<?php
if($showmenu){
?>
<table width="100%" border="0" cellpadding="2" cellspacing="6">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="guide">
<tr>
<td>
<a href="<?=$phpself?>?action=config">连接设置</a> | <a href="<?=$phpself?>?action=export">数据备份</a> | <a href="<?=$phpself?>?action=import">数据恢复</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
//.........这里部分代码省略.........
示例6: checkacpaction
function checkacpaction($action, $operation = '', $halt = true)
{
global $radminid, $groupid, $dactionarray;
$ret = $dactionarray && $radminid != $groupid && (in_array($action, $dactionarray) || $operation && in_array($action . '_' . $operation, $dactionarray)) ? false : true;
if ($halt && !$ret) {
cpheader();
cpmsg('action_noaccess');
}
return $ret;
}
示例7: header
function header(){
cpheader();
echo $this->script ? '<link id="style_dxcp" href="./source/plugin/ducexweather/images/'.$this->script.'.css?'.time().'" rel="stylesheet" type="text/css" /><script type="text/javascript" src="./source/plugin/ducexweather/script/'.$this->script.'.js?'.time().'"></script>' : '';
}