当前位置: 首页>>代码示例>>PHP>>正文


PHP sheader函数代码示例

本文整理汇总了PHP中sheader函数的典型用法代码示例。如果您正苦于以下问题:PHP sheader函数的具体用法?PHP sheader怎么用?PHP sheader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sheader函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: admin_controller

 function admin_controller()
 {
     if (isset($_REQUEST['act']) && ($_REQUEST['act'] == 'admin_ajax' || $_REQUEST['act'] == 'admin_delete')) {
         if (!$GLOBALS['session']->get('adminid')) {
             exit('未登录');
         }
     }
     if (!isset($_REQUEST['act']) || $_REQUEST['act'] != 'login' && $_REQUEST['act'] != 'logout') {
         if (!$GLOBALS['session']->get('adminid')) {
             sheader('index.php?con=' . $GLOBALS['setting']['adminpath'] . '&act=login');
         }
     }
     include ROOT_PATH . '/models/common.php';
 }
开发者ID:Tolecen,项目名称:YouthFundWebSite,代码行数:14,代码来源:admin.class.php

示例2: plugin_controller

 function plugin_controller()
 {
     include ROOT_PATH . '/models/common.php';
     $this->pdir = ROOT_PATH . '/plugins';
     $this->plugin = new common('plugins');
     $this->pluginvars = new common('pluginvars');
     $this->pluginhooks = new common('pluginhooks');
     $adminarr = array('list1');
     if (in_array($_REQUEST['act'], $adminarr)) {
         if (!$GLOBALS['session']->get('adminid')) {
             sheader('index.php?con=admin&act=login');
         }
     }
 }
开发者ID:BGCX261,项目名称:zidan-kaka-oneplusone-svn-to-git,代码行数:14,代码来源:plugin.class.php

示例3: elseif

if ($forum['status'] < 1) {
    //隐藏板块
    $jumptobbs = true;
} elseif (!empty($forum['password'])) {
    $jumptobbs = true;
} elseif (!empty($forum['viewperm'])) {
    $viewpermarr = explode("\t", $forum['viewperm']);
    if (!in_array('7', $viewpermarr)) {
        $jumptobbs = true;
    }
} elseif (!empty($forum['redirect'])) {
    $forumurl = $forum['redirect'];
    $jumptobbs = true;
}
if ($jumptobbs) {
    sheader($threadurl);
    exit;
}
@(include_once S_ROOT . './data/system/bbsforums.cache.php');
if (!empty($_SGLOBAL['bbsforumarr']) && !empty($_SGLOBAL['bbsforumarr'][$forum['fid']]['name'])) {
    $forum['name'] = $_SGLOBAL['bbsforumarr'][$forum['fid']]['name'];
}
$iarr = array();
$listcount = $thread['replies'] + 1;
unset($_SGET['lastpost']);
$page = 1;
$listkey = 'posts';
$action = 'viewthread';
$item['listcount'] = $listcount;
$item['tid'] = $tid;
$space['jammer'] = 0;
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:viewthread.php

示例4: elseif

} elseif (!empty($forum['password'])) {
    $jumptobbs = true;
} elseif (!empty($forum['viewperm'])) {
    $viewpermarr = explode("\t", $forum['viewperm']);
    if (!in_array('7', $viewpermarr)) {
        $jumptobbs = true;
    }
} elseif (!empty($forum['redirect'])) {
    $forumurl = $forum['redirect'];
    $jumptobbs = true;
}
if ($_SC['bbsver'] <= 6 && empty($forum['allowshare'])) {
    $jumptobbs = true;
}
if ($jumptobbs) {
    sheader($forumurl);
}
@(include_once S_ROOT . './data/system/bbsforums.cache.php');
if (!empty($_SGLOBAL['bbsforumarr']) && !empty($_SGLOBAL['bbsforumarr'][$forum['fid']]['name'])) {
    $forum['name'] = $_SGLOBAL['bbsforumarr'][$forum['fid']]['name'];
}
$title = $forum['name'] . ' - ' . $_SCONFIG['sitename'];
$keywords = $forum['name'] . ',' . $lang['bbs'];
$description = $forum['name'] . ',' . $lang['bbs'];
$guidearr = array();
$guidearr[] = array('url' => geturl('action/bbs'), 'name' => $channels['menus']['bbs']['name']);
$guidearr[] = array('url' => geturl('action/forumdisplay/fid/' . $forum['fid']), 'name' => $forum['name']);
$tplname = 'bbs_forumdisplay';
$title = strip_tags($title);
$keywords = strip_tags($keywords);
$description = strip_tags($description);
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:forumdisplay.php

示例5: str_replace

    $template = str_replace("{stitle}", $stitle, $template);
    $template = $template . ' ' . $msg['body_data']['subject'];
    //aipingfa add
    $feedlist[] = $template;
    //    echo($template."<br />");
}
/*echo '<!--';
print_r($_SGLOBAL['member']);
print_r($_SGLOBAL['grouparr'][32]);
echo '-->';*/
//默认首页
//拆分菜单
$menu_arr_vertical = array_splice($channels['menus'], count($channels['menus']) - 6);
if (!empty($channels['default']) && $channels['default'] != 'index.php') {
    if (strpos($channels['default'], '?')) {
        sheader(S_URL . '/' . $channels['default']);
        exit;
    } else {
        include_once S_ROOT . './' . $channels['default'];
    }
} else {
    if (!empty($_SCONFIG['htmlindex'])) {
        $_SHTML['action'] = 'index';
        $_SGLOBAL['htmlfile'] = gethtmlfile($_SHTML);
        ehtml('get', $_SCONFIG['htmlindextime']);
        $_SCONFIG['debug'] = 0;
    }
    $title = $_SCONFIG['sitename'];
    $keywords = $_SCONFIG['sitename'];
    $description = $_SCONFIG['sitename'];
    include template('index');
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:index.php

示例6: account_action

 function account_action()
 {
     if (!$GLOBALS['session']->get('uid')) {
         sheader(url('user', 'login'));
     }
     $container = "and uid=" . $GLOBALS['session']->get('uid');
     if (submitcheck('commit') && !empty($_POST['newpassword'])) {
         if ($_POST['newpassword'] != $_POST['newpassword1']) {
             sheader(url('user', 'account'), 3, '两次密码输入不一致', 'member_redirect');
         } else {
             $user = $this->user->GetOne($container . ' and pwd="' . md52($_POST['password']) . '"');
             if ($user) {
                 $data['pwd'] = md52($_POST['newpassword']);
                 if ($this->user->UpdateData($data, $container)) {
                     sheader(url('user', 'account'), 3, '资料修改成功', 'member_redirect');
                 } else {
                     sheader(url('user', 'account'), 3, '资料修改失败', 'member_redirect');
                 }
             } else {
                 sheader(url('user', 'account'), 3, '资料修改失败,用户不存在', 'member_redirect');
             }
         }
     } else {
         include template('member_account');
     }
 }
开发者ID:BGCX261,项目名称:zidan-kaka-oneplusone-svn-to-git,代码行数:26,代码来源:user.class.php

示例7: ehtml

function ehtml($type, $updatetime = 0)
{
    global $_SGLOBAL, $_SGET, $_SHTML, $_SCONFIG, $lang;
    if ($type == 'get') {
        $_SGLOBAL['htmlfile']['updatetime'] = $updatetime;
        //if(empty($_SGET['php']) && !empty($_SGLOBAL['htmlfile']['path']) && file_exists($_SGLOBAL['htmlfile']['path'])) {
        //	sheader($_SGLOBAL['htmlfile']['url']);
        //}
        if (empty($_SGET['php']) && !empty($_SGLOBAL['htmlfile']['path']) && file_exists($_SGLOBAL['htmlfile']['path'])) {
            if ($_SGLOBAL['htmlfile']['path'] == './html/index.html') {
                include S_ROOT . './html/index.html';
                exit;
            } else {
                sheader($_SGLOBAL['htmlfile']['url']);
            }
        }
    } else {
        if (empty($_SHTML['maxpage']) && !empty($_SGLOBAL['htmlfile']['path'])) {
            $content = $_SGLOBAL['content'];
            $theurl = S_URL_ALL . '/index.php?' . arraytostring($_SHTML);
            $codearr = array('url' => rawurlencode($theurl), 'maketime' => $_SGLOBAL['timestamp'], 'updatetime' => $_SGLOBAL['htmlfile']['updatetime'], 'uid' => empty($_SHTML['uid']) ? 0 : $_SHTML['uid'], 'itemid' => empty($_SHTML['itemid']) ? 0 : $_SHTML['itemid'], 'action' => $_SHTML['action']);
            $code = rawurlencode(implode('/', $codearr));
            $content .= '
			<script language="javascript">
			<!--
			var Modified = new Date(document.lastModified);
			var copyright = document.getElementById("xspace-copyright");
			if(copyright) {
				copyright.innerHTML += "Last update: <a href=\\"' . $theurl . '/php/1\\" title=\\"' . $lang['the_page_can_be_updated_immediately_hits'] . '\\">"+(Modified.getYear()<200?(Modified.getYear()+1900):Modified.getYear())+"-"+(Modified.getMonth()+1)+"-"+Modified.getDate()+" "+Modified.getHours()+":"+Modified.getMinutes()+":"+Modified.getSeconds() + "</a><br>";
			}
			document.write(\'<script src="' . S_URL . '/batch.html.php?code=' . $code . '&amp;lastmodified=\' + Modified.getTime() + \'" type="text\\/javascript" language="javascript"><\\/script>\');
			//-->
			</script>';
            writefile($_SGLOBAL['htmlfile']['path'], $content);
        }
    }
}
开发者ID:hongz1125,项目名称:devil,代码行数:37,代码来源:common.func.php

示例8: showmessage

if (!checkperm('allowview')) {
    showmessage('no_permission');
}
$listcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT COUNT(*) FROM ' . tname('spacenews') . ' WHERE itemid=\'' . $itemid . '\''), 0);
if ($page > $listcount) {
    $_SHTML['page'] = $page = 1;
}
$start = $page - 1;
$query = $_SGLOBAL['db']->query('SELECT ii.* FROM ' . tname('spacenews') . ' ii WHERE ii.itemid=\'' . $itemid . '\' ORDER BY ii.pageorder, ii.nid LIMIT ' . $start . ', 1');
if ($msg = $_SGLOBAL['db']->fetch_array($query)) {
    $news = array_merge($news, $msg);
} else {
    moveitemfolder($itemid, 0, 2);
}
if (!empty($news['newsurl'])) {
    sheader(htmlspecialchars_decode($news['newsurl']));
    // CSIP change, 加入对url中特殊符的处理
}
$news['attacharr'] = array();
$multipage = '';
if ($listcount > 1) {
    $urlarr = array('action' => 'viewnews', 'itemid' => $itemid);
    $multipage = multi($listcount, 1, $page, $urlarr, 0);
} else {
    if ($page == 1 && $news['haveattach']) {
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('attachments') . ' WHERE itemid=\'' . $itemid . '\'');
        while ($attach = $_SGLOBAL['db']->fetch_array($query)) {
            if (strpos($news['message'], $attach['thumbpath']) === false && strpos($news['message'], $attach['filepath']) === false && strpos($news['message'], 'batch.download.php?aid=' . $attach['aid']) === false) {
                $attach['filepath'] = A_URL . '/' . $attach['filepath'];
                $attach['thumbpath'] = A_URL . '/' . $attach['thumbpath'];
                $attach['url'] = S_URL . '/batch.download.php?aid=' . $attach['aid'];
开发者ID:nickflyer,项目名称:osscms,代码行数:31,代码来源:viewnews.php

示例9: showmessage

if (!checkperm('allowvote')) {
    showmessage('no_permission');
}
$pollid = empty($_SGET['pollid']) ? 0 : intval($_SGET['pollid']);
if (empty($pollid)) {
    $pollid = intval(postget('pollid'));
}
if (empty($pollid)) {
    showmessage('not_found', S_URL);
}
$query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('polls') . ' WHERE pollid=\'' . $pollid . '\'');
if (!($poll = $_SGLOBAL['db']->fetch_array($query))) {
    showmessage('not_found', S_URL);
}
if (!empty($poll['pollsurl'])) {
    sheader($poll['pollsurl']);
}
if (submitcheck('pollsubmit')) {
    if (empty($_POST['votekey'])) {
        showmessage('no_votekey');
    }
    if (empty($_SGLOBAL['supe_uid'])) {
        $ip = $_SGLOBAL['onlineip'];
    } else {
        $ip = $_SGLOBAL['supe_uid'];
    }
    $votekeys = $_POST['votekey'];
    $options = unserialize($poll['options']);
    if (empty($poll['voters'])) {
        $voters = array();
    } else {
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:poll.php

示例10: showxml

    showxml($html);
} elseif ($action == 'viewnews') {
    //查看新闻前一个/后一个
    if (!empty($_GET['op']) && !empty($_GET['itemid']) && !empty($_GET['catid'])) {
        $itemid = intval($_GET['itemid']);
        $catid = intval($_GET['catid']);
        $newitemid = 0;
        if ($itemid && $catid && $_GET['op'] == 'up') {
            $newitemid = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT itemid FROM ' . tname('spaceitems') . ' WHERE itemid <\'' . $itemid . '\' AND catid=\'' . $catid . '\' ORDER BY itemid DESC LIMIT 1'), 0);
        } elseif ($itemid && $catid) {
            $newitemid = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT itemid FROM ' . tname('spaceitems') . ' WHERE itemid >\'' . $itemid . '\' AND catid=\'' . $catid . '\' ORDER BY itemid LIMIT 1'), 0);
        }
        if (!empty($newitemid)) {
            sheader(geturl('action/viewnews/itemid/' . $newitemid));
        } else {
            sheader(geturl('action/viewnews/itemid/' . $itemid));
        }
    }
} elseif ($action == 'quote') {
    //评论引用
    include_once S_ROOT . './function/misc.func.php';
    $cid = empty($_GET['cid']) ? 0 : intval($_GET['cid']);
    $html = false;
    if ($cid) {
        $item = array();
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('spacecomments') . ' WHERE cid=\'' . $cid . '\'');
        if ($item = $_SGLOBAL['db']->fetch_array($query)) {
            $currentmessage = array();
            preg_match_all("/\\<div class=\"new\">(.+)?\\<\\/div\\>/is", $item['message'], $currentmessage, PREG_SET_ORDER);
            if (!empty($currentmessage)) {
                $item['message'] = $currentmessage[0][0];
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:batch.common.php

示例11: array

    $_SCONFIG['debug'] = 0;
}
$thecat = array();
if ($catid) {
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('categories') . " WHERE catid='{$catid}'");
    $thecat = $_SGLOBAL['db']->fetch_array($query);
}
if (empty($thecat)) {
    showmessage('not_found', S_URL);
}
$channel = $thecat['type'];
if (!checkperm('allowview')) {
    showmessage('no_permission');
}
if (!empty($thecat['url'])) {
    sheader($thecat['url']);
}
$upcat = array();
if (!empty($thecat['upid'])) {
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('categories') . " WHERE catid='{$thecat['upid']}'");
    $upcat = $_SGLOBAL['db']->fetch_array($query);
}
$_SGET['page'] = empty($_SGET['page']) ? 1 : intval($_SGET['page']);
$guidearr = array();
$guidearr[] = array('url' => geturl('action/' . $thecat['type']), 'name' => $channels['menus'][$thecat['type']]['name']);
if (!empty($upcat)) {
    $guidearr[] = array('url' => geturl('action/category/catid/' . $upcat['catid']), 'name' => $upcat['name']);
}
$guidearr[] = array('url' => geturl('action/category/catid/' . $thecat['catid']), 'name' => $thecat['name']);
if (!empty($thecat['tpl']) && file_exists(S_ROOT . './templates/' . $_SCONFIG['template'] . '/' . $thecat['tpl'] . '.html.php')) {
    $tplname = $thecat['tpl'];
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:category.php

示例12: tname

}
$query = $_SGLOBAL['db']->query('SELECT f.*, ff.name AS upname FROM ' . tname('categories') . ' f LEFT JOIN ' . tname('categories') . ' ff ON ff.catid=f.upid WHERE f.catid=\'' . $news['catid'] . '\'');
$thecat = $_SGLOBAL['db']->fetch_array($query);
$listcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT COUNT(*) FROM ' . tname('spacenews') . ' WHERE itemid=\'' . $itemid . '\''), 0);
if ($page > $listcount) {
    $_SHTML['page'] = $page = 1;
}
$start = $page - 1;
$query = $_SGLOBAL['db']->query('SELECT ii.* FROM ' . tname('spacenews') . ' ii WHERE ii.itemid=\'' . $itemid . '\' ORDER BY ii.pageorder, ii.nid LIMIT ' . $start . ', 1');
if ($msg = $_SGLOBAL['db']->fetch_array($query)) {
    $news = array_merge($news, $msg);
} else {
    updatetable('spaceitems', array('folder' => 3), array('itemid' => $itemid));
}
if (!empty($news['newsurl'])) {
    sheader($news['newsurl']);
}
$news['attacharr'] = array();
$multipage = '';
if ($listcount > 1) {
    $urlarr = array('action' => 'viewnews', 'itemid' => $itemid);
    $multipage = multi($listcount, 1, $page, $urlarr, 0);
} else {
    if ($page == 1 && $news['haveattach']) {
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('attachments') . ' WHERE itemid=\'' . $itemid . '\'');
        while ($attach = $_SGLOBAL['db']->fetch_array($query)) {
            if (strpos($news['message'], $attach['thumbpath']) === false && strpos($news['message'], $attach['filepath']) === false && strpos($news['message'], 'batch.download.php?aid=' . $attach['aid']) === false) {
                $attach['filepath'] = A_URL . '/' . $attach['filepath'];
                $attach['thumbpath'] = A_URL . '/' . $attach['thumbpath'];
                $attach['url'] = S_URL . '/batch.download.php?aid=' . $attach['aid'];
                $news['attacharr'][] = $attach;
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:viewnews.php

示例13: zhikumodify_action

 /**
  *添加标签
  */
 function zhikumodify_action()
 {
     global $session;
     $updateid = intval($_REQUEST['updateid']);
     $zhiku_mod = new common('zhiku');
     $file_mod = new common('file');
     $tag = array();
     if (submitcheck('commit')) {
         //              `topic_id` bigint(20) NOT NULL AUTO_INCREMENT,
         //              `topic_name` varchar(20) NOT NULL COMMENT '文章名称',
         //              `isused` tinyint(1) NOT NULL COMMENT '是否关闭',
         //              `topic_desc` TEXT NOT NULL COMMENT '文章内容',
         //              `topic_tag` varchar(20) NOT NULL COMMENT '话题标语',
         //              `created_time`
         $data['topic_name'] = $_POST['topic_name'];
         $data['topic_desc'] = $_POST['topic_desc'];
         $data['topic_intro'] = $_POST['topic_intro'];
         $data['file_id'] = $_POST['file_id'];
         if (intval($data['file_id']) < 1) {
             $data['file_id'] = $_POST['tag_file_id'];
         }
         if ($updateid > 0) {
             if ($zhiku_mod->UpdateData($data, 'and topic_id=' . $updateid)) {
                 sheader('index.php?con=' . $GLOBALS['setting']['adminpath'] . '&act=zhiku', 3, '修改成功', 'redirect', true);
             } else {
                 sheader('index.php?con=' . $GLOBALS['setting']['adminpath'] . '&act=zhiku', 3, '修改失败', 'redirect', true);
             }
         } else {
             $data['created_time'] = time();
             if ($zhiku_mod->InsertData($data)) {
                 sheader('index.php?con=' . $GLOBALS['setting']['adminpath'] . '&act=zhiku', 3, '添加成功', 'redirect', true);
             }
         }
     } else {
         if ($updateid) {
             $zhiku = $zhiku_mod->GetOne('and topic_id=' . $updateid);
             $zhiku['file'] = $file_mod->GetOne('and file_id=' . $zhiku['file_id']);
         }
         include ROOT_PATH . '/views/admin/zhiku_form.php';
     }
 }
开发者ID:Tolecen,项目名称:YouthFundWebSite,代码行数:44,代码来源:admin.php

示例14: guestbook_action

 function guestbook_action()
 {
     if (submitcheck('commit')) {
         $guestbook_mod = new common('guestbook');
         $data['title'] = trim(strip_tags($_POST['title']));
         $data['content'] = trim(strip_tags($_POST['content']));
         if ($guestbook_mod->InsertData($data)) {
             sheader(url('index', 'guestbook'), 3, '意见提交成功');
         } else {
             sheader(url('index', 'guestbook'), 3, '意见提交失败');
         }
     } else {
         include template('guestbook');
     }
 }
开发者ID:BGCX261,项目名称:zidan-kaka-oneplusone-svn-to-git,代码行数:15,代码来源:index.class.php

示例15: foreach

            break;
        }
    }
}
$wherecatid = '';
foreach ($_GET as $tmpkey => $tmpvalue) {
    if (!is_array($tmpvalue)) {
        $tmpvalue = trim($tmpvalue);
    }
    if (preg_match("/^mo_/", $tmpkey) && (!is_array($tmpvalue) && strlen($tmpvalue) > 0 || is_array($tmpvalue) && !empty($tmpvalue))) {
        $key = preg_replace("/(^mo_|_from\$|_to\$)/", '', $tmpkey);
        if ($key == 'subject') {
            $sqllikearr['i.`subject`'] = stripsearchkey(shtmlspecialchars($tmpvalue));
        } elseif ($key == 'catid') {
            if (!empty($cacheinfo['categoryarr'][$tmpvalue]['url'])) {
                sheader($cacheinfo['categoryarr'][$tmpvalue]['url']);
            }
            $wherecatid = ' i.catid IN (' . $cacheinfo['categoryarr'][$tmpvalue]['subcatid'] . ') AND ';
        } elseif ($key == 'username') {
            $sqlchararr['i.`username`'] = stripsearchkey(shtmlspecialchars($tmpvalue));
        } elseif ($key == 'grade') {
            $sqlchararr['i.`grade`'] = stripsearchkey(shtmlspecialchars($tmpvalue));
        } elseif (!empty($columnsinfoarr[$key])) {
            if (!empty($columnsinfoarr[$key]['isfixed'])) {
                $pre = 'i.';
            } else {
                $pre = 'm.';
                $isfixedsearch = 0;
            }
            if ($columnsinfoarr[$key]['formtype'] == 'linkage') {
                if (!empty($cacheinfo['linkage']['info'][$key][$tmpvalue])) {
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:toolshelf.php


注:本文中的sheader函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。