www.gusucode.com > 云枫工作室企业网站源代码第五版 1.0 > docc/admin/shamod.asp
<%@LANGUAGE="VBSCRIPT"%> <!--#include file="conn.asp"--> <!--#include file="check.asp"--> <!--#include file="include.asp"--> <% Dim MM_FindSql '查询执行语句 Dim MM_TableName '表名 Dim MM_ReturnPath '执行成功后返回的路径 Dim MM_DatabaseStr '数据库各项 Dim MM_FormStr '表单各项 Dim MM_SqlQuery '最终执行语句 MM_TableName = "sha" MM_FindSql = "select * from " & MM_TableName & " where sqlindex=" & request.querystring("id") set rs = conn.Execute(MM_FindSql) MM_ReturnPath = "sha.asp?xiaomin="&request("xiaomin")&"&page=1" if Request.Form("MM_update") <> "" then MM_DatabaseStr = "fnumber|value|ftitle|value|fetitle|value|ftext|value|fetext|value|fimage|value|fcount|value|fadmin|value|fstyle|value|fshow|value|fdate|value" MM_FormStr = "sqlnumber|',none,''|sqltitle|',none,''|sqletitle|',none,''|sqltext|',none,''|sqletext|',none,''|sqlimage|',none,''|sqlcount|',none,''|sqladmin|',none,''|sqlstyle|',none,''|sqlshow|',none,''|sqldate|',none,''" MM_SqlKey = "sqlindex" MM_SqlValue = Request.Form("fid") if Request.Form("MM_update") <> "" then MM_SqlQuery = GetUpdateSql(MM_TableName,MM_DatabaseStr,MM_FormStr,MM_SqlKey,MM_SqlValue) conn.Execute(MM_SqlQuery) response.redirect(MM_ReturnPath) end if end if %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>修改产品</title> <link href="style.css" rel="stylesheet" type="text/css"> <script language="javascript"> function check() { if(myform.fnumber.value == "") { alert("排列次序不能为空!") myform.fnumber.focus() return(false) } if(isNaN(myform.fnumber.value)) { alert("排列次序应是一个有效的数字!"); myform.fnumber.focus(); return(false); } if(myform.fstyle.value == "") { alert("类别不能为空!") myform.fstyle.focus() return(false) } if(myform.ftitle.value == "") { alert("中文标题不能为空!") myform.ftitle.focus() return(false) } if(myform.fetitle.value == "") { alert("产品型号不能为空!") myform.fetitle.focus() return(false) } if(myform.fimage.value == "") { alert("缩略图不能为空!") myform.fimage.focus() return(false) } if(myform.fdate.value == "") { alert("请正确填写发布日期!") myform.fdate.focus() return(false) } } </script> </head> <body topmargin="0" bgcolor="#799AE1"> <table width="100%" height="100%" border="0" align="center" bgcolor="#668ED4"> <tr> <td height="103" colspan="2" align="center"> <img src="images/toplogo.gif" height="60"> </td> </tr> <tr> <td height="25" colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0" background="images/menu_bk.gif"> <tr> <td height="23" valign="bottom" background="images/menu_bk.gif"><font color="#FFFFFF">产品发布->修改产品</font></td> <td valign="bottom" background="images/menu_bk.gif"><a href="<%=MM_ReturnPath%>">返回</a></td> </tr> </table> </td> </tr> <tr> <td colspan="2" valign="top"> <form ACTION="#" METHOD="POST" name="myform" onSubmit="javascript:return check()"> <table width="100%" height="100" align="center" cellpadding="1" cellspacing="1" bordercolor="#ADADC9" bgcolor="#666699"> <tr bgcolor="#799AE1"> <td colspan="4">次序:</td> <td><input name="fnumber" type="text" id="fnumber" value="<%=rs.fields.item("sqlnumber")%>" size="50"> </td> <td> 这个数值越小,显示越前</td> </tr> <tr bgcolor="#799AE1"> <td colspan="4">类别:</td> <td> <select name="fstyle" id="fstyle"> <% dim lyjnet set lyjnet = conn.Execute("SELECT * FROM shastyle ORDER BY sqldate DESC") While (NOT lyjnet.EOF) mystyle = lyjnet.Fields.item("sqlindex") if rs.fields.item("sqlstyle") = mystyle then Response.Write("<option value=" & lyjnet.Fields.item("sqlindex") & " selected>" & lyjnet.Fields.item("sqlstyle") & "</option>") else Response.Write("<option value=" & lyjnet.Fields.item("sqlindex") & ">" & lyjnet.Fields.item("sqlstyle") & "</option>") end if lyjnet.MoveNext() Wend lyjnet.Close() Set lyjnet = Nothing %> </select> </td> <td>选定一个产品类别</td> </tr> <tr bgcolor="#799AE1"> <td colspan="4">标题:</td> <td><input name="ftitle" type="text" id="ftitle2" size="50" value="<%=rs.fields.item("sqltitle")%>"> <script language="javascript"> myform.ftitle.focus(); </script> </td> <td> </td> </tr><!-- <tr bgcolor="#799AE1"> <td colspan="4">产品型号:</td> <td> <input name="fetitle" type="text" id="fetitle" value="<%=rs.fields.item("sqletitle")%>" size="50"></td> <td> </td> </tr>--> <tr bgcolor="#799AE1"> <td colspan="4">图片:</td> <td><input name="fimage" type="text" id="fimage" size="40" value="<%=rs.fields.item("sqlimage")%>"> <input type="button" name="Submit22" value="上传图片" onClick="window.open('upload_image.asp?formname=myform&editname=fimage&uppath=userimages&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> </td> <td>(.jpg|.gif格式)图片大小206*109</td> </tr> <tr bgcolor="#799AE1"> <td colspan="4">内容:</td> <td colspan="2"> <div align="left"> <textarea name="ftext" style="display:none"><%=rs.fields.item("sqltext")%></textarea> <iframe id="eWebEditor1" src="editor/ewebeditor.asp?id=ftext&style=s_popup" frameborder="0" scrolling="no" width="580" height="400"></iframe> </div></td> </tr> <tr bgcolor="#799AE1"> <td colspan="4">简介:(请控制字数)</td> <td colspan="2"> <div align="left"> <textarea name="fetext" style="display:none"><%=rs.fields.item("sqletext")%></textarea> <iframe id="eWebEditor1" src="editor/ewebeditor.asp?id=fetext&style=s_popup" frameborder="0" scrolling="no" width="580" height="200"></iframe> </div> </td> </tr> <tr bgcolor="#799AE1"> <td colspan="4">日期:</td> <td width="50%"><input name="fdate" type="text" id="fdate2" size="20" value="<%=now()%>"></td> <td width="42%">格式如:2005-01-01</td> </tr> <tr bgcolor="#799AE1"> <td colspan="4">显示/隐藏:</td> <script language="javascript"> function checkshow() { if (myform.fshow.value != 0) { myform.fshow.value = 0; } else { myform.fshow.value = 1; } } </script> <td><input name="fclick" type="checkbox" id="fshow2" value="checkbox" checked onClick="javascript:checkshow();"></td> <td>确定是否在前台网页显示</td> </tr> <tr bgcolor="#799AE1"> <td colspan="4"><input name="MM_update" type="hidden" id="MM_update" value="myform"> <input name="fid" type="hidden" id="fshow3" value="<%=rs.Fields.Item("sqlindex")%>"> </td> <td><input name="fshow" type="hidden" id="fshow" value="1"> <input name="fcount" type="hidden" id="fcount" value="<%=rs.fields.item("sqlcount")%>"> <input name="fadmin" type="hidden" id="fadmin" value="<%=session("lyj_admin")%>"></td> </tr> <tr bgcolor="#648BDD"> <td colspan="4"> </td> <td> <input type="submit" name="Submit2" value=" 修 改 "> <input type="reset" name="Submit3" value=" 清 除 "></td> </tr> </table> </form> </td> </tr> <tr> <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="left">注意:请正确对以上内容进行修改!</div></td> </tr> </table> </td> </tr> </table> </body> </html> <% set rs = nothing %>