emprit

form

Jun 4th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.06 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include "../../koneksi.php";
  4. if(!isset($_SESSION['username'])) {
  5.      //jika session belum di set/register
  6.    echo "Anda belum register kan session";
  7.    header('location:../../index.php');
  8. }else{
  9.     $date=date("Y-m-d");
  10.     echo "<link rel='stylesheet' href='http://localhost/keuangan/emprit/setting/background.css' type='text/css'></link>";
  11. $query=mysql_query("SELECT * FROM transaksi where kode = 'input' ORDER BY nomer DESC LIMIT 0,1");
  12.  
  13.  
  14.  
  15. $e=mysql_fetch_array($query);
  16.  
  17. $query1 = substr($e['nomer'],5,50);
  18. $query3=$query1+1;
  19. $query4="input".$query3;
  20.  
  21. ?>
  22. <script src="jquery.js"></script>
  23. <script src="validasiinputdapat.js"></script>
  24. <script language="JavaScript">
  25. function check_angka(){
  26. var jumlah;
  27. jumlah=document.inputdapat.jumlah.value;
  28. if(isNaN(jumlah)){
  29.     document.inputdapat.jumlah.value="";
  30. }
  31. }
  32. </script>
  33.  
  34. <style>
  35. .ijo{border : 1px solid #7FFF00;}
  36. .merah{border: 1px solid red}
  37. </style>
  38.  
  39. <script type="text/javascript" src="jquery-latest.pack.js"></script>
  40. <script>
  41.  
  42. $(document).ready(function() { 
  43.  
  44.     //select all the a tag with name equal to modal
  45.     $('a[name=modal]').click(function(e) {
  46.         //Cancel the link behavior
  47.         e.preventDefault();
  48.        
  49.         //Get the A tag
  50.         var id = $(this).attr('href');
  51.    
  52.         //Get the screen height and width
  53.         var maskHeight = $(document).height();
  54.         var maskWidth = $(window).width();
  55.    
  56.         //Set heigth and width to mask to fill up the whole screen
  57.         $('#mask').css({'width':maskWidth,'height':maskHeight});
  58.        
  59.         //transition effect    
  60.         $('#mask').fadeIn(1000);   
  61.         $('#mask').fadeTo("slow",0.8); 
  62.    
  63.         //Get the window height and width
  64.         var winH = $(window).height();
  65.         var winW = $(window).width();
  66.              
  67.         //Set the popup window to center
  68.         $(id).css('top',  winH/2-$(id).height()/2);
  69.         $(id).css('left', winW/2-$(id).width()/2);
  70.    
  71.         //transition effect
  72.         $(id).fadeIn(2000);
  73.    
  74.     });
  75.    
  76.     //if close button is clicked
  77.     $('.window .close').click(function (e) {
  78.         //Cancel the link behavior
  79.         e.preventDefault();
  80.        
  81.         $('#mask').hide();
  82.         $('.window').hide();
  83.     });    
  84.    
  85.     //if mask is clicked
  86.     $('#mask').click(function () {
  87.         $(this).hide();
  88.         $('.window').hide();
  89.     });        
  90.  
  91.     $(window).resize(function () {
  92.      
  93.         var box = $('#boxes .window');
  94.  
  95.         //Get the screen height and width
  96.         var maskHeight = $(document).height();
  97.         var maskWidth = $(window).width();
  98.      
  99.         //Set height and width to mask to fill up the whole screen
  100.         $('#mask').css({'width':maskWidth,'height':maskHeight});
  101.                
  102.         //Get the window height and width
  103.         var winH = $(window).height();
  104.         var winW = $(window).width();
  105.  
  106.         //Set the popup window to center
  107.         box.css('top',  winH/2 - box.height()/2);
  108.         box.css('left', winW/2 - box.width()/2);
  109.      
  110.     });
  111.    
  112. });
  113.  
  114. </script>
  115.  
  116. <style>
  117.   span { display:none; }
  118.   div { display:none; }
  119.   p { font-weight:bold; background-color:#fcd; }
  120.   </style>
  121.  
  122.  
  123.  
  124. <style>
  125. body {
  126. font-family:verdana;
  127. font-size:15px;
  128. }
  129.  
  130. a {color:#333; text-decoration:none}
  131. a:hover {color:#ccc; text-decoration:none}
  132.  
  133. #mask {
  134.   position:absolute;
  135.   left:0;
  136.   top:0;
  137.   z-index:9000;
  138.   background-color:#000;
  139.   display:none;
  140. }
  141.  
  142. #boxes .window {
  143.   position:fixed;
  144.   left:0;
  145.   top:0;
  146.   width:440px;
  147.   height:200px;
  148.   display:none;
  149.   z-index:9999;
  150.   padding:20px;
  151. }
  152.  
  153. #boxes #dialog {
  154.   width:375px;
  155.   height:203px;
  156.   padding:10px;
  157.   background-color:#ffffff;
  158. }
  159.  
  160. #boxes #dialog1 {
  161.   width:375px;
  162.   height:203px;
  163. }
  164.  
  165. #dialog1 .d-header {
  166.   background:url(images/login-header.png) no-repeat 0 0 transparent;
  167.   width:375px;
  168.   height:150px;
  169. }
  170.  
  171. #dialog1 .d-header input {
  172.   position:relative;
  173.   top:60px;
  174.   left:100px;
  175.   border:3px solid #cccccc;
  176.   height:22px;
  177.   width:200px;
  178.   font-size:15px;
  179.   padding:5px;
  180.   margin-top:4px;
  181. }
  182.  
  183. #dialog1 .d-blank {
  184.   float:left;
  185.   background:url(images/login-blank.png) no-repeat 0 0 transparent;
  186.   width:267px;
  187.   height:53px;
  188. }
  189.  
  190. #dialog1 .d-login {
  191.   float:left;
  192.   width:108px;
  193.   height:53px;
  194. }
  195.  
  196. #boxes #dialog2 {
  197.   background:url(images/notice.png) no-repeat 0 0 transparent;
  198.   width:326px;
  199.   height:229px;
  200.   padding:50px 0 20px 25px;
  201. }
  202. </style>
  203. <script>
  204. function doIt() {
  205.   $("span,div").show("slow");
  206. }
  207. /* can pass in function name */
  208. $("radio").click(doIt);
  209.  
  210. $("form").submit(function () {
  211.   if ($("input").val() == "yes") {
  212.     $("p").show(4000, function () {
  213.       $(this).text("Ok, DONE! (now showing)");
  214.     });
  215.   }
  216.   $("span,div").hide("fast");
  217.   /* to stop the submit */
  218.   return false;
  219. });
  220. </script>
  221.  
  222.  
  223. <form name="inputdapat" id="inputdapat" method="post" action="input_pendapatan.php" enctype="multipart/form-data" >
  224. <table border='1' style='border-collapse:collapse'>
  225. <tr bgcolor='#ba55d3'><td colspan="3"><H2><center>Form Input Pendapatan</center></h2></td></tr>
  226. <tr bgcolor="#afeeee" id="nomer"><td>Nomer Inputan</td><td>:</td><td><input type="text" name="kode1" value='<?=$query4?>' disabled><input type="hidden" name="kode" value='input'><input type="hidden" name="nomer" value='<?=$query4?>'></td></tr>
  227. <tr bgcolor="#00ccd1" id="penginput"><td>Penginput</td><td>:</td><td><input type="text" name="penginput1" value='<?=$_SESSION['username']?>' disabled><input type="hidden" name="penginput" value='<?=$_SESSION['username']?>'></td></tr>
  228. <tr bgcolor="#afeeee" id="jumlah"><td>Jumlah Dana</td><td>:</td><td><input type="text" name="jumlah" onkeyup="check_angka()"></td></tr>
  229. <tr bgcolor="#00ccd1" id="tanggal"><td>Tanggal Input</td><td>:</td><td><input type="text" name="tanggal1" value="<?=$date?>" disabled><input type="hidden" name="tanggal" value="<?=$date?>"></td></tr>
  230. <tr bgcolor="#afeeee" id="sumber"><td>Sumber Dana</td><td>:</td><td><input type="radio" name="sumber" value="KAS">KAS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  231.                                                   <input type="radio" name="sumber" value="Hibah">Hibah<br>
  232.                                                   <input type="radio" name="sumber" value="Wakaf">Wakaf &nbsp;
  233.                                                   <input type="radio" name="sumber" value="Pinjam Bank">Pinjam Bank<br>
  234.                                                   <input type ="radio" name="sumber" value="" >Lainnya<br>
  235.                                                   <div><input type="text"  value="as;ldkfjalsdf"/></div></td></tr>
  236. <tr bgcolor="#00ccd1" id="file"><td>Bukti Tanda Terima</td><td>:</td><td><input type="hidden" name="MAX_FILE_SIZE" value="500000"/><input type="file" name="file_gambar" /><br/></td></tr>
  237. <tr bgcolor="#afeeee"><td colspan="3"><center><a href="#dialog2" name="modal"><input type="Submit" name="sub1" value="Tambah Data"/></a></center></td></tr>
  238.  
  239. <div id="boxes">
  240.  
  241.  
  242.  
  243. <!-- Start of Sticky Note -->
  244. <div id="dialog2" class="window">
  245.   Data yang sudah <font color="red" >terinput </font> tidak bisa dihapus maupun diedit, silahkan cek kembali. <br>
  246.   Jika merasa sudah benar dalam penginputan silahkan tekan button Tambah Data. <br/><br/>
  247. <center><input type="button" value="Cek Kembali" class="close"/>|<input type="Submit" name="sub" value="Tambah Data"/></center>
  248. </div>
  249. <!-- End of Sticky Note -->
  250.  
  251.  
  252.  
  253. <!-- Mask to cover the whole screen -->
  254.   <div id="mask"></div>
  255. </div>
  256.  
  257. </table></form>
  258.  
  259. <?php
  260. }
  261. ?>
Advertisement
Add Comment
Please, Sign In to add comment