Advertisement
Guest User

Bootstrap tabs

a guest
Oct 27th, 2014
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 15.92 KB | None | 0 0
  1. <%@page import="com.iacademy.helper.SQLActions"%>
  2. <%@page import="java.sql.ResultSet"%>
  3. <%@page import="java.sql.Connection" %>
  4. <%@page import="java.util.Iterator" %>
  5. <jsp:useBean id="weatherPost" type="java.sql.ResultSet" scope="request"/>
  6. <jsp:useBean id="trafficPost" type="java.sql.ResultSet" scope="request"/>
  7. <jsp:useBean id="accidentPost" type="java.sql.ResultSet" scope="request"/>
  8. <jsp:useBean id="warningsPost" type="java.sql.ResultSet" scope="request"/>
  9. <jsp:useBean id="politicsPost" type="java.sql.ResultSet" scope="request"/>
  10. <jsp:useBean id="tragediesPost" type="java.sql.ResultSet" scope="request"/>
  11.  
  12. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  13.     pageEncoding="ISO-8859-1"%>
  14. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  18. <title>LetsUpdate</title>
  19.  
  20. <link rel="stylesheet"
  21.     href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
  22. <link rel="stylesheet"
  23.     href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" />
  24.  
  25. <link rel="stylesheet" type="text/css"
  26.     href="letsupdate.com/css/bootstrap.min.css">
  27. <link rel="stylesheet" type="text/css"
  28.     href="letsupdate.com/css/bootstrap.css">
  29. <link rel="stylesheet" type="text/css"
  30.     href="letsupdate.com/css/style.css">
  31.  
  32. <link href="font-awesome-4.1.0/css/font-awesome.min.css"
  33.     rel="stylesheet" type="text/css">
  34. <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700"
  35.     rel="stylesheet" type="text/css">
  36. <link href="http://fonts.googleapis.com/css?family=Kaushan+Script"
  37.     rel="stylesheet" type="text/css">
  38. <link
  39.     href="http://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic"
  40.     rel="stylesheet" type="text/css">
  41. <link
  42.     href="http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700"
  43.     rel="stylesheet" type="text/css">
  44. <link href="http://fortawesome.github.io/Font-Awesome/icon/bars/"
  45.     rel="stylesheet" type="text/css">
  46. <script src="letsupdate.com/js/tab.js"></script>
  47.  
  48. </head>
  49. <body background="letsupdate.com/images/background.jpg">
  50.  
  51.     <%@ include file="style/header.jsp" %> 
  52.  
  53.     <ol class="breadcrumb">
  54.         <li><a href="home.jsp">Home</a></li>
  55.  
  56.         <div id="location">${weather.highTemp[0]}&#176C--- HV Dela Costa
  57.             St. Makati City</div>
  58.  
  59.     </ol>
  60.  
  61.     <ul class="nav nav-tabs" id="myTab">
  62.         <li class="active"><a href="#weather" data-toggle="tab">Weather</a></li>
  63.         <li class=""><a href="#traffic" data-toggle="tab">Traffic</a></li>
  64.         <li class=""><a href="#accident" data-toggle="tab">Accident</a></li>
  65.         <li class=""><a href="#politics" data-toggle="tab">Politics</a></li>
  66.         <li class=""><a href="#tragedies" data-toggle="tab">Tragedies</a></li>
  67.         <li class=""><a href="#warnings" data-toggle="tab">Warnings</a></li>
  68.        
  69.     </ul>
  70.     <div id="myTabContent" class="tab-content">
  71.         <div class="tab-pane fade active in" id="weather">
  72.             <p><strong><span class="glyphicon glyphicon-pencil"></span>   Write a Post</strong></p>
  73.             <form action="weatherpost.html" method="post">
  74.                 <textarea rows="3" cols="60" placeholder="What's happening.." name="textarea" ></textarea>
  75.                 <br/><br/>
  76.                 <button type="submit" class="btn btn-primary">Submit</button>
  77.                 <button type="reset" class="btn btn-default">Reset</button>
  78.             </form>
  79.        
  80.             <div>
  81.                 <%
  82.                     SQLActions sql = new SQLActions();
  83.                     Connection connection = SQLActions.getConnection();
  84.                     String postName = "";
  85.                    
  86.                     int postId;
  87.                     while(weatherPost.next()){
  88.            
  89.                        
  90.                         postId = sql.getPostId(connection, weatherPost.getString("body"));
  91.                    
  92.                              postName = sql.getPostName(connection, postId,weatherPost.getString("body"));
  93.                            
  94.                         %>
  95.                             <br/>
  96.                                 <div class='boxed'>
  97.                                     <div class='statusbody'>
  98.                                         <p class='tab1'><strong><span class='glyphicon glyphicon-user'></span>
  99.                                             &nbsp;<%=postName %> posted...</strong></p>
  100.                                         <p class='tab2'> <%=  weatherPost.getString("body") %></p>
  101.                                     </div>
  102.                                     <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  103.                             <form action='weathercomment.html' method='post'>
  104.                             <input type="hidden" name="post_id" value="<%=postId%>">
  105.                            
  106.                                     <%
  107.                                     ResultSet comment = sql.getComment(connection, postId);
  108.                                     while(comment.next()){
  109.                                     String userId = comment.getString("user_id");
  110.                                     String userName = sql.getUsername(connection, userId);
  111.                                     %>
  112.                                     <div class='statusbody'>
  113.                                         <p class='tab1'><span class="glyphicon glyphicon-comment"></span>
  114.                                             &nbsp;<%=userName %> comments..</p>
  115.                                         <p class='tab2'><%= comment.getString("comment") %></p>
  116.                                     </div>
  117.                                 <%     
  118.                                     }
  119.                                 %>
  120.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  121.                             <textarea id='comment' class='tab1' rows='1' cols='54' placeholder='Write a comment.' name='textarea'></textarea>
  122.                             <p class='tab3'><button type='submit' class='btn btn-default btn-xs'>
  123.                                 Comment</button></p></form>
  124.                             </div>
  125.                         <%
  126.                        
  127.                     }
  128.                 %>
  129.                 </div>
  130.             </div>
  131.        
  132.         <div class="tab-pane fade" id="traffic">
  133.             <p><strong><span class="glyphicon glyphicon-pencil"></span>   Write a Post</strong></p>
  134.             <form action="trafficpost.html" method="post">
  135.                 <textarea rows="3" cols="60" placeholder="What's happening.." name="textarea"></textarea>
  136.                 <br/><br/>
  137.                 <button type="submit" class="btn btn-primary">Submit</button>
  138.                 <button type="reset" class="btn btn-default">Reset</button>
  139.             </form>
  140.             <div>
  141.                 <%             
  142.                     while(trafficPost.next()){
  143.                    
  144.                        
  145.                         postId = sql.getPostId(connection,  trafficPost.getString("body"));
  146.                              postName = sql.getPostName(connection, postId,trafficPost.getString("body"));
  147.                        
  148.                         %>
  149.                             <br/>
  150.                             <div class='boxed'>
  151.                                 <div class='statusbody'>
  152.                                     <p class='tab1'><strong><span class='glyphicon glyphicon-user'></span>
  153.                                         &nbsp;<%=postName %> posted...</strong></p>
  154.                                     <p class='tab2'> <%=trafficPost.getString("body") %></p>
  155.                                 </div>
  156.                                
  157.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  158.                            
  159.                             <form action='weathercomment.html' method='post'>
  160.                             <input type="hidden" name="post_id" value="<%=postId%>">
  161.                            
  162.                                 <%
  163.                                     ResultSet comment = sql.getComment(connection, postId);
  164.                                     while(comment.next()){
  165.                                     String userId = comment.getString("user_id");
  166.                                     String userName = sql.getUsername(connection, userId);
  167.                                     %>
  168.                                     <div class='statusbody'>
  169.                                         <p class='tab1'><span class="glyphicon glyphicon-comment"></span>
  170.                                         &nbsp;<%=userName %> comments..</p>
  171.                                         <p class='tab2'><%= comment.getString("comment") %></p>
  172.                                     </div>
  173.                                 <%     
  174.                                     }
  175.                                 %>
  176.                            
  177.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  178.                             <textarea id='comment' class='tab1' rows='1' cols='54' placeholder='Write a comment.' name='textarea'></textarea>
  179.                             <p class='tab3'><button type='submit' class='btn btn-default btn-xs'>Comment</button></p></form>
  180.                             </div>
  181.                         <%
  182.                     }
  183.                 %>
  184.                 </div>
  185.        
  186.         </div>
  187.         <div class="tab-pane fade" id="accident">
  188.             <p><strong><span class="glyphicon glyphicon-pencil"></span>   Write a Post</strong></p>
  189.             <form action="accidentpost.html" method="post">
  190.                 <textarea rows="3" cols="60" placeholder="What's happening.." name="textarea"></textarea>
  191.                 <br/><br/>
  192.                 <button type="submit" class="btn btn-primary">Submit</button>
  193.                 <button type="reset" class="btn btn-default">Reset</button>
  194.             </form>
  195.             <div>
  196.                 <%
  197.                    
  198.                    
  199.                     while(accidentPost.next()){
  200.                         postId = sql.getPostId(connection,  accidentPost.getString("body"));
  201.                              postName = sql.getPostName(connection, postId,accidentPost.getString("body"));
  202.                        
  203.                         %>
  204.                             <br/>
  205.                             <div class='boxed'>
  206.                                 <div class='statusbody'>
  207.                                     <p class='tab1'><strong><span class='glyphicon glyphicon-user'></span>
  208.                                         &nbsp;<%=postName %> posted...</strong></p>
  209.                                     <p class='tab2'> <%=accidentPost.getString("body") %></p>
  210.                                 </div>
  211.                            
  212.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  213.                            
  214.                             <form action='weathercomment.html' method='post'>
  215.                             <input type="hidden" name="post_id" value="<%=postId%>">
  216.                            
  217.                                 <%
  218.                                     ResultSet comment = sql.getComment(connection, postId);
  219.                                     while(comment.next()){
  220.                                     String userId = comment.getString("user_id");
  221.                                     String userName = sql.getUsername(connection, userId);
  222.                                     %>
  223.                                     <div class='statusbody'>
  224.                                         <p class='tab1'><span class="glyphicon glyphicon-comment"></span>
  225.                                         &nbsp;<%=userName %> comments..</p>
  226.                                         <p class='tab2'><%= comment.getString("comment") %></p>
  227.                                     </div>
  228.                                 <%     
  229.                                     }
  230.                                 %>
  231.                            
  232.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  233.                             <textarea id='comment' class='tab1' rows='1' cols='54' placeholder='Write a comment.' name='textarea'></textarea>
  234.                             <p class='tab3'><button type='submit' class='btn btn-default btn-xs'>Comment</button></p></form>
  235.                             </div>
  236.                         <%
  237.                     }
  238.                 %>
  239.                 </div>
  240.        
  241.         </div>
  242.         <div class="tab-pane fade" id="politics">
  243.             <p><strong><span class="glyphicon glyphicon-pencil"></span>   Write a Post</strong></p>
  244.             <form action="politicspost.html" method="post">
  245.                 <textarea rows="3" cols="60" placeholder="What's happening.." name="textarea"></textarea>
  246.                 <br/><br/>
  247.                 <button type="submit" class="btn btn-primary">Submit</button>
  248.                 <button type="reset" class="btn btn-default">Reset</button>
  249.             </form>
  250.             <div>
  251.                 <%
  252.                    
  253.                     while(politicsPost.next()){
  254.    
  255.                        
  256.                         postId = sql.getPostId(connection,  politicsPost.getString("body"));
  257.                              postName = sql.getPostName(connection, postId,politicsPost.getString("body"));
  258.                        
  259.                         %>
  260.                             <br/>
  261.                             <div class='boxed'>
  262.                                 <div class='statusbody'>
  263.                                     <p class='tab1'><strong><span class='glyphicon glyphicon-user'></span>
  264.                                         &nbsp;<%=postName %> posted...</strong></p>
  265.                                     <p class='tab2'> <%=politicsPost.getString("body") %></p>
  266.                                 </div>
  267.                            
  268.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  269.                            
  270.                             <form action='weathercomment.html' method='post'>
  271.                             <input type="hidden" name="post_id" value="<%=postId%>">
  272.                            
  273.                                 <%
  274.                                     ResultSet comment = sql.getComment(connection, postId);
  275.                                     while(comment.next()){
  276.                                     String userId = comment.getString("user_id");
  277.                                     String userName = sql.getUsername(connection, userId);
  278.                                     %>
  279.                                     <div class='statusbody'>
  280.                                         <p class='tab1'><span class="glyphicon glyphicon-comment"></span>
  281.                                             &nbsp;<%=userName %> comments..
  282.                                         <p class='tab2'><%=comment.getString("comment") %></p>
  283.                                     </div>
  284.                                 <%     
  285.                                     }
  286.                                 %>
  287.                                
  288.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  289.                             <textarea id='comment' class='tab1' rows='1' cols='54' placeholder='Write a comment.' name='textarea'></textarea>
  290.                             <p class='tab3'><button type='submit' class='btn btn-default btn-xs'>Comment</button></p></form>
  291.                             </div>
  292.                         <%
  293.                     }
  294.                 %>
  295.                 </div>
  296.        
  297.         </div>
  298.         <div class="tab-pane fade" id="tragedies">
  299.             <p><strong><span class="glyphicon glyphicon-pencil"></span>   Write a Post</strong></p>
  300.             <form action="tragediespost.html" method="post">
  301.                 <textarea rows="3" cols="60" placeholder="What's happening.." name="textarea"></textarea>
  302.                 <br/><br/>
  303.                 <button type="submit" class="btn btn-primary">Submit</button>
  304.                 <button type="reset" class="btn btn-default">Reset</button>
  305.             </form>
  306.             <div>
  307.                 <%
  308.                    
  309.                     while(tragediesPost.next()){
  310.                        
  311.                        
  312.                         postId = sql.getPostId(connection,  tragediesPost.getString("body"));
  313.                              postName = sql.getPostName(connection, postId,tragediesPost.getString("body"));
  314.                        
  315.                         %>
  316.                             <br/>
  317.                             <div class='boxed'>
  318.                                 <div class='statusbody'>
  319.                                     <p class='tab1'><strong><span class='glyphicon glyphicon-user'></span>
  320.                                         &nbsp;<%=postName %> posted...</strong></p>
  321.                                     <p class='tab2'> <%=tragediesPost.getString("body") %></p>
  322.                                 </div> 
  323.                                    
  324.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  325.                            
  326.                             <form action='weathercomment.html' method='post'>
  327.                             <input type="hidden" name="post_id" value="<%=postId%>">
  328.                            
  329.                                 <%
  330.                                     ResultSet comment = sql.getComment(connection, postId);
  331.                                     while(comment.next()){
  332.                                     String userId = comment.getString("user_id");
  333.                                     String userName = sql.getUsername(connection, userId);
  334.                                     %>
  335.                                     <div class='statusbody'>
  336.                                     <p class='tab1'><span class="glyphicon glyphicon-comment"></span>
  337.                                         &nbsp;<%=userName %> comments..</p>
  338.                                         <p class='tab2'><%=comment.getString("comment") %></p>
  339.                                     </div>
  340.                                 <%     
  341.                                     }
  342.                                 %>
  343.                                
  344.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  345.                             <textarea id='comment' class='tab1' rows='1' cols='54' placeholder='Write a comment.' name='textarea'></textarea>
  346.                             <p class='tab3'><button type='submit' class='btn btn-default btn-xs'>Comment</button></p></form>
  347.                             </div>
  348.                         <%
  349.                     }
  350.                 %>
  351.                 </div>
  352.        
  353.         </div>
  354.         <div class="tab-pane fade" id="warnings">
  355.             <p><strong><span class="glyphicon glyphicon-pencil"></span>   Write a Post</strong></p>
  356.             <form action="warningspost.html" method="post">
  357.                 <textarea rows="3" cols="60" placeholder="What's happening.." name="textarea"></textarea>
  358.                 <br/><br/>
  359.                 <button type="submit" class="btn btn-primary">Submit</button>
  360.                 <button type="reset" class="btn btn-default">Reset</button>
  361.             </form>
  362.                 <div>
  363.                 <%
  364.                    
  365.                     while(warningsPost.next()){
  366.                
  367.                        
  368.                         postId = sql.getPostId(connection,  warningsPost.getString("body"));
  369.                        
  370.                              postName = sql.getPostName(connection, postId,warningsPost.getString("body"));
  371.                        
  372.                         %>
  373.                             <br/>
  374.                             <div class='boxed'>
  375.                                 <div class = 'statusbody'>
  376.                                 <p class='tab1'><strong><span class='glyphicon glyphicon-user'></span>
  377.                                     &nbsp;<%=postName %> posted...</strong></p>
  378.                                 <p class='tab2'> <%= warningsPost.getString("body") %></p>
  379.                             </div>
  380.                            
  381.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  382.                            
  383.                             <form action='weathercomment.html' method='post'>
  384.                             <input type="hidden" name="post_id" value="<%=postId%>">
  385.                            
  386.                                 <%
  387.                                     ResultSet comment = sql.getComment(connection, postId);
  388.                                     while(comment.next()){
  389.                                     String userId = comment.getString("user_id");
  390.                                     String userName = sql.getUsername(connection, userId);
  391.                                     %>
  392.                                     <div class='statusbody'>
  393.                                         <p class='tab1'><span class="glyphicon glyphicon-comment"></span>
  394.                                             &nbsp;<%=userName %> comments..</p>
  395.                                         <p class='tab2'><%=comment.getString("comment") %></p>
  396.                                     </div>
  397.                                 <%     
  398.                                     }
  399.                                 %>
  400.                             <hr style="height:3px; border:none; color:#333; background-color:#333;" />
  401.                             <textarea id='comment' class='tab1' rows='1' cols='54' placeholder='Write a comment.' name='textarea'></textarea>
  402.                             <p class='tab3'><button type='submit' class='btn btn-default btn-xs'>Comment</button></p></form>
  403.                             </div>
  404.                         <%
  405.                     }
  406.                 %>
  407.                 </div>
  408.        
  409.         </div>
  410.        
  411.     </div>
  412.     <br/>
  413.    
  414.     <%@ include file="style/footer.jsp" %>
  415.    
  416.    
  417.     <script type="text/javascript" src="letsupdate.com/js/jquery-1.11.0.min.js"></script>
  418.     <script src="letsupdate.com/js/jquery.cookie.js"></script>
  419.     <script src="http://code.jquery.com/jquery.min.js"></script>
  420.     <script src="letsupdate.com/js/bootstrap.min.js"></script>
  421. </body>
  422. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement