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

📄 classrewrite.asp

📁 功能最强大的ASP网站
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="setting.asp"-->
<%
dim bhx
bhx="1"
 if (request("bh")<>"")then
bhx=request("bh")
end if

Set rs = Server.CreateObject ("ADODB.Recordset")
sql = "Select * from bigclass where bh="+ bhx
rs.Open sql,conn,3,2

classname=rs("bigclassname")

if request("action")="new" then

newbigclassname=request("newbigclassname")
yclassname=request("yclassname")

if newbigclassname="" then
response.Redirect("admin_wrong.asp?url=classrewrite.asp&reason=你的分类标题为空!")
else
Set rs1 = Server.CreateObject ("ADODB.Recordset")
sql1 = "Select * from news where bigclassname= '"&yclassname&"'"
rs1.Open sql1,conn,3,2
do while not rs1.eof
rs1("bigclassname")=newbigclassname
rs1.movenext
loop

url="<img src="&request.Form("pic")&">"
rs("bigclassname")=request.Form("newbigclassname")
rs("admin_name")=request.Form("name")
rs("admin_infor")=request.Form("infor")
rs("admin_pic")=url
if request.Form("newbigclassname")="" then
response.Redirect("admin_wrong.asp?url=classrewrite.asp&reason=你可能没填写分类标题!")
end if
rs.update
response.Redirect("admin_right.asp?url=classmanage.asp&reason=修改成功!")
end if
end if


%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改分类名称</title>
<style type="text/css">
<!--
#Layer1 {
	position:absolute;
	width:363px;
	height:40px;
	z-index:1;
	left: 382px;
	top: 108px;
	background-color: #FFFFFF;
}
-->
</style>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-image: url();
}
-->
</style></head>

<body>
<div id="Layer1">
  <table width="364" height="64" border="0" class="STYLE3" style="border:#999999 1px solid">
    <tr>
      <td height="27" background="image/item_bg.gif" class="STYLE13" id="new" style="border:#999999 1px solid"><div align="center" class="STYLE2">
      <div align="center"><span class="STYLE1">修改类名称</span></div></td>
    </tr>
    <tr>
      <td height="15" class="STYLE1">分类编号:<%=rs("bh")%></td>
    </tr>
    <tr>
      <td class="STYLE1"><form name="form1" method="post" action="classrewrite.asp?action=new">
          <p>分类名称:
            <input name="newbigclassname" type="text" class="STYLE1" id="newbigclassname">
            <span class="STYLE3">修改前名称:<%=rs("bigclassname")%> 
            <input name="yclassname" type="hidden" id="yclassname" value="<%=rs("bigclassname")%>">
            </span></p>
          <p class="STYLE3">*<span class="STYLE1">请务必填写分类栏目名称,否则分类栏目将会清空,新增加分类管理员功能.</span></p>
          <p class="STYLE3">name:            <input name="name" type="text" class="STYLE3" id="name" value="<%=rs("admin_name")%>">
          </p>
          <p class="STYLE3">
          <% if rs("admin_pic")="<img src=http://>" then
		  response.Write("无")
		  else
		  response.Write(rs("admin_pic"))
		  end if
		  %>&nbsp;</p>
          <p class="STYLE3">pic:
            <label class="STYLE3">
            <input name="pic" type="text" class="STYLE3" id="pic" value="http://">
            </label>
&lt;管理员图片,请使用网络地址&gt;</p>
          <p class="STYLE3">infor:</p>
          <p class="STYLE3">
            <label>
            <textarea name="infor" cols="80" class="STYLE1" id="infor"><%=rs("admin_infor")%></textarea>
            <br>
            </label>
          </p>
          <p align="center" class="STYLE1">
            <input name="Submit" type="submit" class="STYLE1" value="rewrite!">
          </p>
      </form>      </td>
    </tr>
  </table>
</div>
</body>
</html>

⌨️ 快捷键说明

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