📄 setting.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.recordset.AddressListTypeRecordSet" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat" %>
<jsp:useBean id="userinfo" scope="session" class="cn.com.aheadsoft.util.UserInfo"/>
<jsp:useBean id="upm" scope="session" class="cn.com.aheadsoft.manage.UserPurviewManage"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
<title>通讯录类别设置</title>
<%
int q23 = upm.getUserPopInt(userinfo,"2","3","q");
int i23 = upm.getUserPopInt(userinfo,"2","3","i");
int u23 = upm.getUserPopInt(userinfo,"2","3","u");
int d23 = upm.getUserPopInt(userinfo,"2","3","d");
%>
<script>
<!--
function update(id,key,val) {
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
len1=document.addresstype.ALT_Owner.options.length;
for(i=len1-1;i>=0;i--) {
document.addresstype.ALT_Owner.remove(i);
}
optionnew1=document.createElement("option");
optionnew1.text='共享';
optionnew1.value='0';
if(isIE) {
document.addresstype.ALT_Owner.add(optionnew1);
}else {
document.addresstype.ALT_Owner.appendChild(optionnew1);
}
optionnew2=document.createElement("option");
optionnew2.text='个人';
optionnew2.value='<%= StringFormat.Source2GB(userinfo.GetUserID()) %>';
if(isIE) {
document.addresstype.ALT_Owner.add(optionnew2);
}else {
document.addresstype.ALT_Owner.appendChild(optionnew2);
}
document.addresstype.ALT_ID.value = id;
document.addresstype.ALT_Title.value = key;
if(val=="") {
val = " ";
}
len=document.addresstype.ALT_Owner.options.length;
if(len>0){
for(i=len-1;i>=0;i--) {
if(document.addresstype.ALT_Owner.options[i].value!=val) {
document.addresstype.ALT_Owner.remove(i);
}else {
document.addresstype.ALT_Owner.options[i].selected=true;
}
}
}
document.addresstype.ALT_Owner.value = val;
document.addresstype.status.value = "u";
document.addresstype.ALT_Title.focus();
}
function atSubmit(obj){
isOK=false;
lab="";
for(i=0;i<obj.length;i++){
if(obj.elements[i].value!=null && obj.elements[i].value!=""){
isOK=true;
}else{
isOK=false;
lab=obj.elements[i].alt;
obj.elements[i].focus();
break;
}
}
if(!isOK){
alert("您没有填写"+lab+"!请填写后提交。");
return false;
}else{
//obj.submit();
}
}
function atDelete() {
return confirm("您确定要删除吗?");
}
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr class="trA">
<td> 您的位置:通讯管理 >> 通讯录 >> <font class="fontcolor">类别设置</font></td>
</tr>
<tr height="8" >
<td >
</td>
</tr>
<tr>
<td align="center" >
<table border="0" width="98%" align="center" class="collapse">
<tr >
<td class="tdA" colspan="9" align="center"><div align="left">通讯录类别设置</div></td>
</tr>
<form action="/krm/servlet/AddressListTypeServlet" method="post" name="addresstype" onsubmit="return atSubmit(this)">
<%if(i23 > 0) {%>
<tr>
<td width="15%" class="common bgcolor" align="center" >类别名称</td>
<td class="common"> <input type="text" class="long" name="ALT_Title" alt="类别名称"></td>
</tr>
<tr>
<td width="10%" class="common bgcolor" align="center" >归属</td>
<td class="common"> <select name="ALT_Owner" alt="归属">
<option value="0">共享</option>
<option value="<%= StringFormat.Source2GB(userinfo.GetUserID()) %>">个人</option>
</select>
</td>
</tr>
<input type="Hidden" name="status" value="i">
<input type="Hidden" name="ALT_ID" value="0">
<tr>
<td colspan="2" align="center" class="tdC"><input name="submit" type="submit" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" value="提 交">
</td>
</tr>
<%}%>
</form>
</table>
<br>
<table border="0" width="98%" bordercolor="A1B7DB" class="collapse">
<tr>
<td width="10%" class="tdB" align="center">序号</td>
<td width="20%" class="tdB" align="center">名称</td>
<td width="40%" class="tdB" align="center">归属状态</td>
<td width="15%" class="tdB" align="center">修改</td>
<td width="15%" class="tdB" align="center">删除</td>
</tr>
<%
AddressListTypeRecordSet recordset = (AddressListTypeRecordSet)request.getAttribute("type");
//session.removeAttribute("type");
if(recordset != null && recordset.size() > 0) {
int num = 1;
while(recordset.next()) {
%>
<tr <%
if(num%2==0){
%> class="bgcolor"<%}%>>
<td width="10%" class="common" align="center" ><%= num %></td>
<td width="20%" class="common" align="center" ><%= StringFormat.Source2GB(recordset.getALT_Title()) %></td>
<td width="40%" class="common" align="center" ><%= recordset.getALT_Owner().equals("0")?"共享":"个人" %></td>
<td width="15%" class="common" align="center" >
<%
if(recordset.getALT_Owner().equals("0")) {
%>
<a <%if(u23 > 0) {%> href="javascript:update("<%= StringFormat.Source2GB(recordset.getALT_ID()) %>","<%= StringFormat.Source2GB(recordset.getALT_Title()) %>","<%= StringFormat.Source2GB(recordset.getALT_Owner()) %>");" <%}%> >修改</a>
<%
}else {
%>
<a href="javascript:update("
<%= StringFormat.Source2GB(recordset.getALT_ID()) %>","
<%= StringFormat.Source2GB(recordset.getALT_Title()) %>","
<%= StringFormat.Source2GB(recordset.getALT_Owner()) %>");">修改</a>
<%
}
%>
</td>
<td width="15%" class="common" align="center" >
<%
if(recordset.getALT_Owner().equals("0")) {
%>
<a <%if(d23 > 0) {%> href="/krm/servlet/AddressListTypeServlet?status=d&ALT_ID=<%= recordset.getALT_ID() %>" onclick="return atDelete()" <%}%>>删除</a>
<%
}else {
%>
<a href="/krm/servlet/AddressListTypeServlet?status=d&ALT_ID=<%= recordset.getALT_ID() %>" onclick="return atDelete()">删除</a>
<%
}
%>
</td>
</tr>
<%
num++;
}
}
%>
<tr><td colspan="8" class="tdC"> </td>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -