?? addnews.asp
字號:
<!--#Include file="../Common/Inc_DatConn.asp"-->
<!--#Include file="Common/Inc_Config.asp"-->
<!--#Include file="Common/Inc_Function.asp"-->
<%
'┌─ 風云ASP在線 ────────────────────────┐
'│ │
'│ 作者:趙振波. http://www.fyasp.com │
'│ │
'│ Q Q:176189168 │
'│ │
'│ Email:fy96@163.com │
'│ │
'│ 程序定做,系統開發,網站制作,提供高質量的網絡產品、技術和服務!│
'│ │
'│【版權聲明】 │
'│ │
'│ 本程序版權歸坐看風云所有,未經授權擅自修改、復制或散布本程序│
'│ │
'│的部分或全部,將承受嚴厲的民事和刑事處罰,對已知的違反者將給予法 │
'│ │
'│律范圍內的全面制裁。對非法使用此程序所造成的一切后果本人概不負責!│
'│ │
'└─────────────────── http://www.fyasp.com ──┘
%>
<%if IsTimeOut(Session("strAccount"),Session("strPassWord")) then Response.Redirect "index.asp"%>
<html>
<head>
<title><% = strSiteName%> - 網站后臺管理系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Common/Site.css" type="text/css">
<script language="javascript">
//檢驗表單的合法性
function CheckForm() {
if (document.AddForm.NewsClass.value == "#") {
alert("\必須選擇新聞類型!");
document.AddForm.NewsClass.focus();
}
else if (document.AddForm.Topic.value == "") {
alert("\新聞標題不能為空!");
document.AddForm.Topic.focus();
}
else if (document.AddForm.Content.value == "") {
alert("\新聞內容不能為空");
document.AddForm.Content.focus();
}
else {
return true;
}
return false;
}
// End of validation form script -->
</script>
<script language="javascript">
function AddPhoto() {
popupWin = window.open('Oper.asp?Oper=AddPhoto','','width=300,height=160,scrollbars=no')
}
</script>
</head>
<body leftMargin="0" topMargin="2">
<!--#Include file="Common/inc_Top.asp"-->
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="105" valign="top" style="border-left: 1px solid rgb(0,0,0); border-right: 1px solid rgb(0,0,0)" class="bottom"><br>
<!--#Include file="Common/Inc_Button.asp"-->
</td>
<td valign="top" style="border-right: 1px solid rgb(0,0,0)" align="center" class="banma2">
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="50">當前位置:<a href="Main.asp">管理首頁</a> -> <a href="NewsMgr.asp">新聞管理</a> -> 添加新聞</td>
</tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="50%" height="25">
<input onclick="parent.location.href='NewsMgr.asp'" type="button" value="管 理" class="button" name="Button">
<%
if Session("intUserLevel") > 2 then
Response.Write " <input onclick=""parent.location.href='NewsEaa.asp'"" type=""button"" value=""審 批"" class=""button"" name=""Button2"">"
end if
%>
</td>
<td width="50%" align="right"></td>
</tr>
</table>
<%
if UCase(Request.Form("Oper")) = "ADDNEWS" then
Dim rdsNews
set rdsNews = Server.CreateObject("ADODB.Recordset")
rdsNews.Open "Dat_News",Conn,3,3
rdsNews.AddNew
rdsNews("NewsClass") = Request.Form("NewsClass")
rdsNews("Topic") = Request.Form("Topic")
rdsNews("From") = Request.Form("From")
rdsNews("Content") =dvHTMLEncode(Request.Form("Content"))
rdsNews("PhotoName") = Request.Form("PhotoName")
rdsNews("Hits") = 0
rdsNews("State") = 1
rdsNews("CreateTime") = now()
rdsNews.Update
rdsNews.Close
set rdsNews = nothing
strMsgTitle = "新聞添加"
strError = False
strMsg = "新聞添加成功..."
strGoFile = "AddNews.asp"
Call ShowMessage()
else
%>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="100%" class="booktable">
<table border="0" width="100%" cellspacing="1" cellpadding="2">
<form method="post" action="AddNews.asp" name="AddForm" OnSubmit="return CheckForm()">
<input type="hidden" name="Oper" value="AddNews">
<tr>
<td width="20%" height="25" class="bottom" align="right">新聞類別:</td>
<td width="80%" height="25" class="banma1">
<select size="1" name="NewsClass" class="face">
<option value="#" selected>-選擇-</option>
<option value="1">本站公告</option>
<option value="2">行業新聞</option>
</select>
</td>
</tr>
<tr>
<td width="20%" height="25" class="bottom" align="right">標題:</td>
<td width="80%" height="25" class="banma2"> <input type="text" name="Topic" size="60" class="face"> <font color="#FF0000">**</font></td>
</tr>
<tr>
<td width="20%" height="25" class="bottom" align="right">摘自:</td>
<td width="80%" height="25" class="banma1"> <input type="text" name="From" size="25" class="face"></td>
</tr>
<tr>
<td width="20%" height="25" class="bottom" align="right">內容:</td>
<td width="80%" height="25" class="banma2"> <textarea rows="12" name="Content" cols="68" class="face"></textarea> <font color="#FF0000">**</font></td>
</tr>
<tr>
<td width="20%" height="25" class="bottom" align="right">相關圖片:</td>
<td width="80%" height="25" class="banma1"> <input type="text" name="PhotoName" size="25" class="face" readonly="ture"> <a href="javascript:AddPhoto()"><img border="0" src="<% = strImageUrl%>addpic.gif" align="absmiddle"><font color="#FF0000">添加</font></a> (只允許上傳.gif、.jpg格式)</td>
</tr>
<tr>
<td width="20%" height="25" class="bottom" align="right"></td>
<td width="80%" height="25" class="banma2"> <input type="submit" value="添 加" name="Submit" class="button"> <input type="reset" value="取 消" name="Reset" class="button"></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%
end if
%>
<br>
</td>
</tr>
</table>
<!--#Include file="Common/Inc_Bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -