當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CheckPurview函數代碼示例

本文整理匯總了PHP中CheckPurview函數的典型用法代碼示例。如果您正苦於以下問題:PHP CheckPurview函數的具體用法?PHP CheckPurview怎麽用?PHP CheckPurview使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CheckPurview函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: empty

}
$diyid = empty($diyid) ? 0 : intval($diyid);
/*----------------
function __SaveEdit()
-----------------*/
if ($dopost == "save") {
    $public = isset($public) && is_numeric($public) ? $public : 0;
    $name = htmlspecialchars($name, ENT_COMPAT, "GB2312");
    $query = "UPDATE `#@__diyforms` SET name = '{$name}', listtemplate='{$listtemplate}', viewtemplate='{$viewtemplate}', posttemplate='{$posttemplate}', public='{$public}' WHERE diyid='{$diyid}' ";
    $dsql->ExecuteNoneQuery($query);
    ShowMsg("成功更改一個自定義表單!", "diy_main.php");
    exit;
} else {
    if ($dopost == "delete") {
        @set_time_limit(0);
        CheckPurview('c_Del');
        $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='{$diyid}'");
        if (empty($job)) {
            $job = "";
        }
        //確認提示
        if ($job == "") {
            $wintitle = "自定義表單管理-刪除自定義表單";
            $wecome_info = "<a href='diy_main.php'>自定義表單管理</a>::刪除自定義表單";
            $win = new OxWindow();
            $win->Init("diy_edit.php", "js/blank.js", "POST");
            $win->AddHidden("job", "yes");
            $win->AddHidden("dopost", $dopost);
            $win->AddHidden("diyid", $diyid);
            $win->AddTitle("!將刪除所有與該自定義表單相關的文件和數據<br />你確實要刪除 \"" . $row['name'] . "\" 這個自定義表單?");
            $winform = $win->GetWindow("ok");
開發者ID:suibber,項目名稱:jb,代碼行數:31,代碼來源:diy_edit.php

示例2: dirname

<?php

/**
 * 係統權限組編輯
 *
 * @version        $Id: sys_group_edit.php 1 22:28 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('sys_Group');
if (empty($dopost)) {
    $dopost = "";
}
if ($dopost == 'save') {
    if ($rank == 10) {
        ShowMsg('超級管理員的權限不允許更改!', 'sys_group.php');
        exit;
    }
    $purview = "";
    if (is_array($purviews)) {
        foreach ($purviews as $p) {
            $purview .= "{$p} ";
        }
        $purview = trim($purview);
    }
    $dsql->ExecuteNoneQuery("UPDATE `#@__admintype` SET typename='{$typename}',purviews='{$purview}' WHERE CONCAT(`rank`)='{$rank}'");
    ShowMsg('成功更改用戶組的權限!', 'sys_group.php');
    exit;
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:sys_group_edit.php

示例3: dirname

<?php

/**
 * 配送方式設置
 *
 * @version        $Id: shops_delivery.php 1 15:46 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('shops_Delivery');
require_once DEDEINC . '/datalistcp.class.php';
if (!isset($do)) {
    $do = '';
}
if ($do == 'add') {
    if (empty($dname) || strlen($dname) > 100) {
        ShowMsg("請填寫配送方式名稱!", "-1");
        exit;
    }
    $price = preg_replace("#[^.0-9]#", "", $price);
    if ($price < 0.01) {
        $price = '0.00';
    }
    $des = cn_substrR($des, 255);
    $InQuery = "INSERT INTO #@__shops_delivery(`dname`,`price`,`des`) VALUES ('{$dname}','{$price}','{$des}');";
    $result = $dsql->ExecuteNoneQuery($InQuery);
    if ($result) {
        ShowMsg("成功添加一個配送方式!", "shops_delivery.php");
開發者ID:iabing,項目名稱:mzzyc,代碼行數:31,代碼來源:shops_delivery.php

示例4: dirname

<?php

/**
 * 自定義表單列表
 *
 * @version        $Id: diy_list.php 1 18:31 2010年7月12日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('c_New');
$diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0;
$action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete')) ? $action : '';
if (empty($diyid)) {
    showMsg("非法操作!", 'javascript:;');
    exit;
}
require_once DEDEINC . '/diyform.cls.php';
$diy = new diyform($diyid);
if ($action == 'post') {
    if (empty($do)) {
        $postform = $diy->getForm('post', '', 'admin');
        include DEDEADMIN . '/templets/diy_post.htm';
    } else {
        if ($do == 2) {
            $dede_fields = empty($dede_fields) ? '' : trim($dede_fields);
            $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash);
            if (!empty($dede_fields)) {
                if ($dede_fieldshash != md5($dede_fields . $cfg_cookie_encode)) {
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:diy_list.php

示例5: dirname

<?php

require_once dirname(__FILE__) . "/config.php";
CheckPurview('sys_Data');
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost == "viewinfo") {
    echo "[<a href='#' onclick='javascript:HideObj(\"_mydatainfo\")'><u>關閉</u></a>]\r\n<xmp>";
    if (empty($tablename)) {
        echo "沒有指定表名!";
    } else {
        $dsql->SetQuery("SHOW CREATE TABLE " . $dsql->dbName . "." . $tablename);
        $dsql->Execute('me');
        $row2 = $dsql->GetArray('me', MYSQL_BOTH);
        $ctinfo = $row2[1];
        echo trim($ctinfo);
    }
    echo '</xmp>';
    exit;
} else {
    if ($dopost == "opimize") {
        echo "[<a href='#' onclick='javascript:HideObj(\"_mydatainfo\")'><u>關閉</u></a>]\r\n<xmp>";
        if (empty($tablename)) {
            echo "沒有指定表名!";
        } else {
            $rs = $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `{$tablename}` ");
            if ($rs) {
                echo "執行優化表: {$tablename}  OK!";
            } else {
                echo "執行優化表: {$tablename}  失敗,原因是:" . $dsql->GetError();
開發者ID:klr2003,項目名稱:sourceread,代碼行數:31,代碼來源:sys_data.php

示例6: dirname

<?php

/**
 * 係統密碼提示問
 *
 * @version        $Id: sys_safe.php 1 22:28 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('sys_Safe');
$safeconfigfile = DEDEDATA . "/safe/inc_safe_config.php";
if (empty($dopost)) {
    $dopost = "";
}
if ($dopost == "save") {
    $configstr = $shortname = "";
    $gdopen = empty($gdopen) ? "" : $gdopen;
    $codetype = empty($codetype) ? 1 : $codetype;
    $gdtype = empty($gdtype) ? 1 : $gdtype;
    $gdstyle = empty($gdstyle) ? "" : $gdstyle;
    $gd_wwidth = empty($gd_wwidth) ? 0 : $gd_wwidth;
    $gd_wheight = empty($gd_wheight) ? 0 : $gd_wheight;
    $codelen = empty($codelen) ? 4 : $codelen;
    $gdfaq_reg = empty($gdfaq_reg) ? 0 : $gdfaq_reg;
    $gdfaq_send = empty($gdfaq_send) ? 0 : $gdfaq_send;
    $gdfaq_msg = empty($gdfaq_msg) ? 0 : $gdfaq_msg;
    if (is_array($gdopen)) {
        $configstr = "\$safe_gdopen = '" . implode(",", $gdopen) . "';\r\n";
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:sys_safe.php

示例7: dirname

<?php

/**
 * 導出采集規則
 *
 * @version        $Id: co_edit_text.php 1 14:31 2010年7月12日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('co_Export');
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost != 'done') {
    require_once DEDEADMIN . "/inc/inc_catalog_options.php";
    $totalcc = $channelid = $usemore = 0;
    if (!empty($nid)) {
        $mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` WHERE nid='{$nid}' AND isdown='1' ");
        $totalcc = $mrow['dd'];
        $rrow = $dsql->GetOne("SELECT channelid,usemore FROM `#@__co_note` WHERE nid='{$nid}' ");
        $channelid = $rrow['channelid'];
        $usemore = $rrow['usemore'];
    } else {
        $mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` WHERE isdown='1' ");
        $totalcc = $mrow['dd'];
    }
    include DedeInclude("templets/co_export.htm");
    exit;
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:co_export.php

示例8: dirname

<?php

/**
 * 會員信息管理
 *
 * @version        $Id: member_info_main.php 1 14:08 2010年7月19日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('sys_Log');
require_once DEDEINC . "/datalistcp.class.php";
require_once DEDEINC . "/common.func.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$sql = $where = "";
$dtime = empty($dtime) ? 0 : $dtime;
$ischeck = empty($ischeck) ? "" : $ischeck;
$dopost = empty($dopost) ? "" : $dopost;
if ($type == "feed") {
    $table = "#@__member_feed";
    $id = "aid";
    $tpl = DEDEADMIN . "/templets/member_feed_main.htm";
} else {
    $table = "#@__member_msg";
    $id = "id";
    $tpl = DEDEADMIN . "/templets/member_mood_main.htm";
}
if (in_array($ischeck, array('-1', '1'))) {
    $type = array('-1' => '0', '1' => '1');
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:member_info_main.php

示例9: ShowMsg

            if ($rs == 1) {
                $dsql->ExecuteNoneQuery("DELETE FROM #@__uploads WHERE aid='" . $myrow['aid'] . "'");
            }
        }
        ShowMsg('成功刪除選定的文件!', $backurl);
        exit;
    }
} else {
    if ($dopost == 'save') {
        if ($aid == "") {
            exit;
        }
        //檢查是否有修改權限
        $myrow = $dsql->GetOne("SELECT * FROM #@__uploads WHERE aid='" . $aid . "'");
        if ($myrow['mid'] != $cuserLogin->getUserID()) {
            CheckPurview('sys_Upload');
        }
        //檢測文件類型
        $addquery = "";
        if (is_uploaded_file($upfile)) {
            if ($mediatype == 1) {
                $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp");
                if (!in_array($upfile_type, $sparr)) {
                    ShowMsg("你上傳的不是圖片類型的文件!", "javascript:history.go(-1);");
                    exit;
                }
            } else {
                if ($mediatype == 2) {
                    $sparr = array("application/x-shockwave-flash");
                    if (!in_array($upfile_type, $sparr)) {
                        ShowMsg("你上傳的不是Flash類型的文件!", "javascript:history.go(-1);");
開發者ID:iabing,項目名稱:mzzyc,代碼行數:31,代碼來源:media_edit.php

示例10: dirname

<?php

/**
 * 模塊管理
 *
 * @version        $Id: module_main.php 1 14:17 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('sys_module');
require_once dirname(__FILE__) . "/../include/dedemodule.class.php";
require_once dirname(__FILE__) . "/../include/oxwindow.class.php";
if (empty($action)) {
    $action = '';
}
require_once DEDEDATA . "/admin/config_update.php";
$mdir = DEDEDATA . '/module';
$mdurl = $updateHost . 'dedecms/module_' . $cfg_soft_lang . '/modulelist.txt';
function TestWriteAble($d)
{
    $tfile = '_dedet.txt';
    $d = preg_replace("#\\/\$#", '', $d);
    $fp = @fopen($d . '/' . $tfile, 'w');
    if (!$fp) {
        return FALSE;
    } else {
        fclose($fp);
        $rs = @unlink($d . '/' . $tfile);
開發者ID:stonelf,項目名稱:mcgmh,代碼行數:31,代碼來源:module_main.php

示例11: require_once

<?php 
require_once(dirname(__FILE__)."/config.php");
CheckPurview('plus_站內新聞發布');
if(empty($dopost)) $dopost = "";
$aid = ereg_replace("[^0-9]","",$aid);
$dsql = new DedeSql(false);
if($dopost=="del")
{
	 $dsql->SetQuery("Delete From #@__mynews where aid='$aid';");
	 $dsql->ExecuteNoneQuery();
	 $dsql->Close();
	 ShowMsg("成功刪除一條站內新聞!","mynews_main.php");
	 exit();
}
else if($dopost=="editsave")
{
	$dsql->SetQuery("Update #@__mynews set title='$title',typeid='$typeid',writer='$writer',senddate='".GetMKTime($sdate)."',body='$body' where aid='$aid';");
	$dsql->ExecuteNoneQuery();
	$dsql->Close();
	ShowMsg("成功更改一條站內新聞!","mynews_main.php");
	exit();
}
$myNews = $dsql->GetOne("Select #@__mynews.*,#@__arctype.typename From #@__mynews left join #@__arctype on #@__arctype.ID=#@__mynews.typeid where #@__mynews.aid='$aid';");

require_once(dirname(__FILE__)."/templets/mynews_edit.htm");

ClearAllLink();
?>
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:28,代碼來源:mynews_edit.php

示例12: dirname

<?php

/**
 * 圈子公告管理
 *
 * @version        $Id: group_notice.php 1 15:34 2011-1-21 tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . '/datalistcp.class.php';
CheckPurview('group_Edit');
$id = isset($id) && is_numeric($id) ? $id : 0;
$gid = isset($gid) && is_numeric($gid) ? $gid : 0;
$action = isset($action) ? trim($action) : '';
$keyword = isset($keyword) ? trim($keyword) : '';
$keyword = stripslashes($keyword);
$keyword = preg_replace("#[\"\r\n\t\\*\\?\\(\\)\$%']#", " ", trim($keyword));
$keyword = addslashes($keyword);
$username = isset($username) ? trim($username) : '';
$username = stripslashes($username);
$username = preg_replace("#[\"\r\n\t\\*\\?\\(\\)\$%']#", " ", trim($username));
$username = addslashes($username);
if ($gid < 1) {
    ShowMsg("含有非法操作!.", "-1");
    exit;
}
if ($action == "del") {
    if ($id > 0) {
開發者ID:iabing,項目名稱:mzzyc,代碼行數:31,代碼來源:group_notice.php

示例13: dirname

<?php

/**
 * 自定義表單列表管理
 *
 * @version        $Id: diy_main.php 1 18:31 2010年7月12日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('c_List');
require_once DEDEINC . "/datalistcp.class.php";
require_once DEDEINC . "/common.func.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$sql = "Select `diyid`,`name`,`table` From #@__diyforms order by diyid asc";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/diy_main.htm");
$dlist->SetSource($sql);
$dlist->display();
$dlist->Close();
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:22,代碼來源:diy_main.php

示例14: require_once

<?php 
require_once(dirname(__FILE__)."/config.php");
$t1 = ExecTime();
CheckPurview('sys_MakeHtml');
require_once(dirname(__FILE__)."/../include/inc_arcpart_view.php");
if($dopost=="view")
{
	$pv = new PartView();
	$templet = str_replace("{style}",$cfg_df_style,$templet);
	$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
	$pv->Display();
	$pv->Close();
}
else if($dopost=="make")
{
	header("Content-Type: text/html; charset={$cfg_ver_lang}");
	$homeFile = dirname(__FILE__)."/".$position;
	$homeFile = str_replace("\\","/",$homeFile);
	$homeFile = str_replace("//","/",$homeFile);
	$fp = fopen($homeFile,"w") or die("你指定的文件名有問題,無法創建文件");
	fclose($fp);
	if($saveset==1)
	{
		$dsql = new DedeSql(false);
		$dsql->SetQuery("update #@__homepageset set templet='$templet',position='$position' ");
		$dsql->ExecuteNoneQuery();
		$dsql->Close();
	}
	$templet = str_replace("{style}",$cfg_df_style,$templet);
	$pv = new PartView();
	$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:makehtml_homepage_action.php

示例15: require

<?php 
require(dirname(__FILE__)."/config.php");
CheckPurview('plus_投票模塊');
if(empty($dopost)) $dopost = "";
//////////////////////////////////////////
if($dopost=="save")
{
	//$ismore,$votename
	$starttime = GetMkTime($starttime);
	$endtime = GetMkTime($endtime);
	$voteitems = "";
	$j=0;
	for($i=1;$i<=15;$i++)
	{
		if(!empty(${"voteitem".$i})){
			$j++;
			$voteitems .= "<v:note id=\\'$j\\' count=\\'0\\'>".${"voteitem".$i}."</v:note>\r\n";
		}
	}
	$dsql = new DedeSql(false);
	$inQuery = "
	insert into #@__vote(votename,starttime,endtime,totalcount,ismore,votenote) 
	Values('$votename','$starttime','$endtime','0','$ismore','$voteitems');
	";
	$dsql->SetQuery($inQuery);
	if(!$dsql->ExecuteNoneQuery())
	{
		$dsql->Close();
		ShowMsg("增加投票失敗,請檢查數據是否非法!","-1");
		exit();
	}
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:vote_add.php


注:本文中的CheckPurview函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。