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


PHP TestPurview函数代码示例

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


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

示例1: searchkeyword

 /**
  *  遍历功能配置项进行关键词匹配
  *
  * @return    void
  */
 function searchkeyword()
 {
     $i = 0;
     //数组序列索引
     foreach ($this->asarray as $key => $value) {
         //对二级项目进行匹配
         if (is_array($this->asarray[$key]['soniterm'])) {
             foreach ($this->asarray[$key]['soniterm'] as $k => $val) {
                 //进行权限判断
                 if (TestPurview($val['purview'])) {
                     //如果有操作权限
                     if ($this->_strpos($val['title'], $this->keyword) !== false || $this->_strpos($val['description'], $this->keyword) !== false) {
                         //一级项目匹配
                         $this->result[$i]['toptitle'] = $this->redColorKeyword($this->asarray[$key]['toptitle']);
                         $this->result[$i]['title'] = $this->redColorKeyword($this->asarray[$key]['title']);
                         $this->result[$i]['description'] = $this->redColorKeyword($this->asarray[$key]['description']);
                         //二级项目匹配
                         $this->result[$i]['soniterm'][] = $this->redColorKeyword($val);
                     }
                 }
             }
         }
         $i++;
     }
 }
开发者ID:hensonvip,项目名称:ymroad,代码行数:30,代码来源:actionsearch_class.php

示例2: CheckPurview

function CheckPurview($n)
{
  if(!TestPurview($n)){
  	ShowMsg("对不起,你没有权限执行此操作!<br/><br/><a href='javascript:history.go(-1);'>点击此返回上一页&gt;&gt;</a>",'javascript:;');
  	exit();
  }
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:7,代码来源:inc_userlogin.php

示例3: GetMkTime

 //对保存的内容进行处理
 $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);
 $keywords = trim(cn_substrR($keywords, 60));
 $filename = trim(cn_substrR($filename, 40));
 $isremote = empty($isremote) ? 0 : $isremote;
 $serviterm = empty($serviterm) ? "" : $serviterm;
 if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) {
     $arcrank = -1;
 }
 $adminid = $cuserLogin->getUserID();
 //处理上传的缩略图
 if (empty($ddisremote)) {
     $ddisremote = 0;
 }
 $litpic = GetDDImage('none', $picname, $ddisremote);
 //分析body里的内容
 $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext');
 //分析处理附加表数据
 $inadd_f = '';
 $inadd_v = '';
 if (!empty($dede_addonfields)) {
     $addonfields = explode(';', $dede_addonfields);
开发者ID:suibber,项目名称:jb,代码行数:31,代码来源:article_edit.php

示例4: 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

示例5: require_once

<?php 
require_once(dirname(__FILE__)."/../config.php");
require_once(dirname(__FILE__)."/../../include/inc_photograph.php");
require_once(dirname(__FILE__)."/../../include/pub_oxwindow.php");
require_once(dirname(__FILE__)."/../inc/inc_archives_functions.php");

if(!TestPurview('spec_New')) {
	ShowMsg("对不起,你没有操作栏目 {$typeid} 的文档权限!");
	exit();
}

if(!isset($iscommend)) $iscommend = 0;
if(!isset($isbold)) $isbold = 0;

$channelid = -1;

//对保存的内容进行处理
//--------------------------------
$iscommend = $iscommend + $isbold;

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

if($ishtml==0) $ismake = -1;
else $ismake = 0;

$title = cn_substr($title,80);
$shorttitle = cn_substr($shorttitle,36);
$color =  cn_substr($color,10);
$writer =  cn_substr($writer,30);
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:spec_add_action.php

示例6: GetMenus

function GetMenus($userrank, $topos = 'main')
{
    global $openitem, $headTemplet, $footTemplet, $itemTemplet;
    if ($topos == 'main') {
        $openitem = empty($openitem) ? 1 : $openitem;
        $menus = $GLOBALS['menusMain'];
    } else {
        if ($topos == 'module') {
            $openitem = 100;
            $menus = $GLOBALS['menusMoudle'];
        }
    }
    $dtp = new DedeTagParse();
    $dtp->SetNameSpace('m', '<', '>');
    $dtp->LoadSource($menus);
    $dtp2 = new DedeTagParse();
    $dtp2->SetNameSpace('m', '<', '>');
    $m = 0;
    foreach ($dtp->CTags as $i => $ctag) {
        if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) {
            if ($openitem != 999 && !preg_match("#" . $openitem . '_' . "#", $ctag->GetAtt('item')) && $openitem != 100) {
                continue;
            }
            $m++;
            echo "<!-- Item " . ($m + 1) . " Strat -->\r\n";
            $htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet);
            if (empty($openitem) || $openitem == 100) {
                if ($ctag->GetAtt('notshowall') == '1') {
                    continue;
                }
                $htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp);
            } else {
                if ($openitem == $ctag->GetAtt('item') || preg_match("#" . $openitem . '_' . "#", $ctag->GetAtt('item')) || $openitem == '-1') {
                    $htmp = str_replace('~display~', 'block', $htmp);
                } else {
                    $htmp = str_replace('~display~', 'none', $htmp);
                }
            }
            $htmp = str_replace('~cc~', $m . '_' . $openitem, $htmp);
            echo $htmp;
            $dtp2->LoadSource($ctag->InnerText);
            foreach ($dtp2->CTags as $j => $ctag2) {
                $ischannel = trim($ctag2->GetAtt('ischannel'));
                if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) {
                    $link = "<a href='" . $ctag2->GetAtt('link') . "' target='" . $ctag2->GetAtt('target') . "'>" . $ctag2->GetAtt('name') . "</a>";
                    if ($ischannel == '1') {
                        if ($ctag2->GetAtt('addalt') != '') {
                            $addalt = $ctag2->GetAtt('addalt');
                        } else {
                            $addalt = '录入新内容';
                        }
                        if ($ctag2->GetAtt('addico') != '') {
                            $addico = $ctag2->GetAtt('addico');
                        } else {
                            $addico = 'images/gtk-sadd.png';
                        }
                        //an add icos , small items use att ischannel='1' addico='ico' addalt='msg' linkadd=''
                        $link = "        <div class='items'>\r\n            <div class='fllct'>{$link}</div>\r\n\r\n            <div class='flrct'>\r\n                <a href='" . $ctag2->GetAtt('linkadd') . "' target='" . $ctag2->GetAtt('target') . "'><img src='{$addico}' alt='{$addalt}' title='{$addalt}'/></a>\r\n            </div>\r\n        </div>\r\n";
                    } else {
                        $link .= "\r\n";
                    }
                    $itemtmp = str_replace('~link~', $link, $itemTemplet);
                    echo $itemtmp;
                }
            }
            echo $footTemplet;
            echo "<!-- Item " . ($m + 1) . " End -->\r\n";
        }
    }
}
开发者ID:iabing,项目名称:mzzyc,代码行数:70,代码来源:inc_menu_func.php

