<%@page contentType="text/html; charset=GBK"%><%@include file="../../include/Admin.jsp"%><%@include file="../../include/DBCon.jsp"%><%if(!StrFormat.isNull(request.getParameter("act"))){if(StrFormat.isNum(request.getParameter("id")) && request.getParameter("act").equals("del")){if(!request.getParameter("id").equals("1")){try{DBSql="delete from Flv where id="+request.getParameter("id").trim();DBStmt = DBCon.createStatement();DBStmt.executeUpdate(DBSql);MesStr = "删除成功！";}catch(Exception ie){MesStr = "修改失败！";if(isShowErr!=0){MesStr += "\\r\\nErrInfo:"+ie;}}finally{if(DBStmt!=null)DBStmt.close();}}else{MesStr = "删除失败！";}}else{MesStr = "操作错误！";}out.print("<script language=\"javascript\" src=\"../../js/common.js\"></script><script language=\"javascript\">alert(\""+MesStr+"\");BackURL(\"FlvList.jsp\",\"\");</script>");}else{%><html><head><meta http-equiv="Content-Type" content="text/html; charset=GBK" /><meta name="keywords" content="向继根,Xiang Jigen,QQ,190582560"><meta name="description" content="Programmer:向继根 QQ:190582560 Email:190582560@qq.com"><meta name="author" content="向继根,Xiang Jigen" /><title><%=TitleStr%>视频管理</title><link rel="stylesheet" type="text/css" href="../images/Style.css"/><script type="text/javascript" src="../../js/min.js"></script><script type="text/javascript" src="../../js/common.js"></script><script type="text/javascript" src="../../js/css.js"></script><script type="text/javascript">function doDel(id){	confirmurl('FlvList.jsp?act=del&id='+id,'确认要 删除 此视频吗？');	return false;}</script></head><body><table cellpadding="0" cellspacing="1" class="table_list"><caption>视频管理</caption><tr><td><a href="AddFlv.jsp"><span class="red">添加视频</span></a></td></tr></table><table cellpadding="0" cellspacing="1" class="table_list"><caption>视频列表</caption><tr><th width="5%" class="align_c"><strong>序号</strong></th><th width="35%" class="align_c"><strong>视频名称</strong></th><th width="20%" class="align_c"><strong>所属类别</strong></th>	<th width="10%" class="align_c"><strong>添加者</strong></th><th width="20%" class="align_c"><strong>添加时间</strong></th><th width="10%" class="align_c"><strong>管理操作</strong></th></tr><%String NowPage="",FileName="",Footer="",WhereStr="";NowPage = request.getParameter("page");	FileName="FlvList.jsp?do=list";if(StrFormat.isNull(NowPage)||!StrFormat.isNum(NowPage)){NowPage="1";} if(!StrFormat.isNull(request.getParameter("typeid")) && StrFormat.isNum(request.getParameter("typeid")) && !request.getParameter("typeid").equals("0")){	WhereStr+=" and f.typeid="+request.getParameter("typeid").trim();	FileName+="&typeid="+request.getParameter("typeid").trim();}if(!StrFormat.isNull(request.getParameter("key"))){	WhereStr+=" and (f.title like '%"+StrTrans.toGBK(request.getParameter("key").trim())+"%')";	FileName+="&key="+StrTrans.toGBK(request.getParameter("key").trim());}DBSql="Select f.id,f.title,f.typeid,f.addid,f.`time`,t.name AS TypeName,a.name AS UserName From flv AS f Left Join `type` AS t ON f.typeid = t.id Left Join admin AS a ON f.addid = a.id where f.id!=0"+WhereStr+" order by f.id desc";GenPages pages=new GenPages(DBCon);pages.setPageSize(PageSize);pages.setNowPage(Integer.parseInt(NowPage));pages.setFileName(FileName);try{	pages.setQuery(DBSql);	Footer=pages.getFooter();if(pages.getCountPage()>0){		DBRs=pages.getResult();	int i=pages.StartRows();		while(DBRs.next()){i++;%><tr><td class="align_c">&nbsp;<%=i%></td><td>&nbsp;<a href="../../play.jsp?id=<%=DBRs.getInt("id")%>"><%=StrFormat.isNull(DBRs.getString("title"),"")%></a><span class="gray">(ID:<%=DBRs.getInt("id")%>)</span></td><td>&nbsp;<span class="black"><%=StrFormat.isNull(DBRs.getString("TypeName"),"")%></span></td><td>&nbsp;<%=StrFormat.isNull(DBRs.getString("UserName"),"")%></td><td class="align_c"><span class="black"><%=StrFormat.isNull(DBRs.getString("time"),"")%></span></td><td class="align_c"><%out.print("<a href=\"ModFlv.jsp?id="+DBRs.getInt("id")+"&page="+NowPage+"\">修改</a>&nbsp;<span class=\"black\">|</span>&nbsp;<a href=\"javascript:void(0);\" onClick=\"doDel('"+DBRs.getInt("id")+"');return false;\">删除</a>");%></td></tr><%	 	}	}else{		out.print("<tr><td colspan=\"6\" class=\"align_c\" valign=\"middle\">暂时没有内容</td></tr>");}}finally{if(DBRs!=null)DBRs.close();if(DBStmt!=null)DBStmt.close();}%></table><div id="pages"><%=Footer%></div><form method="get" name="search" action="?"><table cellpadding="0" cellspacing="1" class="table_list"><caption>视频搜索</caption><tr><td class="align_c">视频名称：<input type="text" name="key" id="key" value="<%if(!StrFormat.isNull(StrTrans.toGBK(request.getParameter("key")))){out.print(StrTrans.toGBK(request.getParameter("key")));}%>" size="30"/>&nbsp;<input type="submit" name="submit" class="button_style" value="搜索"></td></tr></table></form></body></html><%}%><%@include file="../../include/DBConClose.jsp"%>