SHARE
TWEET

Untitled

a guest Nov 10th, 2018 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. function cekdata()
  3. {
  4.     var a=$('[form2.name="checkbox[]"]:checked').length;
  5. if(a==0)
  6.     {
  7.         alert("HARUS ADA YANG DICENTANG");
  8.     }
  9. }
  10. </script>
  11. <script>
  12.   function check(g,c) {
  13.     var input=document.getElementsByClassName(g);
  14.     for(i in input) if(!isNaN(i)) input[i].checked=c;
  15.   }
  16. </script>
  17. </head>
  18.  
  19. <body>
  20. <p>APPOVED BY MANAGEMENT</p>
  21. <p>Branch : <?php echo $_SESSION['cabang']; ?></p>
  22. <form id="form2" name="form2" method="POST" onsubmit="return cekdata()" action="<?php echo $editFormAction; ?>">
  23. <table width="1500" border="1">
  24.   <tr>
  25.     <td width="23">NO</td>
  26.     <td width="77">AWB No</td>
  27.     <td width="57">Airline</td>
  28.     <td width="69">Book Date</td>
  29.     <td width="200">Noted</td>
  30.     <td width="30"><label for="all">ALL</label>
  31.       <input type="checkbox" name="all" id="all" onclick="check('all',this.checked)" /></td>
  32.   </tr>
  33.   <?php
  34.  
  35.    $i=1;
  36.   while ($row_aw = mysql_fetch_assoc($aw)) {
  37.    echo"<tr>
  38.      <td>".$i."</td>
  39.      <td>".$row_aw['awb_no']."</td>
  40.      <td>".$row_aw['air_code']."</td>
  41.      <td>".$row_aw['tgl_book']."</td>
  42.      <td>".nl2br(str_replace('','',htmlspecialchars($row_aw['note'])))."</td>
  43.      <td><input type='checkbox' class='all' name='checkbox[]' id='checkbox' value='".$row_aw['id']."' /></td>
  44.    </tr>";
  45.      $i++;
  46.   }
  47.  
  48.     $jum=$i-1;
  49.     ?>
  50. </table>
  51.   <p>
  52.     <input type="submit" name="submit" id="submit" onclick="return tanya()" value="POSTING" />
  53.     <input type="reset" name="reset" id="reset" value="RESET" />
  54.   </p>
  55.     <input type="hidden" name="n" value="<?php echo $jum; ?>">
  56.   <input type="hidden" name="MM_insert" value="form2" />
  57. </form>
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