?? edit.asp
字號:
<%
if session("admin_name")="" then
response.redirect "index.asp"
end if
%>
<!--#include file="../inc/adconn.asp"-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" type="text/css" href="../style.css"
</HEAD>
<script LANGUAGE="JavaScript">
function check()
{
if (document.form1.title.value=="")
{
alert("請輸入新聞標題!")
document.form1.title.focus()
document.form1.title.select()
return
}
document.form1.submit()
}
</script>
<%
set rs=server.createobject("adodb.recordset")
Sql="select * from news where newsid="&request("newsid")&""
rs.open sql,conn,1,1
%>
<SCRIPT language=javascript>
var upfile_obj;
function OnUpFile()
{
upfile_obj.src=upfile_obj.lowsrc;
upfile_obj.src=document.forms["form1"].upfile.value;
}
</SCRIPT>
<FORM method="post" Action="SaveEdit.asp" Name="form1">
<input type="hidden" name="newsid" value="<%=request("newsid")%>">
<INPUT name=upfile onchange=return(OnUpFile()) type=hidden>
<CENTER>
<TABLE width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#336699">
<TR>
<TD height=30 colspan=2 background="../images/pics/tile_sub.gif"><b><font color="#FFFFFF">添加新聞</font></b></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD width="17%">新聞標題:</TD>
<TD width="60%">
<input type="text" name="title" size="52" value="<%=rs("title")%>"><font color=#ff6600> *</font></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>新聞分類:</td>
<TD>
<select name="typeid">
<%
set rstype=server.createobject("adodb.recordset")
sqltype="select * from newstype"
rstype.open sqltype,conn,1,1
do while not rstype.eof
if rs("typeid")=rstype("typeid") then
sel="selected"
else
sel=""
end if
response.write "<option " & sel & " value='"+CStr(rstype("typeID"))+"' name=typeid>"+rstype("type")+"</option>"+chr(13)+chr(10)
rstype.movenext
loop
rstype.close
%>
</select>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>推薦新聞:</td>
<TD>
<INPUT <%if rs("tjnews")=1 then response.write "checked"%> name=tj type=radio value="1">推薦 <INPUT <%if rs("tjnews")=0 then response.write "checked"%> name=tj type=radio value="0">不推薦</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>新聞內容:</TD>
<TD><input type="hidden" name="content" value="<%=rs("content")%>"> <IFRAME ID="eWebEditor1" SRC="../eWebEditor/ewebeditor.asp?id=content&style=standard_coolblue" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME><font color=#ff6600> *</font></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>來源:</TD>
<TD>
<input type="text" name="nfrom" size="30" value="<%=rs("nfrom")%>"></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>是否包含圖片:</td>
<TD>
<INPUT <%if rs("ispic")=1 then response.write "checked"%> name=ispic type=radio value="1">包含 <INPUT <%if rs("ispic")=0 then response.write "checked"%> name=ispic type=radio value="0">不包含</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD> 上傳文件: </TD>
<TD>
<iframe name="ad" frameborder=0 width=100% height=30 scrolling=no src=upload.asp></iframe></TD>
</TR>
<TR height="30" >
<TD colspan="2" align="center" background="../images/pics/tile_sub.gif">
<input type="button" value=" 提 交" onclick="check()">
<input type="button" name="Submit2" value=" 重 執">
</TR>
</TABLE>
</form>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -