⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 web_educate_lessonedit.asp

📁 直接附加数据库! 修改 Include/ Class_Main.asp 为自己信息 后台admin admin 绍兴人才网程序
💻 ASP
字号:
<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Include/Class_Pass.asp" -->
<!--#include file="Web_Session.asp" -->
<% 
Dim Action,Comid,PageNo
Dim TypeId,TypeName,News
'//检测是否跨站
Call Check_url()
'//检测管理员是否有权限操作该页面
If Instr(1,Session("Web_Power"),"140") <= 0 Then 
  Call CloseDB()
  Response.write "对不起!您没有访问该页面的权限..."
  Response.End()
End If

Action = Request.QueryString("action")
If Action = "edit" Then Call Submit() '//调用保存数据的函数

Param     = Replace_Text(Request.QueryString("Param"))
Schid     = Replace_Text(Request.QueryString("Schid"))
PageNo    = Request.QueryString("PageNo")
'Response.write Jobid
'Response.End()
Set Rs = Conn.Execute("Select * From [pH_Educate_Lesson] Where Schid='"&Schid&"' And Ncid="&Cstr(Param))
Valid = Rs("Valid")
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript" src="../js/Company_Publish.js"></script>
<SCRIPT language=JavaScript src="../js/funlib.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/ua.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/ftiens4.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/persontreeviewnodes.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/areacityselector.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/joball.js"></SCRIPT>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../CSS/css.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="5"></td>
  </tr>
  <tr> 
    <td height="25" bgcolor="fb7a03">&nbsp;<font color="#FFFFFF">::<strong>编辑课程</strong></font></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr> 
    <td align="left"><table width="80%" border="0" cellspacing="0" cellpadding="0">
        <form action="?action=edit" name="theForm" method="post" onSubmit="return theForm_check()">
          <tr> 
            <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="dddddd">
                <tr> 
                  <td bgcolor="#FFFFFF"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td height="2"></td>
                      </tr>
                    </table>
                    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                      <tr> 
                        <td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;培训课程</font></b></td>
                      </tr>
                    </table>
                    <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1">
                      <tr> 
                        <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 课程名称:</td>
                        <td height="25"><input name="lessonname" type="text" id="lessonname" value="<%= Rs("lessonname") %>"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="18%" height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 课程性质:</td>
                        <td height="25" bgcolor="f9f9f9"> <SELECT class=txtfield name=property>
                            <OPTION value="<%=Rs("Property")%>"><%= Rs("Property") %></OPTION>
                            <OPTION 
                    value=IT认证>IT认证</OPTION>
                            <OPTION value=外语培训>外语培训</OPTION>
                            <OPTION value=电脑技术>电脑技术</OPTION>
                            <OPTION 
                    value=财会金融>财会金融</OPTION>
                            <OPTION value=人力资源>人力资源</OPTION>
                            <OPTION value=市场营销>市场营销</OPTION>
                            <OPTION value=法律>法 律</OPTION>
                            <OPTION value=其他>其 他</OPTION>
                          </SELECT> </td>
                      </tr>
                      <tr> 
                        <td height="25" align="right">开课时间:</td>
                        <td height="25"> <input name="begindate" type="text" id="begindate" size="16" onclick="SD(this,'document.all.begindate')"  value="<%= Rs("begindate") %>"></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 开课地点:</td>
                        <td height="25" bgcolor="f9f9f9"><input name="beginaddr" type="text" id="lessonname3" size="45" value="<%= Rs("beginaddr") %>"></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 费 用:</td>
                        <td height="25"> <input name="currcy" type="text" id="currcy" size="16" value="<%= Rs("currcy") %>"></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right" bgcolor="f9f9f9">培训目标:</td>
                        <td height="25" bgcolor="f9f9f9"><textarea name="mubiao" cols="55" rows="5" id="mubiao"> <%= Rs("mubiao") %></textarea></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right">培训对象:</td>
                        <td height="25"> <textarea name="sudobj" cols="55" rows="5" id="sudobj"><%= Rs("sudobj") %></textarea></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 课程内容:</td>
                        <td height="25" bgcolor="f9f9f9"><textarea name="content" cols="55" rows="5" id="textarea2"><%= Rs("content") %></textarea></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 联系人:</td>
                        <td height="25"> <input name="person" type="text" id="person" size="16" value="<%= Rs("person") %>"></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 联系电话:</td>
                        <td height="25" bgcolor="f9f9f9"><input name="phone" type="text" id="currcy3" size="16"  value="<%= Rs("phone") %>"></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right">传 真:</td>
                        <td height="25"> <input name="fax" type="text" id="currcy4" size="16" value="<%= Rs("fax") %>"></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 有效期:</td>
                        <td height="25" bgcolor="f9f9f9"> <select name="valid" id="valid">
                            <OPTION  value=7 <% If Valid = 7 Then Response.Write "Selected" %>>一星期</OPTION>
                            <OPTION value=15 <% If Valid = 15 Then Response.Write "Selected" %>>半个月</OPTION>
                            <OPTION value=30 <% If Valid = 30 Then Response.Write "Selected" %>>一个月</OPTION>
                            <OPTION value=60 <% If Valid = 60 Then Response.Write "Selected" %>>二个月</OPTION>
                            <OPTION value=90 <% If Valid = 90 Then Response.Write "Selected" %>>三个月</OPTION>
                            <OPTION value=180 <% If Valid = 180 Then Response.Write "Selected" %>>半年</OPTION>
                            <OPTION value=0 <% If Valid = 0 Then Response.Write "Selected" %>>长年招生</OPTION>
                          </SELECT> </td>
                      </tr>
                    </table>
                    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td height="2"></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="40" align="center">
			<input type="hidden" name="ncid" value="<%= Rs("Ncid") %>"> 
			<input type="hidden" name="Schid" value="<%= Schid %>"> 
              <input type="submit" name="submit" value=" 保 存 " style="height:30px;"> 
            </td>
          </tr>
        </form>
      </table></td>
</tr>
</table>
</body>
</html>
<% 

Sub Submit()
 Ncid				= Replace_Text(Request.Form("Ncid"))
 Schid              = Replace_Text(Request.Form("Schid"))
 'LessonName,Property,Begindate,BeginAddr,Currcy,Mubiao,Sudobj,Content,Person,Phone,Fax,Valid
 LessonName			= Replace_Text(Request.Form("LessonName"))
 Property1			= Replace_Text(Request.Form("Property"))
 Begindate			= Replace_Text(Request.Form("Begindate"))
 BeginAddr			= Replace_Text(Request.Form("BeginAddr"))
 Currcy				= Replace_Text(Request.Form("Currcy"))
 Mubiao				= Replace_Text(Request.Form("Mubiao"))
 Sudobj				= Replace_Text(Request.Form("Sudobj"))
 Content			= Replace_Text(Request.Form("Content"))
 Person				= Replace_Text(Request.Form("Person"))
 Phone				= Replace_Text(Request.Form("Phone"))
 Fax				= Replace_Text(Request.Form("Fax"))
 Valid				= Replace_Text(Request.Form("Valid"))
 
 If Mubiao <> "" Then Mubiao = Replace(Mubiao,chr(13),"<br>")
 If Sudobj <> "" Then Sudobj = Replace(Sudobj,chr(13),"<br>")
 If Content <> "" Then Content = Replace(Content,chr(13),"<br>")
 
 'SQL = "Insert Into [pH_Educate_Lesson] (Schid,LessonName,Property,Begindate,BeginAddr,Currcy,Mubiao,Sudobj,Content,Person,Phone,Fax,Valid,AddDate) Values ('"&Schid&"','"&LessonName&"','"&Property1&"','"&Begindate&"','"&BeginAddr&"','"&Currcy&"','"&Mubiao&"','"&Sudobj&"','"&Content&"','"&Person&"','"&Phone&"','"&Fax&"','"&Valid&"',getdate())"
 SQL = "Update [pH_Educate_Lesson] Set LessonName='"&LessonName&"',Property='"&Property1&"',Begindate='"&Begindate&"',BeginAddr='"&BeginAddr&"',Currcy='"&Currcy&"',Mubiao='"&Mubiao&"',Sudobj='"&Sudobj&"',Content='"&Content&"',Person='"&Person&"',Phone='"&Phone&"',Fax='"&Fax&"',Valid="&Valid&",AddDate=getdate() Where Schid='"&Schid&"' And Ncid="&Cstr(Ncid)
 Conn.Execute(SQL)
 Response.Write "<script>alert('编辑完成');location.href='Web_Educate_Lesson.asp?Schid="&Schid&"';</script>"
 Response.End()
End Sub

'//关闭数据库连接
CloseDB
 
 %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -