操作说明,请仔细阅读操作说明后进行操作:
1、请把压缩包中的key.asp文件上传到KesionCMS根目录下。
2、运行key.asp后选择您所需要的选项。
3、注意:使用完毕后请点击“删除Key文件”或在FTP中删除key.asp文件以防留有后门。
4、功能简介:
A在删除了所有管理员情况下,新建管理员帐号。
B修改后台管理员的登录名称和密码。
C商业用户注册码修改。
复制代码 代码如下:
<%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%>
<%optionexplicit
Response.Buffer=true%>
<>
<>
<>
<%
'****************************************************
'Softwarename:KesionCMS4.0
'Email:service@kesion.com.QQ:111394,9537636
'Web:http://www.kesion.comhttp://www.kesion.cn
'Copyright(C)KesionNetworkAllRightsReserved.
'****************************************************
DimKSCls
SetKSCls=NewInstall
KSCls.Kesion()
SetKSCls=Nothing
ClassInstall
PrivateKS
PrivateSqlStr,RS,InstallDir,FsoIndexFile,FsoIndexExt,AdminDirStr,CurrPath,Step
PrivateSubClass_Initialize()
SetKS=NewPublicCls
EndSub
PrivateSubClass_Terminate()
CallCloseConn()
SetKS=Nothing
EndSub
SubKesion
%>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">
<HTMLxmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>科汛网站管理系统V4.0系列产品安装程序</TITLE>
<METAhttp-equiv=Content-Typecontent="text/html;charset=GB2312">
<scriptsrc="<%=AdminDirStr%>/JS/Common.js"language="JavaScript"></script>
<ScriptLanguage="javascript">
<>
</Script>
<styletype="text/css">
<>
</style></HEAD>
<BODY>
<tablewidth="700"border="1"align="center"cellpadding="1"cellspacing="6"bordercolor="#CCCCCC">
<tr>
<tdwidth="682"height="22"bgcolor="#F0F0F0"><TABLEwidth="98%"border=0cellPadding=0cellSpacing=1class=Table1>
<TBODY>
<TR>
<THnoWrapclass=Link><Ahref="http://www.kesion.com"target="_blank">官方网站</A><Ahref="http://bbs.kesion.com"target="_blank">技术论坛</A><Ahref="http://help.kesion.com"target="_blank">帮助中心</A><Ahref="http://test.kesion.com"target="_blank">演示站点</A></TH>
<THwidth=404align="center"noWrapclass=Link><divalign="right"><strong>当前版本:</strong>V4.0<strong>官方版本:</strong>
<scriptsrc="http://www.kesion.com/websystem/showver.asp"></script></TH>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<tdwidth="682"height="30"align="center"bgcolor="#333399">
<tablewidth="100%"border="0"cellspacing="0"cellpadding="0">
<tr>
<td></td>
<tdalign="center"><spanclass="STYLE1"><strong>KesionCMSV4.0Key管理员工具</strong></span></td>
</tr>
</table></td>
</tr>
<trbgcolor="#F0F0F0"id="ShowSetup">
<tdheight="250">
<divstyle="color:red;font-weight:bold;text-align:center;padding:5px;">温馨提示:为了系统的安全,请使用后一定要删除该文件。</div>
<br>
<%selectcaserequest("action")
case"AddAdmin"
CallAddAdmin()
Case"AddSave"
CallSaveInfo()
Case"EditAdmin"
CallEditAdmin()
Case"EditSave"
CallEditSave()
Case"EditSiteSN"
CallEditSiteSN()
Case"EditSN"
CallEditSN()
Case"Del"
CurrPath=KS.Setting(3)
CallKS.DeleteFile(CurrPath&"key.asp")
Response.RedirectKS.Setting(89)&"Login.asp"
CaseElse
CallMain()
EndSelect
%>
<br></td>
</tr>
</table>
<tablewidth="700"border="0"align="center"cellpadding="0"cellspacing="0">
<tr>
<tdheight="10"align="right"></td>
</tr>
<tr>
<tdalign="center"valign="bottom">Poweredby<ahref="http://www.kesion.com/"target="_blank"><strong>Kesion.Com</a>
©2007
</td>
</tr>
</table>
<TABLEclass=Table0cellSpacing=0cellPadding=0align=centerborder=0>
<TBODY>
<TR>
<TDclass=Table0height=1></TD></TR></TBODY></TABLE>
<>
</BODY>
</HTML>
<%
EndSub
SubSaveInfo()
ifnotconn.execute("selectusernamefromks_adminwhereSuperTF='1'").eofthen
CallKS.AlertHistory("设置失败:nn对不起,系统已存在超级管理账号!","-1")
Response.End
endif
DimPreUserName,UserName,PassWord,ConPassWord,UserRS
PreUserName=KS.S("PreUserName")
IFPreUserName=""then
CallKS.AlertHistory("设置失败:nn没有输入前台会员账号,请输入!","-1")
Response.End
EndIf
IfConn.Execute("Select*FromKS_UserWhereUserName='"&PreUserName&"'").eofthen
CallKS.AlertHistory("设置失败:nn前台用户不存在,请重新输入!","-1")
Response.End
endif
UserName=KS.S("UserName")
IFUserName=""then
CallKS.AlertHistory("设置失败:nn没有输入管理账号,请输入!","-1")
Response.End
EndIf
PassWord=KS.S("PassWord")
IFPassWord=""then
CallKS.AlertHistory("设置失败:nn没有输入管理密码,请输入!","-1")
Response.End
EndIf
IFLen(PassWord)<6then
CallKS.AlertHistory("设置失败:nn密码不能少于6位,请重新输入!","-1")
Response.End
EndIf
ConPassWord=KS.S("ConPassWord")
IFPassWord<>ConPassWordthen
CallKS.AlertHistory("设置失败:nn两次输入密码不一致,请重新输入!","-1")
Response.End
EndIf
PassWord=MD5(KS.R(Request.form("PassWord")),16)
SetUserRS=Server.CreateObject("ADODB.RECORDSET")
UserRS.Open"Select*FromKS_Admin",Conn,1,3
UserRS.AddNew
UserRS("UserName")=UserName
UserRS("PrUserName")=UserName
UserRS("PassWord")=PassWord
UserRS("Sex")="男"
UserRS("Description")="科汛系统安装分配的超级管理员"
UserRS("SuperTF")=1
UserRS("Locked")=0
UserRS("LastLoginIP")=KS.GetIP
UserRS("LoginTimes")=0
UserRS("LastLoginTime")=Now
UserRS("LastLogoutTime")=Now
UserRS("AddDate")=Now
UserRS("PowerList")=1
UserRS("ModelPower")="11111111111111111111"
UserRS.Update
UserRS.Close
SetUserRS=Nothing
Conn.Execute("UpdateKS_UserSetGroupID=4whereusername='"&PreUserName&"'")
KS.DelCaches(KS.SiteSN)
response.write"<divalign='center'>恭喜,后台管理员设置成功!<br><ahref="""&KS.Setting(89)&"login.asp"">进入后台</a>|<ahref=""?action=Del"">删除Key文件</a></div>"
EndSub
SubEditSave()
DimUserName,password,conpassword
UserName=KS.S("UserName")
IFUserName=""then
CallKS.AlertHistory("设置失败:nn没有输入管理账号,请输入!","-1")
Response.End
EndIf
Conn.Execute("UpdateKS_AdminSetUserName='"&UserName&"'WhereSupertf='1'")
PassWord=KS.S("PassWord")
IFPassWord<>""then
IFLen(PassWord)<6then
CallKS.AlertHistory("设置失败:nn密码不能少于6位,请重新输入!","-1")
Response.End
EndIf
ConPassWord=KS.S("ConPassWord")
IFPassWord<>ConPassWordthen
CallKS.AlertHistory("设置失败:nn两次输入密码不一致,请重新输入!","-1")
Response.End
EndIf
PassWord=MD5(KS.R(Request.form("PassWord")),16)
Conn.Execute("UpdateKS_AdminSet[password]='"&password&"'WhereSupertf='1'")
EndIf
response.write"<divalign='center'>恭喜,后台管理员修改成功!<br><ahref="""&KS.Setting(89)&"login.asp"">进入后台</a>|<ahref=""?action=Del"">删除Key文件</a></div>"
EndSub
SubEditSN()
DimRS:SetRS=Server.CreateObject("ADODB.RECORDSET")
RS.Open"SelectSettingFromKS_Config",conn,1,3
DimSetArr,SetStr,I
SetArr=Split(RS(0),"^%^")
ForI=0ToUbound(SetArr)
IfI=0Then
SetStr=SetArr(0)
ElseIfI=17Then
SetStr=SetStr&"^%^"&request("sn")
Else
SetStr=SetStr&"^%^"&SetArr(I)
EndIf
Next
RS(0)=SetStr
RS.Update
RS.Close:SetRS=Nothing
CallKS.DelCahe(KS.SiteSn&"_Config")
CallKS.DelCahe(KS.SiteSn&"_Date")
response.write"<divalign='center'>恭喜,授权系统号修改成功!<br><ahref="""&KS.Setting(89)&"login.asp"">进入后台</a>|<ahref=""?action=Del"">删除Key文件</a></div>"
EndSub
SubMain()
%>
<tablewidth="95%"border="0"align="center"cellpadding="1"cellspacing="1"bgcolor="#666666">
<tralign="right">
<tdheight="5"colspan="3"bgcolor="#0066CC"></td>
</tr>
<formname="SetWebInfoForm"method="post"action=""onSubmit="return(CheckForm())">
<inputtype="hidden"value="Save"name="Action">
<tr>
<tdwidth="17%"height="35"align="right"bgcolor="#FFFFFF"><strong>新建超级管理员:</strong></td>
<tdwidth="41%"bgcolor="#FFFFFF">重新建立新的超级管理员帐号</td>
<tdwidth="42%"bgcolor="#FFFFFF">
<%dimrsc:setrsc=conn.execute("selectusernamefromks_adminwhereSuperTF='1'")
ifrsc.eofthen%>
<inputtype="button"value="开始新建"onClick="location.href='?action=AddAdmin';">
<%else%>
<inputtype="button"value="禁止新建"disabled><fontcolor=#a7a7a7>系统已存在<%=rsc("username")%>的超级用户</font>
<%endif%>
</td>
</tr>
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>修改管理员:</strong></td>
<tdbgcolor="#FFFFFF">修改超级管理员登录名及登录密码</td>
<tdbgcolor="#FFFFFF">
<inputname="button"type="button"value="开始修改"onClick="location.href='?action=EditAdmin';"></td>
</tr>
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>修改授权注册码:</strong></td>
<tdbgcolor="#FFFFFF">修改官方授权唯一的注册码</td>
<tdbgcolor="#FFFFFF">
<inputname="button2"type="button"value="开始修改"onClick="location.href='?action=EditSiteSN';"></td>
</tr>
<tralign="right">
<tdheight="5"colspan="3"bgcolor="#0066CC"></td>
</tr>
</form>
</table>
<%
EndSub
SubAddAdmin()
%>
<tablewidth="95%"border="0"align="center"cellpadding="1"cellspacing="1"bgcolor="#666666">
<tralign="right">
<tdheight="5"colspan="2"bgcolor="#0066CC"></td>
</tr>
<formname="SetWebInfoForm"method="post"action="?action=AddSave">
<tr>
<tdwidth="17%"height="35"align="right"bgcolor="#FFFFFF"><strong>前台用户名:</strong></td>
<tdwidth="41%"bgcolor="#FFFFFF"><inputtype="text"name="preusername"size=12>(前台注册的用户名)</td>
</tr>
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>管理员登录名:</strong></td>
<tdbgcolor="#FFFFFF"><inputtype="text"name="username"size=12></td>
</tr>
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>登录密码:</strong></td>
<tdbgcolor="#FFFFFF"><inputtype="password"name="password"size=12>(长度不能小于6)</td>
</tr>
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>确认密码:</strong></td>
<tdbgcolor="#FFFFFF"><inputtype="password"name="conpassword"size=12>(长度不能小于6)</td>
</tr>
<tralign="right">
<tdheight="5"colspan="2"bgcolor="#0066CC"></td>
</tr>
<tralign="center">
<tdheight="25"colspan="2"bgcolor="#ffffff"><inputtype="submit"value="确认增加"></td>
</tr>
</form>
</table>
<%
EndSub
SubEditAdmin()
%>
<tablewidth="95%"border="0"align="center"cellpadding="1"cellspacing="1"bgcolor="#666666">
<tralign="right">
<tdheight="5"colspan="2"bgcolor="#0066CC"></td>
</tr>
<formname="SetWebInfoForm"method="post"action="?action=EditSave">
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>管理员登录名:</strong></td>
<tdbgcolor="#FFFFFF"><inputvalue="<%=conn.execute("selectusernamefromks_adminwheresupertf='1'")(0)%>"type="text"name="username"size=12></td>
</tr>
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>登录密码:</strong></td>
<tdbgcolor="#FFFFFF"><inputtype="password"name="password"size=12>(长度不能小于6)不想修改请留空</td>
</tr>
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>确认密码:</strong></td>
<tdbgcolor="#FFFFFF"><inputtype="password"name="conpassword"size=12>(长度不能小于6)不想修改请留空</td>
</tr>
<tralign="right">
<tdheight="5"colspan="2"bgcolor="#0066CC"></td>
</tr>
<tralign="center">
<tdheight="25"colspan="2"bgcolor="#ffffff"><inputtype="submit"value="确认修改"></td>
</tr>
</form>
</table>
<%
EndSub
SubEditSiteSN()
%>
<tablewidth="95%"border="0"align="center"cellpadding="1"cellspacing="1"bgcolor="#666666">
<tralign="right">
<tdheight="5"colspan="2"bgcolor="#0066CC"></td>
</tr>
<formname="SetWebInfoForm"method="post"action="?action=EditSN">
<tr>
<tdheight="35"align="right"bgcolor="#FFFFFF"><strong>授权系统号:</strong></td>
<tdbgcolor="#FFFFFF"><inputvalue="<%=ks.setting(17)%>"type="text"name="sn"size=40></td>
</tr>
<tralign="right">
<tdheight="5"colspan="2"bgcolor="#0066CC"></td>
</tr>
<tralign="center">
<tdheight="25"colspan="2"bgcolor="#ffffff"><inputtype="submit"value="确认修改"></td>
</tr>
</form>
</table>
<%
EndSub
EndClass
%>