exit(); } else { CheckPurview('co_EditNote'); require_once(dirname(__FILE__)."/../include/pub_dedetag.php"); $dtp = new DedeTagParse(); $dbnotes = $notes; $notes = stripslashes($notes); $dtp->LoadString($notes); if(!is_array($dtp->CTags)){ ShowMsg("该规则不合法,无法保存!","-1"); $dsql->Close(); exit(); } $ctag = $dtp->GetTagByName("item"); $query = " Update #@__conote set typeid='".$ctag->GetAtt('typeid')."', gathername='".$ctag->GetAtt('name')."', language='".$ctag->GetAtt('language')."', lasttime=0, savetime='".time()."', noteinfo='".$dbnotes."' where nid = $nid; "; $dsql = new DedeSql(false); $rs = $dsql->ExecuteNoneQuery($query); $dsql->Close(); ShowMsg("成功保存规则!","co_main.php"); exit();
} } } else { if ($ctag->GetName() == 'keywordtrim') { $notes['keywordtrim'] = $ctag->GetInnerText(); } else { if ($ctag->GetName() == 'descriptiontrim') { $notes['descriptiontrim'] = $ctag->GetInnerText(); } else { if ($ctag->GetName() == 'noteinfo') { $noteinfo = $ctag; } else { if ($ctag->GetName() == 'listrule') { $listrule = $ctag; $dtp2->LoadString($ctag->GetInnerText()); $addurls = $dtp2->GetTagByName('addurls'); $regxrule = $dtp2->GetTagByName('regxrule'); $areastart = $dtp2->GetTagByName('areastart'); $areaend = $dtp2->GetTagByName('areaend'); $batchrule = $dtp2->GetTagByName('batchrule'); } else { if ($ctag->GetName() == 'sppage') { $sppage = $ctag; } else { if ($ctag->GetName() == 'previewurl') { $previewurl = trim($ctag->GetInnerText()); } } } } }
ShowMsg('该规则不合法,Base64格式的采集规则为:BASE64:base64编码后的配置:END !', '-1'); exit; } $notess = explode(':', $notes); $notes = $notess[1]; $notes = base64_decode(ereg_replace("[\r\n\t ]", '', $notes)) or die('配置字符串有错误!'); } else { $notes = stripslashes($notes); } $dtp = new DedeTagParse(); $dtp->LoadString($notes); if (!is_array($dtp->CTags)) { ShowMsg('该规则不合法,无法导入!', '-1'); exit; } $ctag1 = $dtp->GetTagByName('listconfig'); $ctag2 = $dtp->GetTagByName('itemconfig'); $listconfig = $ctag1->GetInnerText(); $itemconfig = addslashes($ctag2->GetInnerText()); $dtp->LoadString($listconfig); $listconfig = addslashes($listconfig); $noteinfo = $dtp->GetTagByName('noteinfo'); if (!is_object($noteinfo)) { ShowMsg("该规则不合法,无法导入!", "-1"); exit; } foreach ($noteinfo->CAttribute->Items as $k => $v) { ${$k} = addslashes($v); } $uptime = time(); if (empty($freq)) {
exit(); } else { require_once(dirname(__FILE__)."/../include/pub_dedetag.php"); $dtp = new DedeTagParse(); $dbnotes = $notes; $notes = stripslashes($notes); $dtp->LoadString($notes); if(!is_array($dtp->CTags)) { ShowMsg("该规则不合法,无法保存!","-1"); $dsql->Close(); exit(); } $noteinfos = $dtp->GetTagByName("note"); $query = " Insert Into #@__co_exrule(channelid,rulename,etype,dtime,ruleset) Values('".$noteinfos->GetAtt('channelid')."','".$noteinfos->GetAtt('rulename')."','".$noteinfos->GetAtt('etype')."','".time()."','$dbnotes') "; $dsql = new DedeSql(false); $dsql->ExecuteNoneQuery($query); $dsql->Close(); ShowMsg("成功导入一个规则!","co_export_rule.php"); exit(); } } require_once(dirname(__FILE__)."/templets/co_export_rule_add.htm");
if(!is_array($row)){ ShowMsg('找不到导入规则,无法完成操作!','javascript:;'); $dsql->Close(); exit(); } $channelid = $row['channelid']; $etype = $row['etype']; $arcsource = $row['arcsource']; $senddate = time(); $typeinfos = $dsql->GetOne("Select * From `#@__arctype` where ID='$typeid'",MYSQL_ASSOC); //分析规则,并生成临时的SQL语句 //------------------------------------- $dtp = new DedeTagParse(); $dtp->LoadString($row['ruleset']); $noteinfo = $dtp->GetTagByName('note'); $tablenames = explode(",",$noteinfo->GetAtt('tablename')); $autofield = $noteinfo->GetAtt('autofield'); $synfield = $noteinfo->GetAtt('synfield'); $tablename1 = str_replace('#@__',$cfg_dbprefix,$tablenames[0]); $tb1SqlKey = "Insert Into `$tablename1`($autofield"; $tb1SqlValue = " Values('@$autofield@'"; if(count($tablenames)>=2){ $tablename2 = str_replace('#@__',$cfg_dbprefix,$tablenames[1]); $tb2SqlKey = "Insert Into `$tablename2`("; $tb2SqlValue = " Values("; if($synfield!=''){ $tb2SqlKey .= $synfield; $tb2SqlValue .= "'@$synfield@'"; } }
ShowMsg("读取文档信息出错!", "-1"); exit; } else { if ($row['arcrank'] >= 0) { $dtime = time(); $maxtime = $cfg_mb_editday * 24 * 3600; if ($dtime - $row['senddate'] > $maxtime) { ShowMsg("这篇文档已经锁定,你不能再修改它!", "-1"); exit; } } } $addRow = $dsql->GetOne("SELECT * FROM `{$row['addtable']}` WHERE aid='{$aid}'; "); $dtp = new DedeTagParse(); $dtp->LoadSource($addRow['imgurls']); $abinfo = $dtp->GetTagByName('pagestyle'); $row = XSSClean($row); $addRow = XSSClean($addRow); include DEDEMEMBER . "/templets/album_edit.htm"; exit; } else { if ($dopost == 'save') { $svali = GetCkVdValue(); if (preg_match("/1/", $safe_gdopen)) { if (strtolower($vdcode) != $svali || $svali == '') { ResetVdValue(); ShowMsg('验证码错误!', '-1'); exit; } } $cInfos = $dsql->GetOne("Select * From `#@__channeltype` where id='{$channelid}'; ");
/** * caijixia for dedecms * @version $Id: cjx.class.php 112 2013-05-28 01:22:57Z qinjinpeng $ * @copyright Copyright (c) 2011,caijixia for dedecms,caijixia.com. * @license This is NOT a freeware, use is subject to license terms * * @param NULL * @return NULL */ function ac_gettask() { AjaxHead(); $typeid = $this->gv('typeid'); $rs = cjxdb('kwkeyword')->where("typeid={$typeid}")->Fields('`type`,`keyword`')->select(); $keyword = $rss = $dx = $dxs = ''; require_once DEDEINC . "/dedetag.class.php"; $dtp = new DedeTagParse(); foreach ($rs as $r) { if ($r['type'] == 0) { $keyword .= empty($keyword) ? $r['keyword'] : "\r\n" . $r['keyword']; } else { if ($r['type'] == 1) { $rss .= empty($rss) ? $r['keyword'] : "\r\n" . $r['keyword']; } else { if ($r['type'] == 2) { $dx .= empty($dx) ? $r['keyword'] : "``" . $r['keyword']; $dtp->LoadString($r['keyword']); $dxt = $dtp->GetTagByName('list') ? $dtp->GetTagByName('list')->GetInnerText() : ''; $dxs .= "<span><a href='javascript:void(0);' style='float:right' onclick='delpage(this);'>删除</a><a href='javascript:void(0);' style='float:right' onclick='editpage(this);'>编辑 </a>" . $dxt . "</span>"; } else { } } } } $note = cjxdb('co_note')->Fields('nid,notename')->where('channelid=1')->select(); foreach ($note as $k => $v) { $ck = cjxdb('kwkeyword')->where("`keyword`={$v['nid']} AND `type`=3")->find(); if ($ck) { if ($ck['typeid'] == $typeid) { $note[$k]['btype'] = true; } else { $note[$k]['btype'] = $ck['typeid']; } } $note[$k]['channelname'] = '普通文章'; } $this->assign('typeid', $typeid); $this->assign('keyword', $keyword); $this->assign('rss', $rss); $this->assign('dx', $dx); $this->assign('dxs', $dxs); $this->assign('notelist', $note); $this->display(); }
$language = $ctag->GetAtt("language"); $matchtype = $ctag->GetAtt("matchtype"); $refurl = $ctag->GetAtt("refurl"); $isref = $ctag->GetAtt("isref"); $exptime = $ctag->GetAtt("exptime"); } else if($ctag->GetName()=="list") { $sunnote = $ctag->GetInnerText(); $dtp2->LoadString($sunnote); $source = $ctag->GetAtt('source'); $sourcetype = $ctag->GetAtt('sourcetype'); $varstart = $ctag->GetAtt('varstart'); $varend = $ctag->GetAtt('varend'); $urlTag = $dtp2->GetTagByName('url'); $needTag = $dtp2->GetTagByName('need'); $cannotTag = $dtp2->GetTagByName('cannot'); $linkareaTag = $dtp2->GetTagByName('linkarea'); } else if($ctag->GetName()=="art") { $sunnote = $ctag->GetInnerText(); $dtp3->LoadString($sunnote); $sppageTag = $dtp3->GetTagByName('sppage'); } } require_once(dirname(__FILE__)."/templets/co_edit.htm"); ClearAllLink(); ?>