Advertisement
Guest User

code

a guest
Mar 5th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.37 KB | None | 0 0
  1. <%@ page contentType="text/html; charset=utf-8" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <%@page import="com.sun.xml.internal.txw2.Document"%>
  5. <%@page import="com.sun.org.apache.bcel.internal.generic.BREAKPOINT"%>
  6. <% request.setCharacterEncoding("UTF-8"); %>
  7. <html dir="rtl">
  8. <%@page import="JdbcDbDan.ForDataBase"%>
  9. <jsp:useBean id="db" class = "JdbcDbDan.ForDataBase"/><!-- equals to  "classes.ForDataBase db=new classes.ForDataBase()" -->
  10. <head>
  11. <link rel="stylesheet" type="text/css" href="menu.css" />
  12. <title>Itai's Site</title>
  13. <link rel="shortcut icon" href="http://www.iconarchive.com/download/i85581/graphicloads/100-flat/home.ico">
  14. <link rel="stylesheet" type="text/css" href="popup.css">
  15. <style>
  16. .main {
  17.     height: 50px;
  18.     background-color:#E0E0E0;
  19.     transition:all 0.8s ease-out;
  20.     margin-bottom:5px;
  21.     cursor:pointer;
  22.     width: 40%;
  23.     z-index: inherit;
  24. }
  25. .main:hover {
  26.     background-color:#FFFFCC;
  27. }
  28. .next {
  29.     height:0px;
  30.     background-color:#F8F8F8;
  31.     transition:all 0.5s ease-out;
  32. }
  33. .main2 {
  34.     min-height:50px;
  35.     background-color:#E0E0E0;
  36.     transition:all 0.8s ease-out;
  37.     margin-bottom:5px;
  38.     width: 40%;
  39.     padding-top:10px;
  40. }
  41. .main2 .next {
  42.     height:250px;
  43.     transition:all 1s ease-out;
  44. }
  45. .fade {
  46.     opacity: 0;
  47.     transition-delay: 0s;
  48. }
  49. .main2 .fade {
  50.     opacity:1;
  51.     transition:all 0.8s ease-out;
  52.     transition-delay: 0.9s;
  53. }
  54.  
  55. </style>
  56.  
  57.  <script>
  58. function toggleClass(el) {
  59.     if (el.className == "main") {
  60.         el.className = "main2";
  61.     } else {
  62.  
  63.         el.className = "main";
  64.  
  65.     }
  66. }
  67.  </script>
  68. </head>
  69. <body>
  70. <%
  71. //the code below until '*****' is just translating to hebrew for the user.
  72. String [][] array=null;
  73. String sort="select * from items order by idNum DESC; ";
  74.     System.out.println("FROM sort "+sort);
  75.           array=db.select(sort);
  76.  
  77. for(int i=0;i<array.length;i++){
  78.              System.out.println("FROM sort "+sort);
  79.                    array=db.select(sort);
  80.                
  81.                   if(array[i][5].equals("home"))
  82.                       array[i][5]="מוצרים ביתיים";
  83.                   else
  84.                       if(array[i][5].equals("electricity"))
  85.                           array[i][5]="מוצרי חשמל";
  86.                       else
  87.                           if(array[i][5].equals("garden"))
  88.                               array[i][5]="כלי גינה";
  89.                           else
  90.                               if(array[i][5].equals("electronic"))
  91.                                   array[i][5]="מוצרי אלקטרוניקה";
  92.                               else
  93.       if(array[i][3].equals("haifa"))
  94.                           array[i][3]="חיפה והסביבה";
  95.          else
  96.                  if(array[i][3].equals("galilelion"))
  97.                           array[i][3]="גליל עליון";
  98.                   if(array[i][3].equals("kineret"))
  99.                       array[i][3]="הכנרת והסביבה";
  100.                   else
  101.                       if(array[i][3].equals("afula"))
  102.                           array[i][3]="עפולה והעמקים";
  103.                       else
  104.                           if(array[i][3].equals("galiltahton"))
  105.                               array[i][3]="גליל תחתון";
  106.                           else
  107.                               if(array[i][3].equals("golan"))
  108.                                   array[i][3]="רמת הגולן";
  109.                               else
  110.                                   if(array[i][3].equals("yokneam"))
  111.                                       array[i][3]="יקנעם,טבעון והסביבה";
  112.                                   else
  113.                                       if(array[i][3].equals("betshean"))
  114.                                           array[i][3]="עמק בית שאן";
  115.                                       else
  116.                                           if(array[i][3].equals("hamerkaz"))
  117.                                               array[i][3]="איזור המרכז";
  118.                                           else
  119.                                               if(array[i][3].equals("jerusalem"))
  120.                                                   array[i][3]="ירושלים והסביבה";
  121.                                               else
  122.                                                   if(array[i][3].equals("yeahoda"))
  123.                                                       array[i][3]="ישובי יהודה";
  124.                                                   else
  125.                                                       if(array[i][3].equals("shomron"))
  126.                                                           array[i][3]="ישובי שומרון";
  127.                                                       else
  128.                                                           if(array[i][3].equals("deadsea"))
  129.                                                               array[i][3]="בקעת הירדן וים המלח";
  130.                                                           else
  131.                                                               if(array[i][3].equals("shfela"))
  132.                                                                   array[i][3]="שפלה";
  133.                                                               else
  134.                                                                   if(array[i][3].equals("beersheva"))
  135.                                                                       array[i][3]="באר שבע והסביבה";
  136.                                                                   else
  137.                                                                       if(array[i][3].equals("eilat"))
  138.                                                                           array[i][3]="אילת וערבה";
  139.                                                                       else
  140.                                                                           if(array[i][i].equals("negev"))
  141.                                                                               array[i][3]="ישובי הנגב";
  142.                                                                  
  143.  
  144. *****
  145.  
  146.         out.print("");
  147.         out.print(" <div class='main' onclick='toggleClass(this)'> <br /><center>item_"+i+"</center> ");
  148.         out.print("<div class='next' ><center><font color='black' class='fade' style='text-decoration:none;font:22px arial, verdana, sans-serif';><u>posted by :</u>"+array[i][1]+"</br><u>caregory :</u>"+array[i][5]+"</br><u>subcategory :</u>"+array[i][6]+"</br><u>description :</u>"+array[i][2]+"</br><u>notes :</u>"+array[i][7]+"</br><u>condition:</u>"+array[i][8]+"</br> <u>selling area :</u>"+array[i][3]+"</br><u>Phone :</u>"+array[i][9]+" </font> </center></div> </div> ");
  149.         }
  150.  
  151.  
  152. %>
  153.  
  154. </body>
  155. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement