<%@page contentType="text/html; charset=GBK"%><%@include file="../../include/Admin.jsp"%><%@include file="../../include/DBCon.jsp"%><%if(!StrFormat.isNull(request.getParameter("act"))){if(!StrFormat.isNull(request.getParameter("title")) && request.getParameter("act").equals("add")){try{DBStmt = DBCon.createStatement();DBSql = "select title from home where title='"+ StrTrans.toGBK(request.getParameter("title")) +"'";DBRs = DBStmt.executeQuery(DBSql);if(!DBRs.next()){DBSql = "insert into home (title,body,homepic,isbest,addid,time) values ('"+ StrTrans.toGBK(request.getParameter("title")) +"','"+ StrTrans.toGBK(request.getParameter("body")) +"','"+ StrTrans.toGBK(request.getParameter("picurl")) +"','"+StrTrans.toGBK(request.getParameter("isbest"))+"','"+AdmID+"','"+DateFormat.getDateTime()+"')";DBStmt.executeUpdate(DBSql);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(\"HomeList.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" src="../../js/flv.js"></script><script type="text/javascript">function doCheck(){if(isNull($GenID('title').value)){alert('名称不能为空！');		$GenID('title').focus();return false;}	return true;}</script></head><body><form action="?act=add" method="post" name="form" id="form" onSubmit="return doCheck();"><table cellpadding="0" cellspacing="1" class="table_list"><caption>添加专辑</caption>	<tr><th width="20%"><span class="red">*</span> <strong>专辑名称</strong></th><td>&nbsp;<input type="text" name="title" id="title" size="50" /></td></tr><tr><th valign="top"><strong>简要介绍</strong></th><td>&nbsp;<textarea name="body" cols="80" rows="10" id="body"></textarea></td></tr><tr><th><strong>专辑形象</strong></th><td>&nbsp;<input name="pic" type="text" id="pic" value="http://" size="35" onpropertychange="InPicUrl();" /><input name="picurl" type="hidden" id="picurl"><input name="open" type="button" class="button_style" onClick="javascript:OpenUrl('../UpPic.jsp?filedir=home',0);" value="上传图片">		</td></tr><tr><th><strong>是否推荐</strong></th><td>&nbsp;<input name="isbest" type="radio" class="radio_style" value="0" checked>否&nbsp;&nbsp;<input name="isbest" type="radio" class="radio_style" value="1">是</td></tr></table><div id="button"><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><%}%><%@include file="../../include/DBConClose.jsp"%>