www.gusucode.com > 25175 学生同学录管理系统 2007 build 1231D源码程序 > admin/common/admin_res_yea_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() lj = che(request("lj")) End Sub '**************************************************** '名称:sqltable '功能:将值提交入库 '参数:types 为空或 "add" 判断是修改记录还是添加记录 '**************************************************** Sub sqltable(types) rs("lj") = lj End Sub '**************************************************** '名称:listinfo '功能:列表 '**************************************************** Sub listinfos() %> <table width="100%" cellspacing="1" cellpadding="0" class="info_tab2"> <tr> <th width="5%" style="text-align:center;text-indent: 4px;">选</th> <th width="5%">ID</th> <th width="20%">年届</th> <th width="10%">操作</th> <th width=""></th> </tr> <% sql="select id,lj from res_lj order by id desc" strFileName="admin_res_yea.asp?action="&action colnum="7" formaction="admin_res_yea.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 class="art_info2" align="center"> <input name='id' type='checkbox' class="chek" onclick="unselectall()" id="ArticleID" value='<%=Rs(0)%>' style=" border: 0px"> </td> <td> <%=rs(0)%></td> <td> <%=rs(1)%></td> <td> <A HREF="admin_res_yea.asp?action=edit&id=<%=Rs(0)%>">修改</A>|<A HREF="admin_res_yea.asp?action=del&id=<%=Rs(0)%>">删除</A></td> <td> </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_yea.asp?action=save" name="add"> <TR><TD class="zq" width="20%"><%=ljs(0)%></TD> <TD> <input name="<%=ljslm(0)%>" type="text" onkeypress="var k=event.keyCode; if ((k<=57 &&k>=48)) return true;else return false" onpaste="return false" maxlength="4" onFocus="this.select();" value="" style="ime-mode:disabled" class="put"/> <span id="<%=ljslm(0)%>_txt">*</span><BR> 说明:如2005年入学的则填写“2005” </td> </tr> <TR><TD> </TD><TD> <input type="submit" name="send" value=" 确 认 "></TD></TR> </FORM> </TABLE> <% end Sub '**************************************************** '名称:editinfos '功能:编辑信息 '**************************************************** Sub editinfos() If id="" Then errormsg "参数错误!" Sql_Lists="lj" Sql_tables="res_lj" 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_yea.asp?action=mod" name="edit" onsubmit="return CheckForm2();"> <TR><TD class="zq" width="20%"><%=ljs(0)%></TD> <TD> <input name="<%=ljslm(0)%>" type="text" onkeypress="var k=event.keyCode; if ((k<=57 &&k>=48)) return true;else return false" onpaste="return false" maxlength="4" onFocus="this.select();" value="<%=rs_edit(0,0)%>" style="ime-mode:disabled" class="put"><BR> <span id="<%=ljslm(0)%>_txt">* </span>说明:如2005年入学的则填写“2005” </td> </tr> <TR><TD> </TD><TD> <input type="submit" name="send" value=" 确 认 "> <INPUT TYPE="hidden" NAME="id" value="<%=id%>"> </TD></TR> </FORM> </TABLE> <% end sub %>