var isDebug = 0; var serviceUrl = "http://www.jcph.com/service"; var AdPreWindows2000 = "book"; var Mail_send_addr="webmaster@jcph.com" function FixSql(strValue) { var strRet; strRet = strValue; strRet = strRet.replace(/\'/g, "\'\'"); //strRet = strRet.replace(/src="http:\/\/(.[^\/]*)\/(.*?)/g,'src="/$2'); return strRet; } function FixXml(strValue) { var strRet; strRet = strValue; strRet = strRet.replace(/&/g, "&"); strRet = strRet.replace(/ /gi, " "); strRet = strRet.replace(/\'/g, "'"); strRet = strRet.replace(/\"/g, """); strRet = strRet.replace(/>/g, ">"); strRet = strRet.replace(/"); //strRet = strRet.replace(/src="http:\/\/(.[^\/]*)\/(.*?)/ig,'src="/$2'); return strRet; } function Request(strName) { var strHref = window.document.location.href; var intPos = strHref.indexOf("?"); var strRight = strHref.substr(intPos + 1); var arrTmp = strRight.split("&"); for(var i = 0; i < arrTmp.length; i++) { var arrTemp = arrTmp[i].split("="); if(arrTemp[0].toUpperCase() == strName.toUpperCase()) return arrTemp[1]; } return ""; } function Trim(strValue) { return strValue.replace(/^\s*|\s*$/g,""); } function ExecXmlCmd(strXmlCmd) { doc = new ActiveXObject("Microsoft.XMLDOM"); if(doc.loadXML(strXmlCmd) == false) { if(isDebug) alert("50:XML格式不正确"); return null; } cmdRoot = doc.documentElement; Command = cmdRoot.childNodes.item(0).getAttribute("Command"); if(Command.toUpperCase() == "UPTODB") { FormName = cmdRoot.childNodes.item(0).getAttribute("FormName"); TableName = cmdRoot.childNodes.item(0).getAttribute("TableName"); TableImageFieldName = cmdRoot.childNodes.item(0).getAttribute("TableImageFieldName"); FormImageFieldName = cmdRoot.childNodes.item(0).getAttribute("FormImageFieldName"); WhereClause = cmdRoot.childNodes.item(0).getAttribute("WhereClause").replace("=","_equal_").replace(">","_more_").replace("<","_less_"); submitForm = eval("document.all." + FormName); submitForm.action = serviceUrl + "/binFiles/uptodb.asp"; if(typeof(document.all.__TableName) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__TableName.value = TableName; if(typeof(document.all.__TableImageFieldName) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__TableImageFieldName.value = TableImageFieldName; if(typeof(document.all.__FormImageFieldName) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__FormImageFieldName.value = FormImageFieldName; if(typeof(document.all.__WhereClause) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__WhereClause.value = WhereClause; if(typeof(document.all.__uploadframe) == "undefined") submitForm.appendChild(document.createElement("")); if(typeof(document.all.__isOK) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__isOK.value = ''; submitForm.target = "__uploadframe" submitForm.submit(); showModalDialog(serviceUrl + "/binFiles/upload.htm",window,"status:no;help:no;scrollbars:auto;dialogHeight:120px;dialogWidth:300px"); if(document.all.__isOK.value == 'OK') { doc.loadXML(''); cmdRoot = doc.documentElement; return cmdRoot; } else { if(isDebug) alert(document.all.__isOK.value); return null; } } if(Command.toUpperCase() == "UPTOFILE") { FormName = cmdRoot.childNodes.item(0).getAttribute("FormName"); FormImageFieldName = cmdRoot.childNodes.item(0).getAttribute("FormImageFieldName"); UpFolder = cmdRoot.childNodes.item(0).getAttribute("UpFolder"); SaveAs = cmdRoot.childNodes.item(0).getAttribute("SaveAs"); submitForm = eval("document.all." + FormName); submitForm.action = serviceUrl + "/binFiles/uptofile.asp"; if(typeof(document.all.__FormImageFieldName) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__FormImageFieldName.value = FormImageFieldName; if(typeof(document.all.__UpFolder) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__UpFolder.value = UpFolder; if(typeof(document.all.__SaveAs) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__SaveAs.value = SaveAs; if(typeof(document.all.__uploadframe) == "undefined") submitForm.appendChild(document.createElement("")); if(typeof(document.all.__isOK) == "undefined") submitForm.appendChild(document.createElement("")); else document.all.__isOK.value = ''; submitForm.target = "__uploadframe" submitForm.submit(); showModalDialog(serviceUrl + "/binFiles/upload.htm",window,"status:no;help:no;scrollbars:auto;dialogHeight:120px;dialogWidth:300px"); if(document.all.__isOK.value == 'OK') { doc.loadXML(''); cmdRoot = doc.documentElement; return cmdRoot; } else { if(isDebug) if (document.all.__isOK.value=="") { alert("上传被取消"); } { alert("上传被取消"+document.all.__isOK.value); } return null; } } var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.Open("POST", serviceUrl + "/api/listen.asp", false); xmlhttp.Send(strXmlCmd); switch(xmlhttp.status) { case 200: var root = xmlhttp.responseXML.documentElement; if(root.getAttribute("Status") == "200") return root; else { if(isDebug) alert(root.getAttribute("Status") + ":" + root.getAttribute("Description")); return null; } default: if(isDebug) alert(xmlhttp.status + ":" + "不明错误!"); return null; } } function Access(strAccount, strPassword, strLocation) { /*strAccount=“域名或机器名//帐号”;在同一台机器上时不需要“域名或机器名”*/ //返回值说明 //200:ok //401:没有存取权限或用户名、密码错误 //其他值:不明错误 var auth = new ActiveXObject("Microsoft.xmlhttp"); auth.open("get", strLocation, false, AdPreWindows2000 + "\\" + strAccount, strPassword); auth.send(); return auth.status; } function SetCookie(sName, sValue) { document.cookie = sName + "=" + escape(sValue); } function GetCookie(sName) { var aCookie = document.cookie.split(";"); for (var i=0; i < aCookie.length; i++) { var aCrumb = aCookie[i].split("="); if (sName == Trim(aCrumb[0])) { return unescape(aCrumb[1]); } } return null; } function DelCookie(sName) { document.cookie = sName + "=1234; expires=Fri, 31 Dec 1999 23:59:59 GMT;"; } function HtmlEncode(text) { return text.replace(/&/g, '&').replace(/'/g, '"').replace(//g, '>'); } //var AllM="故事大王^作文世界^娃娃画报^少年文艺^少年科学^小朋友^年轻妈妈之友^卡通先锋^活力派^青少年科技报^小青蛙报^海外求学" //var AllM="娃娃画报^小朋友^年轻妈妈之友^故事大王^少年文艺^阅读前线^作文世界(小学版)^作文世界(初中版)^作文世界(高中版)^少年科学^卡通先锋^海外求学^小青蛙报^活力派" //var AllM="娃娃画报^小朋友^年轻妈妈之友^故事大王^少年文艺^阅读前线^作文世界(小学版)^作文世界(初中版)^作文世界(高中版)^少年科学^卡通先锋^活力派^小青蛙报" var AllM="娃娃画报^小朋友^年轻妈妈之友^故事大王^少年文艺^阅读前线^作文世界(小学版)^作文世界(初中版)^少年科学^卡通先锋^活力派^棒棒英语^小青蛙报"; var AllM22="小朋友^年轻妈妈之友^故事大王^阅读前线^作文世界(小学版)^作文世界(初中版)^少年科学^卡通先锋^棒棒英语^小青蛙报"; var StrM=AllM.split("^") var StrM22=AllM22.split("^") var option_txt option_txt = ''; magazine_index=""; js_txt=""; checkbox_txt="" for(var i=0;i'+StrM[i]+''; js_txt+='parent.NewNode("treeFormagazine",\''+(i+1)+'\',"0","'+StrM[i]+'","images/close.gif","images/open.gif","magazine/loadtableFormagazine.htm?curpage=1&id=0&folder='+StrM[i]+'","iFrm","###");parent.SetNodeMenu("treeFormagazine",\''+(i+1)+'\',"'+StrM[i]+',magazine/magazineEdit.htm?oType=new&folder='+StrM[i]+',520,647,images/newfile.gif;");' checkbox_txt+=''; if ((i+1)%3==0){checkbox_txt+='
'} } for(var i=0;i"+StrM22[i]+" " magazine_index+=" " magazine_index+="" } function Magazine_option() { document.write(""); } function Load_magazine_js() { document.write("