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

📄 web_educate_lessonadd.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() '//调用保存数据的函数

Schid     = Replace_Text(Request.QueryString("Schid"))
PageNo    = Request.QueryString("PageNo")
'Response.write Jobid
'Response.End()

 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript" src="../js/jsdate.js"></script>
<script language="JavaScript" >
function theForm_check()
{
if (document.theForm.lessonname.value=="")
{
 alert("请输入培训课程的名称!");
 document.theForm.lessonname.focus();
 return false;
}

if (document.theForm.beginaddr.value=="")
{
 alert("请输入开课的地点!");
 document.theForm.beginaddr.focus();
 return false;
}
if (document.theForm.currcy.value=="")
{
 alert("请输入所需的费用!");
 document.theForm.currcy.focus();
 return false;
}

if (document.theForm.content.value=="")
{
 alert("请输入课程的内容!");
 document.theForm.content.focus();
 return false;
}

if (document.theForm.person.value=="")
{
 alert("请输入联系人!");
 document.theForm.person.focus();
 return false;
}
if (document.theForm.phone.value=="")
{
 alert("请输入电话号码!");
 document.theForm.phone.focus();
 return false;
}
}
</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"> 
                        </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=""  selected>----请选择----</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')" ></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"></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"></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"></textarea></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right">培训对象:</td>
                        <td height="25"> <textarea name="sudobj" cols="55" rows="5" id="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"></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"></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" ></td>
                      </tr>
                      <tr> 
                        <td height="25" align="right">传 真:</td>
                        <td height="25"> <input name="fax" type="text" id="currcy4" size="16"  ></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="0" selected>请选择</OPTION>
                            <OPTION 
                    value=7>一星期</OPTION>
                            <OPTION value=15>半个月</OPTION>
                            <OPTION 
                    value=30>一个月</OPTION>
                            <OPTION value=60>二个月</OPTION>
                            <OPTION 
                    value=90>三个月</OPTION>
                            <OPTION value=180>半年</OPTION>
                            <OPTION 
                    value=0>长年招生</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="Schid" value="<%= Schid %>">
              <input type="submit" name="submit" value=" 确 认 发 布 " style="height:30px;"> 
            </td>
          </tr>
        </form>
      </table></td>
</tr>
</table>
</body>
</html>
<% 

Sub Submit()

 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())"
 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 + -