www.gusucode.com > 站长俱乐部新闻发布系统精简版 1.01源码程序 > admin/admin_scripts.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% option explicit Response.Buffer = true 'On Error Resume Next Dim objError %> <% Session.Timeout = 30 %> <!--#include file="connections/oConn_db.asp" --> <html> <head> <title><%= Site_name %></title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link href="css/admin_import.css" rel="stylesheet" type="text/css" /> <!--#include file="errors/errors.asp" --> <% dim Banner_left, Banner_right Dim FileSystemObject, FileExists 'If MSAccess, verify that the database exists to prevent the server hanging if ((db_STRING <> "") and (strDatabaseType = "msaccess")) then Set FileSystemObject = Server.CreateObject("Scripting.FileSystemObject") If FileSystemObject.FileExists(db_STRING) Then FileExists = True Else FileExists = False DataErrorNoDatabase() End If Set FileSystemObject = Nothing end if %> <% dim Heading_left_image, Heading_right_image %> <!--#include file="queries/query.asp" --> <% If errorFound <> true then %> <!--#include file="admin_login_check.asp" --> <!--#include file="admin_lang.asp" --> <!--#include file="skins/styles.asp" --> <% if (Session("Color_Scheme")="Skin" or Session("Color_Scheme")="Acidcat_2") then Session("Skin_Content_Font_Size") = Content_Font_Size Session("Skin_Content_Font_Type") = Content_Font_Type Session("Skin_Content_border") = Content_border Session("Skin_Content_bg") = Content_bg Session("Skin_Content_Font_Color") = Content_Font_Color end if 'if skin then load skin banner image dim imageLeft, imageRight if (name="Skin" or name="Acidcat_2") then imageLeft = Heading_left_image imageRight = Heading_right_image else imageLeft = "images/heading_bg_left.gif" imageRight = "images/heading_bg_right.gif" end if %> <!--#include file="admin_heading.asp" --> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //function to take URL and param and submit via form function getMenuItem(myPage,myVal) { menuForm.action = myPage; menuForm.objHidden.value = myVal; menuForm.submit(); } //form validation code function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } //form validation code - edited by Andy function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); if (val) { nm=val.id; if ((val=val.value)!="") { } else if (test.charAt(0) == 'R') errors += ''+nm+'\n'; } } if (errors) alert('Please add the following:\n'+errors); document.MM_returnValue = (errors == ''); } //--> </script> <style type="text/css"> .over { background-color:"#84B6C6"; margin: 5px; padding: 3px; font-family: Arial, Helvetica, sans-serif; font-style: normal; color: #FFFFFF; } .out { background-color:"#6BA6AD"; margin: 5px; padding: 3px; font-family: Arial, Helvetica, sans-serif; font-style: normal; color: #FFFFFF; } .over2 { background-color:"#84B6C6"; } .out2 { background-color:"#6BA6AD"; } /************************************************************************** body settings (admin_scripts.asp) **************************************************************************/ .ac_body { margin: 0px; background-color: <%= Body_bg %>; } /************************************************************************** menu settings (admin_top.asp, admin_bottom.asp) **************************************************************************/ .admin_menu { background-color: <%= Body_bg %>; margin: 0px; } .admin_content_left { background-color: <%= Body_bg %>; } /************************************************************************** banner settings (admin_top.asp) **************************************************************************/ .bannertile { <% if (name="Skin" or name="Acidcat_2") then %> background-image:url(<%= Banner_bg %>); <% else %> background-image:url(../images/banner_<% = Name %>_2.jpg); <% end if %> } /************************************************************************** **************************************************************************/ .admin_intro { background-color: #fff; } .admin_header_left { <% if (name="Skin" or name="Acidcat_2") then %> background-image:url(skins/heading_Skin_2.gif); border-bottom-color: <%= Content_border %>; <% else %> border-bottom-color: #CCCCCC; <% end if %> background-repeat: repeat-x; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #CCCCCC; border-right-color: #CCCCCC; border-left-color: #CCCCCC; } .admin_header_icon { background-color:#fff; <% if (name="Skin" or name="Acidcat_2") then %> background-image:url(skins/heading_Skin_2.gif); border-bottom-color: <%= Content_border %>; <% else %> background-image:url(images/heading_bg.gif); border-bottom-color: #CCCCCC; <% end if %> background-repeat: repeat-x; padding-left: 5px; padding-right: 0px; padding-top: 3px; padding-bottom: 3px; font-family: Verdana; font-weight: normal; font-size: 13px; color: #999; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #CCCCCC; border-right-color: #CCCCCC; border-left-color: #CCCCCC; width: 1%; } .admin_header_text { background-color:#fff; <% if (name="Skin" or name="Acidcat_2") then %> background-image:url(skins/heading_Skin_2.gif); color:<%= Heading_Font_Color%>; border-bottom-color: <%= Content_border %>; <% else %> background-image:url(images/heading_bg.gif); color: #fff; border-bottom-color: #CCCCCC; <% end if %> background-repeat: repeat-x; padding-left: 5px; padding-right: 1px; padding-top: 3px; padding-bottom: 2px; font-family: Verdana; font-weight: bold; font-size: 15px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #CCCCCC; border-right-color: #CCCCCC; border-left-color: #CCCCCC; vertical-align: middle; } .admin_header_text a:link, .admin_header_text a:visited { background-repeat: repeat-x; padding-left: 5px; padding-right: 1px; padding-top: 3px; padding-bottom: 2px; font-family: Verdana; font-weight: bold; font-size: 15px; <% if (name="Skin" or name="Acidcat_2") then %> color:<%= Heading_Font_Color%>; <% else %> color: #fff; <% end if %> border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #CCCCCC; border-right-color: #CCCCCC; border-bottom-color: #CCCCCC; border-left-color: #CCCCCC; vertical-align: middle; text-decoration:none; } .admin_header_spacer { background-color:#fff; <% if (name="Skin" or name="Acidcat_2") then %> background-image:url(skins/heading_Skin_2.gif); border-bottom-color: <%= Content_border %>; <% else %> background-image:url(images/heading_bg.gif); border-bottom-color: #CCCCCC; <% end if %> background-repeat: repeat-x; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #CCCCCC; border-right-color: #CCCCCC; border-left-color: #CCCCCC; } .menu_header_text { background-color:#fff; <% if (name="Skin" or name="Acidcat_2") then %> background-image:url(skins/heading_Skin_2.gif); color:<%= Heading_Font_Color%>; <% else %> background-image:url(images/heading_bg.gif); color: #fff; <% end if %> background-repeat: repeat-x; padding-left: 5px; padding-right: 1px; padding-top: 3px; padding-bottom: 2px; font-family: Verdana; font-weight: bold; font-size: 15px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #CCCCCC; border-right-color: #CCCCCC; border-bottom-color: #CCCCCC; border-left-color: #CCCCCC; vertical-align: middle; width: 100%; } .menu_header_icon { background-color:#fff; <% if (name="Skin" or name="Acidcat_2") then %> background-image:url(skins/heading_Skin_2.gif); <% else %> background-image:url(images/heading_bg.gif); <% end if %> background-repeat: repeat-x; padding-left: 0px; padding-right: 0px; padding-top: 3px; padding-bottom: 3px; border: #0033CC; font-family: Verdana; font-weight: normal; font-size: 13px; color: #999; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #CCCCCC; border-right-color: #CCCCCC; border-bottom-color: #CCCCCC; border-left-color: #CCCCCC; } /************************************************************************** content area view settings (admin_main.asp) **************************************************************************/ .ac_contentarea_view { border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; <% if (name="Skin" or name="Acidcat_2") then %> border-right-color: <%= Content_border %>; border-top-color: <%= Content_border %>; border-bottom-color: <%= Content_border %>; border-left-color: <%= Content_border %>; <% else %> border-right-color: #CCC; border-bottom-color: #CCC; border-left-color: #CCC; <% end if %> background-color: <%= Content_bg %>; color: <%= Content_Font_Color %>; font-family: <%= Content_Font_Type %>; font-size: <%= Content_Font_Size %>; padding:18px; } .ac_contentarea_view td, .ac_contentarea_view p { font-family: <%= Content_Font_Type %>; color: <%= Content_Font_Color %>; font-size: <%= Content_Font_Size %>; background-color: <%= Content_bg %>; } .ac_contentarea_view a:link, .ac_contentarea_view a:visited, .contentarea_view a:active { font-family: <%= Content_Font_Type %>; color: <%= Content_Font_Color %>; font-size: <%= Content_Font_Size %>; background-color: <%= Content_bg %>; } </style> <% dim myNow myNow = Date() %> </head> <body class="ac_body"> <% end if %>