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


PHP CheckCatalog函數代碼示例

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


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

示例1: ShowMsg

 }
 if (empty($typeid)) {
     ShowMsg("請指定文檔的欄目!", "-1");
     exit;
 }
 if (empty($channelid)) {
     ShowMsg("文檔為非指定的類型,請檢查你發布內容的表單是否合法!", "-1");
     exit;
 }
 if (!CheckChannel($typeid, $channelid)) {
     ShowMsg("你所選擇的欄目與當前模型不相符,請選擇白色的選項!", "-1");
     exit;
 }
 if (!TestPurview('a_Edit')) {
     if (TestPurview('a_AccEdit')) {
         CheckCatalog($typeid, "對不起,你沒有操作欄目 {$typeid} 的文檔權限!");
     } else {
         CheckArcAdmin($id, $cuserLogin->getUserID());
     }
 }
 //對保存的內容進行處理
 $pubdate = GetMkTime($pubdate);
 $sortrank = AddDay($pubdate, $sortup);
 $ismake = $ishtml == 0 ? -1 : 0;
 $autokey = 1;
 //$title = htmlspecialchars(cn_substrR($title,$cfg_title_maxlen,ENT_COMPAT ,"GB2312"));
 $shorttitle = cn_substrR($shorttitle, 36);
 $color = cn_substrR($color, 7);
 $writer = cn_substrR($writer, 20);
 $source = cn_substrR($source, 30);
 $description = cn_substrR($description, 250);
開發者ID:suibber,項目名稱:jb,代碼行數:31,代碼來源:article_edit.php

示例2: GetCoRank

if($typeid==0){
	ShowMsg("請指定文檔的欄目!","-1");
	exit();
}
if(empty($channelid)){
	ShowMsg("文檔為非指定的類型,請檢查你發布內容的表單是否合法!","-1");
	exit();
}
if(!CheckChannel($typeid,$channelid) || !CheckChannel($typeid2,$channelid)){
	ShowMsg("你所選擇的欄目與當前模型不相符,請選擇白色的選項!","-1");
	exit();
}
if(!TestPurview('a_New')) {
	CheckCatalog($typeid,"對不起,你沒有操作欄目 {$typeid} 的權限!");
	if($typeid2!=0) CheckCatalog($typeid2,"對不起,你沒有操作欄目 {$typeid2} 的權限!");
}

$arcrank = GetCoRank($arcrank,$typeid);

//對保存的內容進行處理
//--------------------------------
$iscommend = $iscommend + $isbold;

$uptime = $senddate = time();
$pubdate = GetMkTime($pubdate);
$sortrank = AddDay($senddate,$sortup);

if($ishtml==0) $ismake = -1;
else $ismake = 0;
$title =  cn_substr($title,80);
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:30,代碼來源:article_add_action.php

示例3: CheckArcAdmin



if($typeid==0){
	ShowMsg("請指定文檔的欄目!","-1");
	exit();
}
if(empty($channelid)){
	ShowMsg("文檔為非指定的類型,請檢查你發布內容的表單是否合法!","-1");
	exit();
}
if(!CheckChannel($typeid,$channelid) || !CheckChannel($typeid2,$channelid)){
	ShowMsg("你所選擇的欄目與當前模型不相符,請選擇白色的選項!","-1");
	exit();
}
if(!TestPurview('a_Edit')) {
	if(TestPurview('a_AccEdit')) CheckCatalog($typeid,"對不起,你沒有操作欄目 {$typeid} 的文檔權限!");
	else CheckArcAdmin($ID,$cuserLogin->getUserID());
}

$arcrank = GetCoRank($arcrank,$typeid);

//對保存的內容進行處理
//--------------------------------
$iscommend = $iscommend + $isbold;
$pubdate = GetMkTime($pubdate);
$sortrank = AddDay($senddate,$sortup);
$endtime = $senddate + 3600 * 24 * $endtime;


$title = cn_substr($title,80);
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:28,代碼來源:info_edit_action.php

示例4: ShowMsg

 if ($dopost == "guestbook") {
     ShowMsg("正在跳轉到留言本>>", "{$cfg_phpurl}/guestbook.php?gotopagerank=admin");
     exit;
 } else {
     if ($dopost == "viewSgPage") {
         require_once DEDEINC . "/arc.listview.class.php";
         $lv = new ListView($cid);
         $pageurl = $lv->MakeHtml();
         ShowMsg("更新緩衝,請稍後...", $pageurl);
         exit;
     } else {
         if ($dopost == "upRank") {
             //檢查權限許可
             CheckPurview('t_Edit,t_AccEdit');
             //檢查欄目操作許可
             CheckCatalog($cid, "你無權更改本欄目!");
             $row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='{$cid}'");
             $reid = $row['reid'];
             $sortrank = $row['sortrank'];
             $row = $dsql->GetOne("SELECT sortrank FROM #@__arctype WHERE sortrank<={$sortrank} AND reid={$reid} ORDER BY sortrank DESC ");
             if (is_array($row)) {
                 $sortrank = $row['sortrank'] - 1;
                 $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='{$sortrank}' WHERE id='{$cid}'");
             }
             UpDateCatCache();
             ShowMsg("操作成功,返回目錄...", "catalog_main.php");
             exit;
         } else {
             if ($dopost == "upRankAll") {
                 //檢查權限許可
                 CheckPurview('t_Edit');
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:catalog_do.php

示例5: dirname

 * @version        $Id: catalog_edit.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";
require_once DEDEINC . "/typelink.class.php";
if (empty($dopost)) {
    $dopost = '';
}
$id = isset($id) ? intval($id) : 0;
//檢查權限許可
CheckPurview('t_Edit,t_AccEdit');
//檢查欄目操作許可
CheckCatalog($id, '你無權更改本欄目!');
/*-----------------------
function action_save()
----------------------*/
if ($dopost == "save") {
    $description = Html2Text($description, 1);
    $keywords = Html2Text($keywords, 1);
    $uptopsql = $smalltypes = '';
    if (isset($smalltype) && is_array($smalltype)) {
        $smalltypes = join(',', $smalltype);
    }
    if ($topid == 0) {
        $sitepath = $typedir;
        $uptopsql = " ,siteurl='{$siteurl}',sitepath='{$sitepath}',ishidden='{$ishidden}' ";
    }
    if ($ispart != 0) {
開發者ID:nothingsoga1,項目名稱:shfayidiyj,代碼行數:31,代碼來源:catalog_edit.php

示例6: dirname

 * 刪除欄目
 *
 * @version        $Id: catalog_del.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('t_Del,t_AccDel');
require_once DEDEINC . '/typeunit.class.admin.php';
require_once DEDEINC . '/oxwindow.class.php';
$id = trim(preg_replace("#[^0-9]#", '', $id));
//檢查欄目操作許可
CheckCatalog($id, "你無權刪除本欄目!");
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost == 'ok') {
    $ut = new TypeUnit();
    $ut->DelType($id, $delfile);
    UpDateCatCache();
    ShowMsg("成功刪除一個欄目!", "catalog_main.php");
    exit;
}
$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=" . $id);
$row = $dsql->GetOne();
$wintitle = "刪除欄目確認";
$wecome_info = "<a href='catalog_main.php'>欄目管理</a> &gt;&gt; 刪除欄目確認";
$win = new OxWindow();
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:catalog_del.php

示例7: CheckPurview

CheckPurview('a_List,a_AccList,a_MyList');

$cids = '';
//欄目瀏覽許可
if(TestPurview('a_List')){
	;
}
else if(TestPurview('a_AccList'))
{
	 if($cid==0)
	 {
	 	 $cids = MyCatalogInArr();
	 	 if(!empty($cids) && !ereg(',',$cids)){ $cid = $cids; $cids = ''; }
	 }
	 else{
	 	 CheckCatalog($cid,"你無權瀏覽非指定欄目的內容!");
	 }
}else
{
	 $adminid = $cuserLogin->getUserID();
}
require_once(dirname(__FILE__)."/../include/inc_typelink.php");
require_once(dirname(__FILE__)."/../include/pub_datalist_dm.php");
require_once(dirname(__FILE__)."/inc/inc_list_functions.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");

//初始化頻道信息
//------------------------------------
$seltypeids = 0;
//if(empty($cid) && empty($channelid)) $channelid = 1;
$tl = new TypeLink($cid);
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:full_list.php

示例8: empty

}
if (isset($channeltype)) {
    $channelid = $channeltype;
}
$id = empty($id) ? 0 : intval($id);
$reid = empty($reid) ? 0 : intval($reid);
$nid = 'article';
if ($typeimg == "" || empty($typeimg)) {
    $typeimg = "/images/jipin-default.jpg";
}
if ($id == 0 && $reid == 0) {
    CheckPurview('t_New');
} else {
    $checkID = empty($id) ? $reid : $id;
    CheckPurview('t_AccNew');
    CheckCatalog($checkID, '你無權在本欄目下創建子類!');
}
if (empty($myrow)) {
    $myrow = array();
}
$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
    $channelArray[$row->id]['typename'] = $row->typename;
    $channelArray[$row->id]['nid'] = $row->nid;
    if ($row->id == $channelid) {
        $nid = $row->nid;
    }
}
if ($dopost == 'quick') {
    $tl = new TypeLink(0);
開發者ID:soonfine,項目名稱:leread,代碼行數:31,代碼來源:catalog_add.php

示例9: require_once

<?php
require_once(dirname(__FILE__)."/config.php");
if(empty($ID)) $ID = 0;
if(empty($listtype)) $listtype="";
if(empty($dopost)) $dopost = "";
if(empty($channelid)) $channelid = 1;
$ID = intval($ID);
if($ID==0){ CheckPurview('t_New'); }
else{
	CheckPurview('t_AccNew');
	CheckCatalog($ID,"你無權在本欄目下創建子類!");
}

$dsql = new DedeSql(false);


//保存欄目
/*------------------------
function __SaveCatalog()
--------------------------*/
if($dopost=="save")
{
   if(empty($reID)) $reID = 0;
   if(empty($upinyin)) $upinyin = 0;
   $description = Html2Text($description);
   $keywords = Html2Text($keywords);

   
   $tmpdir = $typedir;
   if($ispart==3 && $typedir==''){
     ShowMsg("你設置的欄目屬性是跳轉網址,請指定要跳轉的網址!","-1");
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:catalog_add.php

示例10: require_once

<?php 
require_once(dirname(__FILE__)."/config.php");
if(empty($dopost)) $dopost = "";
if(empty($ID)) $ID="0";
$ID = ereg_replace("[^0-9]","",$ID);

//檢查權限許可
CheckPurview('t_Edit,t_AccEdit');
//檢查欄目操作許可
CheckCatalog($ID,"你無權更改本欄目!");

$dsql = new DedeSql(false);

//----------------------------------
//保存改動 Action Save
//-----------------------------------
if($dopost=="save")
{
	 $description = Html2Text($description);
   $keywords = Html2Text($keywords);
   
   if($cfg_cmspath!='') $typedir = ereg_replace("^".$cfg_cmspath,"{cmspath}",$typedir);
   //else if(!eregi("{cmspath}",$typedir) && $moresite==0) $typedir = "{cmspath}".$typedir;
   
   //子分類
   $sonlists = (empty($sonlists) ? '' : $sonlists);
   $smalltypes = "";
   if(is_array($sonlists) && isset($needson)){
   	 $n = count($sonlists);
   	 for($i=0;$i<$n;$i++){
   	 	 if($i==($n-1)) $smalltypes .= $sonlists[$i];
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:catalog_edit.php

示例11: CheckPurview

}
if (!isset($dopost)) {
    $dopost = '';
}
//檢查權限許可,總權限
CheckPurview('a_List,a_AccList,a_MyList');
//欄目瀏覽許可
$userCatalogSql = '';
if (TestPurview('a_List')) {
} else {
    if (TestPurview('a_AccList')) {
        if ($cid == 0 && $cfg_admin_channel == 'array') {
            $admin_catalog = join(',', $admin_catalogs);
            $userCatalogSql = " arc.typeid IN({$admin_catalog}) ";
        } else {
            CheckCatalog($cid, '你無權瀏覽非指定欄目的內容!');
        }
        if (TestPurview('a_MyList')) {
            $mid = $cuserLogin->getUserID();
        }
    }
}
$adminid = $cuserLogin->getUserID();
$maintable = '#@__archives';
setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/');
$tl = new TypeLink($cid);
//----------------------------------------
//在不指定排序條件和關鍵字的情況下直接統計微表
//----------------------------------------
if (empty($totalresult) && empty($keyword) && empty($orderby) && empty($flag)) {
    $tinyQuerys = array();
開發者ID:puppylsy,項目名稱:cms,代碼行數:31,代碼來源:content_list3.php

示例12: require_once

<?php 
require_once(dirname(__FILE__)."/config.php");
require_once(dirname(__FILE__)."/../include/inc_typeunit_admin.php");
$ID = trim(ereg_replace("[^0-9]","",$ID));

//檢查權限許可
CheckPurview('t_Del,t_AccDel');
//檢查欄目操作許可
CheckCatalog($ID,"你無權刪除本欄目!");

if(empty($dopost)) $dopost="";
if($dopost=="ok"){
	 $ut = new TypeUnit();
	 $ut->DelType($ID,$delfile);
	 //更新緩存
   UpDateCatCache($dsql);
	 $ut->Close();
	 //更新樹形菜單
   $rndtime = time();
   $uptree = "<script language='javascript'>
   if(window.navigator.userAgent.indexOf('MSIE')>=1){
     if(top.document.frames.menu.location.href.indexOf('catalog_menu.php')>=1)
     { top.document.frames.menu.location = 'catalog_menu.php?$rndtime'; }
   }else{
  	 if(top.document.getElementById('menu').src.indexOf('catalog_menu.php')>=1)
     { top.document.getElementById('menu').src = 'catalog_menu.php?$rndtime'; }
   }
   </script>";
   echo $uptree;
	 ShowMsg("成功刪除一個欄目!","catalog_main.php");
	 exit();
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:catalog_del.php


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