⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit_xinxi.asp

📁 二手书籍系统
💻 ASP
字号:
<!--#include file="inc/conn.asp"--> 
<!--#include file="usercookies.asp"-->
<!--#include file="config.asp"-->
<%dim xiu
xiu=Request.form("xiu")%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="供求信息,二手网,二手商品,电子商务,供求网站,免费发布供求信息,商业信息,贸易网,求购,求购信息,出售,供应,供求信息网,招商投资 生活服务 家电家居  旅游出行 招聘求职  房产信息 
建材装饰 烟酒副食 电脑网络  餐饮酒店  医药保健  农林牧渔  安全防护  包装纸张 办公文教  电子通讯  
纺织皮革  服装服饰  工业机械 仪器仪表 交通运输 车及配件 工艺礼品 文化艺术 冶金矿产 出版印刷 能源动力 环境保护 
化工行业 玩具体育 园林绿化 广告服务 商务服务 分类广告 搜索引擎 企业行业黄页 分类信息网 集市">

<title>会员管理中心-修改信息-<%=title%></title>
<SCRIPT language=javascript>
<!--
function CheckForm()
{
if(document.myform.biaoti.value.length<3)
	{
	    alert("信息标题没有填写或内容太少!");
        document.myform.biaoti.focus();
        document.myform.biaoti.select();
	    return false;
	}
if(document.myform.memo.value.length<3)
	{
	    alert("信息内容没有填写或内容太少!");
        document.myform.memo.focus();
        document.myform.memo.select();
	    return false;
	}
if(document.myform.name.value.length<1)
	{
	    alert("联系人姓名没有填写!");
        document.myform.name.focus();
        document.myform.name.select();
	    return false;
	}
if(document.myform.dianhua.value.length<1)
	{
	    alert("联系电话没有填写!");
        document.myform.dianhua.focus();
        document.myform.dianhua.select();
	    return false;
	}
}
//-->
</SCRIPT>
</head>
<body topmargin="0">
<!--#include file="topcnmai.asp"-->
<div align="center">
<table width="760" id="table1" bgcolor="#FFFFFF" style="border-left:1px solid #999999; border-right:1px solid #999999; padding:1px; border-top-width:1px; border-bottom-width:1px" cellspacing="0" cellpadding="0">
<tr>
<td width="158" height="25" class=td2_muen>
<p align="center"><font color=white>会员管理系统</font></td>
<td width="1" height="139" rowspan="2"> </td>
<td width="592" height="25" class=td4_muen>
<p align="center">会员管理中心</font>-修改信息</td>
</tr>
<tr>
<td width="157" height="113" bgcolor="#F6F6F6" valign="top"><!--#include file=userleft.asp--></td>
<td valign="top" bgcolor="#F6F6F6">
<%if xiu<>"" then
username=request.cookies("cnmai")("username")
class1=trim(request("class1"))
class2=trim(request("class2"))
biaoti=trim(request("biaoti"))
diqu=trim(request("diqu"))
memo=trim(request("memo"))

if class1="0" or class1="" then
Response.Write "<script language='javascript'>alert('请选择一级分类!');history.back();</script>" 
response.end
end if
if class2="0" or class2="" then
Response.Write "<script language='javascript'>alert('请选择二级分类!');history.back();</script>" 
response.end
end if


set rs=server.createobject("adodb.recordset")
sql = "select * from [user] where username='"&username&"'"
rs.open sql,conn,1,3
rs("jf")=rs("jf")+jf_3
if len(request("a"))=6 and rs("a")>1 then
rs("a")=rs("a")-1
end if
if request("b")<>"" and rs("b")>1 then
rs("b")=rs("b")-int(request("b"))
end if
rs.update
rs.close
set rs=nothing

id=trim(request("id"))
set rs=server.createobject("adodb.recordset")
sql = "select * from xinxi where username='"&username&"' and id="&cstr(id)
rs.open sql,conn,1,3
if rs.eof then
response.write "非法提交"
response.end
end if
rs("class1")=class1
rs("class2")=class2
rs("biaoti")=biaoti
rs("leixing")=request("leixing")
rs("a")=request("a")
rs("b")=request("b")
rs("diqu")=diqu
rs("memo")=memo
rs("tupian")=trim(request("tupian"))
rs("name")=trim(request("name"))
rs("email")=trim(request("email"))
rs("dianhua")=trim(request("dianhua"))
rs("qq")=trim(request("qq"))
rs("dizhi")=trim(request("dizhi"))
rs("fbsj")=now()


rs.update
rs.close
set rs=nothing
closedb
response.write "<p align=""center"">恭喜你,修改<font color=ff0000>"&biaoti&"</font>成功!</p>"
response.write "<meta http-equiv=refresh content=""1;URL=user_xxgl.asp"">"
else %>
<form action="edit_xinxi.asp" name="myform" method="POST">
<table width="100%" border="0" height="391" bordercolor="#FFFFFF" cellspacing="0" id="table2" cellpadding="0">               
<tr> 
<td height="26" align="right">
信息版块:</td>
<td height="25" bgcolor="#EEEEEE" width="440">
<%
dim rs,sql,i,count,username,qq,id,class1,class2,biaoti,leixing,diqu,memo,name,email,dianhua,tupian
id=trim(request("id"))
username=request.cookies("cnmai")("username")
set rs=server.createobject("adodb.recordset")
sql = "select * from xinxi where username='"&username&"' and id="&cstr(id)
rs.open sql,conn,1,1
if rs.eof then
errcnmai(0)
response.end
end if
class1=rs("class1")
class2=rs("class2")
biaoti=rs("biaoti")
leixing=rs("leixing")
diqu=rs("diqu")
memo=rs("memo")
tupian=rs("tupian")
name=rs("name")
email=rs("email")
dianhua=rs("dianhua")
qq=rs("qq")
rs.close
sql = "select * from class2 order by paixu desc"
rs.open sql,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
        subcat[<%=count%>] = new Array("<%= trim(rs("class2"))%>","<%= trim(rs("class1"))%>","<%= trim(rs("id"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.class2.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.class2.options[document.myform.class2.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</SCRIPT>
<%
sql = "select * from class1 order by paixu desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加分类。"
response.end
else
%>
<SELECT name="class1" onChange="changelocation(document.myform.class1.options[document.myform.class1.selectedIndex].value)" size="1">
<OPTION value="0">信息分类</OPTION>
<%do while not rs.eof%>
<OPTION  <%if trim(class1)=cstr(rs("id")) then%>selected<%end if%>  value="<%=trim(rs("id"))%>"><%=trim(rs("class1"))%></OPTION>
<%
        rs.movenext
        loop
	    end if
        rs.close
        %>
</SELECT>
<SELECT name="class2">
<%
sql = "select id,class2 from class2 where id="&cstr(class2)
rs.open sql,conn,1,1
%>
<OPTION  <%if trim(class2)=cstr(rs("id")) then%>selected<%end if%>  value="<%=trim(rs("id"))%>"><%=trim(rs("class2"))%></OPTION>
<%rs.close%>
</SELECT><input type="hidden" name="id" size="7" maxlength="6" value="<%=id%>"> <select name="leixing" size="1">
<option selected value="0">信息性质</option>
<option value="1"><%=leixing1%></option>
<option value="2"><%=leixing2%></option>
<option value="3"><%=leixing3%></option>
<option value="4"><%=leixing4%></option>
<option value="5"><%=leixing5%></option>
<option value="6"><%=leixing6%></option>
<option value="7"><%=leixing7%></option>
<option value="8"><%=leixing8%></option>
<option value="9"><%=leixing9%></option>
</select></td>
</tr>
<tr> <%
if request.cookies("cnmai")("com")="" then
sql = "select * from [user] where username='"&username&"'"
else
sql = "select * from [com] where username='"&username&"'"
end if
rs.open sql,conn,1,1
if rs.eof then
errcnmai(9)
response.end
end if
%>
<td height="26" align="right">
信息标题:</td>
<td height="25" width="440">
<input type="text" maxlength="80" name="biaoti" size="42" value="<%=biaoti%>">
<font color="#FF0000">*</font><%if rs("a")>0 then%>
<select name="a">
<option style="COLOR: black" value="0" selected  title="醒目您的信息,推荐使用[标题变色]需要花1个[变色道具]">标题变色</option>
<option style="background: #FF0000" value="FF0000"></option>
<option style="background: #CC9900" value="CC9900"></option>
<option style="background: #0000FF" value="0000FF"></option>
<option style="background: #000000" value="000000"></option>
</select>
<%else%> <font color="#999999">没有变色道具,请[兑换道具]吧</font>
<%end if%></td>
</tr>
<tr> 
<td height="26" align="right">
信息地区:</td>
<td height="25" width="440">
<input type="text" maxlength="20" name="diqu" size="13"></td>
</tr>
<tr> 
<td height="26" align="right">
信息内容:</td>
<td height="25" width="440">
<textarea rows="9" name="memo" cols="44"><%=memo%></textarea>
<font color="#FF0000">*</font></td>
</tr><tr><td height="26" align="right">相关图片:</td><td height="25" width="440">
<input type="text" name="tupian" size="51" value="<%=tupian%>">
<a target="_blank" href="<%=tupian%>">浏览该图片</a></td></tr><tr>
	<td height="26" align="right">联系人:</td>
<td height="25" width="440"><input type="text" name="name" size="13" maxlength="20" value="<%=rs("name")%>">
<font color="#FF0000">*</font></td></tr><tr><td height="26" align="right">联系电话:</td><td height="25" width="440">
<input type="text" name="dianhua" size="23" maxlength="40" value="<%=rs("dianhua")%>">&nbsp; 
<font color="#FF0000">*</font></td></tr><tr><td height="26" align="right">Email:</td>
<td height="25" width="440"><input type="text" name="email" size="23" maxlength="40" value="<%=rs("email")%>">&nbsp; <font color="#FF0000">*&nbsp; </font>QQ:<input type="text" name="qq" size="17" maxlength="11" value="<%=rs("qq")%>"></td>
</tr>
<tr> <td height="26" align="right">联系地址:</td><td height="25" width="440"><input type="text" name="dizhi" size="51" maxlength="20" value="<%=rs("dizhi")%>"></td>
</tr><tr><td height="26" align="right"><font face="宋体" size="2">置顶排行:</td><td height="25" width="440"><font face="宋体" size="2"><%
dim b
b=rs("b")
%><%if b>0 then%><select name="b">
<option value="0">不使用</option>
<%for i=1 to b%>
<option value="<%=i%>"><%=i%></option>
<%next%>
</select>个
<img border="0" src="image/num/jsq.gif" title="使您的信息排在最前,数字越大越靠前,使用需要花n个[置顶道具]" width="10" height="11">
<%else%> <font color="#999999">没有道具,请[兑换道具]吧</font>
<%end if%></td>
</tr>
<tr> 
<td height="26" align="right">
是否推荐:</td>
<td height="25" width="440"><%if request.cookies("cnmai")("vip")=1 then%><input type="radio" value="1" name="tui" title="选中推荐您的信息">推荐 
<input type="radio" name="tui" value="0" checked>不推荐<font color="#C0C0C0"><%else%></font><font color="#ACACAC"><img border="0" src="image/num/jian.gif" width="15" height="15"></font><font color="#FF0000">您不是VIP会员,不能使用推荐,请联系本站</font><%end if%></td>
</tr>
<tr> 
<td height="44" colspan="2" width="531">
<p align="center">
<input type="submit" onclick="javascript:return CheckForm();" value="提交修改,刷新信息" name="xiu"> <input type="reset" value="重写" name="B2"></td>
</tr></table></form>
<%end if%>
</td>
</tr>
</table>
</div>
<!--#include file="endcnmai.asp"-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -