InsertHelp.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:5k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- <% Option Explicit %>
- <!--#include file="../FS_Inc/Const.asp" -->
- <!--#include file="../FS_Inc/Function.asp" -->
- <!--#include file="../FS_InterFace/MF_Function.asp" -->
- <%
- Const set_Help_Conn_str = "Foosun_Data/Help.mdb"
- Sub Help_Conn_1
- Dim f_HelpConnStr
- 'If G_IS_SQL_DB = 1 Then
- ' f_CollectConnStr = "Provider=SQLOLEDB.1;Persist Security Info=false;"& G_COLLECT_DATA_STR &";"
- 'Else
- f_HelpConnStr = "DBQ=" + Server.MapPath(Add_Root_Dir(set_Help_Conn_str)) + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
- 'f_CollectConnStr = "provider=microsoft.jet.oledb.4.0;data source="&Server.MapPath(Add_Root_Dir(G_DATABASE_CONN_STR))
- 'End If
- On Error Resume Next
- Set HelpConn = Server.CreateObject(G_FS_CONN)
- HelpConn.Open f_HelpConnStr
- If Err Then
- Err.Clear
- Set HelpConn = Nothing
- Response.Write "<font size=""2"">[数据库服务器连接错误]<br>请检查系统参数设置>>站点常量设置,或者/FS_Inc/Const.asp文件!</font>"
- Response.End
- End If
- End Sub
- dim HelpConn
- Help_Conn_1
- if Request.Form("action")="add_save" then
- dim rs,sql
- set rs = Server.CreateObject(G_FS_RS)
- sql="select * From Foosun_HelpContent where 1=0"
- rs.open sql,HelpConn,3,3
- rs.addnew
- rs("LableType")=Request.Form("LableType")
- rs("SubType")=Request.Form("SubType")
- rs("Content")=Request.Form("Content")
- rs("addTime")=now
- rs.update
- rs.close
- 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>
- <style>
- a{text-decoration: none;} /* 链接无下划线,有为underline */
- a:link {color: #232323;} /* 未访问的链接 */
- a:visited {color: #232323;} /* 已访问的链接 */
- a:hover{color: #FFCC00;} /* 鼠标在链接上 */
- a:active {color: #FFCC00;} /* 点击激活链接 */
- td ,body{
- color:#232323;
- font-size:12px;
- line-height: 18px;
- }
- .input{
- FONT-FAMILY: "新宋体";
- FONT-SIZE: 12px;
- COLOR:#F3F3F3;
- text-decoration: none;
- line-height: 150%;
- background:#0099CC;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: #FFFFFF;
- border-right-color: #FFFFFF;
- border-bottom-color: #FFFFFF;
- border-left-color: #FFFFFF;
- padding:0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
- margin-left: 0px;
- }
- .input_1{
- FONT-FAMILY: "新宋体";
- FONT-SIZE: 12px;
- COLOR:#006699;
- text-decoration: none;
- line-height: normal;
- background:#FFFFFF;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: #80CCFF;
- border-right-color: #80CCFF;
- border-bottom-color: #80CCFF;
- border-left-color: #80CCFF;
- padding:0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
- margin-left: 0px;
- }
- </style>
- </head>
- <body>
- <form id="NewsForm" name="NewsForm" method="post" action="">
- 帮助标签
- <input name="LableType" type="text" id="LableType" />
- <br />
- 应用类型
- <label>
- <select name="SubType" id="SubType">
- <option value="NS" selected="selected">NS</option>
- <option value="MS">MS</option>
- <option value="DS">DS</option>
- <option value="AP">AP</option>
- <option value="HS">HS</option>
- <option value="FL">FL</option>
- <option value="CS">CS</option>
- <option value="SS">SS</option>
- <option value="AS">AS</option>
- <option value="VS">VS</option>
- </select>
- </label>
- <br />
- <iframe id='NewsContent' onload="f_setmode()" src="../Editer/NewsEditer.asp" frameborder=0 scrolling=no width='100%' height='440'></iframe>
- <input name="action" type="hidden" id="action" value="add_save" />
- <label>
- <input type="submit" name="Submit" value="提交" onClick="SubmitFun();" />
- </label> <input name="Content" type="hidden" value="">
- </form>
- </body>
- </html>
- <script language="JavaScript" type="text/javascript">
- function SubmitFun()
- {
- if (frames["NewsContent"].CurrMode!='EDIT') {alert('其他模式下无法保存,请切换到设计模式');return;}
- frames["NewsContent"].SaveCurrPage();
- var TempContentArray=frames["NewsContent"].NewsContentArray;
- document.NewsForm.Content.value='';
- for (var i=0;i<TempContentArray.length;i++)
- {
- if (TempContentArray[i]!='')
- {
- if (document.NewsForm.Content.value=='') document.NewsForm.Content.value=TempContentArray[i];
- else document.NewsForm.Content.value=document.NewsForm.Content.value+'[FS:PAGE]'+TempContentArray[i];
- }
- }
- //alert(document.NewsForm.Content.value);
- document.NewsForm.submit();
- }
- function f_setmode()
- {
- window.frames.item('NewsContent').setMode("EDIT");
- }
- </script>