GetOne($query); $gurl = $row['editcon']; if($gurl=='') $gurl='article_edit.php'; header("location:{$gurl}?aid=$aid"); exit(); } /*-------------------------- //‹¹è§ˆæ–‡æ¡£ function viewArchives(){ } ---------------------------*/ else if($dopost=="viewArchives") { $aid = preg_replace("#[^0-9]#", '', $aid); //获取主表信息 $query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon, tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl FROM `#@__arctiny` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE arc.id='$aid' "; $trow = $dsql->GetOne($query); $trow['maintable'] = ( trim($trow['maintable'])=='' ? '#@__archives' : trim($trow['maintable']) ); if($trow['issystem'] != -1) { $arcQuery = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl FROM `{$trow['maintable']}` arc LEFT JOIN `#@__arctype` tp on arc.typeid=tp.id LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; $arcRow = $dsql->GetOne($arcQuery); PutCookie('DedeUserID',$arcRow['mid'],1800); PutCookie('DedeLoginTime',time(),1800); if($arcRow['ismake']==-1 || $arcRow['corank']!=0 || $arcRow['arcrank']!=0 || ($arcRow['typeid']==0 && $arcRow['channel']!=-1) || $arcRow['money']>0) { echo ""; exit(); } } else { $arcRow['id'] = $aid; $arcRow['typeid'] = $trow['typeid']; $arcRow['senddate'] = $trow['senddate']; $arcRow['title'] = ''; $arcRow['ismake'] = 1; $arcRow['arcrank'] = $trow['corank']; $arcRow['namerule'] = $trow['namerule']; $arcRow['typedir'] = $trow['typedir']; $arcRow['money'] = 0; $arcRow['filename'] = ''; $arcRow['moresite'] = $trow['moresite']; $arcRow['siteurl'] = $trow['siteurl']; $arcRow['sitepath'] = $trow['sitepath']; } $arcurl = GetFileUrl($arcRow['id'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'],$arcRow['ismake'],$arcRow['arcrank'], $arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],$arcRow['filename'],$arcRow['moresite'],$arcRow['siteurl'],$arcRow['sitepath']); $arcfile = GetFileUrl($arcRow['id'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'], $arcRow['ismake'],$arcRow['arcrank'],$arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],$arcRow['filename']); if(preg_match("#^http:#", $arcfile)) { $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); } $truefile = GetTruePath().$arcfile; if(!file_exists($truefile)) { MakeArt($aid,TRUE); } echo ""; exit(); } /*-------------------------- //异步上传¾~©ç•¥å›? function uploadLitpic(){ } ---------------------------*/ else if($dopost=="uploadLitpic") { $upfile = AdminUpload('litpic', 'imagelit', 0, false ); if($upfile=='-1') { $msg = ""; } else if($upfile=='-2') { $msg = ""; } else if($upfile=='0') { $msg = ""; } else { if(!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut=='N') { $msg = ""; } else { $msg = ""; } } echo $msg; exit(); } /*-------------------------- //推荐文æ¡£ function commendArchives(){ } ---------------------------*/ else if($dopost=="commendArchives") { CheckPurview('a_Commend,sys_ArcBatch'); if( !empty($aid) && empty($qstr) ) { $qstr = $aid; } if($qstr=='') { ShowMsg("参数无效åQ?,$ENV_GOBACK_URL); exit(); } $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc LEFT JOIN `#@__arctype` tp on tp.id=arc.typeid LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE arc.id in($arcids) "; $dsql->SetQuery($query); $dsql->Execute(); while($row = $dsql->GetArray()) { $aid = $row['id']; if($row['issystem']!=-1) { $maintable = ( trim($row['maintable'])=='' ? '#@__archives' : trim($row['maintable']) ); $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); $flag = ($arr['flag']=='' ? 'c' : $arr['flag'].',c'); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); } else { $maintable = trim($row['addtable']); $arr = $dsql->GetOne("SELECT flag From `{$maintable}` where aid='$aid' "); $flag = ($arr['flag']=='' ? 'c' : $arr['flag'].',c'); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); } } ShowMsg("成功把所选的文档设äؓ推荐åQ?,$ENV_GOBACK_URL); exit(); } /*-------------------------- //生成HTML function makeArchives(); ---------------------------*/ else if($dopost=="makeArchives") { CheckPurview('sys_MakeHtml,sys_ArcBatch'); if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg('参数无效åQ?,$ENV_GOBACK_URL); exit(); } require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); $qstrs = explode('`',$qstr); $i = 0; foreach($qstrs as $aid) { $i++; $pageurl = MakeArt($aid,false); } ShowMsg("成功更新指定 $i 个文ä»?..",$ENV_GOBACK_URL); exit(); } /*-------------------------- //审核文æ¡£ function checkArchives() { } ---------------------------*/ else if($dopost=="checkArchives") { CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg("参数无效åQ?,$ENV_GOBACK_URL); exit(); } $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE arc.id in($arcids) "; $dsql->SetQuery($query); $dsql->Execute('ckall'); while($row = $dsql->GetArray('ckall')) { $aid = $row['id']; $maintable = ( trim($row['maintable'])=='' ? '#@__archives' : trim($row['maintable']) ); $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' "); if($row['issystem']==-1) { $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' "); } else { $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); } $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); $pageurl = MakeArt($aid,false); } ShowMsg("成功审核指定的文档!",$ENV_GOBACK_URL); exit(); } /*-------------------------- //删除文æ¡£ function delArchives(){ } ---------------------------*/ else if($dopost=="delArchives") { CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); require_once(DEDEINC."/oxwindow.class.php"); if(empty($fmdo)) $fmdo = ''; if($fmdo=='yes') { if( !empty($aid) && empty($qstr) ) { $qstr = $aid; } if($qstr=='') { ShowMsg("参数无效åQ?,$ENV_GOBACK_URL); exit(); } $qstrs = explode("`",$qstr); $okaids = Array(); foreach($qstrs as $aid) { if(!isset($okaids[$aid])) { DelArc($aid); } else { $okaids[$aid] = 1; } } ShowMsg("成功删除指定的文档!",$ENV_GOBACK_URL); exit(); } else { $wintitle = "文æ¡£½Ž¡ç†-删除文æ¡£"; $wecome_info = "文æ¡£½Ž¡ç†::删除文æ¡£"; $win = new OxWindow(); $win->Init("archives_do.php","js/blank.js","POST"); $win->AddHidden("fmdo","yes"); $win->AddHidden("dopost",$dopost); $win->AddHidden("qstr",$qstr); $win->AddHidden("aid",$aid); $win->AddTitle("你确实要删除â€?$qstr å’?$aid ”这些文档?"); $winform = $win->GetWindow("ok"); $win->Display(); } } /*----------------------------- function moveArchives(){ } ------------------------------*/ else if($dopost=='moveArchives') { CheckPurview('sys_ArcBatch'); if(empty($totype)) { require_once(DEDEINC.'/typelink.class.php'); if( !empty($aid) && empty($qstr) ) $qstr = $aid; AjaxHead(); $channelid = empty($channelid) ? 0 : $channelid; $tl = new TypeLink($aid); $typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); $typeOptions = ""; //输出AJAX可移动窗ä½? $divname = 'moveArchives'; echo "
\r\n"; echo "
¿UÕdŠ¨æ–‡æ¡£
\r\n"; echo "
关闭
\r\n"; echo "
\r\n"; echo "
\r\n"; echo "\r\n"; echo "\r\n"; echo "\r\n"; ?>
 ç›®æ ‡æ ç›®åQ?/td>
 æ–‡æ¡£IDåQ?/td>
¿UÕdŠ¨åˆ°çš„目标栏目必须和选定的文档频道类型一è‡ß_¼Œå¦åˆ™½E‹åºä¼šè‡ªåŠ¨å‹¿ç•¥ä¸½W¦åˆçš„文档ã€?
  
GetOne("SELECT tp.channeltype,tp.ispart,tp.channeltype,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE tp.id='$totype' "); $idtype = "id"; if(!is_array($typeInfos)) { ShowMsg('参数错误åQ?,'-1'); exit(); } if($typeInfos['ispart']!=0) { ShowMsg('文档保存的栏目必™åÖMؓ最¾lˆåˆ—表栏目!','-1'); exit(); } if(empty($typeInfos['addtable'])) { $typeInfos['maintable'] = '#@__archives'; } //增加单表模型判断 if($typeInfos['issystem'] == -1) { $typeInfos['maintable'] = $typeInfos['addtable']; $idtype = "aid"; } $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); $arc = ''; $j = 0; $okids = array(); $dsql->SetQuery("SELECT {$idtype},typeid FROM `{$typeInfos['maintable']}` WHERE {$idtype} in($arcids) AND channel='{$typeInfos['channeltype']}' "); $dsql->Execute(); while($row = $dsql->GetArray()) { if($row['typeid']!=$totype) { $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['maintable']}` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['addtable']}` SET typeid='$totype' WHERE aid='{$row[$idtype]}' "); $okids[] = $row[$idtype]; $j++; } } //更新HTML foreach($okids as $aid) { $arc = new Archives($aid); $arc->MakeHtml(); } ShowMsg("成功¿UÕdŠ¨ $j 个文档!", $ENV_GOBACK_URL); exit(); } } /*----------------------------- //˜q˜åŽŸæ–‡æ¡£ function RbReturnArchives(){ } ------------------------------*/ else if($dopost=='return') { CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); require_once(DEDEINC."/oxwindow.class.php"); if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg("参数无效åQ?,"recycling.php"); exit(); } $qstrs = explode("`", $qstr); foreach($qstrs as $aid) { $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); } ShowMsg("成功˜q˜åŽŸæŒ‡å®šçš„文档!","recycling.php"); exit(); } /*----------------------------- //清空文æ¡£ function RbClearArchives(){ } ------------------------------*/ else if($dopost=='clear') { CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); require_once(DEDEINC."/oxwindow.class.php"); if(empty($fmdo)) $fmdo = ''; $recycle = empty($recycle)? "" : $recycle; if($fmdo=='yes') { if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg("参数无效åQ?,"recycling.php"); exit(); } $qstrs = explode(",", $qstr); $okaids = Array(); foreach($qstrs as $qstr) { if(!isset($okaids[$qstr])) { DelArc($qstr, "OK", FALSE, $recycle); $okaids[$qstr] = $qstr; } else { $okaids[$qstr] = 1; } } ShowMsg("成功删除指定的文档!","recycling.php"); exit(); } else { $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); $dsql->Execute(); $qstr = ''; while($row = $dsql->GetArray()) { $qstr .= $row['id'].","; $aid = $row['id']; } $num = $dsql->GetTotalRow(); if(empty($num)) { ShowMsg("对不èµøP¼Œæœªå‘现相å…Ïx–‡æ¡£ï¼","recycling.php"); exit(); } $wintitle = "文æ¡£½Ž¡ç†-清空所有文æ¡?; $wecome_info = "文档回收ç«?/a>::清空所有文æ¡?; $win = new OxWindow(); $win->Init("archives_do.php","js/blank.js","POST"); $win->AddHidden("fmdo","yes"); $win->AddHidden("dopost",$dopost); $win->AddHidden("qstr",$qstr); $win->AddHidden("aid",$aid); $win->AddHidden("recycle",$recycle); $win->AddTitle("本次操作ž®†æ¸…½Iºå›žæ”¶ç«™æ‰€æœ‰å…± $num ½‹‡æ–‡æ¡?/font>
你确实要æ°æ€¹…删除â€?$qstr ”这些文档?"); $winform = $win->GetWindow("ok"); $win->Display(); } } /*----------------------------- //清除文æ¡£ function RbDelArchives(){ } ------------------------------*/ else if($dopost=='del') { CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); require_once(DEDEINC."/oxwindow.class.php"); if(empty($fmdo)) $fmdo = ''; $recycle = empty($recycle)? "" : $recycle; if($fmdo=='yes') { if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg("参数无效åQ?,"recycling.php"); exit(); } $qstrs = explode("`", $qstr); $okaids = Array(); foreach($qstrs as $aid) { if(!isset($okaids[$aid])) { DelArc($aid,"OK","",$recycle); } else { $okaids[$aid] = 1; } } ShowMsg("成功删除指定的文档!","recycling.php"); exit(); } else { $wintitle = "文æ¡£½Ž¡ç†-删除文æ¡£"; $wecome_info = "
文æ¡£½Ž¡ç†::删除文æ¡£"; $win = new OxWindow(); $win->Init("archives_do.php","js/blank.js","POST"); $win->AddHidden("fmdo","yes"); $win->AddHidden("dopost",$dopost); $win->AddHidden("qstr",$qstr); $win->AddHidden("aid",$aid); $win->AddHidden("recycle",$recycle); $win->AddTitle("你确实要æ°æ€¹…删除â€?$qstr å’?$aid ”这些文档?"); $winform = $win->GetWindow("ok"); $win->Display(); } } /*----------------------------- //快速编è¾? function quickEdit(){ } ------------------------------*/ else if($dopost=='quickEdit') { require_once(DEDEADMIN."/inc/inc_catalog_options.php"); AjaxHead(); $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; $arcRow = $dsql->GetOne($query); $divname = 'quickEdit'; echo "
\r\n"; echo "
快速属性编è¾?/div>\r\n"; echo "
关闭
\r\n"; echo "
\r\n"; echo "
\r\n"; echo "\r\n"; echo "\r\n"; echo "\r\n"; ?>
 æ‰€å±žæ ç›®ï¼š getUserChannel(), $arcRow['channel']); echo ""; ?>
 å±?性: ' /> SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); $dsql->Execute(); while($trow = $dsql->GetObject()) { if($trow->att=='j' || $trow->att=='p') continue; if(preg_match("#".$trow->att."#", $arcRow['flag'])) echo "{$trow->attname}.{$trow->att}"; else echo "{$trow->attname}.{$trow->att}"; } ?>
 æ ?题:
 ½Ž€ç•¥æ ‡é¢˜ï¼š
 é˜…读权限åQ?/td> 需要金币:" style="width:80px" />
 å…³é”®å­—:
  
getUserID()); } } $title = htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); $shorttitle = cn_substrR($shorttitle, 36); $keywords = trim(cn_substrR($keywords, 60)); if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; $adminid = $cuserLogin->getUserID(); //属性处ç? $flag = isset($flags) ? join(',', $flags) : ''; if(!empty($flag)) { if(preg_match("#p#", $oldflag)) $flag .= ',p'; if(preg_match("#j#", $oldflag)) $flag .= ',j'; } /* else { $flag = $oldflag; } */ $query = "UPDATE `#@__archives` SET typeid = '$typeid', flag = '$flag', arcrank = '$arcrank', money = '$money', title = '$title', shorttitle = '$shorttitle', keywords = '$keywords', dutyadmin = '$adminid' WHERE id = '$aid'; "; //更新主表 $dsql->ExecuteNoneQuery($query); //更新微表 $dsql->ExecuteNoneQuery(" UPDATE `#@__arctiny` SET typeid='$typeid',arcrank='$arcrank' WHERE id='$aid' "); //更新附加è¡? if($typeid != $oldtypeid) { $addtable = trim($addtable); if(empty($addtable)) $addtable = '#@__addonarticle'; else $addtable = preg_replace("#[^a-z0-9__#@-]#i", "", $addtable); $dsql->ExecuteNoneQuery(" UPDATE `$addtable` SET typeid='$typeid' WHERE aid='$aid' "); } //更新HTML $artUrl = MakeArt($aid, TRUE, TRUE); $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; ShowMsg('成功更新一½‹‡æ–‡æ¡£çš„基本信息åQ?, $backurl); exit(); } /*-------------------------- 分析òq¶è‡ªåŠ¨èŽ·å–文档关键词 function makekw(){ } --------------------------*/ else if($dopost=="makekw") { include_once(DEDEINC.'/splitword.class.php'); CheckPurview('a_Commend,sys_ArcBatch'); if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg("参数无效åQ?, $ENV_GOBACK_URL); exit(); } $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); $query = "SELECT arc.*, addt.* From `#@__archives` arc LEFT JOIN `#@__addonarticle` addt ON addt.aid=arc.id WHERE arc.id in($arcids) AND arc.channel=1 "; $dsql->SetQuery($query); $dsql->Execute(); while($row = $dsql->GetArray()) { //跌™¿‡å·²ç»æœ‰å…³é”®å­—的内å®? if(trim($row['keywords']) !='' ) continue; $aid = $row['id']; $keywords = ''; $title = $row['title']; $description = $row['description']; $body = cn_substr($row['body'], 5000); $sp->SetSource($title, $cfg_soft_lang, $cfg_soft_lang); $sp->StartAnalysis(); $titleindexs = preg_replace("/#p#|#e#/",'',$sp->GetFinallyIndex()); $sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); $sp->StartAnalysis(); $allindexs = preg_replace("/#p#|#e#/",'',$sp->GetFinallyIndex()); if(is_array($allindexs) && is_array($titleindexs)) { foreach($titleindexs as $k => $v) { if(strlen($keywords.$k)>=60) { break; } else { if(strlen($k) <= 2) continue; $keywords .= $k.','; } } foreach($allindexs as $k => $v) { if(strlen($keywords.$k)>=60) { break; } else if(!in_array($k,$titleindexs)) { if(strlen($k) <= 2) continue; $keywords .= $k.','; } } } $description = str_replace(' ', ' ', trim($description)); $description = str_replace('åQ?, ' ', $description); $description = str_replace('åQ?, ' ', $description); $description = preg_replace("#[ \r\n\t]{1,}#is", ' ', $description); $description = str_replace('关键å­?, '', $description); $description = str_replace('关键è¯?, '', $description); $description = addslashes($description); $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); } $sp = null; ShowMsg("成功分析指定文档的关键词åQ?, $ENV_GOBACK_URL); exit(); } /*-------------------------- //扚w‡å¢žåŠ å±žæ€? function attsAdd(){ } ---------------------------*/ else if($dopost=='attsAdd') { CheckPurview('a_Commend,sys_ArcBatch'); if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg("参数无效åQ?,$ENV_GOBACK_URL); exit(); } if(empty($flagname)) { ShowMsg("必须指定要添加的属性!",$ENV_GOBACK_URL); exit(); } $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE arc.id in($arcids) "; $dsql->SetQuery($query); $dsql->Execute(); while($row = $dsql->GetArray()) { $aid = $row['id']; if($row['issystem'] != -1) { $maintable = ( trim($row['maintable'])=='' ? '#@__archives' : trim($row['maintable']) ); $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); $flag = ($arr['flag']=='' ? $flagname : $arr['flag'].','.$flagname); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); } else { $maintable = trim($row['addtable']); $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); $flag = ($arr['flag']=='' ? $flagname : $arr['flag'].','.$flagname); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); } } ShowMsg("成功寚w€‰ä¸­æ–‡æ¡£å¢žåŠ æŒ‡å®šçš„属性!",$ENV_GOBACK_URL); exit(); } /*-------------------------- //扚w‡åˆ é™¤å±žæ€? function attsDel(){ } ---------------------------*/ else if($dopost=='attsDel') { CheckPurview('a_Commend,sys_ArcBatch'); if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg("参数无效åQ?, $ENV_GOBACK_URL); exit(); } if(empty($flagname)) { ShowMsg("必须指定要删除的属性!", $ENV_GOBACK_URL); exit(); } $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE arc.id in($arcids) "; $dsql->SetQuery($query); $dsql->Execute(); while($row = $dsql->GetArray()) { $aid = $row['id']; if($row['issystem'] != -1) { $idname = 'id'; $maintable = ( trim($row['maintable'])=='' ? '#@__archives' : trim($row['maintable']) ); $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); } else { $idname = 'aid'; $maintable = trim($row['addtable']); $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); } $flag = $arr['flag']; if(trim($flag)=='' || !preg_match("#".$flagname."#", $flag) ) { continue; } else { $flags = explode(',', $flag); $okflags = array(); foreach($flags as $f) { if($f != $flagname) $okflags[] = $f; } } $flag = trim(join(',', $okflags)); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); } ShowMsg("成功寚w€‰ä¸­æ–‡æ¡£åˆ é™¤æŒ‡å®šçš„属性!", $ENV_GOBACK_URL); exit(); } /*-------------------------- //获得扚w‡å±žæ€§å¤„理的AJAX½H—体 function attsDlg(){ } ---------------------------*/ else if($dopost=='attsDlg') { if( !empty($aid) && empty($qstr) ) $qstr = $aid; $dojobname = ($dojob=='attsDel' ? '扚w‡åˆ é™¤å±žæ€? : '扚w‡å¢žåŠ å±žæ€?); AjaxHead(); //输出AJAX可移动窗ä½? $divname = 'attsDlg'; echo "
\r\n"; echo "
{$dojobname}
\r\n"; echo "
关闭
\r\n"; echo "
\r\n"; echo "
\r\n"; echo "\r\n"; echo "\r\n"; echo "\r\n"; ?>
 å±?性: ' /> SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); $dsql->Execute(); while($trow = $dsql->GetObject()) { if($trow->att=='j' || $trow->att=='p') continue; echo "{$trow->attname}.{$trow->att}"; } ?>
 æ–‡æ¡£IDåQ?/td>
  
\r\n"; echo "
栏目快速选择å™?/div>\r\n"; echo "
关闭
\r\n"; echo "
\r\n"; $tus = new TypeUnitSelector(); ?>
ListAllType(0); ?>
  
日韩精品亚洲人旧成在线,日韩精品亚洲专区在线影院,日韩精品一区二区AV在线观看