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

📄 cf.asp

📁 轩圆学生信息管理系统 081029修正了成绩数据浏览时查看单个学生成绩时总分排名显示表格问题。 //===============================================
💻 ASP
字号:
<!--#include file="Inc/Check.asp"-->
<!--#include file="Inc/oConn.asp"-->
<!--#include file="Inc/Public.asp"-->
<!--#include file="Inc/Info.asp"-->
<%
Server.ScriptTimeOut = 600
On Error Resume Next 
Const CFFile = "inc/config.asp"
Call CheckAdmin(",1,",","&Session("JB")&",")
Dim lg
lg = RQuery("action")
If lg&""<>"" Then
	lg = UCase(lg)
	If lg = "DC" Then
		Call DC()
	End If 
Else
	Call mainFace()
End If 
If Err Then
	Call ShowErrs()
End If 

Sub mainFace()
	Call PHead("系统设置")
	Print "<div style='width:660px' class='lface'>"
	Print "<div class='thetitle'>系统设置</div>"
	Print "<hr size='1' color='#b8b8b8'/>"
	Print "<form name=""form1"" method=""post"" action=""?action=DC"" onsubmit=""return toDC();"">"
	Print "<textarea name=""f"" rows=""16"" cols=""100%"">"&ReadAllLocalFile(CFFile)&"</textarea>"	
	Print "<br /> <input id='btn' type='submit' value='保存设置'>"
	Print " <span style=""color:red;font-weight:bold"">请按说明修改等号后面引号中间的内容,多个项目之间用英文逗号隔开,其他内容不要修改。</span>"
	Print "</form>"
	Print "<hr size='1' color='#b8b8b8' />"
	Print "<div align='left' class='footcopy'>&copy;2007 XMSky</div>"
	Print "</div>"
	%>
	<script language="JavaScript">
	<!--
	function toDC()
	{
		if (confirm('你确认要进行系统设置吗?\n\n警告:请确认设置的数据是否正确,错误的设置将导致系统无法运行!!'))
		{
			w();
			document.all.btn.value="正在保存设置...";
			document.all.btn.disabled=true;
			return true;
		}
		else
		{
			document.all.btn.value="你已取消系统设置操作";
			document.all.btn.disabled=true;
			return false;
		}
	}
	//-->
	</script>
	<%
	Call PFoot()
End Sub 

Sub DC()
	Dim f
	f = Request.Form("f")
	f = "<%"&f&"%"&">"
	Call WriteLocalFile(CFFile,f)
	Call PHead("系统设置")
	Print "<div class='lface'>"
	Print "<div class='thetitle'>系统设置成功</div>"
	Print "<hr size='1' color='#b8b8b8'/>"
	Print "<ol>系统信息:"
	Print "<li>系统设置完毕..."
	Print "</ol>"
	Print "<div align='left' class='footcopy'>&copy;2007 XMSky</div>"
	Print "</div>"
	Call SaveLog(Session("XM"),"系统设置","系统设置成功")
	Call HWaiting()
	Call PFoot()
End Sub

'//===================
'将内容写入本地文件
'//===================
Sub WriteLocalFile(vFileName,strFile)
	Dim Fso, MyFile
	Set Fso = CreateObject("Scripting.FileSystemObject")
	Set MyFile = fso.CreateTextFile(Server.MapPath(vFileName),True)
	MyFile.Write strFile
	Set MyFile = Nothing
	Set Fso = Nothing
End Sub
'//===================
'读取本地文件内容
'//===================
Function ReadAllLocalFile(strFilePath)
	If strFilePath="" Or IsNull(strFilePath) Then Exit Function
	Const ForReading = 1, ForWriting = 2
	Dim fso, fBody, fPath
	Set fso = CreateObject("Scripting.FileSystemObject")
	Set fPath = fso.GetFile(Server.MapPath(strFilePath))
	Set fBody = fPath.OpenAsTextStream(ForReading, -2)
	ReadAllLocalFile = Replace(Replace(fBody.ReadAll,"<%",""),"%"&">","")
	Set fso = Nothing
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -