daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <? include "koneksi.php"; ?>
  2. <html>
  3. <head>
  4. <title>Saran Kritik </title>
  5. <link rel="stylesheet" href="css/table.css" type="text/css"/>
  6.  
  7. <link rel="stylesheet" type="text/css" href="css/table.css" />
  8. <script type="text/javascript" src="jquery/jquery-1.2.3.pack.js"></script>
  9. <script type="text/javascript" src="jquery/jquery.validate.pack.js"></script>
  10.  
  11. <script>
  12.     function openWindow() {
  13.         sUrl="kreativpop.php";
  14.         features = 'toolbar=no, left=350,top=100, ' + 'directories=no, status=no, menubar=no, ' + 'scrollbars=yes, resizable=no, width=450, height=450';
  15.         window.open(sUrl,"winChild",features);
  16.     };
  17. </script>
  18.     <style type="text/css">
  19.     input.error, select.error { border: 1px solid red; }
  20.     label.error { color:red; margin-left: 10px; }
  21.     </style>
  22.  
  23. </head>
  24. <body>
  25.  
  26. <form name="formPK" method="post" action="">
  27. <fieldset id="fil">
  28. <legend id="legend">Pilih Kelas</legend>
  29. <table id="tabel" width="550" cellspacing="0">
  30.   <tr class="alts" >
  31.     <th scope="col" colspan="9">PILIH KELAS </th>
  32.   </tr>
  33.   <tr>
  34.   <tr class="alt">
  35.    <td colspan="2">Kode Kelas</td>
  36.    <td width="180">Nama Wali Kelas </td>
  37.    <td width="88">Tahun Ajaran </td>
  38.    <td width="78">Jurusan</td>
  39.   </tr>
  40.  <tr class="alt">
  41.    <td colspan="2"><input name="kd_kelas" id="kd_kelas" type="text" size="5" value="<?php echo isset($_POST['kd_kelas']) ? $_POST['kd_kelas'] : '';?>" readonly="true">&nbsp;<input  type="button"  value="Pilih Kelas" onClick="openWindow();"/><div style="color:red"><?php echo isset($error['kd_kelas']) ? $error['kd_kelas'] : '';?></div></td>
  42.     <td width="180"><input name="nm_wk" id="nm_wk" type="text" value="<?php echo isset($_POST['nm_wk']) ? $_POST['nm_wk'] : '';?>" readonly="true"><div style="color:red"><?php echo isset($error['nm_wk']) ? $error['nm_wk'] : '';?></div></td>
  43.     <td width="88"><input name="thn_ajaran" id="thn_ajaran" type="text" size="10" value="<?php echo isset($_POST['thn_ajaran']) ? $_POST['thn_ajaran'] : '';?>" readonly="true"><div style="color:red"><?php echo isset($error['thn_ajaran']) ? $error['thn_ajaran'] : '';?></div></td>
  44.     <td><input name="jurusan" id="jurusan" type="text" size="10" value="<?php echo isset($_POST['jurusan']) ? $_POST['jurusan'] : '';?>" readonly="true"><div style="color:red"><?php echo isset($error['jurusan']) ? $error['jurusan'] : '';?></div></td>
  45.   </tr>
  46.       <th colspan="6"><input type="submit" name="pilsem" id="pilsem" value="Pilih Semester"></th>
  47. </table>
  48. </fieldset>
  49. <?php
  50.          if(isset($_POST['pilsem']))    {
  51.          $kd_kelas      = $_POST['kd_kelas'];    
  52.          $nm_wk         = $_POST['nm_wk'];
  53.          $thn_ajaran    = $_POST['thn_ajaran'];      
  54.          $error = array();  
  55.               if(empty($kd_kelas)){  
  56.               $error['kd_kelas'] = 'tidak boleh kosong';  
  57.               }
  58.               if(empty($nm_wk)){  
  59.               $error['nm_wk'] = 'tidak boleh kosong';  
  60.               }
  61.               if(empty($thn_ajaran)){  
  62.               $error['thn_ajaran'] = 'tidak boleh kosong';  
  63.               }
  64.               if(empty($error)){
  65.         ?>
  66. <fieldset id="fil">
  67. <legend id="legend">Pilih Semester</legend>
  68. <table id="tabel" width="650" cellspacing="0">
  69. <tr class="alt">
  70.     <th colspan="9">Kode Kelas  :&nbsp;<em>[<?=$kd_kelas?>]</em>Nama Wali Kelas :<em>&nbsp;[<?= $nm_wk?>]&nbsp;</em> </br> Tahun Ajaran:<em>&nbsp;[<?=$thn_ajaran?>]&nbsp;</em> </em>
  71.     </th>
  72.   </tr>
  73. <tr>
  74.     <td width="162" class="alt"> Semester : <select name="semester" id="semester" value="<?php echo isset($_POST['semester']) ? $_POST['semester'] : '';?>" class="required" title="harap Pilih Semester">
  75.       <option value="">--Pilih--</option>
  76.       <option value="Ganjil">Ganjil</option>
  77.       <option value="Genap">Genap</option>
  78.     </select><div style="color:red"><?php echo isset($error['semester']) ? $error['semester'] : '';?></div>
  79.     </td>
  80.     <td width="482" class="alt"><input type="submit" name="lihatSKSiswa" id="lihatSKSiswa" value="LihatSKSiswa"> </td>
  81. </tr>
  82. </table>
  83. <? }}?>
  84. </fieldset>
  85. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  86.  
  87.             <?
  88.             if(isset($_POST['lihatSKSiswa']))   {
  89.                  $kd_kelas      = $_POST['kd_kelas'];    
  90.                  $nm_wk         = $_POST['nm_wk'];
  91.                  $thn_ajaran    = $_POST['thn_ajaran'];
  92.                  $semester      = $_POST['semester'];  
  93.                  $error = array();  
  94.                  
  95.                 if(empty($semester)){  
  96.                 $error['semester'] = 'Tidak Boleh Kosong';  
  97.                 }  
  98.                
  99.                 if(empty($error)){
  100.        
  101.                     $query1 = "SELECT a.nis, b.nama, a.kd_kelas, a.thn_ajaran  
  102.                              FROM detilkelas a
  103.                               JOIN mastasiswa b
  104.                              ON a.nis=b.nis
  105.                              where a.kd_kelas='".$kd_kelas."' and a.nm_wk='".$nm_wk."' and a.thn_ajaran = '".$thn_ajaran."' ";
  106.                     $sql1   = mysql_query($query1);
  107.                    
  108.             ?>
  109.            
  110.  
  111. <?
  112. if($semester['semester']="Ganjil")
  113. { ?>
  114. <fieldset id="fil">
  115. <legend id="legend">lIHAT SK SISWA</legend>
  116. <table id="tableData" width="830" cellspacing="0">
  117.   <tr class="alt">
  118.     <th colspan="6">Kode Kelas  :&nbsp;<em>[<?=$kd_kelas?>]</em>Nama Wali Kelas :<em>&nbsp;[<?= $nm_wk?>]&nbsp;</em> </br> Tahun Ajaran:<em>&nbsp;[<?=$thn_ajaran?>]&nbsp;</em>Semester :<em>&nbsp;[<?=$semester?>]&nbsp;<input type="hidden" name="semester" value="<?=$semester?>"/></em>
  119.     </tr>
  120.     <tr class="alt">
  121.     <td width="15" rowspan="2">No.</td>
  122.     <td width="60" rowspan="2" align="center">NIS</td>
  123.     <td width="150" rowspan="2" align="center">NAMA</td>
  124.     </tr>
  125.     <tr class="alt">
  126.     <td align="center" width="170">CATATAN WALI KELAS </td>
  127.     <td align="center" width="170">MATA PELAJARAN YANG HARUS PERBAIKAN NILAI</td>
  128.     </tr>
  129.   <?php
  130.         $i=1;
  131.         while ($hasil = mysql_fetch_array($sql1)){
  132.             $query2 = "SELECT a.nis, c.keterangan1, c.keterangan2
  133.                         FROM mastasiswa a
  134.                         JOIN SK c
  135.                         ON a.nis=c.nis
  136.                         WHERE a.nis='".$hasil['nis']."' AND c.thn_ajaran='".$thn_ajaran."' AND c.semester='".$semester."'";
  137.             $sql2 = mysql_query($query2);
  138.     ?>  
  139.   <tr class="<?=(++$no%2) ? "tr1" : "tr2" ?>">
  140.     <td class="alts"><?php echo $i;?></td>
  141.     <td class="alts"><? echo $hasil['nis'];?></td>
  142.     <td class="alts"><? echo $hasil['nama'];?></td>
  143.    
  144.     <?php if($hasil2 = mysql_fetch_array($sql2)){ ?>
  145.    
  146.     <td class="alts"><? echo $hasil2['keterangan1']?>&nbsp;<? echo $hasil2['keterangan1']?></td>
  147.     <td class="alts"><? echo $hasil2['keterangan2']?>&nbsp;<? echo $hasil2['keterangan2']?></td>
  148.     <? } else
  149.         { ?>
  150.     <td class="alts">Belum Di Isi</td>
  151.     <td class="alts">Belum Di Isi</td>
  152.   </tr>
  153.   <? } ?>
  154. <? $i++; } ?>            
  155.   <tr>
  156.     <th colspan="6">
  157.     <input type="submit" name="isiSK" id="isiSK" value="Isi Saran Kritik"></th>
  158.     </tr>
  159. </table>
  160. </fieldset>
  161.  
  162.  
  163.  
  164.    
  165. <? }
  166. if($semester['semester']="Genap")
  167. { ?>
  168. <fieldset id="fil">
  169. <legend id="legend">lIHAT SK SISWA</legend>
  170. <table id="tableData" width="830" cellspacing="0">
  171.   <tr class="alt">
  172.     <th colspan="6">Kode Kelas  :&nbsp;<em>[<?=$kd_kelas?>]</em>Nama Wali Kelas :<em>&nbsp;[<?= $nm_wk?>]&nbsp;</em> </br> Tahun Ajaran:<em>&nbsp;[<?=$thn_ajaran?>]&nbsp;</em>Semester :<em>&nbsp;[<?=$semester?>]&nbsp;<input type="hidden" name="semester" value="<?=$semester?>"/></em>
  173.     </tr>
  174.     <tr class="alt">
  175.     <td width="15" rowspan="2">No.</td>
  176.     <td width="60" rowspan="2" align="center">NIS</td>
  177.     <td width="150" rowspan="2" align="center">NAMA</td>
  178.     </tr>
  179.     <tr class="alt">
  180.     <td align="center" width="170">CATATAN WALI KELAS </td>
  181.     <td align="center" width="170">SISWA NAIK KELAS GA?</td>
  182.     </tr>
  183.   <?php
  184.         $i=1;
  185.         while ($hasil = mysql_fetch_array($sql1)){
  186.             $query2 = "SELECT a.nis, c.keterangan1, c.keterangan2
  187.                         FROM mastasiswa a
  188.                         JOIN SK c
  189.                         ON a.nis=c.nis
  190.                         WHERE a.nis='".$hasil['nis']."' AND c.thn_ajaran='".$thn_ajaran."' AND c.semester='".$semester."'";
  191.             $sql2 = mysql_query($query2);
  192.     ?>  
  193.   <tr class="<?=(++$no%2) ? "tr1" : "tr2" ?>">
  194.     <td class="alts"><?php echo $i;?></td>
  195.     <td class="alts"><? echo $hasil['nis'];?></td>
  196.     <td class="alts"><? echo $hasil['nama'];?></td>
  197.    
  198.     <?php if($hasil2 = mysql_fetch_array($sql2)){ ?>
  199.    
  200.     <td class="alts"><? echo $hasil2['keterangan1']?>&nbsp;<? echo $hasil2['keterangan1']?></td>
  201.     <td class="alts"><? echo $hasil2['keterangan2']?>&nbsp;<? echo $hasil2['keterangan2']?></td>
  202.     <? } else
  203.         { ?>
  204.     <td class="alts">Belum Di Isi</td>
  205.     <td class="alts">Belum Di Isi</td>
  206.   </tr>
  207.   <? } ?>
  208. <? $i++; } ?>            
  209.   <tr>
  210.     <th colspan="6">
  211.     <input type="submit" name="isiSK" id="isiSK" value="Isi Saran Kritik"></th>
  212.     </tr>
  213. </table>
  214. </fieldset>
  215. <? } }} ?>
  216.  
  217.  
  218.  
  219.  
  220. /////////////////////////////////////////////////////
  221.  
  222.  
  223.  
  224.         <?
  225.             if(isset($_POST['isiSK']))  {
  226.                  $kd_kelas      = $_POST['kd_kelas'];    
  227.                  $nm_wk         = $_POST['nm_wk'];
  228.                  $thn_ajaran    = $_POST['thn_ajaran'];
  229.                  $semester      = $_POST['semester'];
  230.                  $q = "SELECT a.nis, b.nama, a.kd_kelas, a.thn_ajaran  
  231.                              FROM detilkelas a
  232.                               JOIN mastasiswa b
  233.                              ON a.nis=b.nis
  234.                              where a.kd_kelas='".$kd_kelas."' and a.nm_wk='".$nm_wk."' and a.thn_ajaran = '".$thn_ajaran."' ";
  235.                  $s = mysql_query($q);
  236.             ?>
  237.        
  238.         <fieldset id="fil">
  239. <legend id="legend">Lihat </legend>
  240. <table id="tableData" width="830" cellspacing="0">
  241.   <tr class="alt">
  242.     <th colspan="6">Kode Kelas  :&nbsp;<em>[<?=$kd_kelas?>]</em>Nama Wali Kelas :<em>&nbsp;[<?= $nm_wk?>]&nbsp;</em> </br> Tahun Ajaran:<em>&nbsp;[<?=$thn_ajaran?>]&nbsp;</em>Semester :<em>&nbsp;[<?=$semester?>]&nbsp;<input type="hidden" name="semester" value="<?=$semester?>"/></em>
  243.     </tr>
  244.   <tr class="alt">
  245.     <td width="15" rowspan="2">No.</td>
  246.     <td width="60" rowspan="2" align="center">NIS</td>
  247.     <td width="150" rowspan="2" align="center">NAMA</td>
  248.     </tr>
  249.    
  250.   <tr class="alt">
  251.     <td align="center" width="170">CATATAN WALI KELAS </td>
  252.     <td align="center" width="170">KETERANGAN KENAIKAN KELAS SISWA</td>
  253.   </tr>
  254.  
  255.     <?php  
  256.               $e=1;
  257.               while ($ha = mysql_fetch_array($s)){
  258.         ?>
  259.        
  260. <tr class="<?=(++$no%2) ? "tr1" : "tr2" ?>">
  261.     <td class="alts"><?php echo $e;?></td>
  262.     <td class="alts"><input type="text" id="nis[]" name="nis[]" value="<? echo $ha['nis'];?>" size="8" readonly=""></td>
  263.     <td class="alts"><input type="text" id="nama[]" name="nama[]" value="<? echo $ha['nama'];?>" size="25" readonly=""></td>
  264.     <td>
  265.     <textarea name="" id="alamat" class="required" title="Harap di Isi"  value="<?php echo isset($_POST['alamat']) ? $_POST['alamat'] : '';?>" /></textarea>
  266.     </td>
  267.      <td>
  268.     <textarea name="" id="alamat" class="required" title="Harap di Isi"  value="<?php echo isset($_POST['alamat']) ? $_POST['alamat'] : '';?>" /></textarea>
  269.     </td>
  270. </tr>
  271.  
  272.   </tr>
  273.   <? $e++; } ?>
  274.   <tr>
  275.       <th colspan="9"><input type="submit" name="simpan_SK" id="simpan_SK" value="Simpan SK Siswa"></th>
  276.   </tr>          
  277.   </table>
  278. </fieldset>
  279. <? } ?>
  280.  
  281.  
  282. <?
  283.     if (isset($_POST['simpan_SK'])) {        
  284.        $nis                 = $_POST['nis'];
  285.        $thn_ajaran          = $_POST['thn_ajaran'];
  286.        $semester            = $_POST['semester'];
  287.        $ket1                = $_POST['keterangan1'];
  288.        $ket2                = $_POST['keterangan2'];
  289.            
  290.         for($i=0;$i<count($nis);$i++){
  291.         $kuery = "insert into SK value('$nis[$i]','$thn_ajaran','$semester','$keterangan1[$i]','$keterangan2[$i]')";
  292.         $esq = mysql_query($kuery);
  293.            }
  294.         if ($esq){
  295.       ?>
  296.             <script language="JavaScript" type="text/javascript">
  297.             alert("Data telah tersimpan");
  298.             document.location = "?hal=entryssarankritik";
  299.             </script>
  300.     <?
  301.       }  else {
  302.                   die(mysql_error());
  303.       }} ?>
  304.  
  305.  
  306. </form>
  307. </body>
  308. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top