Advertisement
lankov1

zapis.php

Oct 28th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.63 KB | None | 0 0
  1. <?php
  2. include_once('db.php');
  3. $id = $_GET['action'];
  4. switch($id)
  5. {
  6.     case "prijavljeni_predmeti":
  7.     {
  8.         $naslov = "Prijavljeni predmeti";
  9.         $zapisi = $Db->getList("SELECT *,FROM_UNIXTIME(datumroka, '%Y/%m/%d') AS rok,FROM_UNIXTIME(datumprijave, '%Y/%m/%d') AS prijava FROM prijave_ispita");
  10.         break;
  11.     }
  12.     case "upisani_predmeti":
  13.     {
  14.         $naslov = "Upisani predmeti";
  15.         $zapisi = $Db->getList("SELECT * FROM upisani_predmeti");
  16.         break;
  17.     }
  18. }
  19. ?>
  20.  
  21. <!DOCTYPE html>
  22.  
  23. <html>
  24.  
  25. <head>
  26. <title>Zapisi- <?php echo $naslov;?></title>
  27. <link rel="stylesheet" href="<?php echo SITE_URL; ?>studenti/bootstrap/css/bootstrap.min.css">
  28. <link rel="stylesheet" href="<?php echo SITE_URL; ?>studenti/dist/css/AdminLTE.min.css">
  29. <link rel="stylesheet" href="<?php echo SITE_URL; ?>studenti/dist/css/skins/skin-blue.min.css">
  30. </head>
  31.  
  32. <body class="hold-transition skin-blue">
  33. <div class="wrapper">
  34.  
  35. <?php include_once("../header.php"); ?>
  36.  
  37. <?php include_once("../menu.php"); ?>
  38.  
  39. <div class="content-wrapper">
  40.  
  41. <section class="content-header">
  42. <h1><?php echo $naslov;?></h1>
  43.  
  44. <ol class="breadcrumb">
  45. <li><a href="#"><i class="fa fa-dashboard"></i> Studenti</a></li>
  46. <li class="active">zapisi</li>
  47. </ol>
  48. </section>
  49.  
  50. <section class="content">
  51.  
  52. <div class="row">
  53.  
  54. <div class="col-md-12">
  55.  
  56. <div class="box box-info">
  57. <table class="table table-bordered table-striped">
  58. <?php switch($id)
  59. {
  60.     case "prijavljeni_predmeti":
  61.     {
  62.         echo "<thead>";
  63.         echo "<tr>";
  64.         echo "<th>Datum roka</th>";
  65.         echo "<th>Datum prijave</th>";
  66.         echo "<th>Predmet</th>";
  67.         echo "<th>Status</th>";
  68.         echo "</tr>";
  69.         echo "</thead>";
  70.         echo "<tbody>";
  71.         if(!empty($zapisi)) { foreach ($zapisi as $zapis)
  72.         {
  73.             echo "<tr>";
  74.             echo "<td> '".$zapis['rok']."' </td>";
  75.             echo "<td> '".$zapis['prijava']."' </td>";
  76.             echo "<td> '".$zapis['predmet']."' </td>";
  77.             echo "<td> '".$zapis['status']."' </td>";
  78.             echo "</tr>";
  79.         }
  80.         }
  81.         echo "</tbody>";
  82.         break;
  83.     }
  84.     case "upisani_predmeti":
  85.     {
  86.         echo "<thead>";
  87.         echo "<tr>";
  88.         echo "<th>Predmet</th>";
  89.         echo "<th>ETCS</th>";
  90.         echo "<th>Status predmeta</th>";
  91.         echo "</tr>";
  92.         echo "</thead>";
  93.         echo "<tbody>";
  94.         if(!empty($zapisi)) { foreach ($zapisi as $zapis)
  95.         {
  96.             echo "<tr>";
  97.             echo "<td> '".$zapis['Predmet']."' </td>";
  98.             echo "<td> '".$zapis['ECTS']."' </td>";
  99.             echo "<td> '".$zapis['Status Predmeta']."' </td>";
  100.             echo "</tr>";
  101.         }
  102.         }
  103.         echo "</tbody>";
  104.         break;
  105.     }
  106. }
  107.        
  108.                
  109. ?>
  110.  
  111.  
  112. </table>
  113.  
  114. </div>
  115.  
  116. </div>
  117.  
  118. </div>
  119.  
  120. </section>
  121.  
  122. </div>
  123.  
  124. <?php include_once("../footer.php"); ?>
  125.  
  126. </div>
  127.  
  128. <?php include_once("../footer_scripts.php"); ?>
  129.  
  130. </body>
  131. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement