ControlHeader.aspx
上传用户:jdb8708888
上传日期:2013-05-29
资源大小:19971k
文件大小:9k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

C#

  1. <%@ Import Namespace="UDS.Components" %>
  2. <%@ Import Namespace="System.Data.SqlClient" %>
  3. <%@ Import Namespace="System.Data" %>
  4. <%@ Import Namespace="System" %>
  5. <HTML>
  6. <HEAD>
  7. <title>Untitled Document</title>
  8. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  9. <script language="javascript">
  10. <!--
  11. function MM_openBrWindow(theURL,winName,features) { //v2.0
  12.   window.open(theURL,winName,features);
  13. }
  14. //function getSubmodule(){
  15. // SubmoduleCon.innerHTML=Submodule.xml;
  16. //}
  17. function ShowModuleView(ModuleID){
  18. top.main.location="ModuleView.asp?ModuleID="+ ModuleID +"";
  19. }
  20. function ComfirmExit(action){
  21. if(action==1)
  22. {
  23. myconfirm = confirm("确实要关闭窗口,退出文档一体化系统吗?");
  24. if (myconfirm==true){
  25. top.location.href="../SubModule/Login/logout.aspx?Action=1";
  26. }
  27. }
  28. if(action==2)
  29. {
  30. myconfirm = confirm("确实要重新登陆吗?");
  31. if (myconfirm==true){
  32. top.location.href="../SubModule/Login/logout.aspx?Action=2";
  33. }
  34. }
  35. }
  36. function GetLink()
  37. {
  38. var str = Head.txtKey.value;
  39. if(str!="")
  40. {
  41. if(Head.txtKey.value.length==1)
  42. {
  43. if((str.toUpperCase()<="Z"&&str.toUpperCase()>="A")||(str.toUpperCase()<="9"&&str.toUpperCase()>="0"))
  44. alert("不能查询单个字符!");
  45. else
  46. top.main.MainFrame.location= "../SubModule/Query/Listview.aspx?Key=" + Head.txtKey.value + "&amp;Range=15&amp;SearchType=3";
  47. }
  48. else
  49. {
  50. top.main.MainFrame.location= "../SubModule/Query/Listview.aspx?Key=" + Head.txtKey.value + "&amp;Range=15&amp;SearchType=3";
  51. }
  52. }
  53. else
  54. alert("请输入查询关键字!");
  55. }
  56. //获取时间
  57. function Timer(span)
  58. {
  59. var tmp = new Date();
  60. var milsecs=Date.parse(tmp.getMonth()+"-"+tmp.getDay()+"-"+tmp.getFullYear()+" "+document.getElementById('lbl_Hour').innerText+":"+document.getElementById('lbl_Minute').innerText+":"+document.getElementById('lbl_Second').innerText);
  61. var timer = new Date(milsecs+span);
  62. var seconds,minutes,hours,date;
  63. if(timer.getSeconds()<10)
  64. seconds = "0"+timer.getSeconds();
  65. else
  66. seconds = timer.getSeconds();
  67. if(timer.getMinutes()<10)
  68. minutes = "0"+timer.getMinutes();
  69. else
  70. minutes = timer.getMinutes();
  71. if(timer.getHours()<10)
  72. hours = "0"+timer.getHours();
  73. else
  74. hours = timer.getHours();
  75. date=timer.getDate();
  76. document.getElementById('lbl_Second').innerText = seconds;
  77. document.getElementById('lbl_Minute').innerText = minutes;
  78. document.getElementById('lbl_Hour').innerText = hours;
  79. }
  80. //得到服务器时间每隔updatespan分钟校验一次,每秒更新一次本地时钟
  81. function GetServerTime(updatespan)
  82. {
  83. var clientspan = 1*1000;
  84. //更新本地时钟
  85. setInterval("Timer("+clientspan+")",clientspan);
  86. //同步服务器时钟
  87. setInterval("window.location.href='ControlHeader.aspx'",updatespan);
  88. }
  89. //-->
  90. </script>
  91. <script language="C#" runat="server">
  92. private void Page_Load(){
  93. BBSClass bbsclass = new BBSClass();
  94. //显示系统公告
  95. SqlDataReader dr_sysbulletin = bbsclass.GetDeskTopBulletin();
  96. string innerstring = "";
  97. while(dr_sysbulletin.Read())
  98. {
  99. innerstring += "<a href='../SubModule/UnitiveDocument/BBS/Display.aspx?BoardID="+dr_sysbulletin["board_id"].ToString()+"&ItemID="+dr_sysbulletin["item_id"].ToString()+"' target='_blank' title='"+dr_sysbulletin["content"].ToString()+"'>" + dr_sysbulletin["title"].ToString() + "</a></font>";
  100. }
  101. sys_bulletin.InnerHtml = innerstring;
  102. lbl_Hour.Text = DateTime.Now.Hour.ToString();
  103. lbl_Minute.Text = DateTime.Now.Minute.ToString();
  104. lbl_Second.Text = DateTime.Now.Second.ToString();
  105. lbl_year.Text=DateTime.Now.Date.Year.ToString();
  106. lbl_month.Text=DateTime.Now.Date.Month.ToString();
  107. lbl_day.Text=DateTime.Now.Date.Day.ToString();}
  108. string GetTime(object day)
  109. {
  110. if(day.ToString()=="")
  111. return "";
  112. else
  113. {
  114. return(DateTime.Parse(day.ToString()).ToShortTimeString());
  115. }
  116. }
  117. </script>
  118. <LINK href="../Css/mycss1.css" type="text/css" rel="stylesheet">
  119. </HEAD>
  120. <body text="#ffffff" leftMargin="0" topMargin="0" onload="GetServerTime(15*60*1000)" marginheight="0"
  121. marginwidth="0">
  122. <SCRIPT language="JavaScript">
  123. function intPage(ParentNameStr){
  124. var myParentStr = "";
  125. myParentStr = parent.parent.location;
  126. myParentStr = myParentStr.toString();
  127. if (ParentNameStr.toLowerCase()==myParentStr.toLowerCase()){
  128. }else{
  129. ControlBar.style.visibility='hidden';
  130. }
  131. }
  132. function InfraUp(){
  133. parent.parent.UpFrame.rows="0,*"
  134. }
  135. function InfraDown(){
  136. parent.parent.UpFrame.rows="60,*"
  137. }
  138. function InfraLeft(c){
  139. var w,l;
  140. w = parent.parent.main.thisFrame.cols;
  141. l = w.substr(0,w.indexOf(","))
  142. if(l==0)
  143. {
  144. Head.imgTreeStatus.src = "../Images/opentree.gif"
  145. c.innerText = "关闭目录"
  146. }
  147. else
  148. {
  149. Head.imgTreeStatus.src = "../Images/closetree.gif"
  150. c.innerText = "打开目录"
  151. }
  152. parent.parent.main.thisFrame.cols =  (180-l) +",*"
  153. }
  154. function InfraRight(){
  155. parent.parent.main.thisFrame.cols="180,*"
  156. }
  157. function InfraDefault(){
  158. parent.parent.UpFrame.rows="60,*"
  159. parent.parent.LeftFrame.cols="180,*";
  160. }
  161. function InfraMax(){
  162. parent.parent.UpFrame.rows="0,*"
  163. parent.parent.LeftFrame.cols="0,*";
  164. }
  165. function changeuser()
  166. {
  167. var newdialoguewin = window.showModalDialog("../SubModule/Login/Index.aspx",window,"dialogWidth:600px;DialogHeight=490px;status:no");
  168. if(newdialoguewin!=null){}
  169. }
  170. </SCRIPT>
  171. <form name="Head">
  172. <table cellSpacing="0" cellPadding="0" width="100%" border="0">
  173. <tr>
  174. <td width="502" rowSpan="2"><IMG height="89" src="../Images/head42.jpg" width="502" border="0"></td>
  175. <td bgColor="#0051a5" height="41"></td>
  176. </tr>
  177. <tr>
  178. <td background="../Images/head7.jpg" height="48">
  179. <TABLE id="Table4" height="22" cellSpacing="0" cellPadding="0" width="98%" border="0">
  180. <TR>
  181. <TD class="gbtext" align="center">
  182. <div id="layer3" style="Z-INDEX: 3; POSITION: absolute">
  183. <div id="layer7" style="Z-INDEX: 4; LEFT: -289px; WIDTH: 213px; POSITION: absolute; TOP: -52px; HEIGHT: 37px">
  184. <table height="30" width="100%" border="0">
  185. <tr>
  186. <td>
  187. <MARQUEE id="sys_bulletin" onmouseover="this.stop()" onmouseout="this.start();" scrollAmount="5"
  188. direction="left" behavior="scroll" loop="0" runat="server"></MARQUEE></td>
  189. </tr>
  190. </table>
  191. </div>
  192. <div id="layer5" style="Z-INDEX: 2; LEFT: 146px; WIDTH: 371px; POSITION: absolute; TOP: -68px; HEIGHT: 31px">
  193. <table height="42" width="100%" border="0">
  194. <tr>
  195. <td bgColor="#0051a5"></td>
  196. <td vAlign="top" width="316" background="../Images/head62.jpg">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  197. <A href="../SubModule/UnitiveDocument/Index.aspx" target="main">我的桌面</A><font color="white">|</font><A href="../SubModule/WorkAttendance/Default.aspx" target="MainFrame">考勤</A><font color="white">|</font><A href="../SubModule/UnitiveDocument/Setup/MySetup.aspx" target="MainFrame">密码</A><font color="white">|</font><A href="../help/help.htm" target="_blank">帮助</A><font color="white">|</font><A href="../Help/About.aspx" target="MainFrame">关于</A><font color="white">|</font><A onclick="ComfirmExit(2)" href="#" target="_self">重新登陆</A><font color="white">|</font><A onclick="ComfirmExit(1)" href="#" target="_self">退出</A></td>
  198. </tr>
  199. </table>
  200. </div>
  201. <div id="layer4" style="Z-INDEX: 2; LEFT: 256px; WIDTH: 250px; POSITION: absolute; TOP: -33px; HEIGHT: 24px">
  202. <table width="100%" bgColor="#0051a5" border="0">
  203. <tr>
  204. <td></td>
  205. <td align="center" width="63"><A href="../SubModule/Query/Google.aspx" target="MainFrame">全文检索</A></td>
  206. <td align="center" width="98"><INPUT id="txtKey" onkeydown="if(event.keyCode == 13) { GetLink();}" style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid"
  207. type="text" size="12" name="txtKey" height="12px"></td>
  208. <td align="center" width="43"><A style="CURSOR: hand" onclick="GetLink()" target="Main"><IMG id="IMG1" height="24" src="../images/Udssearchbutton.gif" width="26" border="0"></A></td>
  209. </tr>
  210. </table>
  211. </div>
  212. <div id="layer6" style="Z-INDEX: 3; LEFT: 348px;width:160px; POSITION: absolute; TOP: 8px; HEIGHT: 15px"><asp:label id="lbl_year" runat="server" Font-Size="X-Small" ForeColor="white">Label</asp:label><font color="white">年</font><asp:label id="lbl_month" runat="server" Font-Size="X-Small" ForeColor="white">Label</asp:label><font color="white">月</font><asp:label id="lbl_day" runat="server" Font-Size="X-Small" ForeColor="white">Label</asp:label><font color="white">日</font>
  213. <asp:label id="lbl_Hour" runat="server" Font-Size="X-Small" ForeColor="White"></asp:label><font color="white">:</font><asp:label id="lbl_Minute" runat="server" Font-Size="X-Small" ForeColor="White"></asp:label><font color="white">:</font><asp:label id="lbl_Second" runat="server" Font-Size="X-Small" ForeColor="White"></asp:label></div>
  214. </div>
  215. </TD>
  216. <TD vAlign="middle" align="center" width="100"></TD>
  217. <TD align="center"></TD>
  218. </TR>
  219. </TABLE>
  220. </td>
  221. </tr>
  222. </table>
  223. </form>
  224. </body>
  225. </HTML>