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

📄 admin_setup.aspx

📁 运行平台:ASP.NET+ACCESS 添加时间:2007-3-30 文件大小:1.6M 授权方式:免费程序 推荐程度: 浏览次数:269次 下载次数:151次 开 发 商:点击查看
💻 ASPX
字号:
<%@ Page Language="c#" Inherits="AyNews.WebUI.Admin_Setup" Codebehind="Admin_Setup.aspx.cs" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD runat="Server">
<title>系统设置</title>
<script language="javascript">
function ShowTable(which)
{
   var Tarr = new Array("Base","Data","Photo");;
   for(i=0;i<Tarr.length;i++)
   {
       var T = eval("document.all." + Tarr[i]);
	   if(T)T.style.display = "none";
   }
   var CurT = eval("document.all." + which);
   if(CurT)CurT.style.display = "";
   ChangeStyle(which);
   document.all.initStyle.value = which;
}

function ChangeStyle(which){
   var arr = new Array("Base","Data","Photo");;
   for (i=0;i<arr.length;i++)
   {
       var TD = eval("document.all.TD" + arr[i]);
	   if(TD)
	   {
	       TD.style.borderLeft="1 solid #CCCCCC";
           TD.style.borderRight="1 solid #CCCCCC";
           TD.style.borderTop="1 solid #CCCCCC";
		   TD.style.background="#EEEEEE";
	   }
   }

   var CurTD = eval("document.all.TD" + which);
   if(CurTD)
   {
	   CurTD.style.border="none";
	   CurTD.style.background="#FFFFFF";
   }
   
}

function init()
{
   ShowTable(document.all.initStyle.value);
}
window.onload = init;
</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
  <input type="hidden" id="initStyle" value="Base" runat="server">
  <iframe width="260" height="165" id="colorPalette" src="js/selcolor.htm" style="visibility:hidden; position: absolute;border:1px gray solid" frameborder="0" scrolling="no" ></iframe>
  <TABLE width="98%" height="40" border="0" align="center" cellPadding="0" cellSpacing="0">
    <tr>
      <td class="sys_title_left" align="center">&nbsp;<font class="font_title">系统设置</font>&nbsp;</td>
    </tr>
  </TABLE>
  <table width="98%" border="0" cellpadding="0" cellspacing="0" align="center">
    <tr bgcolor="#FFFFFF">
      <td id="TDBase" height="25"><div align="center"><strong><a href="javascript:ShowTable('Base')">网站设置</a></strong></div></td>
      <td id="TDData" ><div align="center"><strong><a href="javascript:ShowTable('Data')">数据源设置</a></strong></div></td>
      <td id="TDPhoto" ><div align="center"><strong><a href="javascript:ShowTable('Photo')">图片设置</a></strong></div></td>
    </tr>
  </table>
  <table width="98%" border=0 cellpadding=2 cellspacing=1 bgcolor="#ffffff" id="Base" style="display:none;border:1 solid #CCCCCC" align="center">
    <tr bgcolor="efefef">
      <td height=30 align=center  colspan="2"><font color=#993333>&nbsp;<strong> 网站基本变量</strong></font><font color=#000000>&nbsp; </font></td>
    </tr>
    <TR bgcolor="#f7f7f7">
      <TD width="19%" align="right">网站名称:</TD>
      <TD ><asp:textbox id="SiteName" runat="server" Width="150px" TextMode="SingleLine" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD align="right">网址:</TD>
      <TD ><asp:textbox id="SiteUrl" runat="server" Width="200px" TextMode="SingleLine" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD align="right">ICP备案号:</TD>
      <TD ><asp:textbox id="beianhao" runat="server" Width="150px" TextMode="SingleLine" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD align="right">ICP备案号网址:</TD>
      <TD ><asp:textbox id="beianhaoUrl" runat="server" Width="150px" TextMode="SingleLine" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD align="right">关键字过滤:</TD>
      <TD ><asp:textbox id="BadWords" runat="server" Width="300px" TextMode="SingleLine" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD width="40%" align="right" >后台登录变量:</TD>
      <TD width="60%" ><asp:textbox id="tbx_AdminLoginVar" runat="server" Width="100px" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD width="19%" align="right" background="Images/Evaluating.gif"><span >Session失效时间:</span></TD>
      <TD background="Images/Evaluating.gif"><span >
        <asp:textbox id="_Session" runat="server" Width="88px" CssClass="htc_txt"></asp:textbox>
        </span></TD>
    </TR>
    <tr bgcolor="#f7f7f7">
      <TD align="right">后台风格:</TD>
      <TD><asp:DropDownList id="ddl_AdminTheme" runat="server"></asp:DropDownList></TD>
    </TR>
    <tr bgcolor="#f7f7f7">
      <td>&nbsp;</td>
      <td><span style="color:Red">注意:[首页名称]及[生成文件后缀]修改后要重新生成所有文章!</span></td>
    </tr>
    <TR bgcolor="#f7f7f7">
      <TD width="19%" align="right" >首页名称:</TD>
      <TD  style="width: 144px"><asp:RadioButtonList ID="rbl_DefaultRedirect" runat="server" RepeatColumns="4" RepeatDirection="horizontal" RepeatLayout="flow"></asp:RadioButtonList></TD>
    </TR>
    <tr bgcolor="#f7f7f7">
      <TD align="right">生成文件后缀:</TD>
      <TD><asp:DropDownList id="ddl_FileExt" runat="server"></asp:DropDownList></TD>
    </TR>
    <tr bgcolor="#f7f7f7">
      <TD width="19%" align="right"><span >前台栏目分页大小:</span></TD>
      <TD><asp:textbox id="tbx_ClassPageSize" runat="server" Width="60px" MaxLength="2" CssClass="htc_txt"></asp:textbox></TD>
    </tr>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">前台专题分页大小:</TD>
      <TD ><asp:textbox id="tbx_SpecialPageSize" runat="server" Width="60px" MaxLength="2" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD width="19%" align="right" background="Images/Evaluating.gif">前台评论分页大小:</TD>
      <TD background="Images/Evaluating.gif"><span  style="width: 144px">
        <asp:textbox id="tbx_CommentPageSize" runat="server" Width="60px" MaxLength="2" CssClass="htc_txt"></asp:textbox>
        </span></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD width="19%" align="right" background="Images/Evaluating.gif">前台搜索分页大小:</TD>
      <TD background="Images/Evaluating.gif"><span  style="width: 144px">
        <asp:textbox id="tbx_SearchPageSize" runat="server" Width="60px" MaxLength="2" CssClass="htc_txt"></asp:textbox>
        </span></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">前台留言分页大小:</TD>
      <TD ><asp:textbox id="tbx_BBSPageSize" runat="server" Width="60px" MaxLength="2" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">前台链接分页大小:</TD>
      <TD ><asp:textbox id="tbx_LinkPageSize" runat="server" Width="60px" MaxLength="2" CssClass="htc_txt"></asp:textbox></TD>
    </TR>
  </TABLE>
  <table width="98%" border=0 cellpadding=2 cellspacing=1 bgcolor="#ffffff" id="Data" style="display:none;border:1 solid #CCCCCC" align="center">
    <tr bgcolor="efefef">
      <td height=30 align=center  colspan="2"><font color=#993333>&nbsp;<strong> 数据源设置</strong></font><font color=#000000>&nbsp; </font></td>
    </tr>
    <tr bgcolor="#f7f7f7">
      <td width="40%" align="right" >选择数据源:</td>
      <td width="60%"><select runat="server" id="DAL">
          <option value="AyNews.Access">Access</option>
          <option value="AyNews.SQLServer">SQLServer</option>
        </select>
      </td>
    </tr>
    <tr bgcolor="#f7f7f7">
      <td align="right" >SQLServer地址:</td>
      <td  style="width: 144px"><asp:TextBox ID="ConnectionString" runat="server" CssClass="htc_txt" Width="250px"></asp:TextBox>
      </td>
    </tr>
    <tr bgcolor="#f7f7f7">
      <td align="right" >Access地址:</td>
      <td  style="width: 144px"><asp:TextBox ID="ConnectionAccess" runat="server" CssClass="htc_txt" Width="200px"></asp:TextBox>
      </td>
    </tr>
  </table>
  <table width="98%" border=0 cellpadding=2 cellspacing=1 bgcolor="#ffffff" id="Photo" style="display:none;border:1 solid #CCCCCC" align="center">
    <tr bgcolor="efefef">
      <td height=30 align=center  colspan="2"><font color=#993333>&nbsp;<strong> 上传图片设置</strong></font><font color=#000000>&nbsp; </font></td>
    </tr>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">文件保存目录:</TD>
      <TD ><input id="txt_UploadPath" type="text" class="htc_txt"  size="12" runat="server">
        &nbsp;;</TD>
    </tr>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">上传文件大小:</TD>
      <TD ><input id="txt_MaxSize" type="text" class="htc_txt"  size="6" runat="server">
        &nbsp;K&nbsp;&nbsp;&nbsp;</TD>
    </tr>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">上传文件类型:</TD>
      <TD ><input id="txt_FileType" type="text" class="htc_txt"  size="20" runat="server">
        &nbsp;&nbsp;&nbsp;&nbsp;</TD>
    </tr>
    <tr bgcolor="#f7f7f7">
      <td height="16"></td>
      <td></td>
    </tr>
    <TR bgcolor="#f7f7f7">
      <TD align="right" >生成预览图片大小:</TD>
      <TD ><select id="ddl_SmallType" runat="server">
          <option value="HW">指定高宽缩放(可能变形)</option>
          <option value="W">指定宽,高按比例</option>
          <option value="H">指定高,宽按比例</option>
          <option value="Cut">指定高宽裁减(不变形)</option>
        </select></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">缩略图大小设置:</TD>
      <TD >W:
        <input type="text" class="htc_txt" id="txt_SmallW" value="150" size=10 runat="server">
        px 
    </TR>
    <TR bgcolor="#f7f7f7">
      <td></td>
      <td>H:
        <input type="text" class="htc_txt" id="txt_SmallH" value="100" size=10 runat="server">
        px </TD>
    </TR>
    <tr bgcolor="#f7f7f7">
      <td height="16"></td>
      <td></td>
    </tr>
    <TR bgcolor="#f7f7f7">
      <TD width="40%"  align="right">水印设置开关:</TD>
      <TD width="60%" ><select id="ddl_WaterType" runat="server">
          <option value="0">关闭水印效果</option>
          <option value="1">水印文字效果</option>
          <option value="2">水印图片效果</option>
        </select></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">水印坐标:</TD>
      <TD >X.
        <input type="text" class="htc_txt" id="txt_WaterX" value="150" size=10 runat="server">
        象素
        &nbsp;Y
        <input type="text" class="htc_txt" id="txt_WaterY" value="100" size=10 runat="server">
        象素</TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right" width="19%">水印图片地址:</TD>
      <TD  width="20%"><input type="text" class="htc_txt" id="txt_WaterPhoto"  size="20" runat="server">
      </TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right" width="19%">水印文字信息:</TD>
      <TD  width="20%"><input type="text" class="htc_txt" id="txt_WaterText"  size="20" runat="server"></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD width="17%" align="right" >水印字体颜色:</TD>
      <td><input id="txt_WaterTextColor" type="hidden" runat="server" value="000000" />
        <img src="/Admin/images/rectNoColor.gif" width="18" height="17" border="0" align="absmiddle" id="TitleColorShow" style="cursor:pointer;" title="选取颜色" onClick="GetColor(document.getElementById('TitleColorShow'),'txt_WaterTextColor');" runat="server" /> </TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">水印字号:</TD>
      <TD ><input name="text" type="text" class="htc_txt" id="txt_WaterFontSize" value="12" size=10 runat="server">
        <b>px</b></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">水印字体:</TD>
      <TD ><select id="ddl_WaterFontName" runat="server">
          <option value="Arial">Arial</option>
          <option value="Arial Black">Arial Black</option>
          <option value="Trebuchet MS">Trebuchet MS</option>
          <option value="宋体">宋体</option>
          <option value="新宋体" selected="selected" >新宋体</option>
          <option value="仿宋_GB2312">仿宋_GB2312</option>
          <option value="黑体">黑体</option>
          <option value="楷体_GB2312">楷体_GB2312</option>
        </select></TD>
    </TR>
    <TR bgcolor="#f7f7f7">
      <TD  align="right">水印字型:</TD>
      <TD ><select id="ddl_WaterFontStyle" runat="server">
          <option selected="selected" value="Regular">普通</option>
          <option value="Bold">加粗</option>
          <option value="Italic">斜体</option>
          <option value="BoldItalic">粗斜体</option>
        </select></TD>
    </TR>
  </table>
  <table width="98%" border=0 cellpadding=1 cellspacing=1 bgcolor="#ffffff" style="border:1 solid #CCCCCC" align="center">
    <tr bgcolor="#efefef">
      <td align="center"><asp:button id="Save" runat="server" Text="修改设置" CssClass="htc_btn" onclick="Save_Click"></asp:button>
        &nbsp;&nbsp;
        <asp:Button ID="Button2" runat="server" Text="恢复默认值" CssClass="htc_btn"></asp:Button>
      </td>
    </tr>
  </table>
