mrs_cl4y

test

Jun 6th, 2015
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.09 KB | None | 0 0
  1.  
  2. <html>
  3.  
  4. <head>
  5.  
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7.  
  8. <title>Pengelola Nilai Mahasiswa</title>
  9.  
  10. <link href="css/tooplate_style.css" rel="stylesheet" type="text/css" />
  11.  
  12. <script type="text/javascript" src="js/swfobject.js"></script>
  13.  
  14. <script type="text/javascript">
  15.  
  16. var flashvars = {};
  17.  
  18. flashvars.xml_file = "photo_list.xml";
  19.  
  20. var params = {};
  21.  
  22. params.wmode = "transparent";
  23.  
  24. var attributes = {};
  25.  
  26. attributes.id = "slider";
  27.  
  28. swfobject.embedSWF("flash_slider.swf", "flash_grid_slider", "780", "210", "9.0.0", false, flashvars, params, attributes);
  29.  
  30. </script>
  31.  
  32. </head>
  33.  
  34. <body>
  35.  
  36. <div id="tooplate_wrapper">
  37.  
  38. <div id="tooplate_header">
  39.  
  40. <div id="tooplate_menu">
  41.  
  42. <ul>
  43.  
  44. <li><a class="current">Saya Dosen</a></li>
  45.  
  46. <li><a href="index.html" class="current">Logout</a></li>
  47.  
  48. </ul>
  49.  
  50. </div> <!-- end of tooplate_menu -->
  51.  
  52. </div> <!-- end of forever header -->
  53.  
  54. <div id="tooplate_middle">
  55.  
  56. <div id="flash_grid_slider">
  57.  
  58. <a rel="nofollow" href="http://www.adobe.com/go/getflashplayer">
  59.  
  60. <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
  61.  
  62. </a>
  63.  
  64. </div>
  65.  
  66. </div> <!-- end of middle -->
  67.  
  68. <div id="tooplate_content"><span class="content_top"></span>
  69.  
  70. <!-- dari sini logika loginnya-->
  71.  
  72. <div class="cleaner h40"></div>
  73.  
  74. <form name="form1" action="edit_1ia01.php" method="POST">
  75.  
  76. <center>
  77.  
  78. <h1>Edit Data Mahasiswa</h1>
  79.  
  80. <table border="1" style="border-collapse:collapse" width="100%">
  81.  
  82. <tr style="background:orange;">
  83.  
  84. <!-- di gunakan untuk membuat label nama fieldnya-->
  85.  
  86. <th>NPM</th>
  87.  
  88. <th>Nama</th>
  89.  
  90. <th>Kelas</th>
  91.  
  92. <th>Absen</th>
  93.  
  94. <th>Tugas 1</th>
  95.  
  96. <th>Tugas 2</th>
  97.  
  98. <th>Tugas 3</th>
  99.  
  100. <th>Nilai Ujian</th>
  101.  
  102. <th>Grade</th>
  103.  
  104. </tr>
  105.  
  106.  
  107. <?php
  108.  
  109. include "koneksi.php";
  110.  
  111. $sql="SELECT * FROM mhsnilai where kelas<='1IA01' order by nama";
  112.  
  113. $result=mysqli_query($conn,$sql) or die(mysqli_error());
  114. $count=mysqli_num_rows($result);
  115. $i=-1;
  116. while ($row=mysqli_fetch_array($result)) {
  117. $i=$i+1;
  118. extract($row);
  119.  
  120. ?>
  121. <tr>
  122.  
  123.  
  124. <td><?php echo $npm ?><input type=hidden name=npm[<?php echo $i ?>] value='<?php echo $npm;?>' /></td>
  125. <td><?php echo $nama ?></td>
  126.  
  127. <td><?php echo $kelas ?></td>
  128.  
  129. <td><center><input name='absen[<?php echo $i ?>]' placeholder="absen" size='4' maxlength='4' type=text value= '<?php echo $absen ?>'></center></td>
  130.  
  131. <td><center><input name='tugas1[<?php echo $i ?>]' placeholder="tugas1" size='4' maxlength='4' type=text value='<?php echo $tugas1 ?>'></center></td>
  132.  
  133. <td><center><input name='tugas2[<?php echo $i ?>]' placeholder='tugas2' size='4' maxlength='4' type=text value='<?php echo $tugas2 ?>'></center></td>
  134.  
  135. <td><center><input name='tugas3[<?php echo $i ?>]' placeholder='tugas3' size='4' maxlength='4' type=text value='<?php echo $tugas3 ?>'></center></td>
  136.  
  137. <td><center><input name='nilai_ujian[<?php echo $i ?>]' placeholder='nilai_ujian' size='5' maxlength='5' type=text value='<?php echo $nilai_ujian?>'></center></td>
  138.  
  139. <td><center><?php echo $grade ?></center></td>
  140.  
  141. </tr>
  142.  
  143. <?php
  144.  
  145. }
  146.  
  147. ?>
  148.  
  149.  
  150. </table>
  151.  
  152. <center><input type="Submit" value="Submit" name="Submit"></center>
  153. </form>
  154.  
  155.  
  156. <?php
  157. /*
  158. if ($_POST){
  159.  
  160. for($i=0;$i<$count;$i++){
  161. $sql1="UPDATE mhsnilai SET absen='$absen[$i]',tugas1=$tugas1[$i], tugas2=$tugas2[$i], tugas3=$tugas3[$i], nilai_ujian=$nilai_ujian[$i] where npm=$npm[$i]";
  162. $result1=mysql_query($sql1);
  163. }
  164. if($result1){
  165.  
  166. header("location:1ia01.php");
  167. }
  168.  
  169. }
  170.  
  171. */
  172. extract($_POST);
  173. if (isset($Submit))
  174. {
  175. for($i=0;$i<$count;$i++)
  176. {
  177. /*
  178. $update=("UPDATE tbl_name SET name='$name[$i]', lname='$lastname[$i]',email='$email[$i]' WHERE id='$id[$i]'");*/
  179.  
  180. $update=("UPDATE mhsnilai SET absen='$absen[$i]',tugas1='$tugas1[$i]', tugas2='$tugas2[$i]', tugas3='$tugas3[$i]', nilai_ujian='$nilai_ujian[$i]' where npm='$npm[$i]'");
  181. $res=mysql_query($update);
  182. }
  183. }
  184. if(isset($res))
  185. {
  186. header("location:1ia01.php");
  187. }
  188. ?>
  189.  
  190. <div class="cleaner"></div>
  191.  
  192. </div> <!-- end of content -->
  193.  
  194. <div id="tooplate_footer">
  195.  
  196. Copyright © 2048 <a href="#">Company Name</a>
  197.  
  198. <div class="cleaner"></div>
  199.  
  200. </div>
  201.  
  202. </div> <!-- end of wrapper -->
  203.  
  204. </body>
  205.  
  206. </html>
Advertisement
Add Comment
Please, Sign In to add comment