一个用java编写的功能强大的OA系统

源代码在线查看: message.jsp

软件大小: 32919 K
上传用户: l550253832
关键词: java OA系统 编写
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
				
				
				
				
				
				消息中心
				
				
				
				function selAllCheckBox(checkboxname){
					var checkboxboxs = document.all.item(checkboxname);
					if (checkboxboxs!=null)
					{
						// 如果只有一个元素
						if (checkboxboxs.length==null) {
							checkboxboxs.checked = true;
						}
						for (i=0; i						{
							checkboxboxs[i].checked = true;
						}
					}
				}
				
				
				
				
				
								if (!privilege.isUserLogin(request)) {
					out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
					return;
				}
				String name = privilege.getUser(request);
				%>
				
				   
				    
				      消 息 中 心
				    
				  
				   
				     
				        
				           
				             
				              
				            
				             
				              
				            
				             
				              
				            
				             
				               
				                
				              
				            
				          
				        
				    
				  
				   
				      
						
				          
				            
				  
				              
				                
												MessageDb md = new MessageDb();
						
						String sql = "select id from oa_message where receiver="+StrUtil.sqlstr(name)+" and isDraft=0 order by isreaded asc,rq desc";
						int pagesize = 5;
						Paginator paginator = new Paginator(request);
						int curpage = paginator.getCurPage();
				
						int total = md.getObjectCount(sql);
						paginator.init(total, pagesize);
						//设置当前页数和总页数
						int totalpages = paginator.getTotalPages();
						if (totalpages==0)
						{
							curpage = 1;
							totalpages = 1;
						}
				
				int id,type;
				String title="",sender="",receiver="",rq="";
				boolean isreaded = true;
				int i = 0;
				Iterator ir = md.list(sql, (curpage-1)*pagesize, curpage*pagesize-1).iterator();
				while (ir.hasNext()) {
				 	      md = (MessageDb)ir.next(); 
						  i++;
						  id = md.getId();
						  title = md.getTitle();
						  sender = md.getSender();
						  receiver = md.getReceiver();
						  rq = md.getRq();
						  type = md.getType();
						  isreaded = md.isReaded();
						 %>
				                  
				                    
				                      
				                      
				                       
				                        
				                        
				                        
				                        
				                        
				                          []
				                        
				                      
				                      
				              							    switch(type) {
							     case 0:
								  { out.print("个人消息");
								    break; }
								 case 1:
								  { out.print("公司消息");
								    break; }
								 case MessageDb.TYPE_SYSTEM:
								  { out.print("公共消息");
								    break; }
								 case 8:
								  { out.print("管 理 员");
				                    break;}
								}
							  %>
				                      
				                    
				                  
				                  
				              
				            
				            
				          
				        
				0){ %>
				        
				          
				             
				  
				       全选
				    共  条 每页 条 / 
				  
				
				              
					  					  String querystr = "";
				 	  out.print(paginator.getCurPageBlock("message.jsp?"+querystr));
					  %>
					
				            
				          
				        
					
				      
				  
				   
				    
				  
				
				
				
							

相关资源