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

📄 hx_system.asp

📁 一个比较完整的oa系统
💻 ASP
📖 第 1 页 / 共 4 页
字号:
	  else
	    CheckCookies=True
	  end if	
	  HX_CheckCookies=CheckCookies
    End Function
'选择记录方式	
    Sub HX_SelectCookiesORSession()
	  select case WS_S.HX_CheckCookies
	    case True
		  Response.Cookies(prefix)("LOGINUSERID")=WS_Uid
	      Response.Cookies(prefix)("LOGINUSERNAME")=WS_UserName		
          Response.Cookies(prefix)("LOGINPASSWORD")=HX_PassWord
		  Response.Cookies(prefix)("LOGAppointment")=WS_Appointment
		  Response.Cookies(prefix)("LOGdepartment")=WS_department
          Response.Cookies(prefix)("LoginCook")=HX_cook
		  if HX_cook>0 then
           Response.Cookies(prefix).Expires=date+HX_cook
         end if	
		case False
		   Session(prefix&"LOGINUSERID")=WS_Uid
	       Session(prefix&"LOGINUSERNAME")=WS_UserName		
           Session(prefix&"LOGINPASSWORD")=HX_PassWord
		   Session(prefix&"LOGAppointment")=WS_Appointment
		   Session(prefix&"LOGdepartment")=WS_department
	  end select	
    End Sub
'读取登录后记录
    Sub HX_LoginCheck()
	  select case WS_S.HX_CheckCookies
	    case True
		  LOGINUid=REQUEST.Cookies(prefix)("LOGINUSERID")
		  LOGINUSERNAME=REQUEST.Cookies(prefix)("LOGINUSERNAME")
          LOGINPASSWORD=REQUEST.Cookies(prefix)("LOGINPASSWORD")
          LogAppointment=REQUEST.Cookies(prefix)("LogAppointment")
		  LOGdepartment=REQUEST.Cookies(prefix)("LOGdepartment")
	    case False
		   LOGINUid=Session(prefix&"LOGINUSERID")
	       LOGINUSERNAME=Session(prefix&"LOGINUSERNAME")		
           LOGINPASSWORD=Session(prefix&"LOGINPASSWORD")
		   LogAppointment=Session(prefix&"LOGAppointment")
		   Logdepartment=Session(prefix&"LOGdepartment")
	  end select	  
	End Sub
	Function HX_OutAttendanceDuty(DutyType)
	   if HX_IsNUM(DutyType) then
	     select case DutyType
		   case 1
		     HX_OutAttendanceDuty="上班"
		   case 2
		     HX_OutAttendanceDuty="下班" 
		 end select	 
	   end if
	End Function
	Function HX_NotifyFlag(NotifyFlag)
	  if HX_ISNUM(NotifyFlag) then
	    select case NotifyFlag
		  case 0:HX_NotifyFlag="普通"
		  case 1:HX_NotifyFlag="重要"
		  case 2:HX_NotifyFlag="加急"
		end select  
	  end if
	End Function
	Function HX_OutWorkFlowType(FlowType)
	   if HX_IsNUM(FlowType) then
	     ColumnName="":tablename="HX_WorkFlowType":Orderby=" order by WS_WTID desc"
         set Ourtyrs=WS_S.HX_SetRSD(ColumnName,tablename,Orderby)
          if Ourtyrs.recordcount>0 then
		    HX_OutWorkFlowType=Ourtyrs("WS_WorkFlowTypeName")
		  end if      
	   end if
	End Function
    Sub HX_OutEnrolFlag(flag)
	   if HX_IsNUM(flag) then
	     select case flag
		   case 0
		     response.write "领导尚未批示"
		   case 1
		     response.write "领导已批准"
		   case 2
		     response.write "领导未批准" 
		 end select	 
	   end if
	End Sub'判断是否登录
    Function HX_ISLogin()
	    WS_S.HX_LoginCheck
	    HX_ISLogin=True
	    IF ISNULL(LOGINUSERNAME) OR LOGINUSERNAME="" OR ISNULL(LOGINPASSWORD) OR LOGINPASSWORD="" THEN
           HX_ISLogin=False
        ELSE
           LOGINPASSWORDMD5=MD5(LOGINPASSWORD)
           ORderby=" where WS_UserName='"&LOGINUSERNAME&"' and WS_PassWord='"&LOGINPASSWORDMD5&"'": HX_Conn dir
           SET RS=WS_S.HX_SetRSD("","HX_CompanyUser",ORderby)
           IF RS.RECORDCOUNT<=0 THEN
             HX_ISLogin=False
		   Else
		     HX_ISLogin=True	 
           END IF
         Call WS_S.HX_RSClose(RS)  
        END IF
	End Function	
'注销登录	
	Sub HX_LoginOut()
	    if HX_ISNUM(request.Cookies(prefix)("LOGINUSERID")) then
		  HX_conn dir
		  conn.execute("delete from HX_Online where WS_Userid="&request.Cookies(prefix)("LOGINUSERID"))
		end if
	    Response.Cookies(prefix)("LOGINUSERID")=""
       	Response.Cookies(prefix)("LOGINUSERNAME")=""
        Response.Cookies(prefix)("LOGINPASSWORD")=""
		Response.Cookies(prefix)("WS_Appointment")=""
		session.Abandon()	
	End Sub
'程序编写及设计:徐勇
'QQ号码:  32981688 6(万辰)  563097256(网络侠客)
'网址:http://www.wsoas.com
'E_mail(MSN):netcst@126.com 
'电话:13856921303   0551-5168961
'以上信息不影响程序运行!
'在使用过程中请保留以上信息,以便出现问题时及时与我取得联系
'注意:免费版程序不得用于商业用途,否则后果自负!!!!
    Function HX_OutOnline(stype)
        if HX_isnum(stype) then
		  ColumnName="WS_Userid,WS_Name,WS_Viewip,WS_Lasttime,WS_Staus":tablename="HX_Online":Orderby=" order by WS_Lasttime desc"
		  set onliners=HX_SetRSD(ColumnName,tablename,Orderby)
		   select case stype
		      case 0			  
			    HX_OutOnline=onliners.recordcount
			  case 1
		        if onliners.recordcount<=0 then
				   response.write "<table width='85' border='0' cellspacing='1' cellpadding='3'><tr><td align=center>无人在线</td></tr></table>" 
				else 
				   response.write "<table width='85' border='0' cellspacing='1' cellpadding='3'>"
                     do until onliners.eof
					    HX_OutUserInfo(onliners("WS_Userid"))
						 if onliners("WS_Userid")=cint(loginuid)  then
			               myoutname="<font color=red title='自己' onclick=""if (confirm('你想自己给自己发消息吗?')) show('"&onliners("WS_Userid")&"');"">"&onliners("WS_Name")&"</font>"
			             else
			               myoutname=onliners("WS_Name")
			             end if
	                    response.write "<tr><td  class='face' onMouseDown=this.className='face-2' onMouseUp=this.className='face-1' onMouseOver=this.className='face-1' onMouseOut=this.className='face' style='CURSOR:hand;' onDblClick=""show('"&onliners("WS_Userid")&"');"" title=""双击给 ["&Outdepartment&" "&OutAppointment&" "&onliners("WS_Name")&"] 发短消息!!! &#10;目前状态:"&HX_OutStaus(onliners("WS_Staus"))&"&#10;用户IP:"&onliners("WS_Viewip")&"&#10;上线时间:"&onliners("WS_Lasttime")&"""><img src='../hximages/websms/userface.gif' align='absmiddle' id='WSOA"&onliners("WS_Userid")&"' name='WSOA"&onliners("WS_Userid")&"'> "&myoutname&"</td></tr>"
                     onliners.movenext
                     loop
                   response.write "</table>" 
		        end if
		   end select 
		   HX_RSClose(onliners)  
		else
          HX_OutOnline=0
		end if
    End Function
	Function HX_OutStaus(str)
	  if HX_ISNUM(str) then
	    select case str
		  case 0:HX_OutStaus="联机"
		  case 1:HX_OutStaus="忙碌"
		  case 2:HX_OutStaus="离开"
		end select  	  
	  end if
	End Function
'程序编写及设计:徐勇
'QQ号码: 563097256(网络侠客)
'网址:http://www.wsoas.com
'E_mail(MSN):netcst@126.com 
'电话:13856921303   0551-5168961
'以上信息不影响程序运行!
'在使用过程中请保留以上信息,以便出现问题时及时与我取得联系
'注意:免费版程序不得用于商业用途,否则后果自负!!!!
    Function HX_OutListMember()
	   ColumnName="":tablename="HX_CompanyUser":Orderby=" where WS_leave=False order by WS_Uid desc"
       set Ourusers=WS_S.HX_SetRSD(ColumnName,tablename,Orderby)
        if Ourusers.recordcount>0 then
	      response.write "<table width='85' border='0' cellspacing='1' cellpadding='3'>"
          do until Ourusers.eof
			HX_OutUserInfo(Ourusers("WS_Uid"))
			if Ourusers("WS_Uid")=cint(loginuid)  then
			  myoutname="<font color=red title='自己'>"&Ourusers("WS_Name")&"</font>"
			else
			  myoutname=Ourusers("WS_Name")
			end if
	        response.write "<tr><td  class='face' onMouseDown=this.className='face-2' onMouseUp=this.className='face-1' onMouseOver=this.className='face-1' onMouseOut=this.className='face' style='CURSOR:hand;' onDblClick=""show('"&Ourusers("WS_Uid")&"');"" title=""双击给 ["&Outdepartment&" "&OutAppointment&" "&Ourusers("WS_Name")&"] 发短消息!!! &#10;注册时间:"&Ourusers("WS_addate")&"&#10;上次登录:"&Ourusers("WS_logindate")&"""><img src='../hximages/websms/userface.gif' align='absmiddle'> "&myoutname&"</td></tr>"
          Ourusers.movenext
          loop
          response.write "</table>"
        end if
		HX_RSClose(Ourusers)
   End Function
'返回
    Sub HX_Redirect(url)
	   if url<>"" then
	      response.redirect url
		  response.end
	   else
	      response.write "<script>history.go(-1);</script>"
		  response.end
	   end if	
	End Sub	
'向地址中加入 ? 或 & (无用)
	Public Function JoinChar(strUrl)
		if strUrl="" then JoinChar="":Exit Function
		if InStr(strUrl,"?")<len(strUrl) then 
			if InStr(strUrl,"?")>1 then
				if InStr(strUrl,"&")<len(strUrl) then 
					JoinChar=strUrl & "&"
				else
					JoinChar=strUrl
				end if
			else
				JoinChar=strUrl & "?"
			end if
		else
			JoinChar=strUrl
		end if
	End Function
' 判断是否安全字符串,在注册登录等特殊字段中使用
	Public Function IsSafeStr(str)
		Dim s_BadStr, n, i
		s_BadStr = "'  &<>?%,;:()`~!@#$^*{}[]|+-=" & Chr(34) & Chr(9) & Chr(32)
		n = Len(s_BadStr)
		IsSafeStr = True
		For i = 1 To n
			If Instr(str, Mid(s_BadStr, i, 1)) > 0 Then
				IsSafeStr = False
				Exit Function
			End If
		Next
	End Function
'程序编写及设计:徐勇
'QQ号码: 563097256(网络侠客)
'网址:http://www.wsoas.com
'E_mail(MSN):netcst@126.com 
'电话:13856921303   0551-5168961
'以上信息不影响程序运行!
'在使用过程中请保留以上信息,以便出现问题时及时与我取得联系
'注意:免费版程序不得用于商业用途,否则后果自负!!!!
    Public Function DBPathAddress(DBPathStr)
       SELECT CASE DBPathStr
          CASE 0 DBPath ="WSOASCOM/#HX_WSOAS2.5.ASP"
          CASE 1 DBPath ="../WSOASCOM/#HX_WSOAS2.5.ASP"
          CASE 2 DBPath ="../../WSOASCOM/#HX_WSOAS2.5.ASP"
		  CASE 3 DBPath ="WSOASCOM/##HX_IPWASOAS.ASP"
		  CASE 4 DBPath ="../WSOASCOM/#HX_IPWASOAS.ASP"
		  CASE 5 DBPath ="../../WSOASCOM/#HX_IPWASOAS.ASP"	  
       END SELECT 
	   DBPathAddress=server.mappath(DbPath)
    End Function
''获取任何表任何字段信息函数
    Public Function HX_SetRSD(ColsStr,TaNameStr,OrderBystr)
	    If ColsStr="" then ColsStr="*"
         set HX_SetRSD=server.CreateObject("adodb.recordset")
         HX_SetRSD.open "select "&ColsStr&" from "&TaNameStr&OrderBystr,conn,1,3			 	 
     End Function 
'写入任何表任何字段信息函数
	Public Sub InToColumn(TableName,ColumnName,ColumnValue)
		On Error Resume Next
		Execute("insert into ["&TableName&"] ("&ColumnName&") values ("&Replace(Replace(ColumnValue,"True","1"),"False","0")&")")
		If Err Then
			Response.Write "在数据库表"&TableName&"中添加记录失败!原因:<font color=red>" & Err.Description
			Err.Clear
		End If
	End Sub
'程序编写及设计:徐勇
'QQ号码: 563097256(网络侠客)
'网址:http://www.wsoas.com
'E_mail(MSN):netcst@126.com 
'电话:13856921303   0551-5168961
'以上信息不影响程序运行!
'在使用过程中请保留以上信息,以便出现问题时及时与我取得联系
'注意:免费版程序不得用于商业用途,否则后果自负!!!!
     Public Function HX_OutAppointment(Appointment)
	    If Appointment<>"" and Isnumeric(Appointment) Then
	    Set OutRs=WS_S.HX_SetRSD("WS_AppointmentName,WS_Did","HX_Appointment"," where WS_Aid="&Appointment)
		  If OutRs.recordcount>0 Then
		    Set Ders=WS_S.HX_SetRSD("WS_DepartmentName","HX_Department"," where WS_Did="&OutRs("WS_Did"))
			If Ders.recordcount>0 Then
			HX_OutAppointment=Ders(0)
			End If
			Call HX_RSClose(Ders)
		    HX_OutAppointment=HX_OutAppointment&OutRs(0)
		  Else
		    HX_OutAppointment="<font color=red>职位删除</font>"
		  End If
		Else
		  HX_OutAppointment="<font color=red>参数错误</font>"
		End If
		  Call HX_RSClose(OutRs)
	 End Function
'程序编写及设计:徐勇
'QQ号码: 563097256(网络侠客)
'网址:http://www.wsoas.com
'E_mail(MSN):netcst@126.com 
'电话:13856921303   0551-5168961
'以上信息不影响程序运行!
'在使用过程中请保留以上信息,以便出现问题时及时与我取得联系
'注意:免费版程序不得用于商业用途,否则后果自负!!!! 
    Public Function HX_OutDepartment(Department)
	    If Department<>"" and Isnumeric(Department) Then
		    Set Ders=WS_S.HX_SetRSD("WS_DepartmentName","HX_Department"," where WS_Did="&Department)
			If Ders.recordcount>0 Then
			  HX_OutDepartment=Ders(0)
			End If
			Call HX_RSClose(Ders)
		end if	
	 End Function'显示用户名、姓名、部门、职位	
	 Sub HX_OutUserInfo(Userid)
	   if Userid<>"" and isnumeric(Userid) then
	     OutUserName="":OutName="":OutPhone="":OutAddress="":OutAppointmentID="":OutdepartmentID=""
	     Set Outrs=WS_S.HX_SetRSD("*","HX_CompanyUser"," where WS_Uid="&Userid)
		 if Outrs.recordcount>0 then

⌨️ 快捷键说明

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