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

📄 root_model_modi.asp

📁 网上购物系统
💻 ASP
字号:
<!--#include file="admin_check.asp"-->
<!--#include file="../Conn.asp"-->
<!--#include file="../include/MyRequest.asp"-->
<%
id=my_request("id",1)
if id="" or isnull(id) or IsNumeric(id)=False then
  response.write("<script>alert(""参数错误!"");location.href=""root_model_List.asp"";</script>")
  response.end
end if

sql="select root_model_name,root_model_css,root_model_pic,id from root_model where id="&id
set rs=conn.execute (sql)
root_model_name=rs(0)
root_model_css=rs(1)
root_model_pic=rs(2)
id=rs(3)
rs.close
set rs=nothing

action=my_request("action",0)
if action="save" then call save()

sub save()
    id=my_request("id",1)
    root_model_name=my_request("root_model_name",0)
    root_model_css=my_request("root_model_css",0)
    root_model_ispic=my_request("root_model_ispic",1)
    if root_model_ispic=1 then root_model_pic=my_request("root_model_pic",0)

    ErrMsg=""
    if root_model_name="" then
    	FoundErr=True
	    ErrMsg=ErrMsg & "<li>模板名称不能为空!</li>"
    end if
    if root_model_css="" then
    	FoundErr=True
	    ErrMsg=ErrMsg & "<li>样式表文件名不能为空!</li>"
    end if
    if FoundErr<>True then
        Set rs= Server.CreateObject("ADODB.Recordset")
        sql="select * from root_model where id="&id
        rs.open sql,conn,1,3
        rs("root_model_name")=root_model_name
        rs("root_model_css")=root_model_css
        if root_model_ispic=1 then
        	rs("root_model_pic")=root_model_pic
        end if
        rs.update
        rs.close
        set rs=nothing
        call ok("您已成功更新了一条网站模板信息!","root_model_list.asp")
    else
        call WriteErrMsg(ErrMsg)
    end if
end sub
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>模板-更新</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="Editor/edit.js" type="text/javascript"></script>
<script language = "JavaScript">  
function showlist(dd)
{
  if(dd=="a")
  {
   linkimg.style.display="none";
  }
  else
  {
   linkimg.style.display="";
  }
}
</script>
</head>

<body>

<table cellspacing="1" cellpadding="4" width="100%" class="tableborder">
<tbody class="altbg2">
<form name="form1" action="Root_Model_Modi.asp" method="post">
<input type="hidden" name="action" value="save"> 
<input type="hidden" name="id" value="<%=id%>"> 
	<tr>
		<td colspan="2" class="header">模板-更新</td>
	</tr>
	<tr>
		<td colspan="2"><font color="#808080">[说明]:在添加模板前,请您</font><font color="#FF6600">先将样式表文件及该模板用到的图片文件包放到style目录下,</font><font color="#808080">否则无效!</font></td>
	</tr>
	<tr>
		<td>模板名称:</td>
		<td>
		    <input type="text" name="root_model_name" size="20" value="<%=root_model_name%>"></td>
	</tr>
	<tr>
		<td>模板样式表-文件名:</td>
		<td>
		    <input type="text" name="root_model_css" size="20" value="<%=root_model_css%>">.css<font color="#808080">&nbsp;&nbsp;
			<br>
			请确认你已将此文件放到了style目录下了;<br>
			该模板用到的图片文件包也请一并放到style目录下;</font></td>
	</tr>
	<tr>
		<td>是否有模板首页截图:</td>
		<td> 
		<input type="radio" value="1" name="root_model_ispic" onClick='showlist("b");' <%if root_model_pic<>"" then response.write "checked"%>>是&nbsp;&nbsp;&nbsp;
		<input type="radio" value="0" name="root_model_ispic" onClick='showlist("a");' <%if root_model_pic="" or null(root_model_pic) then response.write "checked"%>>否&nbsp;
		</td>
	</tr>
	<tr id="linkimg" <%if root_model_pic<>"" then%>style='display:""'<%else%>style='display:none'<%end if%>>
		<td>模板首页截图:</td>
		<td><input type="text" name="root_model_pic" size="40" value=<%=root_model_pic%>>
		        <input type="button" value="&gt;&gt;点此上传图" name="action" onclick="javascript:openWin('Njj_Pic_Upload.asp?Fname=root_model_pic','upload','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=400,height=100')">
		</td>
	</tr>
	<tr>
		<td> </td>
		<td>
		   <input type="submit" value="  提  交  " name="Submit1">&nbsp; 
		   <input type="reset" value="重置" name="B2">
		</td>
	</tr>
</form>
</tbody>
</table>

</body>

</html>

⌨️ 快捷键说明

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