一个完整的门户网站,基于JSP环境下开发的,使用SQL数据库.

源代码在线查看: modify_theme.jsp~76~

软件大小: 38271 K
上传用户: yuanshuai440
关键词: JSP SQL 门户 网站
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
				
				
				
								int count=0;
				up.initialize(pageContext);
				try{up.upload();}catch(Exception e){}
				Request uprequest=up.getRequest();
				int lid=ParamUtils.getIntParameter(uprequest,"fsid");
				String action =ParamUtils.getRequestString(uprequest,"action");
				BasetableFactory bf=BasetableFactory.getInstance();
				boolean falg=false;
				if(action==null||"".equals(action)){
				    return;
				}else if("add".equals(action)){
				        java.util.Random r=new java.util.Random(System.currentTimeMillis()+1);
				        long longr=r.nextLong();
				        long longd=System.currentTimeMillis()+longr;
				        String upname=new Long(longr).toString();
				        upname=upname.replace('-','_');
				        File f=up.getFiles().getFile(0);
				        if(!f.isMissing()){
				                upname="upload/forum/"+upname+f.getFileExt();
				                f.saveAs(upname+f.getFileExt());
				                bf.CreateForum(request,upname);
				        }
				        response.sendRedirect("manage_link.jsp");
				}else if("del".equals(action)&&bf.DeleteLink("WHERE lid="+lid)){
				        response.sendRedirect("manage_link.jsp");
				}else if("modify".equals(action)){
				        Link l=bf.SearchLink("WHERE lid="+lid);
				        l.setName(ParamUtils.getRequestString(request,"name"));
				        l.setUrl(ParamUtils.getRequestString(request,"url"));
				        response.sendRedirect("manage_link.jsp");
				}else{
				        session.setAttribute("error","在友情链接中操作失败");
				        response.sendRedirect("error.jsp");
				}
				%>
							

相关资源