www.gusucode.com > 盐城分类信息网asp源码程序 > com_e_x.asp

    <!--#include file="inc/conn.asp"--> 
<!--#include file="usercookies.asp"-->
<!--#include file="inc/inc.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">
<title><%=title%>-会员管理中心-修改信息</title>
<SCRIPT language=javascript>
<!--
function CheckForm()
{
if(document.myform.class1.value.length<1)
	{
	    alert("请选择一级分类!");
        document.myform.class1.focus();
	    return false;
	}
if(document.myform.class2.value.length<1)
	{
	    alert("请选择二级分类!!");
        document.myform.class2.focus();
	    return false;
	}
if(document.myform.leixing.value.length<1)
	{
	    alert("请选择信息类别!");
        document.myform.leixing.focus();
	    return false;
	}
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">
<%call t()%>
<div align="center">
 <table width="956" id="table1" bgcolor="#FFFFFF" style="border-right:1px solid #999999; border-top:1px solid #999999;border-left:1px solid #999999;border-bottom:1px solid #999999; padding:1px; border-top-width:1px; border-bottom-width:1px" cellspacing="0" cellpadding="0">
 
<tr>
<td width="158" height="25" class=td1>
<p align="center">会员管理系统</td>
<td width="1" height="139" rowspan="2"> </td>
<td width="594" height="25" class=td1>
<p align="center">会员管理中心</font>-修改信息</td>
</tr>
<tr>
<td width="157" height="113" bgcolor="#F6F6F6" valign="top"><!--#include file=com_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 [com] where username='"&username&"'"
rs.open sql,conn,1,3
rs("jf")=rs("jf")+jf_3
if len(request("a"))=6 then
rs("a")=rs("a")-1
end if
if request("b")<>"" 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=com_user_xxgl.asp"">"
else %>
<form action="com_e_x.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,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%>"></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"><%call leixs()%><input type="text" maxlength="28" 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: #000088" value="000088"></option>
<option style="background: #0000ff" value="0000ff"></option>
<option style="background: #008800" value="008800"></option>
<option style="background: #008888" value="008888"></option>
<option style="background: #0088ff" value="0088ff"></option>
<option style="background: #00a010" value="00a010"></option>
<option style="background: #1100ff" value="1100ff"></option>
<option style="background: #111111" value="111111"></option>
<option style="background: #333333" value="333333"></option>
<option style="background: #50b000" value="50b000"></option>
<option style="background: #880000" value="880000"></option>
<option style="background: #8800ff" value="8800ff"></option>
<option style="background: #888800" value="888800"></option>
<option style="background: #888888" value="888888"></option>
<option style="background: #8888ff" value="8888ff"></option>
<option style="background: #aa00cc" value="aa00cc"></option>
<option style="background: #aaaa00" value="aaaa00"></option>
<option style="background: #ccaa00" value="ccaa00"></option>
<option style="background: #ff0000" value="ff0000"></option>
<option style="background: #ff0088" value="ff0088"></option>
<option style="background: #ff00ff" value="ff00ff"></option>
<option style="background: #ff8800" value="ff8800"></option>
<option style="background: #ff0005" value="ff0005"></option>
<option style="background: #ff88ff" value="ff88ff"></option>
<option style="background: #ee0005" value="ee0005"></option>
<option style="background: #ee01ff" value="ee01ff"></option>
<option style="background: #3388aa" value="3388aa"></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">
<% call dix()%></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>
<input type="text" name="com" size="25" maxlength="20" value="<%=rs("com")%>"></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="宋体">置顶排行:</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="foot.asp"-->
</body>
</html>