|
主题:[已答复]新版9.5中发布文章后点修改文章提示错误,图片如下 [收藏主题] | 转到: |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
Function Parse(sTemplate, iPosBegin)
Dim iPosCur, sToken, sTemp,MyNode iPosCur = InStr(iPosBegin, sTemplate, "]") sTemp = Mid(sTemplate,iPosBegin,iPosCur-iPosBegin) iPosBegin = iPosCur+1 select case Lcase(sTemp) case "pubtips" If Action="Edit" Then echo "修改" & KS.C_S(Channelid,3) Else echo "发布" & KS.C_S(Channelid,3) End If case "selectclassid" If KS.C("UserName")="" Then '游客投稿 echo "[" & KS.GetClassNP(KS.S("ClassID")) & "] <a href=""Contributor.asp""><<重新选择>></a>" echo "<input type=""hidden"" name=""ClassID"" value=""" & KS.S("ClassID") & """>" Else Call KSUser.GetClassByGroupID(ChannelID,ClassID,Selbutton) End If case "status" if action="Edit" Then If RS("Verific")<>1 Then if rs("verific")=2 Then echo "<label style='color:#999999'><input type='checkbox' name='status' value='2' onclick='if(!this.checked){return(confirm(""确定立即投稿发布吗?""));}' checked>放入草稿</label>" else echo "<label style='color:#999999'><input type='checkbox' name='status' onclick='if(!this.checked){return(confirm(""确定立即投稿发布吗?""));}' value='2'>放入草稿</label>" end if Else echo "<input type=""hidden"" name=""okverific"" value=""1""><input type=""hidden"" name=""verific"" value=""1"">" End If Else echo "<label style='color:#999999'><input type='checkbox' name='status' value='2'>放入草稿</label>" End If case "readpoint" if action="Edit" Then echo rs("readpoint") else echo "0" case "showsetthumb" if action<>"Edit" Then echo "<label><input type='checkbox' name='autothumb' id='autothumb' value='1' checked>使用图集的第一幅图</label>" case "showphotourl" If KS.C("UserName")="" Then%> <td width="240"><input class="textbox" name='PhotoUrl' type='text' style="width:230px;" id='PhotoUrl' maxlength="100" /></td> <%Else if action="Edit" Then PhotoUrl=rs("PhotoUrl") %> <td width="340"><input class="textbox" name='PhotoUrl' value="<%=PhotoUrl%>" type='text' style="width:230px;" id='PhotoUrl' maxlength="100" /> <input class="uploadbutton1" type='button' name='Submit3' value='选择图片'选择" & KS.C_S(ChannelID,3))%>&ChannelID=4',500,360,window,document.myform.PhotoUrl);" /> </td> <%End If case "showselecttk" If KS.C("UserName")<>"" Then echo "<button type=""button"" class=""pn""AddTJ();"" style=""margin: -6px 0px 0 0;""><strong>图片库...</strong></button>" case "showquestionandverify" If KS.C("UserName")="" Then Call PubQuestion() %> <tr class="tdbg"> <td height="25" align="center"><span>验证码:</span></td> <td> <script type="text/javascript">writeVerifyCode('<%=KS.GetDomain%>',1,'textbox')</script> </td> </tr> <% End If case "showstyle" if action="Edit" Then ShowStyle=RS("ShowStyle"): PageNum=RS("PageNum") Else ShowStyle=4 : PageNum=10 End If %> <table width='80%'><tr><td> <input type='radio' name='showstyle' value='4'<%If ShowStyle="4" Then response.Write " checked"%>><img src='../images/default/p4.gif' title='当图片组只有一张图片时无效,设置此样式无效!'></td><td> <input type='radio' name='showstyle' value='1'<%If ShowStyle="1" Then response.Write " checked"%>><img src='../images/default/p1.gif' title='当图片组只有一张图片时无效,设置此样式无效!'></td> <td><input type='radio' name='showstyle' value='2'<%If ShowStyle="2" Then Response.Write " checked"%>><img src='../images/default/p2.gif' title='当图片组只有一张图片时无效,设置此样式无效!'></td><td><input type='radio' name='showstyle' value='3'<%If ShowStyle="3" Then Response.Write " checked"%>><img src='../images/default/p3.gif'> </td><td><input type='radio' name='showstyle' value='5'<%If ShowStyle="5" Then Response.Write " checked"%>><img src='../images/default/p5.gif'> </td></tr></table><div style="margin:5px" id="pagenums" <%If ShowStyle="1" or ShowStyle="4" Then Response.Write " style='display:none'"%> >每页显示<input type="text" name="pagenum" value="<%=PageNum%>" style="text-align:center;width:30px">张</div> <% case "downlblist" echo DownLBList case "downyylist" echo DownYYList case "downsqlist" echo DownSQList case "downptlist" echo DownPTList case "sizeunit" Dim SizeUnit If Action="Edit" Then SizeUnit = Right(rs("DownSize"), 2) Else SizeUnit="KB" Response.Write "<input name=""SizeUnit"" type=""radio"" value=""KB"" id=""kb""" If SizeUnit = "KB" Then response.write "checked" Response.Write "><label for=""kb"">KB</label> " & vbCrLf Response.Write "<input type=""radio"" name=""SizeUnit"" value=""MB"" id=""mb""" If SizeUnit = "MB" Then response.write "checked" Response.Write "><label for=""mb"">MB</label> " & vbCrLf case "downurls" If Action="Edit" Then echo Split(RS("DownUrls")&"|||","|")(2) case "content" If Action="Edit" Then select case KS.ChkClng(KS.C_S(ChannelID,6)) case 1 if not KS.IsNul(rs("ArticleContent")) then echo Server.HtmlEncode(rs("ArticleContent")) case 2 if not KS.IsNul(rs("PictureContent")) then echo Server.HtmlEncode(rs("PictureContent")) case 3 if not KS.IsNul(rs("DownContent")) then echo Server.HtmlEncode(rs("DownContent")) end select End If case else Dim II,DV,XNode if instr(sTemp,"|select")<>0 then '下拉及联动 Set Xnode=FieldXML.DocumentElement.selectsinglenode("fielditem[@fieldname='" & split(sTemp,"|")(0) &"']") if Not Xnode is nothing then If Action="Edit" Then DV=RS(split(sTemp,"|")(0)) Else DV=xnode.selectsinglenode("defaultvalue").text KS.Echo KSUser.GetSelectOption(ChannelID,FieldDictionary,FieldXML,xnode.selectsinglenode("fieldtype").text,split(sTemp,"|")(0),xnode.selectsinglenode("width").text,xnode.selectsinglenode("options").text,DV) end if elseif instr(sTemp,"|radio")<>0 then '单选 Set Xnode=FieldXML.DocumentElement.selectsinglenode("fielditem[@fieldname='" & split(sTemp,"|")(0) &"']") if Not Xnode is nothing then If Action="Edit" Then DV=RS(split(sTemp,"|")(0)) Else DV=xnode.selectsinglenode("defaultvalue").text KS.Echo KSUser.GetRadioOption(split(sTemp,"|")(0),xnode.selectsinglenode("options").text,DV) End If elseif instr(sTemp,"|checkbox")<>0 then '多选 Set Xnode=FieldXML.DocumentElement.selectsinglenode("fielditem[@fieldname='" & split(sTemp,"|")(0) &"']") if Not Xnode is nothing then If Action="Edit" Then DV=RS(split(sTemp,"|")(0)) Else DV=xnode.selectsinglenode("defaultvalue").text KS.Echo KSUser.GetCheckBoxOption(split(sTemp,"|")(0),xnode.selectsinglenode("options").text,DV) End If elseif instr(sTemp,"|unit")<>0 then '单位 Set Xnode=FieldXML.DocumentElement.selectsinglenode("fielditem[@fieldname='" & split(sTemp,"|")(0) &"']") if Not Xnode is nothing then If Action="Edit" Then DV=RS(split(sTemp,"|")(0)&"_unit") Else DV=xnode.selectsinglenode("defaultvalue").text KS.Echo KSUser.GetUnitOption(split(sTemp,"|")(0),xnode.selectsinglenode("unitoptions").text,DV) End If elseif action="Add" then if lcase(trim(stemp))="author" and Not KS.IsNul(KS.C("UserName")) then echo KSUser.GetUserInfo("RealName") end if if lcase(trim(stemp))="origin" and Not KS.IsNul(KS.C("UserName")) then echo LFCls.GetSingleFieldValue("SELECT top 1 CompanyName From KS_EnterPrise Where UserName='" & KSUser.UserName & "'") end if if instr(stemp,"@")<>0 then '有设置默认值 dim tempstr:tempstr=split(stemp,"@") if tempstr(1)="now" then echo now elseif tempstr(1)="date" then echo date else echo LFCls.GetSingleFieldValue("SELECT top 1 " & split(tempstr(1),"|")(1) &" From " & split(tempstr(1),"|")(0) &" Where UserName='" & KSUser.UserName & "'") end if end if elseif action="Edit" Then echo rs(trim(sTemp)) Elseif left(lcase(sTemp),3)="ks_" then echo server.htmlencode(GetDiyFieldValue(FieldXML,sTemp)) End If end select Parse = iPosBegin End Function |
|
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
专业网站漏洞检测与修复及服务器安全维护、专业程序修改与二次开发及标签制作。QQ:2813239495 详谈 | |
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |