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

📄 tongxun_geren.jsp

📁 oa办公系统
💻 JSP
字号:
<%@ page language="java" import="java.util.*,cn.jx.ecjtu.oa.ps.pojo.*"
	pageEncoding="GBK"%>
<jsp:directive.page import="javax.servlet.jsp.tagext.TryCatchFinally"/>
<html xmlns="http://www.w3.org/1999/xhtml">
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
		<title>联系人信息</title>
		<link href="../common/defaultFa/css/all.css" rel="stylesheet"
			type="text/css" />

		<link href="../common/defaultFa/css/css.css" rel="stylesheet"
			type="text/css" />
		<script>
//function add(){    
//	window.showModalDialog("preAddUser",'',"dialogHeight:420px;dialogWidth:280px");
//}

function add()
{
  document.f5.action="preAddUser";
  document.f5.submit();	 
}

function read(card_id){
	window.showModalDialog("tongxun_geren_show.jsp?card_id="+card_id,'',"dialogHeight:400px;dialogWidth:520px");
}
function remove(cardid)
{
 msg="确认要删除该联系人么?";
 if(window.confirm(msg))
 {
		document.f4.action="removeusercardServlet";
		document.f4.card_id.value=cardid;
		document.f4.submit();
 }
}

function changePage(page){
 if(page==0){
    page=1; 
 }
	    document.form1.page.value=page;
	    document.form1.action="listusercardServlet";
	    document.form1.submit();	
}

function dossa(){ 
	    document.form1.action="listusercardServlet";
	    document.form1.submit();	
}
</script>
		<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-size: 16px;
}
.STYLE2 {font-size: 14px}
-->
        </style>
	</head>

	<body style="overflow-y:auto"  background="summer_relaxation_JD047.jpg">
		<form id="form1" name="form1" method="post"
			action="FindUserCardServlet">
			<input type="hidden" name="id" value="<%=request.getAttribute("id")%>"/>
			<table border="0" align="center" cellpadding="0" cellspacing="0"
				class="tb_title">

			</table>
			<table width="650" border="0" cellpadding="0" cellspacing="0"
				class="tb_form">
				<!--DWLayoutTable-->
				<tr>
					<td width="650" height="30" nowrap="nowrap" bgcolor="#0099CC">
						<span class="STYLE1">联系人名片</span>					</td>
				</tr>
				<tr>
					<td width="650" align="left" valign="top" nowrap="nowrap">
						<select name="select1">
							<option value="1">
								联系人名片ID
							</option>
							<option value="2">
								姓名
							</option>
							<option value="3">
								联系电话
							</option>
							<option value="4">
								组名
							</option>
						</select>
						<select name="select2">
							<option value="=" selected="selected">
								精确
							</option>
							<option value="like">
								模糊
							</option>
						</select>
						<input type="text" name="text" value="" style="width: 100px;">
						<input name="btn_UserCard_find" type="submit" id="btn_commit"
							value="查  询" />
				  </td>
				</tr>
		  </table>
			<table width="650" border="0" cellpadding="0" cellspacing="1" class="tb_data"
				id="tb_query">
				<thead>
					<tr>
					    <td width="120" height="15" align="center">
							<span class="STYLE2">名片ID</span> </td>
						<td width="102" height="13" align="center">
						<span class="STYLE2">姓名</span>						</td>
						<td width="56" align="center">
						<span class="STYLE2">性别</span>						</td>
						<td width="108" align="center">
						<span class="STYLE2">联系电话</span>						</td>
						<td width="150" align="center">
						<span class="STYLE2">联系地址					    </span></td>
						<td width="141" align="center">
						<span class="STYLE2">操作</span>						</td>
					</tr>
				</thead>			
				
				<%
				    int pageShowUser=6;
				    List<UserCard> usercards=(List<UserCard>) request.getAttribute("USERCARD");
				    int pagenum=1;
				    int pageall=1;
				    try{
				       pagenum=(Integer)request.getAttribute("pageNum");
				       pageall=(Integer)request.getAttribute("ALLPAGE");}
				    catch(Exception e){
				       pagenum=1;
				       pageall=1;
				    }
				    UserCard usercard=null;
				    for(int i=(pagenum-1)*pageShowUser;i<usercards.size() && i<pagenum*pageShowUser;i++){
				    //for(int i=0;i<usercards.size();i++){
				       
				       if(usercards.get(i)!=null) {
				       usercard=usercards.get(i);	
				       }
				%>
					<tr>
					    <td height="20">
							<div align="center">
								<%=usercard.getCard_id()%>
							</div>
						</td>
						<td height="20">
							<div align="center">
								<%=usercard.getName() %>
							</div>
						</td>
						<%
							String s="s";
							if(usercard.getGender()==true)  s="男";
							else s="女";
							%>
						<td align="center" nowrap="nowrap">
								<%= s %>
							
							<%--<c:choose>
								<c:when test="${usercard.getGender()=='true'}">男</c:when>
								<c:when test="${usercard.getGender()=='false'}">女</c:when>
							</c:choose>
						--%>
						</td>
						<td align="center" nowrap="nowrap">
							<%=usercard.getPhone()%>
						</td>
						<td align="center" nowrap="nowrap">
							<%=usercard.getHome_address()%>
						</td>
						<td width="141" align="center" nowrap="nowrap">
							<a href="javascript:remove(card_id=<%=usercard.getCard_id()%>)">删除</a>
							<a href="premodifyusercardServlet?card_id=<%=usercard.getCard_id()%>">编辑</a>
							<a href="ShowUserDetailServlet?card_id=<%=usercard.getCard_id()%>">详细信息</a>						</td>
					</tr>				
				
				<%
				}
				%>
		  </table>
			<table width="60%" border="0" cellpadding="0" cellspacing="0"
				class="tb_foot">
				<tr>
					<td align="center"><a href="javascript:changePage(1)" onclick="">首页 </a>&nbsp;
                    <a href="javascript:changePage(${requestScope.pageNum-1 })">上一页</a>&nbsp;
                    <a href="javascript:changePage(${requestScope.pageNum+1 })">下一页 </a>&nbsp;
                    <a href="javascript:changePage(${requestScope.ALLPAGE})">最后一页</a>&nbsp;
                    <input name="page" type="text" value="${requestScope.pageNum }" size="3" />
                    <input name="btn_new" type="button" id="btn_new" value=" 跳转 " onClick="dossa()" /></td>
				</tr>
			</table>
			<table width="60%" border="0" align="center" cellpadding="0"
				cellspacing="0" class="tb_foot">

			</table>
		</form>
		<form name="f4" id="f4" action="" method="post">
			<input type="hidden" name="card_id">
		</form>
		<form name="f5" id="f5" action="" method="post">
		<input type="hidden" name="id" value="<%=request.getAttribute("id")%>"/>
			<table border="0" align="center" cellpadding="0" cellspacing="0"
				class="tb_foot">
				<tr>
					<td align="center">
						<input type="submit" name="Submit2" value=" 添  加 " onClick="add()">
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>

⌨️ 快捷键说明

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