comment.jsp
上传用户:sami52198
上传日期:2010-02-11
资源大小:5174k
文件大小:12k
源码类别:

电子政务应用

开发平台:

MultiPlatform

  1. <%@ page contentType="text/html;charset=GB2312"%>
  2. <%@ include file="include/config.jsp"%>
  3. <%@include file="include/head.jsp"%>
  4. <% request.setCharacterEncoding("gb2312"); %>
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  8. <LINK href="../css/style.css" rel=stylesheet type=text/css>
  9. <SCRIPT language=JavaScript src="../js/page.js"></SCRIPT>
  10. <title>欢迎试用乐趣新闻发布系统!</title>
  11. </head>
  12. <body bgcolor="#FFF9E6" leftmargin="0" topmargin="0">
  13. <table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DC9F01" bgcolor="#FFFFFF" bordercolordark="#FFF9E6">
  14.   <tr> 
  15.     <td valign="top">
  16. <table width="770" border="0" cellspacing="0" cellpadding="0">
  17.         <tr> 
  18.           <td height="80"><img src="images/tou.jpg" width="770" height="80"></td>
  19.         </tr>
  20.         <tr> 
  21.           <td><table width="770" border="0" cellspacing="0" cellpadding="0">
  22.               <tr bgcolor="#838383"> 
  23.                 <td width="755" height="5"><img src="images/tmtp.gif" width="2" height="2"></td>
  24.               </tr>
  25.               <tr> 
  26.                 <td height="25" background="images/topbg1.gif"> 
  27.                 <div align="center">
  28.                 <%@include file="include/board1.jsp"%>               
  29.                 </div></td>
  30.               </tr>
  31.             </table></td>
  32.         </tr>
  33. <%
  34.     newid = request.getParameter("newid");
  35.     boardParentID = request.getParameter("boardParentID");
  36.     boardID = request.getParameter("boardID");
  37.     Vector name_vct = comment.getNewName(newid);
  38.     int curpage = request.getParameter("jumpPage")==null?1:Integer.parseInt(request.getParameter("jumpPage"));    
  39.     
  40.     String anonymity = request.getParameter("anonymity");
  41.     String username = request.getParameter("username");
  42.     
  43.     String password = request.getParameter("password");
  44.     par = request.getParameter("par");
  45.   
  46.      if(par!=null&&par.equals("add"))
  47.       {   
  48.               String ip = request.getRemoteAddr();
  49.               if((session.getAttribute("id") == null || session.getAttribute("id") == "")&&(anonymity==null||anonymity.equals("")))
  50.                {   
  51.                     Vector username_vct = user.login(username,password);      
  52.                     if(username_vct!=null&&username_vct.size()>0)
  53.                      {
  54.                          Vector t_vct =(Vector)username_vct.get(0);                         
  55.                          session.setAttribute("inc",t_vct.get(0));                         
  56.                          session.setAttribute("id",t_vct.get(1));                         
  57.                          session.setAttribute("nickname",t_vct.get(2));
  58.                          issuance.createComment(t_vct.get(0).toString(),newid,(String)t_vct.get(2),ip);                                
  59.                      }
  60.                     else
  61.                      {
  62.                           throw new Exception("输入的用户名或密码不正确,请重新输入!");
  63.                      }   
  64.                      
  65.               }
  66.              else
  67.               {
  68.                  if(anonymity!=null&&!anonymity.equals("")&&anonymity.equals("anonymity"))
  69.                   {                   
  70.                     // issuance.createComment("-1",newid,new String(("乐趣网友").getBytes("gb2312"),"ISO8859_1"),ip);
  71.                      issuance.createComment("-1",newid,"乐趣网友",ip);
  72.                   }
  73.                  else
  74.                   {
  75.                      issuance.createComment(session.getAttribute("inc").toString(),newid,username,ip); session.getAttribute("id") ;
  76.                      
  77.                   } 
  78.                   
  79.                   
  80.               }   
  81.         
  82.       } 
  83.     //m_vct = pageCtl.getcurData(comment.getComment(newid),20,curpage);                  
  84.     m_vct = comment.getComment(newid); 
  85.     
  86. %>        
  87.         <tr> 
  88.           <td height="8"><img src="images/tmtp.gif" width="2" height="2"></td>
  89.         </tr>
  90.         <tr>
  91.           <td height="3">
  92.           <table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
  93.               <tr>
  94.                 <td height="25" bgcolor="#D59F00">&nbsp;&nbsp;&nbsp;&nbsp;<font size="2"><a href="newdetail.jsp?boardParentID=<%=boardParentID%>&boardID=<%=boardID%>&newid=<%=newid%>"><font size="3"><b><u><!--%=new String(((String)((Vector)name_vct.get(0)).get(0)).getBytes("gb2312"),"ISO8859_1")%--><%=((Vector)name_vct.get(0)).get(0)%></font></u></b></a></font></td>
  95.               </tr>
  96.             </table></td>
  97.         </tr>
  98.         <tr>
  99.           <td height="8"><img src="images/tmtp.gif" width="2" height="2"></td>
  100.         </tr>
  101.         <tr> 
  102.           <td><table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  103.               <tr> 
  104.                 <td height="10"><table width="750" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CD9501" bordercolordark="#FFFFFF">
  105.                     <tr> 
  106.                       <td bgcolor="#FFCC00"><font size="2">本新闻所有评论共 <%=pageCtl.getmaxRowCount()%>  条    
  107.                         </font></td>
  108.                     </tr>
  109.                     
  110. <%
  111.    if(m_vct!=null&&m_vct.size()>0)
  112.     {
  113.        for(int i=0;i<m_vct.size();i++)
  114.         {
  115.            Vector t_vct = (Vector)m_vct.get(i);
  116.            //Sting ip = t_vct.get(4);
  117.            %>
  118.                     <tr> 
  119.                       <td height="5"><img src="images/tmtp.gif" width="2" height="2"></td>
  120.                     </tr>
  121.                     <tr> 
  122.                       <td height="25" bgcolor="#FFFBEC"> &nbsp;&nbsp;<img src="images/dis01.gif" width="13" height="18"> 
  123.                         <font size="2"><!--%=new String(((String)(t_vct.get(1))).getBytes("gb2312"),"ISO8859_1")%--><%=t_vct.get(1)%>&nbsp;&nbsp;&nbsp;&nbsp;<%=(t_vct.get(2).toString()).substring(0,19)%><!--%=t_vct.get(2)%--> IP:<%=((String)t_vct.get(4)).substring(0,((String)t_vct.get(4)).lastIndexOf("."))%>.*  
  124.                         </font></td>
  125.                     </tr>  
  126.                     <tr> 
  127.                       <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <!--%=new String(((String)(t_vct.get(3))).getBytes("gb2312"),"ISO8859_1")%--> <%=t_vct.get(3)%> 
  128.                       </td>
  129.                     </tr>                             
  130.            <%
  131.         }
  132.     }
  133. %>    
  134. <tr>
  135.  <td>&nbsp;    <table>
  136.                                           <%
  137. if(pageCtl.getmaxPage()>1)
  138. {
  139.   %>
  140. <form name="PageForm"  action="comment.jsp" method="post">
  141. <input type="hidden" name="newid" value="<%=newid%>">
  142. <input type="hidden" name="boardParentID" value="<%=boardParentID%>">
  143. <input type="hidden" name="boardID" value="<%=boardID%>">
  144.           <tr>
  145. <td colspan="9" width="100%" align="left" valign="top"> 
  146. <div align="center"><br>&nbsp;&nbsp;
  147. <%if(pageCtl.getcurPage()==1){ out.print(" 首页 上一页");   }else{  %>
  148. <A HREF="javascript:gotoPage(1)">首页</A>
  149. <A HREF="javascript:gotoPage(<%=pageCtl.getcurPage()-1%>)">上一页</A>
  150. <%}%>
  151. <%if(pageCtl.getcurPage()==pageCtl.getmaxPage()){ out.print("下一页 尾页");
  152.    }else{  %>   
  153. <A HREF="javascript:gotoPage(<%=pageCtl.getcurPage()+1%>)">下一页</A>
  154. <A HREF="javascript:gotoPage(<%=pageCtl.getmaxPage()%>)">尾页</A>
  155. <%}%>
  156. 转到第<SELECT name="jumpPage" onchange="Jumping()">
  157.      <% for(int j=1;j<=pageCtl.getmaxPage();j++)  {
  158.      if (j== pageCtl.getcurPage()){
  159.      %>
  160.      <OPTION selected value=<%=j%>><%=j%></OPTION>
  161.      <%}else{%>
  162.      <OPTION value=<%=j%>><%=j%></OPTION>
  163.      <%}}%>   
  164.      </SELECT>页
  165.     </div>
  166. </td>
  167. </tr>
  168. </form>    
  169. <% }%></td>
  170.  </table>
  171.  </tr>
  172.       </table></td>
  173.   </tr>
  174.                     <tr> 
  175.                       <td>&nbsp;</td>
  176.                     </tr>
  177.                     
  178.                   </table></td>
  179.               </tr>
  180.               
  181.               <tr> 
  182.                 <td height="10">&nbsp;</td>
  183.               </tr>
  184.               <tr> 
  185.       <td>   
  186.       <form name="form1" method="post" action="comment.jsp">
  187.      <input type="hidden" name="newid" value="<%=newid%>">
  188.      <input type="hidden" name="boardParentID" value="<%=boardParentID%>">
  189.      <input type="hidden" name="boardID" value="<%=boardID%>">             
  190.     <input type="hidden" name="par" value="add">
  191.     <table width="760" border="1" cellpadding="0" cellspacing="0" bordercolor="#CD9501" bordercolordark="#FFFFFF">
  192.         <tr> 
  193.           <td width="50%" bgcolor="#FFFBEC">&nbsp;&nbsp;<img src="images/dis01.gif" width="13" height="18"> 
  194.             <font size="2"> 
  195. <%
  196.   if(session.getAttribute("id") == null || session.getAttribute("id") == "")
  197.   {
  198.      %>
  199.             <input type="checkbox" name="anonymity" value="anonymity">
  200.             匿名 会员名: 
  201.             <input name="username" type="text" size="10">
  202.             密码: 
  203.             <input name="password" type="password" size="10">     
  204.      <%
  205.   } 
  206.  else
  207.   {
  208.     %>
  209. 会员名: <input name="username" type="text" size="20" value="<%=session.getAttribute("nickname")%>"> <!--%=new String(((String)session.getAttribute("nickname")).getBytes("gb2312"),"ISO8859_1")%>"-->   
  210. <input name="password" type="hidden" size="10">     
  211.     <% 
  212.   } 
  213. %>            
  214.             </font> </td>
  215.                       <td width="50%" bgcolor="#FFFBEC">&nbsp;&nbsp;<img src="images/dis01.gif" width="13" height="18"> 
  216.                         <font size="2"><strong>相关产品 </strong></font></td>
  217.                     </tr>
  218.                     <tr> 
  219.                       <td width="50%" height="130"> <div align="center"> 
  220.                           <table width="375" border="0" cellspacing="0" cellpadding="0">
  221.                             <tr> 
  222.                               <td height="130"> <div align="center"> 
  223.                                    <textarea name="content" cols="45" rows="7"></textarea>
  224.                                 </div></td>
  225.                             </tr>
  226.                             <tr> 
  227.                               <td height="30" valign="top"> <div align="center"> 
  228.                                   <input type="submit" name="Submit" value="提交">
  229.                                 </div></td>
  230.                             </tr>
  231.                           </table>
  232.                         </div></td>
  233.                       <td width="50%" valign="top"> <br> <table width="360" border="0" align="center" cellpadding="0" cellspacing="0">
  234.                           <tr> 
  235.                             <td height="20"><font size="2">· 布什将宣布成立调查委员会调查美对伊武器情报</font></td>
  236.                           </tr>
  237.                           <tr> 
  238.                             <td height="20"><font size="2">· 布什将宣布成立调查委员会调查美对伊武器情报</font></td>
  239.                           </tr>
  240.                           <tr> 
  241.                             <td height="20"><font size="2">· 布什将宣布成立调查委员会调查美对伊武器情报</font></td>
  242.                           </tr>
  243.                           <tr> 
  244.                             <td height="20"><font size="2">· 布什将宣布成立调查委员会调查美对伊武器情报</font></td>
  245.                           </tr>
  246.                           <tr> 
  247.                             <td height="20"><font size="2">· 布什将宣布成立调查委员会调查美对伊武器情报</font></td>
  248.                           </tr>
  249.                           <tr> 
  250.                             <td height="20"><font size="2">· 布什将宣布成立调查委员会调查美对伊武器情报</font></td>
  251.                           </tr>
  252.                         </table></td>
  253.                     </tr>
  254.                   </table></td>
  255.               </tr>
  256.               <tr> 
  257.                 <td> <div align="left"> &nbsp;&nbsp;&nbsp;&nbsp; </div></td>
  258.               </tr>
  259.             </table></td>
  260.         </tr>
  261.       </table>
  262.     </td>
  263.   </tr>
  264. </table>
  265. <div align="center">
  266.   <table width="760" border="0" cellspacing="0" cellpadding="0">
  267.     <tr>
  268.       <td height="10"><img src="images/tmtp.gif" width="2" height="2"></td>
  269.     </tr>
  270.     <tr>
  271.       <td><div align="center">&copy;中文版权所有: 乐趣工作室『2rich』 &copy;Copyright 2003-2004 
  272.         </div></td>
  273.     </tr>
  274.     <tr>
  275.       <td><div align="center">本新闻系统部分内容摘自Internet,与 乐趣工作室『2rich』 立场无关 </div></td>
  276.     </tr>
  277.   </table>
  278. </div>
  279. </body>
  280. </html>