📄 admin.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="common.asp"-->
<!--#include file="md5.asp"-->
<%
if Request("index")="6" then
ID=Cint(request("ID"))
sql="delete * from link where ID="&ID
conn.execute (sql)
response.write "<script>alert(""操作成功!"");document.URL=""admin.asp#5"";</script>"
end if
if request("submit")=" 确定修改 " then
Select case Request("index")
case "1"
Call submit1()
case "2"
Call submit2()
case "3"
Call submit3()
case "4"
Call submit4()
case "5"
Call submit5()
case "6"
Call delete1()
end Select
end if
sub submit1
SiteName=trim(replace(request("SiteName"),"'",""))
SiteURL=trim(replace(request("SiteURL"),"'",""))
MasterName=trim(replace(request("MasterName"),"'",""))
MasterPSW=trim(replace(request("MasterPSW"),"'",""))
ReMasterPSW=trim(replace(request("ReMasterPSW"),"'",""))
Email=trim(replace(request("Email"),"'",""))
if SiteName="" or SiteURL="" or MasterName="" or Email="" then
response.write "<script>alert(""请填写全部信息!"");window.history.back();</script>"
exit sub
end if
if MasterPSW<>"" then
if MasterPSW<>ReMasterPSW then
response.write "<script>alert(""两次输入密码不一致!"");window.history.back();</script>"
exit sub
end if
sql="update setting set SiteName='"&SiteName&"', SiteURL='"&SiteURL&"', MasterName='"&MasterName&"', MasterPSW='"&md5(MasterPSW)&"', Email='"&Email&"'"
else
sql="update setting set SiteName='"&SiteName&"', SiteURL='"&SiteURL&"', MasterName='"&MasterName&"', Email='"&Email&"'"
end if
conn.execute (sql)
response.write "<script>alert(""操作成功!"");document.URL=""admin.asp#1"";</script>"
end sub
sub submit2
PR=int(request("PR"))
Alexa=int(request("Alexa"))
IsConfirm=request("IsConfirm")
IsVerify=request("IsVerify")
IsActivation=request("IsActivation")
SpecialNote=trim(replace(request("SpecialNote"),"'",""))
WordsCount=int(request("WordsCount"))
AltCount=int(request("AltCount"))
LogoWidth=int(request("LogoWidth"))
LogoHeight=int(request("LogoHeight"))
OrderBy=int(request("OrderBy"))
MaxPerPage=int(request("MaxPerPage"))
PageWidth=int(request("PageWidth"))
Unit=trim(replace(request("Unit"),"'",""))
alternation=int(request("alternation"))
if PR="" or Alexa="" or IsConfirm="" or IsVerify="" or SpecialNote="" or WordsCount="" or AltCount="" or LogoWidth="" or LogoHeight="" or OrderBy="" or PageWidth="" or Unit="" or MaxPerPage="" or alternation="" then
response.write "<script>alert(""请填写全部信息!"");window.history.back();</script>"
exit sub
end if
sql="update setting set PR="&PR&", Alexa="&Alexa&", IsConfirm="&IsConfirm&", IsVerify="&IsVerify&", IsActivation="&IsActivation&",SpecialNote='"&SpecialNote&"',WordsCount="&WordsCount&",AltCount="&AltCount&",LogoWidth="&LogoWidth&",LogoHeight="&LogoHeight&",OrderBy="&OrderBy&",MaxPerPage="&MaxPerPage&",PageWidth="&PageWidth&",Unit='"&Unit&"',alternation="&alternation
conn.execute (sql)
response.write "<script>alert(""操作成功!"");document.URL=""admin.asp#2"";</script>"
end sub
sub submit3
L_SiteName=trim(replace(request("L_SiteName"),"'",""))
L_SiteURL=trim(replace(request("L_SiteURL"),"'",""))
L_Logo=trim(replace(request("L_Logo"),"'",""))
L_Alt=trim(replace(request("L_Alt"),"'",""))
if L_SiteName="" or L_SiteURL="" or L_Logo="" or L_Alt="" then
response.write "<script>alert(""请填写全部信息!"");window.history.back();</script>"
exit sub
end if
sql="update setting set L_SiteName='"&L_SiteName&"', L_SiteURL='"&L_SiteURL&"', L_Logo='"&L_Logo&"', L_Alt='"&L_Alt&"'"
conn.execute (sql)
response.write "<script>alert(""操作成功!"");document.URL=""admin.asp#3"";</script>"
end sub
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="css.css" type=text/css rel=stylesheet>
<%
if session("S_username")="" or session("S_userid")="" then
Errmsg = Errmsg+"<li>您没有登录,或登录超时。"
Call ErrList(Errmsg)
response.end
end if
%>
<%
dim SiteName
dim SiteURL
dim MasterName
dim Email
dim PR
dim Alexa
dim IsConfirm
dim IsVerify
dim IsActivation
dim SpecialNote
dim WordsCount
dim AltCount
dim LogoWidth
dim LogoHeight
dim OrderBy
dim MaxPerPage
dim PageWidth
dim Unit
dim alternation
dim L_SiteName
dim L_SiteURL
dim L_Logo
dim L_Alt
sql="select * from setting"
set rs=conn.execute (sql)
if not rs.eof then
SiteName=rs("SiteName")
SiteURL=rs("SiteURL")
MasterName=rs("MasterName")
Email=rs("Email")
PR=rs("PR")
Alexa=rs("Alexa")
IsConfirm=rs("IsConfirm")
IsVerify=rs("IsVerify")
IsActivation=rs("IsActivation")
SpecialNote=rs("SpecialNote")
WordsCount=rs("WordsCount")
AltCount=rs("AltCount")
LogoWidth=rs("LogoWidth")
LogoHeight=rs("LogoHeight")
OrderBy=rs("OrderBy")
MaxPerPage=rs("MaxPerPage")
PageWidth=rs("PageWidth")
Unit=rs("Unit")
alternation=rs("alternation")
L_SiteName=rs("L_SiteName")
L_SiteURL=rs("L_SiteURL")
L_Logo=rs("L_Logo")
L_Alt=rs("L_Alt")
rs.close
end if
%>
<title><%response.write SiteName&"-自助友情链接系统 - Power By TODO.NET.CN"%></title>
<script>
function CloseOpen(Num){
var CurrObj=eval("Tab"+Num);
if (CurrObj.style.display!="none"){
CurrObj.style.display="none";
window.event.srcElement.src="img/collapsed_yes.gif"
} else {
CurrObj.style.display="";
window.event.srcElement.src="img/collapsed_no.gif"
}
}
function submitform(Num){
var CurrForm=eval("form"+Num);
CurrForm.action="admin.asp";
CurrForm.method="post";
CurrForm.submit();
}
function admin_delete(ID){
Num=4;
var CurrForm=eval("form"+Num);
CurrForm.ID.value=ID;
CurrForm.action="admin.asp";
CurrForm.method="post";
CurrForm.submit();
}
function admin(ID){
var width,height,left,top;
width=550;
height=450;
left=screen.Width/2-width/2;
top=(screen.Height-25)/2-height/2;
window.open ('admin2.asp?ID='+ID, '详细设置', 'height='+height+', width='+width+', top='+top+',left='+left+', toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=yes')
}
function changecolor(Obj){
var arr=showModalDialog("selcolor.html",window, "dialogWidth:20em; dialogHeight:16em; status:0; help:0");
if (arr != null){
Obj.style.backgroundColor=arr;
}
}
function GetRadioValue(Obj){
for (var i=0;i<Obj.length;i++){
if(Obj[i].checked==true){
return Obj[i].value;
break;
}
}
}
function GetNeedCode(){
var vDefaultPage=DefaultPage.value;
var vDislayOrder=GetRadioValue(DislayOrder);
var vLogoLine=LogoLine.value;
var vLogoCount=LogoCount.value;
var vWordLine=WordLine.value;
var vWordCount=WordCount.value;
var vTabWidth=TabWidth.value;
var vTabWidthUnit=TabWidthUnit.options[TabWidthUnit.selectedIndex ].value;
var vTabAlign=TabAlign.options[TabAlign.selectedIndex ].value;
var vtTabBGColor=tTabBGColor.style.backgroundColor;
var vsTabBorderColor=sTabBorderColor.style.backgroundColor;
var vTabBGColor=TabBGColor.style.backgroundColor;
var vTabBorderWidth=TabBorderWidth.value;
var vTabBorderColor=TabBorderColor.style.backgroundColor;
var vTabCellSpacing=TabCellSpacing.value;
var vTabCellPadding=TabCellPadding.value;
var vTabCellColor=TabCellColor.style.backgroundColor;
var vTabLinHeight=TabLinHeight.value;
var vTabLinHeightUnit=TabLinHeightUnit.options[TabLinHeightUnit.selectedIndex ].value;
var vNeedCode;
var vPageUrl;
var re;
re=/(?:admin.asp)[#]?\d?/gi;
vPageUrl=window.location.href.replace(re,"linkforward.asp");
var Index;
var Arr1;
var Arr2;
Index=0;
vDefaultPage=vDefaultPage.replace(/\\/,"/");
vPageUrl=vPageUrl.replace(/\\/,"/");
if (vDefaultPage.search(/\w+\.\w+$/)==-1){
if (vDefaultPage.search(/[\/|\\]$/)==-1){
vDefaultPage=vDefaultPage+"/default.asp";
} else {
vDefaultPage=vDefaultPage.replace(/[\/|\\]$/,"/default.asp");
}
}
Arr1=vDefaultPage.split("/");
Arr2=vPageUrl.split("/");
if (Arr1[2]!=Arr2[2]){
alert("调用页面和本系统不在同一个域内,请更正.");
return false;
}
var ResultIndex=0;
var Jump="";
var PageUrl="";
CompareIndex=Arr1.length>=Arr2.length?Arr1.length:Arr2.length;
for (i=0;i<CompareIndex;i++){
if (Arr1[i]!=Arr2[i]){
ResultIndex=i+1;
break;
}
}
for (i=0;i<(Arr1.length-ResultIndex);i++){
Jump=Jump+"../";
}
for (i=ResultIndex-1;i<Arr2.length-1;i++){
Jump=Jump+Arr2[i]+"/";
}
PageUrl=Jump;
Jump=Jump+"linkforward.asp";
vNeedCode='<!--'+'#'+'include file="'+Jump+'"-->\n';
vNeedCode=vNeedCode+"<"+"%\n"+"c"+"all ShowFriendLink(\""+vDislayOrder+"\","+
vLogoLine+","+vLogoCount+","+
vWordLine+","+vWordCount+",\""+
vTabWidth+vTabWidthUnit+
"\",\""+vTabAlign+"\",\""+
vsTabBorderColor+"\",\""+vtTabBGColor+
"\",\""+vTabBGColor+"\","+vTabBorderWidth+
",\""+vTabBorderColor+"\","+
vTabCellSpacing+","+vTabCellPadding+
",\""+vTabCellColor+"\",\""+
vTabLinHeight+vTabLinHeightUnit+"\",\""+PageUrl+"\")\n%>";
NeedCode.value=vNeedCode;
copycode(NeedCode);
}
function copycode(obj){
obj.select();
objcopy=obj.createTextRange();
objcopy.execCommand("Copy");
}
</script>
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="<%=PageWidth&Unit%>">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#698CC3">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -