?? systemsmallclassmanage.asp
字號:
<!--#include file="CheckAdminLogined.asp"-->
<!--#include file="../include/connstr.asp"-->
<!--#include file="../include/DefFunction.asp"-->
<%
if request("cur_action")="delete" then
sql_delete="delete from tSystemSmallClass where ID='"&request("EditID")&"'"
conn.execute sql_delete
PageNo=request("PageNo")
BClassID=request("BClassID")
end if
if request("cur_action")="addsave" then
set rs=server.CreateObject("adodb.recordset")
sql_addsave="select * from tSystemSmallClass where ID='"&request("T_ID")&"'"
rs.open sql_addsave,conn,1,1
if not(rs.bof and rs.eof) then
response.write "<script>alert('該類別ID號已經存在,按確定返回!');history.back();</script>"
response.End()
end if
sql_addsave="insert into tSystemSmallClass(ID,SClassName,BigClassID,AddTime) values('"&request("T_ID")&"','"&request("T_SClassName")&"','"&request("S_BigClassID")&"','"&request("T_AddTime")&"')"
conn.execute sql_addsave
response.write "<script>location.replace('SystemSmallClassManage.asp');</script>"
response.End()
end if
if request("cur_action")="editsave" then
sql_editsave="update tSystemSmallClass set SClassName='"&request("T_SClassName")&"',BigClassID='"&request("S_BigClassID")&"',AddTime='" &request("T_AddTime")&"' where ID='"&request("EditID")&"'"
conn.execute sql_editsave
response.write "<script>location.replace('SystemSmallClassManage.asp?PageNo="&request("PageNo")&"&BigClassID="&request("BigClassID")&"');</script>"
response.End()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src="/include/jchar.js"></script>
<script language="JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function check_data(form){
if(Jtrim(form.T_SClassName.value)==""){
alert("你沒有填寫小類別行業名稱,請填寫!")
form.T_SClassName.focus();
return(false)
}
form.submit();
}
function dele_check(ID,BigClassID,PageNo){
if(confirm("真的要刪除嗎?刪除后數據不能恢復!")){
location.href="?cur_action=delete&EditID="+ID+"&BigClassID="+BigClassID+"&PageNo="+PageNo
}
}
</script>
<link href="Images/AdminCss.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="8" colspan="2"></td>
</tr>
<tr>
<td width="75" height="20" rowspan="2"><img src="Images/TopBt.gif" width="67" height="36"></td>
<td width="918" height="10"></td>
</tr>
<tr>
<td>我的位置:服務管理平臺._基本信息._系統小類管理</td>
</tr>
<tr>
<td height="4" colspan="2"></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="E7E7E7">
<tr>
<td height="20"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="159" height="20" align="center" background="images/title1.gif" class="fontwintitle">
<strong>系統小類管理</strong></td>
<td align="right" background="images/title2.gif"> <a href="?cur_action=add" class="top"><strong><font color="#CC0000">添加系統小類</font></strong></a> </td>
<td width="10"><img src="images/title3.gif" width="10" height="20"></td>
</tr>
</table></td>
</tr>
<tr valign="top">
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6" background="images/midder1.gif"><img src="images/midder1.gif" width="6" height="3"></td>
<td width="985" height="100%" align="center" valign="top"> <% if request("cur_action")="add" then%> <br> <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<form name="form1" method="post" action="?cur_action=addsave">
<tr>
<td height="22" colspan="2" align="center" bgcolor="#FFFFFF" class="fonttitle"><strong>添加系統小類</strong></td>
</tr>
<tr>
<td height="26" align="right" bgcolor="#E7E7DE">ID號:</td>
<td bgcolor="#FFFFFF"> <input name="T_ID" type="text" id="T_ID" size="20"></td>
</tr>
<tr>
<td width="30%" height="26" align="right" bgcolor="#E7E7DE">
<font color="#CC0000">*</font> 小類名稱:</td>
<td width="70%" bgcolor="#FFFFFF"> <input name="T_SClassName" type="text" size="40"></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#E7E7DE">所屬大類:</td>
<td bgcolor="#FFFFFF"> <select name="S_BigClassID" id="S_BigClassID">
<%set rs_class=server.CreateObject("adodb.recordset")
sql_class="select * from tSystemBigClass"
rs_class.open sql_class,conn,1,1
do while not rs_class.eof
response.write "<option value='"&rs_class("ID")&"'>"&rs_class("BClassName")&"</option>"
rs_class.movenext
loop
%>
</select></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#E7E7DE">添加時間:</td>
<td bgcolor="#FFFFFF"> <input name="T_AddTime" type="text" id="T_AddTime" value="<%=now()%>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="31" colspan="2" align="center"><input type="button" name="Button" value="正確提交" onClick="return check_data(this.form)">
<input type="reset" name="Submit2" value="重新填寫"> <input type="button" name="Submit3" value="返回" onClick="javascript:history.back();"></td>
</tr>
</form>
</table>
<%end if
if request("cur_action")="edit" then
set rs_edit=server.CreateObject("adodb.recordset")
sql_edit="select * from tSystemSmallClass where ID='"&request("EditID")&"'"
rs_edit.open sql_edit,conn,1,1
if rs_edit.bof and rs_edit.eof then
response.write "<script>alert('讀取數據時出錯,請與管理員聯系!');history.back();</script>"
response.end
end if
%> <br> <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<form name="form2" method="post" action="?cur_action=editsave">
<tr>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -