⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editsoft.jsp

📁 JSP+ORACLE网站开发实例(下).rar
💻 JSP
字号:
<%@ include file="../conn.jsp"%>
<%! 
String replacenull(String a){ 
	if(a==null){
return "&nbsp;"; 
	}else{
return a; 
	}
} 
%> 
<%! 
String selected(String a,String b){ 
	if(a.equals(b)){
return "selected"; 
	}else{
return ""; 
	}
} 
%> 
<%request.setCharacterEncoding("GB2312");
 String classid=request.getParameter("classid");
 String Nclassid=request.getParameter("Nclassid");
 String did=request.getParameter("id");
if ((session.getValue("admin")==null)){
	response.sendRedirect("login.jsp"); 
}else{
 String aaa= (String) session.getValue("flag"); 
	int ddd=Integer.parseInt(aaa);
	if(ddd>2){
		out.print("<br><p align=center>您没有操作的权限</p>");
	}else{
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>修 改 下 载 视 频</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<%
String sql="select * from scott.Nclass order by Nclassid asc"; 
ResultSet rs=stmt.executeQuery(sql); 
%>
<SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        int count = 0;
        while(rs.next()){
        %>
subcat[<%=count%>] = new Array("<%=rs.getString("Nclass")%>","<%=rs.getString("classid")%>","<%=rs.getString("Nclassid")%>");
        <%
        count++;
        }
        rs.close();
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</SCRIPT>
<body bgcolor=#468ea3>
<form method="POST"  name="myform"  action="adminsave.jsp?id=<%=request.getParameter("id")%>&action=edit">
  <TABLE width="602" border="0" align="center" cellspacing="1">
    <TR align="center"> 
      <TD colspan="4" height="30" bgcolor="#145f74" width="594"><b><FONT color="#FFFFFF">修 
        改 下 载 视 频</FONT></b></TD>
    </TR>
    <tr> 
      <td width="75" align="right" valign="top" height="30" bgcolor="#a5d0dc"><b><font color="#FF0000">影片类型:</font></b></td>
      <td width="225" bgcolor="#a5d0dc" height="30"> 
           <%sql="select * from scott.class "; 
           rs=stmt.executeQuery(sql); 
      
%>
		<SELECT name="classid" onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" size="1">
        <% 
        while(rs.next()){
%>
          <OPTION value="<%=rs.getString("classid")%>" <%=selected(rs.getString("classid"),classid)%> ><%=rs.getString("class")%></OPTION>
          <%
       
	  }
        rs.close();
   
%>
        </SELECT>
      </td>
      <td width="75" bgcolor="#a5d0dc" align="right" height="30"> <B>选择分类:</B> 
      </td>
      <td width="225" bgcolor="#a5d0dc" height="30"> 
        <SELECT name="Nclassid" size="1">
         <%sql="select * from scott.nclass "; 
           rs=stmt.executeQuery(sql); 
		   while(rs.next()){
      
%>
 <OPTION value="<%=rs.getString("nclassid")%>" <%=selected(rs.getString("nclassid"),Nclassid)%> ><%=rs.getString("nclass")%></OPTION>
          <%
       
	  }
        rs.close();
   
%>
        </SELECT>
      </td>
    </tr>
    <%    sql="select * from scott.download where id='"+request.getParameter("id")+"'"; 
           rs=stmt.executeQuery(sql); 
if(rs.next()){       
%>
    <tr> 
      <td width="75" align="right" height="30" bgcolor="#CCE6ED"><b><font color="#FF0000">影片</font></b><font color="#FF0000"><b>名称:</b></font></td>
      <td width="225" height="30" bgcolor="#CCE6ED"> <FONT color="#FF0000"> 
        <input type="text" name="txtshowname" size="33"            
          class="smallinput" maxlength="100" value="<%=replacenull(rs.getString("showname"))%>">
        </FONT></td>
      <td width="75" height="30" bgcolor="#CCE6ED" align="right"> <b>影片版本:</b></td>
      <td width="225" height="30" bgcolor="#CCE6ED"> <FONT color="#FF0000"> 
        <input type="text" name="txtbb" size="33"            
          class="smallinput" maxlength="100" value="<%=replacenull(rs.getString("bb"))%>">
        </FONT> </td>
    </tr>
    <tr> 
      <td width="75" align="right" height="14" nowrap bgcolor="#A5D0DC">电影格式:</td>
      <td width="450" height="14" colspan="3" bgcolor="#A5D0DC"> [<img border="0" src="../images/rm.gif"> 
        <input type="radio" value="rm" name="movie">
        ]&nbsp;&nbsp;&nbsp;&nbsp; [<img border="0" src="../images/win.gif"> 
        <input type="radio" value="win" name="movie" checked>
        ]&nbsp;&nbsp;&nbsp; [不是电影 
        <input type="radio" value="" name="movie" >
        ]如果是在线电影请选择播放格式</td>
    </tr>
    <tr> 
      <td width="75" align="right" height="15" nowrap bgcolor="#A5D0DC">会员:</td>
      <td width="450" height="15" colspan="3" bgcolor="#A5D0DC">是否会员
        <input type="checkbox" name="club" value="on">
        &nbsp;如果选择会员,只有会员才可观看</td>
    </tr>
    <tr bgcolor="#cce6ed"> 
      <td width="75" align="right" height="30"><b><font color="#FF0000">下载地址1</font>:</b></td>
      <td width="450" height="30" colspan="3"> 
        <input type="text" name="txtfilename" size="82"            
          class="smallinput" maxlength="100" value="<%=replacenull(rs.getString("filename"))%>">
      </td>
    </tr>
    <tr> 
      <td width="75" align="right" height="30" bgcolor="#a5d0dc"><b>下载地址2:</b></td>
      <td width="450" height="30" bgcolor="#a5d0dc" colspan="3"> 
        <input type="text" name="txtfilename1" size="82"             
          class="smallinput" maxlength="100" value="<%=replacenull(rs.getString("filename1"))%>">
      </td>
    </tr>
    <tr bgcolor="#cce6ed"> 
      <td width="75" align="right" height="30"><b>下载地址3:</b></td>
      <td width="450" height="30" colspan="3"> 
        <input type="text" name="txtfilename2" size="82"             
          class="smallinput" maxlength="100" value="<%=replacenull(rs.getString("filename2"))%>">
      </td>
    </tr>
    <tr bgcolor="#cce6ed"> 
      <td width="75" align="right" height="30" bgcolor="#A5D0DC"><b>推荐度:</b></td>
      <td width="450" height="30" colspan="3" bgcolor="#A5D0DC"> 
        <select name="hot" size="1">
          <option <%=selected(rs.getString("hot"),"1")%> value="1" name="hot">一星级</option>
          <option <%=selected(rs.getString("hot"),"2")%> value="2" name="hot">二星级</option>
          <option <%=selected(rs.getString("hot"),"3")%> value="3" name="hot">三星级</option>
          <option <%=selected(rs.getString("hot"),"4")%> value="4" name="hot">四星级</option>
          <option <%=selected(rs.getString("hot"),"5")%> value="5" name="hot">五星级</option>
        </select>
        <!--<input type="text" name="hot" size="60" class="smallinput" maxlength="100" value="3">-->
      </td>
    </tr>
    <tr> 
      <td width="75" align="right" height="30" bgcolor="#CCE6ED"><b>影片大小:</b></td>
      <td width="225" height="30" bgcolor="#CCE6ED"> 
        <!--<input type="text" name="system" size="60" class="smallinput" maxlength="100" value="Win98/2000+PWS4&NT+IIS4/5">-->
        <input type="text" name="size" size="33"             
          class="smallinput" maxlength="100" value="<%=replacenull(rs.getString("size1"))%>">
      </td>
      <td width="75" height="30" bgcolor="#CCE6ED" align="right"> <b>运行环境:</b> 
      </td>
      <td width="225" height="30" bgcolor="#CCE6ED"> 
        <select name="system" size="1">
          <option <%=selected(rs.getString("system"),"Win9x/WinNT/Win2000/WinXP/WinME")%> value="Win9x/WinNT/Win2000/WinXP/WinME" name="system"><font color="#FF0000">Win9x/WinNT/Win2000/WinXP/WinME</font></option>
          <option <%=selected(rs.getString("system"),"Win9x/WinNT/Win2000/WinME")%> value="Win9x/WinNT/Win2000/WinME" name="system"><font color="#FF0000">Win9x/WinNT/Win2000/WinME</font></option>
          <option <%=selected(rs.getString("system"),"Win9x/WinNT/Win2000")%> value="Win9x/WinNT/Win2000" name="system"><font color="#FF0000">Win9x/WinNT/Win2000</font></option>
          <option <%=selected(rs.getString("system"),"Win9x/WinNT")%> value="Win9x/WinNT" name="system"><font color="#FF0000">Win9x/WinNT</font></option>
          <option <%=selected(rs.getString("system"),"Win9x/WinME")%> value="Win9x/WinME" name="system"><font color="#FF0000">Win9x/WinME</font></option>
        </select>
      </td>
    </tr>
    <tr bgcolor="#cce6ed"> 
      <td width="75" align="right" height="30" bgcolor="#A5D0DC"><b>影片来源:</b></td>
      <td height="30" bgcolor="#A5D0DC" width="225"> 
        <input type="text" name="fromurl" size="33"             
          class="smallinput" maxlength="100" value="<%=replacenull(rs.getString("fromurl"))%>">
      </td>
      <td height="30" bgcolor="#A5D0DC" width="75" align="right"><B>影片图片:</B></td>
      <td height="30" bgcolor="#A5D0DC" width="225"> 
        <input type="text" name="images" size="33"             
          class="smallinput" maxlength="160" value="<%=replacenull(rs.getString("images"))%>">
      </td>
    </tr>
    <tr bgcolor="#cce6ed"> 
      <td width="75" align="right" height="30"><b>授权形式:</b></td>
      <td width="450" height="30" colspan="3"> 
        <select name="order" size="1">
          <option selected value="共享影片" name="order">共享影片</option>
          <option value="免费影片" name="order">免费影片</option>
          <option value="商业影片" name="order">商业影片</option>
        </select>
        <!--<input type="text" name="order" size="60" class="smallinput" maxlength="100" value="免费">-->
        是否推荐 
        <input type="checkbox" name="hots" value="on"  checked>
        是否精品
<input type="checkbox" name="hide" value="on" >
      </td>
    </tr>
    <tr bgcolor="#a5d0dc"> 
      <td width="75" align="right" valign="top" height="30"><b><font color="#FF0000">程式简介</font>:</b></td>
      <td width="450" colspan="3" height="30"> 
        <textarea rows="6" name="txtnote" cols="82" class="smallarea">
		<%=replacenull(rs.getString("note"))%>
		</textarea>
      </td>
    </tr>
  </table>             
           <%} %>              
  <div align="center"><center><p><input type="submit" value=" 添 加 "             
  name="cmdok" class="buttonface">&nbsp; <input type="reset" value=" 清 除 "             
  name="cmdcancel" class="buttonface"></p>             
  </center></div>             
</form>             
</body>             
</html>             
<%             
}
}         
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -