Guest User

Untitled

a guest
Apr 10th, 2017
88
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. if(isset($_SESSION['id'])){
  3. echo'<div id="menu"> <!-- MENU Z -->
  4. <div id="innermenuhome">
  5. <ul>
  6. <li><div id="btn1"><a href="index.php?page='.$domu.'">Domů</a></div></li>
  7. <li class="dropdown">
  8. <div id="btn2"><a href="index.php?page='.$recenze.'">Herní recenze</a></div>
  9. <div class="dropdown-content">
  10. <a href="index.php?page='.$akcni.'">Akční</a>
  11. <a href="index.php?page='.$sportovni.'">Sportovní</a>
  12.  
  13. <a href="index.php?page='.$zavodni.'">Závodní</a>
  14. </div>
  15. </li>
  16.  
  17.  
  18. <li class="dropdown">
  19. <div id="btn3"><a href="index.php?page='.$novinky.'">Mobilní sekce</a></div>
  20. <div class="dropdown-content">
  21. <a href="index.php?page='.$hry.'">Mobilní hry</a>
  22. <a href="index.php?page='.$hw.'">Mobilní app</a>
  23. </div>
  24. </li>
  25. <li><div id="btn4"><a href="index.php?page='.$about.'">O nás</a></div></li>
  26. <!-- <li><div id="btn5">';?><a href="mail.html" onclick="window.open('mail.html', 'mail', 'location=no,status=no,width=600,height=500,resizable'); return false">Napište nám</a></div></li> -->
  27. <?php echo'<li><div id="btn6"><a href="index.php?page='.$forum.'">Forum</a></div></li>';
  28. echo'<li><div id="btn7"><a href="index.php?page='.$admin.'&load=me-udaje">Administrace</a></div></li>
  29. <li><div id="btn8"><a href="logout.php">Odhlásit se</a></div></li>';
  30.  
  31. echo'</ul>
  32. </div>
  33. </div><!-- MENU K -->';
  34. }else {
  35. echo'<div id="menu"> <!-- MENU Z -->
  36. <div id="innermenuhome_odhlasen">
  37. <ul>
  38. <li><div id="btn1"><a href="index.php?page='.$domu.'">Domů</a></div></li>
  39. <li class="dropdown">
  40. <div id="btn2"><a href="index.php?page='.$recenze.'">Herní recenze</a></div>
  41. <div class="dropdown-content">
  42. <a href="index.php?page='.$akcni.'">Akční</a>
  43. <a href="index.php?page='.$sportovni.'">Sportovní</a>
  44. <a href="index.php?page='.$zavodni.'">Závodní</a>
  45. </div>
  46. </li>
  47.  
  48.  
  49. <li class="dropdown">
  50. <div id="btn3"><a href="index.php?page='.$novinky.'">Mobilní sekce</a></div>
  51. <div class="dropdown-content">
  52. <a href="index.php?page='.$hry.'">Mobilní hry</a>
  53. <a href="index.php?page='.$hw.'">Mobilní app</a>
  54. </div>
  55. </li>
  56. <li><div id="btn4"><a href="index.php?page='.$about.'">O nás</a></div></li>
  57. <!-- <li><div id="btn5">';?><a href="mail.html" onclick="window.open('mail.html', 'mail', 'location=no,status=no,width=600,height=500,resizable'); return false">Napište nám</a></div></li> -->
  58. <?php echo'<li><div id="btn6"><a href="index.php?page='.$forum.'">Forum</a></div></li>';
  59. echo'<li><div id="btn7"><a href="index.php?page='.$admin.'&load=me-udaje">Administrace</a></div></li>';
  60.  
  61. echo'</ul>
  62. </div>
  63. </div><!-- MENU K -->';}
  64. ?>
  65.  
  66. <div id="container">
  67. <div id="obsah">
  68. <div id="floatbloky"><!-- float bloky Z -->
  69.  
  70. <h1 style="margin-top:5px;margin-bottom:5px;text-align:middle; color: #ffa500;font-weight:bold"> Aktuality </h1>
  71. <?php
  72. include_once("config.php");
  73. /*$vypis1 = mysqli_query($id_spojeni, "SELECT * FROM novinka WHERE ID_novinka > (SELECT MAX(ID_novinka) - 5 FROM novinka) ORDER BY Pridan DESC");*/
  74. $vypis1 = mysqli_query($id_spojeni, "SELECT * FROM (SELECT ID_aktuality, NULL AS ID_turnaje, Pridan,Nazev,Podnadpis,Text,ID_uzivatel FROM aktuality UNION SELECT NULL AS ID_aktuality, ID_turnaje, Pridan,Nazev,Podnadpis,Text,ID_uzivatel FROM turnaje )AS tmptable2 ORDER BY STR_TO_DATE(`Pridan`,'%d-%m-%Y') DESC LIMIT 10");
  75. $vypis2 = mysqli_query($id_spojeni, "SELECT * FROM aktuality WHERE ID_aktuality > (SELECT MAX(ID_aktuality) - 5 FROM aktuality) ORDER BY Pridan DESC");
  76. echo'<div id="boxes">';
  77. while($nacti1= mysqli_fetch_array($vypis1)) {
  78. $id_turnaje = $nacti1['ID_turnaje'];
  79. $id_aktuality = $nacti1['ID_aktuality'];
  80. $jmeno = $nacti1['ID_uzivatel'];
  81. $nacti_jmeno = mysqli_query($id_spojeni, "SELECT * FROM uzivatel WHERE ID_uzivatel = '$jmeno'");
  82. while($vypis_jmeno = mysqli_fetch_array($nacti_jmeno)) {
  83.  
  84. if($id_turnaje > 0) {
  85. echo'
  86. <div /*style="margin-top:20px;margin-bottom:20px; text-align:middle"*/class="easyblok" id="second" >
  87. <a href=index.php?page=turnaje&turnaje='.$nacti1["ID_turnaje"].'>
  88. <p class="nadpis_domu">'.$nacti1["Nazev"].'</p></a>
  89. <p class="napsal_domu">Autor '.$vypis_jmeno["Jmeno"].' | '.$nacti1["Pridan"].'</p>
  90. '.$nacti1["Podnadpis"].'
  91. <a class="vicedomu" href=index.php?page=turnaje&turnaje='.$nacti1["ID_turnaje"].'>Více...</a>
  92. </div>';
  93. }elseif($id_aktuality > 0) {
  94. echo'
  95.  
  96. <div /*style="margin-top:20px;margin-bottom:20px;text-align:middle"*/class="easyblok" id="first" >
  97. <a href=index.php?page=aktuality&aktuality='.$nacti1["ID_aktuality"].'><p class="nadpis_domu">'.$nacti1["Nazev"].'</p></a>
  98. <p class="napsal_domu">Autor '.$vypis_jmeno["Jmeno"].' | '.$nacti1["Pridan"].'</p>
  99.  
  100. '.$nacti1["Podnadpis"].'
  101. <a class="vicedomu" href=index.php?page=aktuality&aktuality='.$nacti1["ID_aktuality"].'>Více...</a>
  102. </div>';
  103. }
  104. }}
  105. echo'</div>';
  106.  
  107.  
  108.  
  109. while($nacti2= mysqli_fetch_array($vypis2)) {
  110. $jmeno = $nacti2['ID_uzivatel'];
  111. $nacti_jmeno = mysqli_query($id_spojeni, "SELECT * FROM uzivatel WHERE ID_uzivatel = '$jmeno'");
  112. while($vypis_jmeno = mysqli_fetch_array($nacti_jmeno)) {
  113. /*echo'
  114.  
  115. <td class="horizont" id="right" rowspan="2"><a href=index.php?page=recenze&recenze='.$nacti2["ID_recenze"].'><p class="nadpis">'.$nacti2["Nazev"].'</p></a>
  116. <p class="napsal">Autor '.$vypis_jmeno["Jmeno"].' | '.$nacti2["Pridan"].'</p>
  117.  
  118. '.$nacti2["Podnadpis"].'
  119. <a href=index.php?page=recenze&recenze='.$nacti2["ID_recenze"].'>Více...</a></td>
  120. </tr>
  121. </table>';*/
  122. }}
  123. ?>
  124. </div>
  125. </div>
  126. </div>
RAW Paste Data