📄 admin_res_col.asp
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../inc/inc.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="common/admin_res_Col_inc.asp"-->
<%
res w3chead(HTMLother),1
nowtit="系所"
Login_Judge
powerid=121
Dim Col
Dim Cols(0)
Cols(0)="系所"
Dim Colslm(0)
Colslm(0)="Col"
Dim Col_id,nowyear
action=che(request("action"))
id=che(request("id"))
If action="list" Then
Ispower powerid & "1"
const MaxPerPage=15
restit nowtit,infotit(0)
nowmenu
listinfos
ElseIf action="add" Then
Ispower powerid & "2"
restit nowtit,infotit(1)
nowmenu
addinfos
ElseIf action="save" Then
Ispower powerid & "2"
jstable
If Col = "" Then errormsg "参数错误!"
Dim class_check
sql=Sqlinfo("id","res_Col"," Col = '"&Col&"'","","","")
class_check = connopen(sql)
If isArray(class_check) Then errormsg "该 <B>"&Col&"</B> 年届已存在!"
sql=Sqlinfo("*","res_Col","id=0","","","")
set rs=server.createobject("adodb.recordset")
rs.Open Sql, Conn, 1, 3
rs.AddNew
sqltable("add")
rs.Update
rs.close
rightmsg "?action=list",""
ElseIf action="edit" Then
Ispower powerid & "3"
restit nowtit,infotit(2)
nowmenu
editinfos
ElseIf action="mod" Then
Ispower powerid & "3"
jstable
If Col = "" Then errormsg "参数错误!"
sql=Sqlinfo("*","res_Col","id="&id,"","","")
set rs=server.createobject("adodb.recordset")
rs.Open Sql, Conn, 1, 3
If Not rs.Eof Then
sqltable("mod")
rs.Update
Else
errormsg "参数错误"
End If
rs.close
rightmsg "?action=list",""
ElseIf action="del" Then
Ispower powerid & "4"
isn id,"id",1
sqldel "res_Col",id
sqldel "res_pro","Col_id in ("&id&")"
sqldel "res_info","cla_id in (select id from res_cla where Col_id in ("&id&"))"
sqldel "res_cla","Col_id in ("&id&")"
sqldel "res_cou","Col_id in ("&id&")"
sqldel "admin_stu","Col_id in ("&id&")"
rightmsg "?action=list",""
End If
res footer(1),0
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -