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

📄 view.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<%Option explicit%>
<!--#include virtual ="Include/DataEnvi.asp"-->
<!--#include virtual ="Include/String.asp"-->
<!--#inclsude file ="DrawComMessageToolBar.asp"-->
<%
Response.Expires = -1
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control","no-cache,must-revalidate"

Dim ObjRS,ObjDB,StrSQL,conn
Dim IntBoxID,IntComMsgID,IntExeID
Dim StrTitle,StrBody,IntMsgLevel,IntIsHtml
Dim IntNodeID
Set conn=Server.CreateObject("ADODB.Connection")
OpenDBH( conn )
Set ObjDB = Server.CreateObject ("ADODB.Connection")
OpenDB ObjDB
Set ObjRS = Server.CreateObject ("ADODB.RecordSet")

IntBoxID = Request.QueryString ("BoxID")
If IntBoxID = "" Then 
  IntBoxID = 1
Else
  IntBoxID = Cint(IntBoxID)
End If

If IntBoxID = 2 Then
  IntComMsgID = Request.QueryString ("ID")
  StrSQL = "Select * from t_Hrms_JobApplications_DepRequirement where ID = " & IntComMsgID
  ObjRS.Open StrSQL,conn,1,3

Else
  IntExeID = Request.QueryString ("ID")
  if Cint(IntExeID)=0 Then
    	Response.Write "<script language=javascript>alert('请选择要查看的部门需求');history.back();</script>"
    	Response.End
  End if
  StrSQL = "Select * from t_OA_Work_ComMessage_Record_Des where ID = " & IntExeID
  Set ObjRS = ObjDB.Execute (StrSQL)
  IntNodeID = ObjRS("NodeID")
  ObjRS.Close
  StrSQL = "Select * from t_OA_Work_ComMessage_Record where ID = " & IntNodeID
  Set ObjRS = ObjDB.Execute (StrSQL)
  IntComMsgID = ObjRS("ComMsgID")
  ObjRS.Close
  StrSQL = "Select * from t_Hrms_JobApplications_DepRequirement where ID = " & IntComMsgID
  ObjRS.Open StrSQL,conn,1,3

End If

Sub Main()
%> 



<script language=javascript>
  var IsHTML = 1
  function setIsHTML(t)
  {
    IsHTML = t
    TBody1.style.display = "none"
    TBody2.style.display = "none"
    if(t==0)TBody1.style.display = ""
    if(t==1)TBody2.style.display = ""
  }
</script> 
<script language=javascript>
  function MyCheck(f)
  {
    if(IsHTML==0)
      f.Body.value = f.BodyText.value
    else
      f.Body.value = BodyFrame.getHTML()
    return CheckForm(f)
  }
</script> 
<style>
.T_A {cursor:hand;font-size:12px;background-color: #808080; color: #FFFFFF; border-top: 1 solid #000000; border-bottom: 1 solid #000000}
.T_B {cursor:hand;font-size:12px;background-color: #D6D3CE; border-bottom: 1 solid #000000}
</style>
<script language=javascript>
  var DefaultID = 1
<%
  If IntBoxID=2 Then response.write "DefaultID = 0"
%>

  function OpenItem(Item)
  {
    DrawToolBar(Item)
<%
    If IntBoxID = 2 Then
%>
      if(Item==0)frameEdit.location = "View_Content.asp?ID=<%=IntComMsgID%>" + "&R=" + Math.random()
      if(Item==1)frameEdit.location = "View_Attach.asp?ID=<%=IntComMsgID%>" + "&R=" + Math.random()
<%
    Else
%>
      if(Item==0)frameEdit.location = "View_Advice.asp?ID=<%=IntComMsgID%>" + "&R=" + Math.random()
      if(Item==1)frameEdit.location = "View_Content.asp?ID=<%=IntComMsgID%>" + "&R=" + Math.random()
      if(Item==2)frameEdit.location = "View_Flow.asp?ID=<%=IntComMsgID%>" + "&R=" + Math.random()
<%
    End If
%>
    DefaultID = Item
  }

  var NameList = new Array('批复','内容','工作流')
<%
  If IntBoxID = 2 Then 
%>
     var NameList = new Array('内容')
<%
   End If 
%>
  function DrawToolBar(Item)
  {
    var ArrIMG = new Array();
    var IMGCount = NameList.length;
    for(var i=0;i<=IMGCount;i++)
    {
      ArrIMG[ArrIMG.length] = "D01"
    }
    ArrIMG[0] = "A01"
    ArrIMG[IMGCount] = "A02"
    if(Item==0)
    {
      ArrIMG[0] = "B01"
      ArrIMG[1] = "C02"
    }
    else if(Item==IMGCount-1)
    {
      ArrIMG[IMGCount] = "B02"
      ArrIMG[IMGCount-1] = "C01"
    }
    else
    {
      ArrIMG[Item] = "C01"
      ArrIMG[Item+1] = "C02"
    }
    
    var tmpHTML=""
    tmpHTML += '<table border="0" cellpadding="0" cellspacing="0">'
    tmpHTML += '<tr>'
    tmpHTML += '<td><img border="0" src="<%=Application("RootPath")%>Images/OA/work/commessage/' + ArrIMG[0] + '.gif"></td>'
    var ClassName = "T_A"
    
    for(var i=0;i<NameList.length;i++)
    {
      ClassName = "T_A"
      if(i==Item)ClassName="T_B"
      tmpHTML += '<td class=' + ClassName + ' width="50" align=center onclick="OpenItem(' + i + ')">' + NameList[i] + '</td>'
      tmpHTML += '<td><img border="0" src="<%=Application("RootPath")%>Images/OA/work/commessage/' + ArrIMG[i+1] + '.gif"></td>'
    }
    tmpHTML += '</tr></table>'
    DocToolbar.innerHTML = tmpHTML
  }
</script>


 <form name="thisForm" onsubmit="return(MyCheck(this))" method="post" action="Addnew_03.asp">
  <input type=hidden name="Body">
      
  <table class=Ltr bgcolor="#Dedfde" cellspacing=1 cellpadding=3 height=100% width=100%>
    <tr class=LHtr> 
      <td colspan=2>查看部门需求信息</td>
    </tr>
    <tr class=Ltr> 
      <td align=right colspan="2">
<input type=button class=button value="返   回" onclick="parent.frmToolbar.doList(<%=IntBoxID%>)" id=button1 name=button1> 
        <%
  If IntBoxID = 2 Then
%>
        <input type=button class=button value="发 送" onclick="parent.frmToolbar.SendOneComMessage(<%=IntComMsgID%>)" id=button2 name=button2> 
        <%
  End If
%>
      </td>
    </tr>
    <tr class=Ltr id=TBody2 height=100%> 
      <td colspan=2> <table border="0" cellpadding="0" cellspacing="1" width=100% height=100%>
          <tr height=100%>
            <td style="border: 1 solid #000000"> <iframe  width=100% height=100% frameborder=0 id=frameEdit></iframe> 
            </td>
          </tr>
          <tr>
            <td align=left> <span id=DocToolbar></span> </td>
          </tr>
        </table></td>
    </tr>
  </table>
  </form>
<script language=javascript>
  OpenItem(DefaultID)
</script>
<%
End Sub
%>
<!--#include file ="Templet.asp"-->

⌨️ 快捷键说明

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