示例7: time

$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);
$shorttitle = cn_substr($shorttitle,36);
$color =  cn_substr($color,10);
$writer =  cn_substr($writer,30);
$source = cn_substr($source,50);
$description = cn_substr($description,250);
$keywords = cn_substr($keywords,60);
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')){ $arcrank = -1; }

//处理上传的缩略图
if(empty($ddisremote)) $ddisremote = 0;
$litpic = GetDDImage('litpic',$picname,$ddisremote);

$body = stripslashes($body);

//自动摘要
if($description=="" && $cfg_auot_description>0){
	$description = stripslashes(cn_substr(html2text($body),$cfg_auot_description));
	$description = trim(preg_replace("/#p#|#e#/","",$description));
	$description = addslashes($description);
}

//把内容中远程的图片资源本地化
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:article_add_action.php

示例8: CheckPurview

if(!isset($cid)) $cid = 0;
if(!isset($keyword)) $keyword = "";
if(!isset($channelid)) $channelid = 0;
if(!isset($arcrank)) $arcrank = "";
if(!isset($adminid)) $adminid = 0;
if(!isset($ismember)) $ismember = 0;
if(!isset($USEListStyle)) $USEListStyle = '';
//检查权限许可,总权限
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");
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:full_list.php

示例9: GetMenus

function GetMenus($userrank)
{
global $c,$menus;
$catalog =(isset($c) ? $c : 2);
$headTemplet = "
<dl>
    <dt><a href=\"###\" onclick=\"showHide('items~cc~');\" target=\"_self\">~channelname~</a></dt>
    <dd id=\"items~cc~\" style=\"display:block;\">
			<ul>
";
$footTemplet = "  			</ul>
		</dd>
	</dl>";
$itemTemplet = "<li><a href='~link~' target='~target~'>~itemname~</a></li>
";
/////////////////////////////////////////
$dtp = new DedeTagParse();
$dtp->SetNameSpace("m","<",">");
$dtp->LoadSource($menus);
$dtp2 = new DedeTagParse();
$dtp2->SetNameSpace("m","<",">");
foreach($dtp->CTags as $i=>$ctag)
{
	$lc = $ctag->GetAtt('c');
	if($ctag->GetName()=="top"
	&& (ereg($catalog.',',$lc) || $catalog=='0') )
	{
		echo "<!-- Item ".($i+1)." Strat -->\r\n";
		$htmp = str_replace("~channelname~",$ctag->GetAtt("name"),$headTemplet);
		$htmp = str_replace("~display~",$ctag->GetAtt("display"),$htmp);
		$htmp = str_replace("~cc~",$i,$htmp);
		echo $htmp;
		$dtp2->LoadSource($ctag->InnerText);
		if(!empty($dtp2->CTags) && is_array($dtp2->CTags)){
			foreach($dtp2->CTags as $j=>$ctag2)
			{
				if($ctag2->GetName()=="item"
				&& ($ctag2->GetAtt('rank')=='' || TestPurview($ctag2->GetAtt('rank')) )
				)
				{
					 $itemtmp = str_replace("~link~",$ctag2->GetAtt("link"),$itemTemplet);
					 $itemtmp = str_replace("~target~",$ctag2->GetAtt("target"),$itemtmp);
					 $itemtmp = str_replace("~n~",$i,$itemtmp);
					 $itemtmp = str_replace("~itemname~",$ctag2->GetAtt("name"),$itemtmp);
					 echo $itemtmp;
				}
			}
		}
		echo $footTemplet;
		echo "<!-- Item ".($i+1)." End -->\r\n";
	}
}
}//End Function
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:53,代码来源:inc_menu.php

示例10: DelArc

