Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=windows-1255"
- pageEncoding="windows-1255"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="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=windows-1255">
- <title>home page</title>
- <link rel="sylesheet" href="homecss">
- <style>
- ul {
- list-style-type: none;
- mergin: 0;
- padding: 0;
- overflow: hidden;
- background-color: #147f22;
- }
- li {
- float: left;
- }
- li a{
- display: block;
- color: white;
- text-align: center;
- padding: 16px;
- text-decoration: none;
- }
- li a:hover{
- background-color: #07380d;
- }</style>
- </head>
- <body>
- <ul>
- <c:if test="${isadmin}">
- <li><a href="True.jsp">Administor</a><li>
- </c:if>
- </ul>
- HELLO ${sessionScope.user}
- <br>
- home page
- <%
- session.setMaxInactiveInterval(10);
- if(application.getAttribute("counter") == null) {
- application.setAttribute("counter", 0);
- }
- if (session.getAttribute("visited") == null) {
- synchronized(page){
- Integer counter = (Integer)
- application.getAttribute("counter");
- counter = counter + 1;
- application.setAttribute("counter", counter);
- }
- session.setAttribute("visited", true);
- }
- %>
- You are the <%= application.getAttribute("counter")%> Visitor of the site
- <sql:setDataSource var="toledo" driver="com.mysql.jdbc.Driver"
- url="jdbc:mysql://localhost/toledo"
- user="root" password="t7417883"/>
- רוצה לבקר בנתנוי הקבוצות שלך, בחר קבוצה
- <form id="form4" action="player_skills.jsp" method="get">
- <sql:query dataSource="${toledo}" var="groups">
- SELECT group_name from users_to_groups where user_name='${sessionScope.user}';
- </sql:query>
- <select name="groupSelection">
- <c:forEach var="group" items="${groups.rows}">
- <option value="${group.group_name}">${group.group_name}</option>
- </c:forEach>
- </select>
- <input type="submit" value="קבוצה"/>
- </form>
- להצטרף לקבוצה
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement