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

📄 careatefloder.asp

📁 绿叶OA 一个功能比较全面的办公OA系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<%  
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
MM_authorizedUsers=""
MM_authFailedURL="../../../../../index.asp"
MM_grantAccess=false
If Session("userssdfgfhtrh") <> "" Then
  If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
    MM_grantAccess = true
  End If
End If
If Not MM_grantAccess Then
  MM_qsChar = "?"
  If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  MM_referrer = Request.ServerVariables("URL")
  if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="../../../../../../Connections/oavbsconn.asp" -->

<!--#include file="../../../../../../toall/fengge/config.asp" -->
<%
Dim webtiles
Dim webtiles_numRows
Set webtiles = Server.CreateObject("ADODB.Recordset")
webtiles.ActiveConnection = MM_oavbsconn_STRING
webtiles.Source = "SELECT 页面名称  FROM webtitles  WHERE 模块名称 = '文件传输' and 描述='新建文件类别'"
webtiles.CursorType = 0
webtiles.CursorLocation = 2
webtiles.LockType = 1
webtiles.Open()
if not webtiles.eof or not webtiles.bof then
dim webtilesname
webtilesname=webtiles("页面名称")
webtiles.Close()
Set webtiles = Nothing
else
webtiles.Close()
Set webtiles = Nothing
response.write "页面标题不完整,请管理员在后台补充。"
end if
webtiles_numRows = 0
%>
<%
Dim webtiles1
Dim webtiles1_numRows
Set webtiles1 = Server.CreateObject("ADODB.Recordset")
webtiles1.ActiveConnection = MM_oavbsconn_STRING
webtiles1.Source = "SELECT 页面名称  FROM webtitles  WHERE 模块名称 = '文件传输' and 描述='文件类别列表'"
webtiles1.CursorType = 0
webtiles1.CursorLocation = 2
webtiles1.LockType = 1
webtiles1.Open()
if not webtiles1.eof or not webtiles1.bof then
dim webtiles1name
webtiles1name=webtiles1("页面名称")
webtiles1.Close()
Set webtiles1 = Nothing
else
webtiles1.Close()
Set webtiles1 = Nothing
response.write "页面标题不完整,请管理员在后台补充。"
end if
webtiles1_numRows = 0
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset2__MMColParam = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT max(排序)+1 as maxp  FROM filestyeps  WHERE 用户帐号 = '" + Replace(Recordset2__MMColParam, "'", "''") + "' and 目录名<>'其它'"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>
<%if not Recordset2.eof or not  Recordset2.bof then
maxp=Recordset2("maxp")
else
maxp="1"
end if
Recordset2.Close()
Set Recordset2 = Nothing%>
<%
Dim Recordset1__u
Recordset1__u = "1"
If (Session("userssdfgfhtrh")   <> "") Then 
  Recordset1__u = Session("userssdfgfhtrh")  
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM filestyeps  WHERE 用户帐号='" + Replace(Recordset1__u, "'", "''") + "' and 目录名='其它'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 3
Recordset1.LockType = 3
Recordset1.Open()
if Recordset1.eof and Recordset1.bof then
Recordset1.addnew
Recordset1("用户帐号")=Session("userssdfgfhtrh")
Recordset1("目录名")="其它"
Recordset1("排序")="1"
Recordset1("开关")="是"
Recordset1("建立时间")=now()
Recordset1.update
Recordset1_numRows = 0
%>
<%end if
Recordset1.Close()
Set Recordset1 = Nothing%>




<%
Dim Recordset1111111__MMColParam
Recordset1111111__MMColParam = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset1111111__MMColParam = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1111111
Dim Recordset1111111_numRows

Set Recordset1111111 = Server.CreateObject("ADODB.Recordset")
Recordset1111111.ActiveConnection = MM_oavbsconn_STRING
Recordset1111111.Source = "SELECT *  FROM filestyeps  WHERE 用户帐号 = '" + Replace(Recordset1111111__MMColParam, "'", "''") + "'  ORDER BY 排序 ASC"
Recordset1111111.CursorType = 0
Recordset1111111.CursorLocation = 2
Recordset1111111.LockType = 1
Recordset1111111.Open()

Recordset1111111_numRows = 0
%>

<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset1111111_numRows = Recordset1111111_numRows + Repeat1__numRows
%>
<HEAD>
<script language="javascript">
<!--
function isNumber(string) {
    if (string =="") string = "0";
    valid = '0123456789x';
    for (var i=0; i< string.length; i++) {
        if (valid.indexOf(string.charAt(i)) == -1) {
            return false;
        }
    }
    return true;
}
function dis(){
document.form1.submit.value='新建类别'
document.form1.submit.disabled=true;
return true;
}

function check(){
  if(form1.types.value==""){
    alert("请输入类别。");
    form1.types.focus();
    return(false);
  }
    if ((document.form1.types.value.indexOf("*")>-1)||(document.form1.types.value.indexOf(":")>-1)||(document.form1.types.value.indexOf(",")>-1)||(document.form1.types.value.indexOf("/")>-1)||(document.form1.types.value.indexOf("<")>-1)||(document.form1.types.value.indexOf(">")>-1)||(document.form1.types.value.indexOf("?")>-1))
	{
alert("请勿输入*:,/<>?等非法字符。")
form1.types.focus();
return false;
}
  if(form1.px.value==""){
    alert("请输入排序。");
   form1.px.focus();
    return(false);
  }


if(isNumber(document.form1.px.value) == false){
		alert("友情提醒:排序需为数字。");
		document.form1.px.focus();
		
		return (false);
		}
 
  return(true);
}
//-->
</script>
  <link href="../../../../../../css/textarea.css" rel="stylesheet" type="text/css">
  <style type="text/css">
<!--
.style2 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
  </style>
</HEAD><body onload=document.form1.types.focus()>
<div align="center">
  <table width="70%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>
              </span>                <div class="RoundedCorner"> 
      <div align="center"><b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <span class="style2"><%=webtilesname%></span></div>
    </div></td>
            </tr>
  </table>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><form name="form1" method="post" action="cratefolderpost.asp" onSubmit="return dis()">
            <div align="center">
              <table width="70%" height="129" border="0" cellpadding="3" cellspacing="1" bgcolor="<%=secaiid%>">
                <tr bgcolor="#FFFFFF">
                  <td width="14%"><div align="right" style="font-size: 12px">类 别:</div></td>
                  <td width="86%"><span style="font-size: 12px">
                    <input name="types" type="text" class=inputs id="types" size="25" maxlength="10">
                    <img src="../../../../../../img/files/f.gif" width="16" height="16"> </span></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td><div align="right" style="font-size: 12px"> 排 序:</div></td>
                  <td><input name="px" type="text" id="px" maxlength="9"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td><div align="right" style="font-size: 12px">启用否:</div></td>
                  <td><span style="font-size: 12px">是:
                        <input name="kg" type="radio" value="是" checked>
        ;否:
        <input type="radio" name="kg" value="否">
                  </span></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td>&nbsp;</td>
                  <td><input name="submit" type=submit id="submit" style="FONT-SIZE: 12px; HEIGHT: 27px"   value= "新建类别" onclick="return check()">
                       
  <input name="按钮" type=button style="FONT-SIZE: 12px; HEIGHT: 27px"   onClick="javascript:history.go(-1)" value= " 取 消 " ></td>
                </tr>
              </table>
            </div>
            </div>
<p>&nbsp;</p>
      </form></td>
    </tr>
</table>

<div align="center">
    <table width="70%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><div class="RoundedCorner">
            <div align="center"><b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b><span class="style2"><%=webtiles1name%></span></div>
        </div></td>
      </tr>
    </table>
    <table width="70%" border="0" cellpadding="3" cellspacing="1" bgcolor="<%=secaiid%>">
      <tr bgcolor="#FFFFFF">
        <td width="12%"><div align="center"><strong>类 别</strong></div></td>
        <td width="4%"><div align="center"><strong>排 序</strong></div></td>
        <td width="5%"><div align="center"><strong>开 关</strong></div></td>
        <td width="15%"><div align="center"><strong>时 间</strong></div></td>
        <td width="18%"><div align="center"><strong>操 作</strong></div></td>
      </tr>
      <% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset1111111.EOF)) 
dim kg,f
f=Recordset1111111("目录名")
kg=Recordset1111111.Fields.Item("开关").Value
%>
      <tr bgcolor="#FFFFFF" >
        <td><div align="center"><%=f%></div></td>
        <td><div align="center"><%=(Recordset1111111.Fields.Item("排序").Value)%></div></td>
        <td><div align="center">
          <%if kg="是" then%>
          <img src="../../../../../../toall/workreport/img/cs-1.gif" width="25" height="16">
          <%else%>
          <img src="../../../../../../toall/workreport/img/cs-3.gif" width="25" height="16">
          <%end if%>
        </div></td>
        <td><div align="center"><%=(Recordset1111111.Fields.Item("建立时间").Value)%></div></td>
        <td><%if f<>"其它" then%><%if kg="是" then%> <a href="close.asp?id=<%=(Recordset1111111.Fields.Item("ID").Value)%>&p=<%=(Recordset1111111.Fields.Item("排序").Value)%>&c=<%=f%>" onClick="return confirm('您确定要关闭 <%=f%> 吗?系统将把该类的所有文件转移到 其它 类别')">关闭</a>
        <%else%>
        <a href="open.asp?id=<%=(Recordset1111111.Fields.Item("ID").Value)%>">启用</a>
        <%end if%><a href="update.asp?id=<%=(Recordset1111111.Fields.Item("ID").Value)%>">修改</a> <a href="del.asp?id=<%=(Recordset1111111.Fields.Item("ID").Value)%>&p=<%=(Recordset1111111.Fields.Item("排序").Value)%>&c=<%=f%>" onClick="return confirm('您确定要删除 <%=f%> 吗?系统将把该类的所有文件转移到 其它 类别')">删除 </a><a href="updatepaixu.asp?id=<%=(Recordset1111111.Fields.Item("ID").Value)%>">修改排序</a><%end if%></td>
      </tr>
      <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1111111.MoveNext()
Wend
%>
    </table>
    <br>
    <img src="../../../../../../img/up.gif" width="17" height="12"><a href="../list.asp">返 回</a>
</div>
<%
Recordset1111111.Close()
Set Recordset1111111 = Nothing
%>
<%
on error resume next
if(Session("userssdfgfhtrh") <> "") then Command1__u = Session("userssdfgfhtrh")

if(maxp <> "") then Command1__maxp = maxp

%>
<%

set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_oavbsconn_STRING
Command1.CommandText = "UPDATE filestyeps  SET 排序=" + Replace(Command1__maxp, "'", "''") + "  WHERE 目录名='其它' and 用户帐号='" + Replace(Command1__u, "'", "''") + "' "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

%>

⌨️ 快捷键说明

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