?? save.jsp
字號(hào):
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="../conn.jsp"%>
<%request.setCharacterEncoding("gb2312");
String actions;
String classid=request.getParameter("Classid");
String Nclassid=request.getParameter("Nclassid");
String softname=request.getParameter("softname");
String yxhj=request.getParameter("yxhj");
String grade=request.getParameter("Grade");
String downurl=request.getParameter("downurl");
String urlsay=request.getParameter("urlsay");
String softsize=request.getParameter("softsize");
String codeshow=request.getParameter("codeshow");
String abouturl=request.getParameter("abouturl");
String images=request.getParameter("images");
String sq=request.getParameter("sq");
String lang=request.getParameter("lang");
String tj=request.getParameter("tj");
String jp=request.getParameter("jp");
String jb=request.getParameter("jb");
String note=request.getParameter("txtnote");
if((session.getAttribute("admin")==null)){
response.sendRedirect("admin.jsp");
}else{
if((softname==null)|(softname.equals(""))){%>
<script language="javascript">
alert("軟件名稱不能為空");
window.history.go(-1);
</script>
<%}else{
if ((note==null)|(note.equals(""))){%>
<script language="javascript">
alert("軟件簡介不能為空");
window.history.go(-1);
</script>
<% }else{
//out.print(classid);
if((classid==null)|(classid.equals("==請(qǐng)選類型=="))){
out.print("<script language=Javascript>alert('請(qǐng)選擇類型');");
out.print("window.histroy.go(-1);</script>");
}else{
if((Nclassid==null)|(Nclassid.equals("==請(qǐng)選分類=="))){
out.print("<script language=Javascript>alert('請(qǐng)選擇分類');");
out.print("window.histroy.go(-1);</script>");
}else{
actions="add";
//out.print(request.getParameter("action"));
if(actions.equals(request.getParameter("action"))){
String sql="INSERT INTO download(softname,downurl,urlsay,softsize,codeshow,abouturl,images,sq,lang,tj,jp,jb,note,yxhj,grade,classid,nclassid)";
sql=sql+" VALUES('"+softname+"','"+downurl+"','"+urlsay+"','"+softsize+"','"+codeshow+"','"+abouturl+"','"+images+"','"+sq+"','"+lang+"','"+tj+"','"+jp+"','"+jb+"','"+note+"','"+yxhj+"','"+grade+"','"+classid+"','"+Nclassid+"')";
//out.print(sql);
stmt.executeUpdate(sql);
}else{
actions="edit";
if(actions.equals(request.getParameter("action"))){
String sql="Update download set softname='"+softname+"',downurl='"+downurl+"',urlsay='"+urlsay+"',softsize='"+softsize+"',codeshow='"+codeshow+"',abouturl='"+abouturl+"',images='"+images+"',sq='"+sq+"',lang='"+lang+"',tj='"+tj+"',jp='"+jp+"',jb='"+jb+"',note='"+note+"',yxhj='"+yxhj+"',grade='"+grade+"',nclassid='"+Nclassid+"' where id='"+request.getParameter("softid")+"'";
//out.print(sql);
stmt.executeUpdate(sql);
}
}
}
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type=text/css>
<!--
BODY{
margin:0px;
FONT-SIZE: 12px;
FONT-FAMILY: "宋體", "Verdana", "Arial", "Helvetica", "sans-serif";
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
background-color: #D4DEF9;
}
table { border:0px; }
td { font:normal 12px 宋體; }
img { vertical-align:bottom; border:0px; }
a { font:normal 12px 宋體; color:#000000; text-decoration:none; }
a:hover { color:#428EFF;text-decoration:underline; }
.sec_menu { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title { }
.menu_title span { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; }
.menu_title2 { }
.menu_title2 span { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
input,select,Textarea{
font-family:宋體,Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
}
.style1 {
color: #3D6DD3;
font-weight: bold;
}
-->
</style>
<title>無標(biāo)題文檔</title>
</head>
<body bgcolor="#D4DEF9">
<br><br>
<table bgcolor="#39867b" width="100%" height="" align="center" cellpadding="3" cellspacing="1" border="0">
<tr><td width="100%" height="20" bgcolor="#e1f4ee">
<p align="center">
<font color="#000000">
<%actions="add";
if(actions.equals(request.getParameter("action"))){
out.print("添加");
}else{
out.print("修改");
}
%>程序成功
</font>
</p></td></tr>
<tr>
<td width="100%" bgcolor="#e1f4ee">
<p align="left">
<br>
顯示名稱為:<%=request.getParameter("softname")%> 程序演示地址:<%=codeshow%><br></p>
您可以進(jìn)行其它操作:<a href="addsoft.jsp" target="_self">添加</a> <a href="editsoft.jsp" target="_self">修改刪除</a>
</td>
</tr>
</table>
</body>
</html>
<%}
}
}
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -