本文整理汇总了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);
示例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);
示例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);
示例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');
示例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) {
示例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> >> 删除栏目确认";
$win = new OxWindow();
示例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);
示例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);
示例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");
示例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];
示例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();
示例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();