www.gusucode.com > 25175 学生同学录管理系统 2007 build 1231D源码程序 > admin/common/admin_res_Col_inc.asp

    <%
'****************************************************
'名称:nowmenu
'功能:管理快捷菜单
'****************************************************
Sub nowmenu()
res "<h4><b>相关操作:</b>",1
res "<a href=""?action=add"">添加新系所</a> | ",1
res "<a href=""?action=list"">系所列表管理</a> ",1
res "</h4>",1
res "<div style=""height:3px;width:100%;background: #fff;""></div>",1
End Sub

'****************************************************
'名称:jstable
'功能:接收表单提交过来的值
'****************************************************
Sub jstable()
	Col = che(request("Col"))
End Sub

'****************************************************
'名称:sqltable
'功能:将值提交入库
'参数:types 为空或 "add" 判断是修改记录还是添加记录
'****************************************************
Sub sqltable(types)
	rs("Col") = Col
End Sub


'****************************************************
'名称:listinfo
'功能:列表
'****************************************************
Sub listinfos()
%>

	<table width="100%" cellspacing="0" cellpadding="0" class="info_tab2">
	<tr> 
		<th width="5%" style="text-align:center;text-indent: 4px;">选</th>
		<th width="5%">ID</th>
	<th width="30%">系所</th>
		<th width="10%">操作</th>
		<th></th>
	</tr>
	<%
	sql="select id,Col from res_Col  order by id desc"
	strFileName="admin_res_Col.asp?action="&action
	colnum="5"
	formaction="admin_res_Col.asp?action=del"
	sqllist sql,colnum,strFileName,formaction 
	If outcom=True Then
	showContent
	showdelpages
	End If
	%>
	</TABLE>
<%
end sub 

'****************************************************
'名称:showContent
'功能:翻页列表输出
'****************************************************
sub showContent
	dim i
	i=0
	do while not rs.eof
		%>
		<tr> 
			<td align="center">
				<input name='id' type='checkbox' class="chek" onclick="unselectall()" id="ArticleID" value='<%=Rs(0)%>' style=" border: 0px"> 
			</td>
			<td>&nbsp;<%=rs(0)%></td>
			<td>&nbsp;<%=rs(1)%></td>
			<td>&nbsp;<A HREF="admin_res_Col.asp?action=edit&id=<%=Rs(0)%>">修改</A>|<A HREF="admin_res_Col.asp?action=del&id=<%=Rs(0)%>">删除</A></td>
			<td>&nbsp;</td>
		</tr>
	<%
		i=i+1
		if i>=MaxPerPage then exit do
		rs.movenext
	loop
end Sub


'****************************************************
'名称:addinfos
'功能:添加信息
'****************************************************
Sub addinfos()
%>
	<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
	<FORM METHOD=POST ACTION="admin_res_Col.asp?action=save" name="add">

	<TR><TD class="zq" width="20%"><%=Cols(0)%></TD>
		<TD>&nbsp;<input name="<%=Colslm(0)%>" type="text" maxlength="20"  value="" class="put"/>
		&nbsp;<span id="<%=Colslm(0)%>_txt">*</span><BR>&nbsp;说明:在此处填写学院(系)名称。
		</td>
	</tr>
	
	<TR><TD>&nbsp;</TD><TD>&nbsp;<input type="submit" name="send" value=" 确 认 "></TD></TR>
	</FORM>
	</TABLE>

<%
end Sub

'****************************************************
'名称:editinfos
'功能:编辑信息
'****************************************************
Sub editinfos()
	If id="" Then errormsg "参数错误!"
	Sql_Lists="Col"
	Sql_tables="res_Col"
	Sql_Conditions=" ID = "&id
	sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
	rs_edit = connopen(sql)
	If isArray(rs_edit)=False Then errormsg "参数错误"
	%>
	<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
	<FORM METHOD=POST ACTION="admin_res_Col.asp?action=mod" name="edit">

	<TR><TD class="zq" width="20%"><%=Cols(0)%></TD>
		<TD>&nbsp;<input name="<%=Colslm(0)%>" type="text" maxlength="20" value="<%=rs_edit(0,0)%>" class="put">&nbsp;<span id="<%=Colslm(0)%>_txt">*&nbsp;</span><BR>&nbsp;说明:在此处填写学院(系)名称。
		</td>
	</tr>
	
	<TR><TD>&nbsp;</TD><TD>&nbsp;<input type="submit" name="send" value=" 确 认 ">
	<INPUT TYPE="hidden" NAME="id" value="<%=id%>">
	</TD></TR>
	</FORM>
	</TABLE>

<%
end sub 
%>