function DelArc($aid, $type = 'ON', $onlyfile = false)
{
    global $dsql, $cfg_cookie_encode, $cfg_multi_site, $cfg_medias_dir;
    global $cuserLogin, $cfg_upload_switch, $cfg_delete, $cfg_basedir;
    global $admin_catalogs, $cfg_admin_channel;
    if ($cfg_delete == 'N') {
        $type = 'OK';
    }
    if (empty($aid)) {
        return;
    }
    $aid = ereg_replace("[^0-9]", '', $aid);
    $arctitle = $arcurl = '';
    //查询表信息
    $query = "Select ch.maintable,ch.addtable,ch.nid,ch.issystem From `#@__arctiny` arc\r\n\t            left join `#@__arctype` tp on tp.id=arc.typeid\r\n              left join `#@__channeltype` ch on ch.id=arc.channel where arc.id='{$aid}' ";
    $row = $dsql->GetOne($query);
    $nid = $row['nid'];
    $maintable = trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable']);
    $addtable = trim($row['addtable']);
    $issystem = $row['issystem'];
    //查询档案信息
    if ($issystem == -1) {
        $arcQuery = "Select arc.*,tp.* from `{$addtable}` arc left join `#@__arctype` tp on arc.typeid=tp.id where arc.aid='{$aid}' ";
    } else {
        $arcQuery = "Select arc.*,tp.*,arc.id as aid from `{$maintable}` arc left join `#@__arctype` tp on arc.typeid=tp.id where arc.id='{$aid}' ";
    }
    $arcRow = $dsql->GetOne($arcQuery);
    //检测权限
    if (!TestPurview('a_Del,sys_ArcBatch')) {
        if (TestPurview('a_AccDel')) {
            if (!in_array($arcRow['typeid'], $admin_catalogs) && (count($admin_catalogs) != 0 || $cfg_admin_channel != 'all')) {
                return false;
            }
        } else {
            if (TestPurview('a_MyDel')) {
                if ($arcRow['mid'] != $cuserLogin->getUserID()) {
                    return false;
                }
            } else {
                return false;
            }
        }
    }
    //$issystem==-1 是单表模型,不使用回收站
    if ($issystem == -1) {
        $type = 'OK';
    }
    if (!is_array($arcRow)) {
        return false;
    }
    /** 删除到回收站 **/
    if ($cfg_delete == 'Y' && $type == 'ON') {
        $dsql->ExecuteNoneQuery("Update `{$maintable}` set arcrank='-2' where id='{$aid}' ");
        $dsql->ExecuteNoneQuery("Update `#@__arctiny` set `arcrank` = '-2' where id = '{$aid}'; ");
    } else {
        //删除数据库记录
        if (!$onlyfile) {
            //删除相关附件
            if ($cfg_upload_switch == 'Y') {
                $dsql->Execute("me", "SELECT * FROM `#@__uploads` WHERE arcid = '{$aid}'");
                while ($row = $dsql->GetArray('me')) {
                    $addfile = $row['url'];
                    $aid = $row['aid'];
                    $dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '{$aid}' ");
                    $upfile = $cfg_basedir . $addfile;
                    if (@file_exists($upfile)) {
                        @unlink($upfile);
                    }
                }
            }
            $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='{$aid}'");
            if ($addtable != '') {
                $dsql->ExecuteNoneQuery("Delete From `{$addtable}` where aid='{$aid}' ");
            }
            if ($issystem != -1) {
                $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='{$aid}' ");
            }
            $dsql->ExecuteNoneQuery("Delete From `#@__feedback` where aid='{$aid}' ");
            $dsql->ExecuteNoneQuery("Delete From `#@__member_stow` where aid='{$aid}' ");
            $dsql->ExecuteNoneQuery("Delete From `#@__taglist` where aid='{$aid}' ");
            $dsql->ExecuteNoneQuery("Delete From `#@__erradd` where aid='{$aid}' ");
        }
        //删除文本数据
        $filenameh = DEDEDATA . "/textdata/" . ceil($aid / 5000) . "/{$aid}-" . substr(md5($cfg_cookie_encode), 0, 16) . ".txt";
        if (@is_file($filenameh)) {
            @unlink($filenameh);
        }
    }
    if (empty($arcRow['money'])) {
        $arcRow['money'] = 0;
    }
    if (empty($arcRow['ismake'])) {
        $arcRow['ismake'] = 1;
    }
    if (empty($arcRow['arcrank'])) {
        $arcRow['arcrank'] = 0;
    }
    if (empty($arcRow['filename'])) {
        $arcRow['filename'] = '';
    }
//.........这里部分代码省略.........
开发者ID:klr2003,项目名称:sourceread,代码行数:101,代码来源:inc_batchup.php

示例11: CheckPurview

    $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();
    if (!empty($userCatalogSql)) {
        $tinyQuerys[] = str_replace('arc.', '', $userCatalogSql);
开发者ID:puppylsy,项目名称:cms,代码行数:31,代码来源:content_list3.php

示例12: mt_rand

 if (empty($click)) {
     $click = $cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click;
 }
 if (empty($typeid)) {
     ShowMsg("请指定文档的栏目!", "-1");
     exit;
 }
 if (empty($channelid)) {
     ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1");
     exit;
 }
 if (!CheckChannel($typeid, $channelid)) {
     ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1");
     exit;
 }
 if (!TestPurview('a_New')) {
     CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!");
 }
 //对保存的内容进行处理
 if (empty($writer)) {
     $writer = $cuserLogin->getUserName();
 }
 if (empty($source)) {
     $source = '未知';
 }
 $pubdate = GetMkTime($pubdate);
 $senddate = time();
 $sortrank = AddDay($pubdate, $sortup);
 $ismake = $ishtml == 0 ? -1 : 0;
 $title = preg_replace("#\"#", '"', $title);
 $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen));
开发者ID:puppylsy,项目名称:cms,代码行数:31,代码来源:article_add.php

示例13: DelArc

function DelArc($aid,$onlyfile=false,$channelid=0)
{
	  global $dsql,$cuserLogin,$cfg_send_score;
	  
	  if(!is_object($dsql)) $dsql = new DedeSql(false);
	  
	  $tables = GetChannelTable($dsql,$aid,'arc');
	  
    //读取文档信息
    $arctitle = "";
    $arcurl = "";
    $arcQuery = "
    Select a.ID,a.title,a.typeid,
    a.ismake,a.senddate,a.arcrank,c.addtable,
 		a.money,t.typedir,t.typename,a.adminID,a.memberID,
 		t.namerule,t.namerule2,t.ispart,
 		t.moresite,t.siteurl,t.siterefer,t.sitepath 
		from `{$tables['maintable']}` a 
		left join #@__arctype t on a.typeid=t.ID
		left join #@__channeltype c on c.ID=a.channel
    where a.ID='$aid'
    ";
    $arcRow = $dsql->GetOne($arcQuery);
    if(!TestPurview('a_Del,sys_ArcBatch')){
    	if(TestPurview('a_AccDel'))
    	{ if(!in_array($arcRow['typeid'],MyCatalogs())) return false; }
    	else if(TestPurview('a_MyDel'))
    	{ if($arcRow['adminID']!=$cuserLogin->getUserID()) return false; }
    	else
    	{ return false;}
    }
    if(!is_array($arcRow)) return false;
    //删除数据库的内容
    if(!$onlyfile)
    {
      $dsql->ExecuteNoneQuery("Delete From `{$tables['maintable']}` where ID='$aid'");
      if($arcRow['addtable']!=""){
        $dsql->ExecuteNoneQuery("Delete From `{$tables['addtable']}` where aid='$aid'");
      }
      $dsql->ExecuteNoneQuery("Delete From #@__feedback where aid='$aid'");
      $dsql->ExecuteNoneQuery("Delete From #@__full_search where aid='$aid'");
      $dsql->ExecuteNoneQuery("Delete From #@__memberstow where arcid='$aid'");
      if($arcRow['memberID']>0){
      	$dsql->ExecuteNoneQuery("Update From #@__member set scores = scores-{$cfg_send_score},c1=c1-1 where ID='{$arcRow['memberID']}' ");
      }
    }
    //删除HTML
    if($arcRow['ismake']==-1||$arcRow['arcrank']!=0
    ||$arcRow['typeid']==0||$arcRow['money']>0){
  		return true;
  	}
  	$arcurl = GetFileUrl($arcRow['ID'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'],$arcRow['ismake'],
           $arcRow['arcrank'],$arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],false,'');
    if(!ereg("\?",$arcurl)){
    	 $truedir = GetTruePath($arcRow['siterefer'],$arcRow['sitepath']);
    	 $htmlfile = $truedir.$arcurl;
    	 if(file_exists($htmlfile) && !is_dir($htmlfile)) unlink($htmlfile);
    	 $arcurls = explode(".",$arcurl);
    	 $sname = $arcurls[count($arcurls)-1];
    	 $fname = ereg_replace("(\.$sname)$","",$arcurl);
    	 for($i=2;$i<=100;$i++){
    		 $htmlfile = $truedir.$fname."_$i".".".$sname;
    		 if(file_exists($htmlfile) && !is_dir($htmlfile)) unlink($htmlfile);
    		 else break;
    	 }
    }
    //删除文本文件
    $ipath = $GLOBALS['cfg_cmspath']."/data/textdata/".(ceil($aid/5000))."/";
		$filename = $GLOBALS['cfg_basedir'].$ipath."{$aid}.txt";
		if(is_file($filename)) unlink($filename);
    return true;
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:72,代码来源:inc_batchup.php

示例14: ShowMsg

     $autolitpic = 0;
 }
 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 = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen));
 $shorttitle = cn_substrR($shorttitle, 36);
 $color = cn_substrR($color, 7);
 $writer = cn_substrR($writer, 20);
 $source = cn_substrR($source, 30);
开发者ID:puppylsy,项目名称:cms,代码行数:31,代码来源:article_edit.php

示例15: require_once

<?php 
require_once(dirname(__FILE__)."/../config.php");
require_once(dirname(__FILE__)."/../../include/inc_photograph.php");
require_once(dirname(__FILE__)."/../../include/pub_oxwindow.php");
require_once(dirname(__FILE__)."/../inc/inc_archives_functions.php");

if(!isset($iscommend)) $iscommend = 0;
if(!isset($ispic)) $ispic = 0;
if(!isset($isbold)) $isbold = 0;

if( empty($channelid)||empty($ID) ){
	ShowMsg("文档为非指定的类型,请检查你增加内容时是否合法!","-1");
	exit();
}
if(!TestPurview('spec_Edit')) {
	ShowMsg("对不起,你没有操作栏目 {$typeid} 的文档权限!");
	exit();
}

//对保存的内容进行处理
//--------------------------------
$iscommend = $iscommend + $isbold;

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

if($ishtml==0) $ismake = -1;
else $ismake = 0;

$title = cn_substr($title,80);
$shorttitle = cn_substr($shorttitle,36);
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:spec_edit_action.php


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