require_once(dirname(__FILE__).'/config.php')
CheckPurview('a_New,a_AccNew')
require_once(DEDEINC.'/customfields.func.php')
require_once(DEDEADMIN.'/inc/inc_archives_functions.php')
if(empty($dopost))
{
$dopost = ''
}
if($dopost != 'save')
{
require_once(DEDEINC.'/dedetag.class.php')
require_once(DEDEADMIN.'/inc/inc_catalog_options.php')
ClearMyAddon()
$channelid = empty($channelid) ?0 : intval($channelid)
$cid = empty($cid) ?0 : intval($cid)
if($cid >0 &&$channelid == 0)
{
$row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid' ")
$channelid = $row['channeltype']
}
else
{
if($channelid==0)
{
ShowMsg('无法识别模型信息,因此无法 *** 作!','-1')
exit()
}
}
$cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' ")
$channelid = $cInfos['id']
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives")
include DedeInclude('templets/archives_line_add.htm')
exit()
}
else if($dopost=='save')
{
require_once(DEDEINC.'/image.func.php')
require_once(DEDEINC.'/oxwindow.class.php')
$flag = isset($flags) ?join(',',$flags) : ''
$notpost = isset($notpost) &&$notpost == 1 ?1: 0
if(empty($click)) $click = ($cfg_arc_click=='-1'?mt_rand(50,200) : $cfg_arc_click)
if(empty($typeid2)) $typeid2 = 0
if(!isset($autokey)) $autokey = 0
if(!isset($remote)) $remote = 0
if(!isset($dellink)) $dellink = 0
if(!isset($autolitpic)) $autolitpic = 0
if(empty($click)) $click = ($cfg_arc_click=='-1'?mt_rand(50,200) : $cfg_arc_click)
if($typeid==0)
{
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 = ereg_replace('"','"',$title)
$title = 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)
$description = cn_substrR($description,$cfg_auot_description)
$keywords = cn_substrR($keywords,60)
$filename = trim(cn_substrR($filename,40))
$userip = GetIP()
$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)
$arcID = GetIndexKey($arcrank,$typeid,$sortrank,$channelid,$senddate,$adminid)
if(empty($arcID))
{
ShowMsg("无法获得主键,因此无法进行后续 *** 作!","-1")
exit()
}
$inadd_f = $inadd_v = ''
if(!empty($dede_addonfields))
{
$addonfields = explode('',$dede_addonfields)
if(is_array($addonfields))
{
foreach($addonfields as $v)
{
if($v=='') continue
$vs = explode(',',$v)
if($vs[1]=='htmltext'||$vs[1]=='textdata')
{
${$vs[0]}= AnalyseHtmlBody(${$vs[0]},$description,$litpic,$keywords,$vs[1])
}
else
{
if(!isset(${$vs[0]})) ${$vs[0]}= ''
${$vs[0]}= GetFieldValueA(${$vs[0]},$vs[1],$arcID)
}
$inadd_f .= ','.$vs[0]
$inadd_v .= " ,'".${$vs[0]}."' "
}
}
}
if($litpic!=''&&!ereg('p',$flag))
{
$flag = ($flag==''?'p': $flag.',p')
}
if($redirecturl!=''&&!ereg('j',$flag))
{
$flag = ($flag==''?'j': $flag.',j')
}
if(ereg('j',$flag)) $ismake = -1
$noo=count($att[from])
if($noo>=0)
{
$okxc=okfromzj($noo,$att[from],$att[to],$att[by],$att[zc],$att[zhc],$att[wc],$att[home],$att[xingcheng])
$xcjd=xcjd($noo,$att[jd])
}
if($allll>0 and $datee1<>'')
{
$da=''
for($i=1$i<=$allll$i++)
{
$datee="datee".$i
$dateee="dateee".$i
$crr="crr".$i
$rtt="rtt".$i
$smm="smm".$i
$plda .="~".$$datee."+".$$dateee."+".$$crr."+".$$rtt."+".$$smm
}
}
else
{
for($i=1$i<=$alll$i++)
{
$date="date".$i
$cr="cr".$i
$rt="rt".$i
$sm="sm".$i
$da .="~".$$date."+".$$cr."+".$$rt."+".$$sm
}
}
$query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,
color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight)
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle',
'$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight')"
if(!$dsql->ExecuteNoneQuery($query))
{
$gerr = $dsql->GetError()
$dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'")
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给CTSCMS官方。".str_replace('"','',$gerr),"javascript:")
exit()
}
$cts = $dsql->GetOne("Select addtable From `#@__channeltype` where id='$channelid' ")
$addtable = trim($cts['addtable'])
if(!empty($addtable))
{
$useip = GetIP()
$query = "INSERT INTO `{$addtable}`(aid,typeid,xc,bj,plbj,xcjd,redirecturl,userip{$inadd_f}) Values('$arcID','$typeid','$okxc','$da','$plda','$xcjd','$redirecturl','$useip'{$inadd_v})"
if(!$dsql->ExecuteNoneQuery($query))
{
$gerr = $dsql->GetError()
$dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'")
$dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'")
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给CTSCMS官方。".str_replace('"','',$gerr),"javascript:")
exit()
}
}
InsertTags($tags,$arcID)
if($cfg_remote_site=='Y'&&$isremote=="1")
{
if($serviterm!=""){
list($servurl,$servuser,$servpwd) = explode(',',$serviterm)
$config=array( 'hostname'=>$servurl,'username'=>$servuser,'password'=>$servpwd,'debug'=>'TRUE')
}else{
$config=array()
}
if(!$ftp->connect($config)) exit('Error:None FTP Connection!')
}
ClearMyAddon($arcID,$title)
$artUrl = MakeArt($arcID,true,true,$isremote)
if($artUrl=='')
{
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"
}
$msg = " 请选择你的后续 *** 作:
<a href='archives_line_add.php?cid=$typeid'><u>继续发布文档</u></a>
&nbsp&nbsp
<a href='$artUrl' target='_blank'><u>查看文档</u></a>
&nbsp&nbsp
<a href='archives_do.php?aid=".$arcID."&dopost=editArchives'><u>更改文档</u></a>
&nbsp&nbsp
<a href='catalog_do.php?cid=$typeid&dopost=listArchives'><u>已发布文档管理</u></a>
&nbsp&nbsp
$backurl
"
$msg = "<div style=\"line-height:36pxheight:36p
第一步:
把代码里面的那个eval改成print,如图:
然后保存,打开浏览器运行一下(当然,需要php运行环境)
然后在空白地方,鼠标右键,查看源文件, 然后复制下来。
第二步:
把复制到的代码覆盖掉eval那一段,如图:
接着保存,继续运行一下,继续查看源文件。
一直运行的源代码结果符合常规代码即可, 如果出现的代码还会有eval(一段乱七八糟的代码)
那重复上面的步骤即可!
貌似这是在程序文件里加密的,加密源文件吧?如果是在地址栏里传参的话,会用到以下两个函数:
urlencode --- URL编码字符串
说明 :
将所有非字母字元的字符串除了-_.之外,以百分比符号(%)后跟随二个迷惑的数字的方式表示,而空白则会被编码成正的(+)符号。此编码方式与WWW表单post资料的编码方式相同,这和RFC1738编码方式不同,空白键会被编码成正的(+)符号,此函数适合用在查询的URL的一部份,适合将变量传递到下一个网页。
urldecode --- 译解URL编码字符串
语法 : string urldecode (string str)
说明 :
译解给予的字符串中任何的%##编码,传回译解后的字符串。
希望可以帮到你!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)