<%@page contentType="text/html; charset=GBK"%><%@include file="../../include/Admin.jsp"%><%@include file="../../include/DBCon.jsp"%><%String folderPath=PathStr+UpPathStr+"flv/"+request.getParameter("olddir")+"/";if(!StrFormat.isNull(request.getParameter("act"))){if(!StrFormat.isNull(request.getParameter("name")) && request.getParameter("act").equals("mod")){try{DBStmt = DBCon.createStatement();DBSql = "select name from Ser where (name='"+ StrTrans.toGBK(request.getParameter("name")) +"' or dir='"+ StrTrans.toGBK(request.getParameter("dir")) +"') and id!="+request.getParameter("id");DBRs = DBStmt.executeQuery(DBSql);if(!DBRs.next()){DBSql = "update Ser set name='"+StrTrans.toGBK(request.getParameter("name"))+"',dir='"+StrTrans.toGBK(request.getParameter("dir"))+"' where id="+request.getParameter("id");DBStmt.executeUpdate(DBSql);if(!request.getParameter("olddir").equals(request.getParameter("dir"))){Flv Flv = new Flv();Flv.RenFolder(folderPath,request.getParameter("dir")+"/");}MesStr = "修改成功！";}else{MesStr = "修改失败：该名称已存在，请更换其他名称！";}}catch(Exception ie){MesStr = "修改失败！";if(isShowErr!=0){MesStr += "\\r\\nErrInfo:"+ie;}}finally{if(DBRs!=null)DBRs.close();if(DBStmt!=null)DBStmt.close();}}else{MesStr = "操作错误！";}out.print("<script language=\"javascript\" src=\"../../js/common.js\"></script><script language=\"javascript\">alert(\""+MesStr+"\");BackURL(\"SerList.jsp\",\"\");</script>");}else{if(StrFormat.isNum(request.getParameter("id"))){DBSql = "select * from ser where id="+request.getParameter("id");try{DBStmt = DBCon.createStatement();DBRs = DBStmt.executeQuery(DBSql);if(DBRs.next()){%><html><heSer><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" src="../../js/flv.js"></script><script type="text/javascript">function doCheck(){if(isNull($GenID('name').value)){alert('名称不能为空！');		$GenID('name').focus();return false;}if(isNull($GenID('dir').value)){alert('标识不能为空！');		$GenID('dir').focus();return false;}	return true;}</script></heSer><body><form action="?act=mod" method="post" name="form" id="form" onSubmit="return doCheck();"><table cellpSerding="0" cellspacing="1" class="table_list"><caption>修改服务器</caption>	<th width="20%"><span class="red">*</span> <strong>服务器名称</strong></th><td>&nbsp;<input type="text" name="name" id="name" value="<%=StrFormat.isNull(DBRs.getString("name"),"")%>" size="35" /></td></tr><tr><th><span class="red">*</span> <strong>服务器标识</strong></th><td>&nbsp;<input name="dir" type="text" id="dir" value="<%=StrFormat.isNull(DBRs.getString("dir"),"")%>" size="15"/>无特殊字符</td></table><div id="button"><input name="id" type="hidden" id="id" value="<%=DBRs.getString("id")%>"><input name="olddir" type="hidden" id="olddir" value="<%=StrFormat.isNull(DBRs.getString("dir"),"")%>"><input type="submit" name="dosubmit" class="button_style" value="确 定" />&nbsp;<input type="reset" name="reset" class="button_style" value="清 除" />&nbsp;<input type="button" name="button" class="button_style" value="返 回" onClick="history.back();"></div></form></body></html><%}else{out.print("<script language=\"javascript\">alert(\"无数据！\");history.back();</script>");}}finally{if(DBRs!=null)DBRs.close();if(DBStmt!=null)DBStmt.close();}}else{out.print("<script language=\"javascript\">alert(\"操作错误！\");history.back();</script>");}}%><%@include file="../../include/DBConClose.jsp"%>