Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=windows-1255"
  2. pageEncoding="windows-1255"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
  4. <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
  9. <title>home page</title>
  10. <link rel="sylesheet" href="homecss">
  11. <style>
  12.  
  13. ul {
  14. list-style-type: none;
  15. mergin: 0;
  16. padding: 0;
  17. overflow: hidden;
  18. background-color: #147f22;
  19.  
  20. }
  21.  
  22. li {
  23. float: left;
  24. }
  25.  
  26. li a{
  27. display: block;
  28. color: white;
  29. text-align: center;
  30. padding: 16px;
  31. text-decoration: none;
  32. }
  33.  
  34. li a:hover{
  35. background-color: #07380d;
  36. }</style>
  37. </head>
  38. <body>
  39. <ul>
  40. <c:if test="${isadmin}">
  41. <li><a href="True.jsp">Administor</a><li>
  42. </c:if>
  43. </ul>
  44. HELLO ${sessionScope.user}
  45. <br>
  46. home page
  47. <%
  48. session.setMaxInactiveInterval(10);
  49. if(application.getAttribute("counter") == null) {
  50. application.setAttribute("counter", 0);
  51. }
  52. if (session.getAttribute("visited") == null) {
  53. synchronized(page){
  54. Integer counter = (Integer)
  55. application.getAttribute("counter");
  56. counter = counter + 1;
  57. application.setAttribute("counter", counter);
  58. }
  59. session.setAttribute("visited", true);
  60. }
  61. %>
  62. You are the <%= application.getAttribute("counter")%> Visitor of the site
  63. <sql:setDataSource var="toledo" driver="com.mysql.jdbc.Driver"
  64. url="jdbc:mysql://localhost/toledo"
  65. user="root" password="t7417883"/>
  66.  
  67. רוצה לבקר בנתנוי הקבוצות שלך, בחר קבוצה
  68. <form id="form4" action="player_skills.jsp" method="get">
  69. <sql:query dataSource="${toledo}" var="groups">
  70. SELECT group_name from users_to_groups where user_name='${sessionScope.user}';
  71. </sql:query>
  72.  
  73. <select name="groupSelection">
  74. <c:forEach var="group" items="${groups.rows}">
  75. <option value="${group.group_name}">${group.group_name}</option>
  76. </c:forEach>
  77. </select>
  78. <input type="submit" value="קבוצה"/>
  79. </form>
  80.  
  81. להצטרף לקבוצה
  82.  
  83.  
  84.  
  85. </body>
  86. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement