ntype_add.asp
来自「shopxp网上购物系统v6.6已经调试,百分百可用」· ASP 代码 · 共 149 行
ASP
149 行
<!--#include file="../nUser/config.asp"-->
<!--#include file="../nUser/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<%
'''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''
Dim act,ClassID,title,date,nType
act=Request("act")
if(request("id")<>"") then
nType=Cint(Request("id"))
else
call alertstr("请选择正确的父栏目",1)
end if
if(act="add") then
title=request.Form("title")
date=request.Form("date")
nPower=request.Form("nPower")
set rs=server.createobject("adodb.recordset")
sqltext="select * from kheu_ntype"
rs.open sqltext,conn,3,3
if not rs.eof and not rs.bof then
rs.addnew
rs("title")=title
rs("date")=date
rs("nPower")=nPower
rs("nType")=nType
rs.update
rs.close
response.Write("<script>alert(""成功添加分类!"");location.href=""nType.asp"";</script>")
else
response.Write("<script>alert(""父栏目不存在,请重新加载!"");location.href=""nType.asp"";</script>")
end if
end if
if nType < 1 then
ParentCName = "参数传递错误,请重新加载"
nType=2
else
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from kheu_nType where id="&nType,conn,3,1
if rs.Eof or rs.Bof then
ParentCName = "父栏目不存在,请重新加载"
nType=2
else
ParentCName = rs("title")
end if
rs.close
Set rs = Nothing
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>栏目添加</title>
<link href="Css.css" rel="stylesheet">
</head>
<script type="text/javascript">
function check(obj)
{
if(obj.title.value==""){
alert("栏目名称不能为空!");
obj.title.focus();
obj.title.select();
return false;
}
if(obj.nPower.value==""){
alert("栏目起始分值不能为空!");
obj.nPower.focus();
obj.nPower.select();
return false;
}
if(obj.date.value==""){
alert("栏目修改时间不能为空!");
obj.date.focus();
obj.date.select();
return false;
}
}
</script>
<body>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0" background="Images/main_bg.gif">
<tr>
<td bgcolor="#006699" onMouseOver="javascript:this.bgColor='#0066cc'" onMouseOut="javascript:this.bgColor='#006699'">
<div align="center" class="style1">
欢迎使用『秦直道』多用户博客管理系统V2.0版</div></td>
</tr>
</table>
<table width="100%" height="22" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF9900">
<tr>
<td><div align="center" class="style1">添加博客日志分类栏目</div></td>
</tr>
</table>
<div align="center">
<table width="100%" border="0" cellspacing="5" cellpadding="0" style="border:1px solid #000000; ">
<form action="nType_add.asp?act=add" method="post" name="ClassForm" onSubmit="return check(this);">
<tr>
<td height="5" colspan="2"></td>
<tr>
<td height="5" colspan="2"></td>
</tr>
<tr>
<td width="18%"><div align="center">类别名称</div></td>
<td> <div align="left">
<input value="<%=title%>" name="title" type="text" style="width:70%;">
</div></td>
</tr>
<tr>
<td><div align="center">父 栏 目</div></td>
<td> <div align="left">
<input readonly value="<%=ParentCName %>" style="width:70%;" type="text" name="textfield3">
</div></td>
</tr>
</tr>
<tr>
<td><div align="center">目录启分</div></td>
<td><div align="left">
<input value="<%=100%>" type="text" style="width:70%;" name="nPower">
<BR>[<font color="#FF0000"> * </font>多少积分以上的用户有权修改此目录文档 ]
</div></td>
</tr>
<tr>
<td><div align="center">添加日期</div></td>
<td><div align="left">
<input value="<%=Now()%>" type="text" style="width:70%;" name="date">
</div></td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="submit" value=" 确 定 ">
<input name="id" value="<%=nType%>" type="hidden" id="id">
<input type="button" name="Submit2" onClick="history.back();" value=" 返 回 ">
</div></td>
</tr>
</form>
</table>
</div>
<%
%>
</body>
</html>
<%
call connclose()
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?