/admin/pf_class.asp
https://github.com/hare1987/kaidun180 · ASP · 135 lines · 130 code · 5 blank · 0 comment · 0 complexity · f631749ca22f4870fa905afd33a6443f MD5 · raw file
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
- <!--#include file="pf_conn.asp"-->
- <!--#include file="pf_function.asp"-->
- <!--#include file="pf_session.asp"-->
- <%
- If request.Form("submit") = "È·ÈÏÌí¼Ó" Then
- If request.Form("class_name") = "" Then
- Call infoback("¿ª°àÃû³Æ²»ÄÜΪ¿Õ£¡")
- End If
- If request.Form("class_date") = "" Then
- Call infoback("ÉÏ¿ÎÈÕÆÚ²»ÄÜΪ¿Õ£¡")
- End If
- If request.Form("class_time") = "" Then
- Call infoback("ÉÏ¿Îʱ¼ä²»ÄÜΪ¿Õ£¡")
- End If
- If request.Form("class_address") = "" Then
- Call infoback("ÉϿεص㲻ÄÜΪ¿Õ£¡")
- End If
-
- Set rs = server.CreateObject("adodb.recordset")
- sql = "select * from class"
- rs.Open sql, conn, 1, 3
- rs.addnew
- rs("class_name") = request.Form("class_name")
- rs("class_time") = request.Form("class_time")
- rs("class_date") = request.Form("class_date")
- rs("class_address") = request.Form("class_address")
- rs.update
- Call close_rs
- Call close_conn
- Call infohref("Ìí¼Ó³É¹¦£¡", "pf_class.asp")
- End If
- %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <title>¿¶Ù¶ùͯÃÀÓïѧУ»¶ÓÄú!</title>
- <link href="pf_style.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- <!--
- .style1 {}
- -->
- </style>
- </head>
- <body>
- <!--#include file="pf_top.asp"-->
- <div id="content">
- <!--#include file="pf_left.asp"-->
- <div id="right">
- <div class="right_title">
- <h1>ÐÞ¸ÄÃûʦÐÅÏ¢</h1>
-
- </div>
- <div class="right_body">
- <table>
- <tr>
- <tr>
- <th>¿ª°àÃû³Æ</th>
- <th >ÉÏ¿Îʱ¼ä</th>
- <th >ÉÏ¿ÎÈÕÆÚ</th>
- <th >ÉϺ£µØµã</th>
- <th width="148">Ð޸IJÙ×÷</th>
- </tr>
- <%
- Set rs = server.CreateObject("adodb.recordset")
- sql = "select * from class"
- rs.Open sql, conn, 1, 1
- Do While Not rs.EOF
-
- %>
- <tr align="center">
- <td><%=rs("class_name")%></td>
- <td><%=rs("class_time")%></td>
- <td><%=rs("class_date")%></td>
- <td><%=rs("class_address")%></td>
- <td>[<a href="pf_class_modify.asp?ID=<%=rs("ID")%>">ÐÞ¸Ä</a>] [<a href="pf_class_delete.asp?ID=<%=rs("ID")%>" onclick="return confirm('È·¶¨ÒªÉ¾³ý´Ë¼Ç¼Âð£¿É¾³ýºó½«²»¿É»Ö¸´£¡')">ɾ³ý</a>]</td>
- </tr>
- <%
- rs.movenext
- Loop
- Call close_rs
-
- %>
- </table>
- </div>
- <div class="right_title">
- <h1>Ìí¼Ó¿ª°àÐÅÏ¢</h1>
- </div>
- <div class="right_body">
- <table>
- <form name="pcfinal" method="post">
- <tr>
- <td width="9%" align="center">¿ª°àÃû³Æ£º</td>
- <td width="91%"><input type="text" name="class_name" size="60" />
- <span class="red">±ØÌî</span> </td>
- </tr>
- <tr>
- <td width="9%" align="center">¿ª°àʱ¼ä£º</td>
- <td width="91%"><input type="text" name="class_time" size="60" />
- </td>
- </tr>
- <tr>
- <td width="9%" align="center">¿ª°àÈÕÆÚ£º</td>
- <td width="91%"><input type="text" name="class_date" size="60" />
- </td>
- </tr>
- <tr>
- <td align="center">¿ª°àµØµã£º</td>
- <td><select name="class_address" id="class_address">
- <option selected="selected">Ðì»ãÌïÁÖУ</option>
- <option>»ÆÆÖÊé³ÇУ</option>
- <option>ÆÖ¶«½ðÇÅУ</option>
- <option>ãÉÐÐݷׯУ</option>
- <option>ºç¿Ú¶«±¦Ð£</option>
- <option>³¤Äþºç¿ÚУ</option>
- <option>Ëɽ¾ÅͤУ</option>
- <option>±¦É½´ó»ªÐ£</option>
- </select></td>
- </tr>
-
- <tr>
- <td colspan="2" align="center">
- <input type="submit" name="submit" class="submit_button" value="È·ÈÏÌí¼Ó">
- </td>
- </tr>
- </form>
- </table>
- </div>
- </div>
- <div class="clear"></div>
- </div>
- <!--#include file="pf_bottom.asp"-->
- </body>
- </html>