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

📄 jcy_ry_dyxk.jsp

📁 公务员工资系统软件工程文档及源代码
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" language="java" import="java.sql.*,com.vstsoft.std.*" %>
<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
%>
<jsp:useBean id="jcypurview" class="com.vstsoft.jcypurview" scope = "session" />
<%
  String currusercode = jcypurview.getUsercode(); //取当前用户usercode
  String curruserid = jcypurview.getUserid();     //取当前用户编号
  String currusername = jcypurview.getUserName(); //取当前用户名称
  String curruserszqx = jcypurview.getUserSzqx(); //取当前用户所在区县 
  String curruserszdw = jcypurview.getUserSzdw(); //取当前用户所在单位

//检测用户是否登录
if (jcypurview.checkLogin() == false)
   {
%>   
	<Script Language=javascript>
		alert("用户已断线或未正常登录,请重新登录!")
		window.open("../index.htm","_top")
	</Script>
<%  
    return;
	}
%>
<%
  //检测用户是否有操作权限 
  if (jcypurview.purviewVerdict("B0500043") == false)
  {
%>
	<Script Language=javascript>
		alert("您没有操作此页权限!");
		window.close();
	</Script>
<%
	return;
   }
%> 

<%vststd std = new vststd();%>
<%
	String uid = std.getValue(request,"uid");
	String sqlStr = "";
	String xphm = "";
	String name = "";
	String zw   = "";
	String dwmc = "";
	String gzzr = "";
	String qx   = "";
	String year = "";
	String month= "";
	String day  = "";

	sun.jdbc.rowset.CachedRowSet crs = null;
	sqlStr = "select ry.xphm xphm, ry.username username, dp_sys.F_Get_mc_by_dm('5002',ry.zw) zw, dw.dwmc dwmc, to_char(ry.gzzr,'yyyymmdd') gzzr, ry.qx qx from jcy_ry ry, jcy_dw dw where userid = '"+uid+"' and ry.dwdm = dw.dwdm";
	crs = std.getResultBySelect(sqlStr);
	crs.next();
	xphm = crs.getString("xphm");	
	name = crs.getString("username");
	zw   = crs.getString("zw");
	dwmc = crs.getString("dwmc");
	gzzr = crs.getString("gzzr");
	qx   = crs.getString("qx");

	xphm = (xphm != null)?xphm:"";
	name = (name != null)?name:"";
	zw   = (zw   != null)?zw:"";
	dwmc = (dwmc != null)?dwmc:"";
	gzzr = (gzzr != null)?gzzr:"";
	qx   = (qx   != null)?qx:"";

	try{
	zw   = zw.substring(0,2);
	}catch(Exception e){}
	year = gzzr.substring(0,4);
	month= gzzr.substring(4,6);
	day  = gzzr.substring(6,8);
%>
<%
  //检测用户是否有操作权限 
  if (!curruserszqx.equals("001") && !curruserszqx.equals(qx))
  //if (1==2)
  {
%>
	<Script Language=javascript>
		alert("您没有操作此页权限!");
		window.close();
	</Script>
<%
	return;
}
%> 
<script language="JavaScript">
function f_check()
{
	var v_zw = "<%=zw%>";
	var v_xphm = "<%=xphm%>";
	if (v_zw.length == 0)
	{
		alert("此公务员没有职务,暂时不能打印证件!");
		return(false);
	}
	else if (v_xphm.length == 0)
	{
		alert("此公务员没有胸牌号码,暂时不能打印证件!");
		return(false);
	}
	else
	{
	factory.printing.Print(false);
	}
}
</script>
<html>
<style media="print">
.noprint { display: none }
</style>
<link rel="stylesheet" href="../style.css" type="text/css">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>打印胸卡</title>
</head>
<body >
<div id="Layer1" style="position:absolute; width:440px; height:264px; z-index:1"><img src="../images/dyxk.jpg" width="350" height="210"></div>
<div id="Layer2" style="position:absolute; width:440px; height:264px; z-index:2; left: 25px;"> 
    
  <table width="350" height="228" border="0" cellpadding="0" cellspacing="0">
    <tr> 
        
      <td width="140" height="86">&nbsp;</td>
        
      <td colspan="4" valign="bottom"><font size="3"><%=dwmc%></font></td>
      </tr>
      <tr> 
        
      <td height="40">&nbsp;</td>
        
      <td colspan="3" valign="bottom"><font size="3"><%=name%></font></td>
        
      <td width="100" valign="bottom">&nbsp;<font size="3"><%=zw%></font></td>
      </tr>
      <tr> 
        
      <td height="41">&nbsp;</td>
        
      <td colspan="4" valign="bottom"><font size="3"><%=xphm%></font></td>
      </tr>
      <tr> 
        
      <td height="32">&nbsp;</td>
        <td width="12" valign="bottom">&nbsp;</td>
        
      <td width="59" valign="bottom"><font size="3"><%=year%></font></td>
        
      <td width="39" valign="bottom"><font size="3"><%=month%></font></td>
        
      <td valign="bottom"><font size="3"><%=day%></font></td>
      </tr>
      <tr> 
        <td height="29">&nbsp;</td>
        <td colspan="4">&nbsp;</td>
      </tr>
    </table>

      <div class=noprint> 
	<table width="0" border="0" cellspacing="0" cellpadding="0" height="0">
      <tr> 
        <td width="350" height="0" align="center">&nbsp; 
          <input name="button" type="button" id="idPrint1" onClick="f_check()" value="打  印" class="input"> 
          <input name="button2" type="button" id="idPrint2" onclick="factory.printing.PageSetup()" value="页面设置" class="input"> 
          <input name="button2" type="button" id="idPrint3" onclick="factory.printing.Preview()" value="打印预览" class="input">
          <input name="button2" type="button" id="idPrint4" onclick="window.close()" value="关闭窗口" class="input"> 
        </td>
      </tr>
    </table>
	</div>
</div>
<iframe name="submitx" width="1000" height="600"  style="display:none"></iframe>
</body>
</html>
<object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="ScriptX.cab">
</object> 
<script>
	function window.onload() {
	factory.printing.header = ""
	factory.printing.footer = ""
	factory.printing.portrait = false
	idPrint1.disabled = false; // enable UI button
	idPrint2.disabled = false;
	idPrint3.disabled = false;
	idPrint4.disabled = false;
	factory.printing.leftMargin = 0.5
	factory.printing.topMargin = 0.5
	factory.printing.rightMargin = 0.5
	factory.printing.bottomMargin = 0.5
	//  factory.printing.paperSize = "A4"
	}
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>

⌨️ 快捷键说明

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