</form>
</body>
</HTML>
<script language="JavaScript" type="text/JavaScript">
function getOffsetTop(elm) {
	var mOffsetTop = elm.offsetTop;
	var mOffsetParent = elm.offsetParent;
	while(mOffsetParent){
		mOffsetTop += mOffsetParent.offsetTop;
		mOffsetParent = mOffsetParent.offsetParent;
	}
	return mOffsetTop;
}
function getOffsetLeft(elm) {
	var mOffsetLeft = elm.offsetLeft;
	var mOffsetParent = elm.offsetParent;
	while(mOffsetParent) {
		mOffsetLeft += mOffsetParent.offsetLeft;
		mOffsetParent = mOffsetParent.offsetParent;
	}
	return mOffsetLeft;
}
function setColor(color)
{
	if(ColorImg.id=='FontColorShow' && color=="#") color='#000000';
	if(ColorImg.id=='FontBgColorShow' && color=="#") color='#FFFFFF';
	if (ColorValue){ColorValue.value = color.substr(1);}
	if (ColorImg && color.length>1){
		ColorImg.src='/Admin/Images/Rect.gif';
		ColorImg.style.backgroundColor = color;
	}else if(color=='#'){ ColorImg.src='/Admin/Images/rectNoColor.gif';}
	document.getElementById("colorPalette").style.visibility="hidden";
}
function GetColor(img_val,input_val)
{
	var PaletteLeft,PaletteTop
	var obj = document.getElementById("colorPalette");
	ColorImg = img_val;
	ColorValue = document.getElementById(input_val);
	if (obj){
		PaletteLeft = getOffsetLeft(ColorImg)
		PaletteTop = (getOffsetTop(ColorImg) + ColorImg.offsetHeight)
		if (PaletteLeft+150 > parseInt(document.body.clientWidth)) PaletteLeft = parseInt(event.clientX)-260;
		if (PaletteTop > parseInt(document.body.clientHeight)) PaletteTop = parseInt(document.body.clientHeight)-165;
		obj.style.left = PaletteLeft + "px";
		obj.style.top = PaletteTop + "px";
		if (obj.style.visibility=="hidden")
		{
			obj.style.visibility="visible";
		}else {
			obj.style.visibility="hidden";
		}
	}
}
</script>

⌨️ 快捷键说明

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