posts - 3,  comments - 2,  trackbacks - 0
  2008年7月9日
SERV-U的目录文件结构说明
Servudaemon.exe        serv-u的服务程序,主文件
Servudaemon.ini        serv-u的配置文件,记录用户信息,服务器参数
Seruadmin.exe                serv-u管理界面
Servuadmin.ini                serv-u管理界面配置文件
Servutray.exe                serv-u系统托盘程序

        SERV-U配置文件例子
[GLOBAL]
Version=5.0.0.0
RegistrationKey=HsVRCjxHMe/HwDOrrUxqeMuChKO0DdlzUy2tCGgcdMVQDs/7P9EdwjKrowsPF//h4YObIvknAH/FHA95cfEyb3wzQp2v7UfOzCFEFq722
ProcessID=1172
[DOMAINS]
Domain1=0.0.0.0||21|Wizard Generated Domain|1|0|0
[Domain1]
User1=admin|1|0
[USER=admin|1]
Password=hr1589A4F0334FDF55D52F26DFA2D3CCEB
HomeDir=g:\
RelPaths=1
DiskQuota=1|153600000|0
SpeedLimitUp=5120
SpeedLimitDown=5120
TimeOut=600
Maintenance=System
Note1="Administrator User"
Access1=g:\|RWAMELCDP

        SERV-U配置文件分析
配置文件对大小写不敏感
行与行之间允许空行
主要分为2段
[GLOBAL]
全局变量段
主要设置SERV-U的注册号,以及刷新标志
[DOMAINS]
域名配置段
包括在serv-u下添加的所有域信息以及域以下用户列表

#具体分析
[GLOBAL]
Version=5.0.0.0
#无需改动.版本号
RegistrationKey=HsVRCjxHMe/HwDOrrUxqeMuChKO0DdlzUy2tCGgcdMVQDs/7P9EdwjKrowsPF//h4YObIvknAH/FHA95cfEyb3wzQp2v7UfOzCFEFq722
#无需改动.产品注册码
ProcessID=1172
#无需改动.注册号
ReloadSettings=True
#在修改INI文件后需加入此项,这时SERV-U会自动刷新配置文件并生效,此项随之消失.再有修改再次添加

[DOMAINS]
Domain1=0.0.0.0||21|Wizard Generated Domain|1|0|0
#无需改动.新增加的域的IP地址以及说明.
# 格式
# Domain1= IP地址 | 端口 | 域显示名称 | 是否生效 | 是否显示 | 是否删除
#IP地址为0.0.0.0时,SERV-U自动适配系统所分配的IP地址
#当生效位置0,则此域禁用
#当显示位置0,此域不生效并且在控制面板不显示此项
#当删除位置0,则ReloadSettings设置为Ture后,即刷新后,自动删除此域名以下所有内容

[Domain1]
#无需改动.与上面添加的域对应.是此域内的一些公共设置

User1=admin|1|0
#必填.用户列表
# 格式
# User序号 = 用户名 | 是否生效 | 是否删除
#User添加时必须按照序号排列,如果跳号,则跳号的不生效.如果序号重复.则排列在后的无效.
#是否生效置0,则此用户禁用
#是否删除置1,则刷新后删除用户信息,包括配置. 如果置2,则域下所有用户均删除.

[USER=admin|1]
#用户配置段,这些段的排列不分先后
# 格式 [ USER=用户名 | 是否?120
TimeOut=600
Maintenance=System
Note1="Administrator User"
Access1=g:\|RWAMELCDP

        SERV-U配置文件分析
配置文件对大小写不敏感
行与行之间允许空行
主要分为2段
[GLOBAL]
全局变量段
主要设置SERV-U的注册号,以及刷新标志
[DOMAINS]
域名配置段
包括在serv-u下添加的所有域信息以及域以下用户列表

#具体分析
[GLOBAL]
Version=5.0.0.0
#无需改动.版本号
RegistrationKey=HsVRCjxHMe/HwDOrrUxqeMuChKO0DdlzUy2tCGgcdMVQDs/7P9EdwjKrowsPF//h4YObIvknAH/FHA95cfEyb3wzQp2v7UfOzCFEFq722
#无需改动.产品注册码
ProcessID=1172
#无需改动.注册号
ReloadSettings=True
#在修改INI文件后需加入此项,这时SERV-U会自动刷新配置文件并生效,此项随之消失.再有修改再次添加

[DOMAINS]
Domain1=0.0.0.0||21|Wizard Generated Domain|1|0|0
#无需改动.新增加的域的IP地址以及说明.
# 格式
# Domain1= IP地址 | 端口 | 域显示名称 | 是否生效 | 是否显示 | 是否删除
#IP地址为0.0.0.0时,SERV-U自动适配系统所分配的IP地址
#当生效位置0,则此域禁用
#当显示位置0,此域不生效并且在控制面板不显示此项
#当删除位置0,则ReloadSettings设置为Ture后,即刷新后,自动删除此域名以下所有内容

[Domain1]
#无需改动.与上面添加的域对应.是此域内的一些公共设置

User1=admin|1|0
#必填.用户列表
# 格式
# User序号 = 用户名 | 是否生效 | 是否删除
#User添加时必须按照序号排列,如果跳号,则跳号的不生效.如果序号重复.则排列在后的无效.
#是否生效置0,则此用户禁用
#是否删除置1,则刷新后删除用户信息,包括配置. 如果置2,则域下所有用户均删除.

[USER=admin|1]
#用户配置段,这些段的排列不分先后
# 格式 [ USER=用户名 | 是否显示 ]

Password=hr1589A4F0334FDF55D52F26DFA2D3CCEB
#必填.密码.算法为随机产生2个字符,如hr.将hr+明文密码(如test)使用MD5加密,如MD5("hrtest",生成密码后将所有小写字符变为大写
#在最前加上这两个随机字符"hr"+"1589A4F0334FDF55D52F26DFA2D3CCEB",生成最终密码

HomeDir=g:\
#必填.Home目录,用户登陆后的所在目录

RelPaths=1
#无需改动.锁定用户于Home目录,

DiskQuota=1|153600000|0
#必填.磁盘限额
# 格式 DiskQuota = 生效位 | 限制容量 | 实际使用量
#容量均以字节计算

SpeedLimitUp=5120
#可选.上传最大速度.以字节计算

SpeedLimitDown=5120
#可选.下载最大速度.以字节计算

TimeOut=600
#无需改动.超时,以秒计算,默认10分钟

Maintenance=System
#可选.用户权限,默认无此项

Note1="Administrator User"
#可选.注释.默认无此项

Access1=g:\|RWAMELCDP
#必填.对于目录的存储权限,默认权限为RWAMLCDP.权限排列无需按照顺序.
# 格式 Access序号 = 目录 | 权限
#R 读取
#W 写入
#A 附加
#M 修改
#E 执行--由于安全原因,所有帐号均不能开启此权限
#L 目录列表
#C 建立目录
#D 删除目录
#P 将权限继承给子目录

标准的serv-u用户配置段例
[Domain1]
User1=admin|1|0
User2=test|1|0
[USER=admin|1]
Password=hr1589A4F0334FDF55D52F26DFA2D3CCEB
HomeDir=g:\
RelPaths=1
DiskQuota=1|153600000|0
TimeOut=600
Access1=g:\|RWAMLCDP
[USER=test|1]
Password=hr1589A4F0334FDF55D52F26DFA2D3CCEB
HomeDir=f:\test
RelPaths=1
DiskQuota=1|153600000|0
TimeOut=600
Access1=f:\test|RWAMLCDP
posted @ 2008-07-09 10:46 李超(coder) 阅读(16) | 评论 (2)编辑
  2008年7月5日

<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<script language="javascript">
function ConfirmDel()
{
if(confirm("确定要删除此记录吗?"))
 return true;
else
  return false;
}
</script>
<%if Request.QueryString("mark")="southidc" then
dim SQL, Rs, contentID,CurrentPage
CurrentPage = request("Page")
contentID=request("id")

set rs=server.createobject("adodb.recordset")
sqltext="delete from Aboutus where Id="& contentID
rs.open sqltext,conn,3,3
set rs=nothing
conn.close
response.redirect "AdminAboutus.asp"
end if
%>
<%

set rs=server.createobject("adodb.recordset")
sqltext="select * from Aboutus order by id desc"
rs.open sqltext,conn,1,1

dim MaxPerPage
MaxPerPage=10
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next

If checkpage<>0 then
 If NOT IsEmpty(request("page")) Then
 CurrentPage=Cint(request("page"))
 If CurrentPage < 1 Then CurrentPage = 1
 If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
 Else
 CurrentPage= 1
 End If
 If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
 CurrentPage=1
End if

call list

'显示帖子的子程序
Sub list()%>
<!-- #include file="Inc/Head.asp" -->

<table width="556" border="0" align="center" cellpadding="2" cellspacing="1" class="table_southidc">
  <tr>
    <td width="550" height="25" class="back_southidc">
      <div align="center"><strong>栏目管理</strong></div></td>
  </tr>
  <tr>
    <td height="66">
      <div align="center">
        <table width="100%" height="62" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000" class="border">
          <tr bgcolor="#ECF5FF" class="title">
            <td width="161" align="center"><strong>排序号</strong></td>
            <td width="249" height="29" align="center"><strong> 栏目名称</strong></td>
            <td width="136" align="center"><strong> 操作</strong></td>
          </tr>
             <%
if not rs.eof then
i=0
do while not rs.eof
%>
          <tr class="tdbg">
            <td align="center" bgcolor="#ECF5FF"><%=rs("Aboutusorder")%></td>
            <td height="28" align="center" bgcolor="#ECF5FF"><%=rs("Title")%></td>
            <td align="center" bgcolor="#ECF5FF"><a href=../Aboutus.asp?Title=<%=rs("Title")%> target="_blank">查看</a>&nbsp; &nbsp;<a href="AdminAboutusModify.asp?ID=<%=rs("ID")%>">修改</a>&nbsp; &nbsp;<a href="AdminAboutus.asp?id=<%=rs("id")%>&mark=southidc" onClick="return ConfirmDel();">删除</a></td>
          </tr>
            <%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
end if
%>
        </table>
  
    </div></td>
 
  </tr>

     <tr><td height="25" colspan="3" bgcolor="#FFFFFF"> <div align="right">
                      <%
Response.write "全部-"
Response.write "共" & Cstr(Rs.RecordCount) & "篇文章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
Response.write "第" & Cstr(CurrentPage) &  "/" & Cstr(rs.pagecount) & "&nbsp;"
If currentpage > 1 Then
response.write "<a href='AdminAboutus.asp?&page="+cstr(1)+"'>&nbsp;首页&nbsp;</a>"
Response.write "<a href='AdminAboutus.asp?page="+Cstr(currentpage-1)+"'>&nbsp;上一页&nbsp;</a>"
Else
Response.write "&nbsp;上一页&nbsp;"
End if
If currentpage < Rs.PageCount Then
Response.write "<a href='AdminAboutus.asp?page="+Cstr(currentPage+1)+"'>&nbsp;下一页&nbsp;</a>"
Response.write "<a href='AdminAboutus.asp?page="+Cstr(Rs.PageCount)+"'>&nbsp;尾页&nbsp;</a>"
Else
Response.write ""
Response.write "&nbsp;下一页&nbsp;"
End if
Response.write "转到第"
response.write"<select name='sel_page' onChange='javascript:location=this.options[this.selectedIndex].value;'>"
    for i = 1 to Rs.PageCount
       if i = currentpage then
          response.write"<option value='AdminAboutus.asp?page="&i&"&id="&id&"' selected>"&i&"</option>"
       else
          response.write"<option value='AdminAboutus.asp?page="&i&"&id="&id&"'>"&i&"</option>"
       end if
    next
response.write"</select>页"
%>
                    </div></td></tr>
  <%
End sub
rs.close

%>
</table>

posted @ 2008-07-05 12:39 李超(coder) 阅读(30) | 评论 (0)编辑

<% @ Import Namespace="System.Data" %>
<% @ Import Namespace="System.Data.OleDb" %>
<Script Language="C#" Runat="Server">

OleDbConnection MyConn;
int PageSize,RecordCount,PageCount,CurrentPage;
public void Page_Load(Object src,EventArgs e)
{
 //设定PageSize
 PageSize = 10;

 //连接语句
 string MyConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+Server.MapPath(".")+"//App_Data\\1.mdb;";
 MyConn = new OleDbConnection(MyConnString);
 MyConn.Open();

 //第一次请求执行
 if(!Page.IsPostBack)
 {
  ListBind();
 
  CurrentPage = 0;
  ViewState["PageIndex"] = 0;

  //计算总共有多少记录
  RecordCount = CalculateRecord();
  lblRecordCount.Text = RecordCount.ToString();

  //计算总共有多少页
  PageCount = RecordCount/PageSize;
  if(RecordCount%PageSize!=0)PageCount++;
  lblPageCount.Text = PageCount.ToString();
  ViewState["PageCount"] = PageCount;
 
 
 }
}
//计算总共有多少条记录
public int CalculateRecord()
{
 int intCount;
 string strCount = "select count(*) as co from hotel";
 OleDbCommand MyComm = new OleDbCommand(strCount,MyConn);
 OleDbDataReader dr = MyComm.ExecuteReader();
 if(dr.Read())
 {
  intCount = Int32.Parse(dr["co"].ToString());
 }
 else
 {
  intCount = 0;
 }
 dr.Close();
 return intCount;
}

ICollection CreateSource()
{

 int StartIndex;

 //设定导入的起终地址
 StartIndex = CurrentPage*PageSize;
 string strSel = "select * from hotel";
 DataSet ds = new DataSet();

 OleDbDataAdapter MyAdapter = new OleDbDataAdapter(strSel,MyConn);
 MyAdapter.Fill(ds,StartIndex,PageSize,"Score");

 return ds.Tables["Score"].DefaultView;
}
public void ListBind()
{
 score.DataSource = CreateSource();
 score.DataBind();

 lbnNextPage.Enabled = true;
 lbnPrevPage.Enabled = true;
 shouye.Enabled= true;
 moye.Enabled= true;
 if(CurrentPage==(PageCount-1))
  {
 lbnNextPage.Enabled = false;
 moye.Enabled= false;
 }
 if(CurrentPage==0)
 {
 lbnPrevPage.Enabled = false;
 shouye.Enabled =false;
 }
 lblCurrentPage.Text = (CurrentPage+1).ToString();

}

public void Page_OnClick(Object sender,CommandEventArgs e)
{
 CurrentPage = (int)ViewState["PageIndex"];
 PageCount = (int)ViewState["PageCount"];

 string cmd = e.CommandName;
 //判断cmd,以判定翻页方向
 switch(cmd)
 {
  case "next":
   if(CurrentPage<(PageCount-1)) CurrentPage++;
   break;
  case "prev":
   if(CurrentPage>0) CurrentPage--;
   break;
   case "shou":
      CurrentPage=0 ;
      break;
   case "mo":
      CurrentPage=PageCount-1;
      break;
 }

 ViewState["PageIndex"] = CurrentPage;

 ListBind();

}
</script>
<html>
<head>
<title>datalist分页效果</title>
<link href="admin.css" type="text/css" />
</head>
<body>
<form id="Form1" runat="server">
    &nbsp;<table style="width: 680px">
        <tr>
            <td style="width: 680px" align="center">
共有<asp:Label id="lblRecordCount" ForeColor="red" runat="server" />条记录&nbsp;
当前为<asp:Label id="lblCurrentPage" ForeColor="red" runat="server" />/<asp:Label id="lblPageCount" ForeColor="red" runat="server" />页&nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 680px; height: 218px" align="center">

<asp:DataList id="score" runat="server"
HeaderStyle-BackColor="#aaaadd"
AlternatingItemStyle-BackColor="Gainsboro"
EditItemStyle-BackColor="yellow" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" GridLines="Both"
>
 <ItemTemplate>
 <table><tr><td  width="200px">
  酒店名称:<%# DataBinder.Eval(Container.DataItem,"Name") %>  </td><td width="120px">星级:<%# DataBinder.Eval(Container.DataItem,"satr") %> </td><td>城市:<%# DataBinder.Eval(Container.DataItem,"City") %> </td></tr></table>  
 
 </ItemTemplate>
    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
    <EditItemStyle BackColor="Yellow" />
    <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
    <ItemStyle BackColor="White" ForeColor="#330099" />
    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
    <AlternatingItemStyle BackColor="Gainsboro" />
    <HeaderTemplate>
        黄山酒店一揽表
   
       
    </HeaderTemplate>
    <FooterTemplate>
        &nbsp;&nbsp;
    </FooterTemplate>
</asp:DataList></td>
        </tr>
        <tr>
            <td style="width: 680px" align="center">
    <asp:LinkButton ID="shouye" runat="server" Text="首页" CommandName="shou" OnCommand="Page_OnClick"/>
 
<asp:LinkButton id="lbnPrevPage" Text="上一页" CommandName="prev" OnCommand="Page_OnClick" runat="server" />
<asp:LinkButton id="lbnNextPage" Text="下一页" CommandName="next" OnCommand="Page_OnClick" runat="server" />
  <asp:LinkButton ID="moye" runat="server"  Text="末页"   CommandName="mo" OnCommand="Page_OnClick"/></td>
        </tr>
    </table>
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

</form>
</body>
</html>

posted @ 2008-07-05 12:34 李超(coder) 阅读(258) | 评论 (0)编辑
  
<2008年9月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

与我联系

搜索

 

常用链接

留言簿

我的标签

随笔档案

最新评论

阅读排行榜

评论排行榜