📄 blogsettings2.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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=utf-8" />
<title>Blog Settings</title>
<link type="text/css" rel="stylesheet" href="../css/HomeStyle.css" />
<script type="text/javascript" language="javascript" src="../js/SimpleCMS.js"></script>
</head>
<body>
<!--#include file="conn.asp"-->
<%
Dim configRS, configSQL, saved
saved = false
Set configRS = Server.CreateObject("ADODB.Recordset")
If Request.QueryString("saveSetting") = "save" Then
'Err.clear
'On Error Resume Next
configSQL = "SELECT * FROM config ORDER BY blog_id DESC"
configRS.open configSQL, conn, 1,3
configRS("blog_name") = Request.Form("blogTitle")
configRS("blog_url") = Request.Form("blogURL")
configRS("blog_bottom") = Request.Form("copyright")
configRS("blog_desc") = Request.Form("tagline")
configRS("blog_shows") = Request.Form("shows")
configRS.update
configRS.close
saved = true
'If Err <> "" Then
' saved = false
' Response.Write("Error: " + Err.number + " - " + Err.Description)
' Err.clear
'End if
End if
%>
<%
Dim blogName, Tagline, blogBottom, blogURL, blogShows
On Error Resume Next
configSQL = "SELECT TOP 1 * FROM config ORDER BY blog_id DESC"
configRS.open configSQL, conn, 1,1
IF configRS.EOF or configRS.BOF then
Response.Write("The configure information is missing.")
Else
blogName = configRS("blog_name")
blogURL = configRS("blog_url")
blogBottom = configRS("blog_bottom")
Tagline = configRS("blog_desc")
blogShows = configRS("blog_shows")
End If
configRS.close
Set configRS = nothing
conn.close
Set conn = nothing
If Err <> "" Then
Response.Write("Error: " + Err.number + " - " + Err.Description)
Err.clear
End if
%>
<%
If saved = true Then
Response.Write("<div style=""color:#FF0000;background:#FDFDDB;"">Setting saved successfully.</div>")
End if
%>
<form id="blogSettingForm" name="blogSettingForm" method="post" action="blogSettings.asp?act=setting&saveSetting=save">
<table>
<tbody>
<tr>
<td><div class="subTitle">Blog Title</div></td>
<td><input type="text" id="blogTitle" name="blogTitle" class="inputBox2" value="<%=blogName%>" /></td>
</tr>
<tr>
<td><div class="subTitle">Tagline</div></td>
<td><input type="text" id="tagline" name="tagline" class="inputBox2" value="<%=Tagline%>" /></td>
</tr>
<tr>
<td><div class="subTitle">Blog URL</div></td>
<td><input type="text" id="blogURL" name="blogURL" class="inputBox2" value="<%=blogURL%>" /></td>
</tr>
<tr>
<td>
<div class="subTitle">Blog pages show at most</div>
</td>
<td><input type="text" name="shows" id="shows" class="inputBox3" value="<%=blogShows%>" /> posts</td>
</tr>
<tr>
<td>
<div class="subTitle">Copyright Info</div>
<div>HTML enabled</div>
</td>
<td><textarea id="copyright" name="copyright" class="smallTextArea"><%=blogBottom%></textarea></td>
</tr>
</tbody>
</table>
<input type="submit" value="Save" name="save" id="save" class="button" />
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -