Advertisement
Guest User

Sesi bertanya bersama member

a guest
Nov 20th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.24 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4.  
  5. include('includes/config.php');
  6. if(strlen($_SESSION['pengawal'])==0)
  7. {
  8. header('location:index.php');
  9. }
  10. else{
  11.  
  12. ?>
  13.  
  14.  
  15. <div class="row">
  16.  
  17. <!DOCTYPE html>
  18. <html lang="en">
  19. <head>
  20.  
  21. <!-- Title -->
  22. <title>Pelajar | Permohonan Keluar</title>
  23.  
  24. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  25. <meta charset="UTF-8">
  26. <meta name="description" content="Responsive Admin Dashboard Template" />
  27. <meta name="keywords" content="admin,dashboard" />
  28. <meta name="author" content="Steelcoders" />
  29.  
  30. <!-- Styles -->
  31. <link type="text/css" rel="stylesheet" href="assets/plugins/materialize/css/materialize.min.css"/>
  32. <link href="./assets/css/icon.css" rel="stylesheet">
  33. <link href="assets/plugins/material-preloader/css/materialPreloader.min.css" rel="stylesheet">
  34. <link href="assets/css/alpha.min.css" rel="stylesheet" type="text/css"/>
  35. <link href="assets/css/custom.css" rel="stylesheet" type="text/css"/>
  36. <style>
  37. .errorWrap {
  38. padding: 10px;
  39. margin: 0 0 20px 0;
  40. background: #fff;
  41. border-left: 4px solid #dd3d36;
  42. -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
  43. box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
  44. }
  45. .succWrap{
  46. padding: 10px;
  47. margin: 0 0 20px 0;
  48. background: #fff;
  49. border-left: 4px solid #5cb85c;
  50. -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
  51. box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
  52. }
  53. </style>
  54.  
  55.  
  56.  
  57. </head>
  58. <body>
  59. <?php include('includes/header.php');?>
  60.  
  61. <?php include('includes/sidebar.php');?>
  62. <main class="mn-inner">
  63. <div class="row">
  64. <div class="col s12">
  65. <div class="page-title">Permohonan Keluar Bengkel</div>
  66. </div>
  67. <div class="col s12 m12 l8">
  68. <div class="card">
  69. <div class="card-content">
  70. <form id="example-form" method="post" name="addemp">
  71. <div>
  72. <h3>Permohonan Keluar Bengkel</h3>
  73. <section>
  74. <div class="wizard-content">
  75. <div class="row">
  76. <div class="col m12">
  77. <div class="row">
  78. <?php if($error){?><div class="errorWrap"><strong>RALAT </strong> ! <?php echo htmlentities($error); ?> </div><?php }
  79. else if($msg){?><div class="succWrap"><strong>TAHNIAH</strong> ! <?php echo htmlentities($msg); ?> </div><?php }?>
  80.  
  81.  
  82. <div class="input-field col s12">
  83. <select name="leavetype" autocomplete="off">
  84. <option value="">Sila Pilih Jenis Urusan @ Tujuan</option>
  85. <?php $sql = "SELECT LeaveType from tblleavetype";
  86. $query = $dbh -> prepare($sql);
  87. $query->execute();
  88. $results=$query->fetchAll(PDO::FETCH_OBJ);
  89. $cnt=1;
  90. if($query->rowCount() > 0)
  91. {
  92. foreach($results as $result)
  93. { ?>
  94. <option value="<?php echo htmlentities($result->LeaveType);?>"><?php echo htmlentities($result->LeaveType);?></option>
  95. <?php }} ?>
  96. </select>
  97. </div>
  98.  
  99. <?php
  100. $eid=$_SESSION['pengawal'];
  101. $sql = "SELECT FirstName,LastName from pengawal where id=:eid";
  102. $query = $dbh -> prepare($sql);
  103. $query->bindParam(':eid',$eid,PDO::PARAM_STR);
  104. $query->execute();
  105. $results=$query->fetchAll(PDO::FETCH_OBJ);
  106. $cnt=1;
  107. if($query->rowCount() > 0)
  108. {
  109. foreach($results as $result)
  110. { ?>
  111. <?php }} ?>
  112.  
  113. <div class="input-field col m6 s12">
  114. <label for="firstName"></label>
  115. <input id="firstName" name="firstName" value="<?php echo htmlentities($result->FirstName);?>" type="text" readonly required>
  116. </div>
  117.  
  118. <div class="input-field col m6 s12">
  119. <label for="lastName"> </label>
  120. <input id="lastName" name="lastName" value="<?php echo htmlentities($result->LastName);?>" type="text" readonly autocomplete="off" required>
  121. </div>
  122.  
  123. <div class="input-field col m6 s12">
  124. <label for="fromdate">Tarikh Permohonan</label>
  125. <input placeholder="" id="mask1" name="fromdate" class="masked" type="text" data-inputmask="'alias': 'date'" required>
  126. </div>
  127. <div class="input-field col m6 s12">
  128. <label for="todate">Tarikh Pulang</label>
  129. <input placeholder="" id="mask1" name="todate" class="masked" type="text" data-inputmask="'alias': 'date'" required>
  130. </div>
  131. <div class="input-field col m12 s12">
  132. <label for="birthdate">Huraian</label>
  133.  
  134. <textarea id="textarea1" name="description" class="materialize-textarea" length="500" required></textarea>
  135. </div>
  136. </div>
  137. <button type="submit" name="apply" id="apply" class="waves-effect waves-light btn indigo m-b-xs">Mohon</button>
  138.  
  139. </div>
  140. </div>
  141. </section>
  142.  
  143.  
  144. </section>
  145. </div>
  146. </form>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </main>
  152. </div>
  153. <div class="left-sidebar-hover"></div>
  154.  
  155. <!-- Javascripts -->
  156. <script src="assets/plugins/jquery/jquery-2.2.0.min.js"></script>
  157. <script src="assets/plugins/materialize/js/materialize.min.js"></script>
  158. <script src="assets/plugins/material-preloader/js/materialPreloader.min.js"></script>
  159. <script src="assets/plugins/jquery-blockui/jquery.blockui.js"></script>
  160. <script src="assets/js/alpha.min.js"></script>
  161. <script src="assets/js/pages/form_elements.js"></script>
  162. <script src="assets/js/pages/form-input-mask.js"></script>
  163. <script src="assets/plugins/jquery-inputmask/jquery.inputmask.bundle.js"></script>
  164. </body>
  165. </html>
  166. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement