Guest User

complete

a guest
Dec 29th, 2016
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. include 'home.php';
  4. $stmt = $user_home->runQuery("SELECT * FROM tbl_users");
  5. $stmt->execute(array(":uid" => $_SESSION['userSession']));
  6. $row = $stmt->fetch(PDO::FETCH_ASSOC);
  7. $stmt->execute();
  8. ?>
  9.  
  10. <style type="text/css">
  11. .paymentstatus{width:70%;margin: auto!important;}
  12. .inputpayment{/*width: 20%;clear:both;*/}
  13. </style>
  14.  
  15. <div class="paymentstatus">
  16. <form class="form-signin" method="post" enctype='multipart/form-data' action="update_paidstatus.php" id="" onsubmit="return validate(); ">
  17. <h2 class="form-signin-heading">Designer Payment Status</h2>
  18.  
  19. <table>
  20. <tr><td> Designer </td><td>
  21.  
  22. <select onchange="getOrderDetail(event);" name="designer_id" id="designer_id" >
  23. <option value="">Select Designer</option>
  24. <?php
  25. while($data = $stmt->fetch())
  26. {
  27. if($data['type']=="admin")continue;
  28. ?>
  29. <option value="<?php echo $data['userID'];?>">
  30. <?php
  31. echo $data['name'];
  32. ?>
  33. </option>
  34. <?php } ?>
  35. </select>
  36.  
  37. </td><td><p id="error_para1" ></p></td></tr>
  38.  
  39.  
  40. <tr><td>Order Number: </td><td>
  41.  
  42.  
  43. <div id="ordernumbers">
  44. <select name="designerorder_id" id="designerorder_id" >
  45. <option>Select Order</option>
  46. </select>
  47. </div>
  48.  
  49. </td><td><p id="error_para2" ></p></td></tr>
  50.  
  51.  
  52.  
  53.  
  54. <tr><td>Product</td><td>
  55.  
  56.  
  57. <div id="productnumbers" name="dproduct_id" id="dproduct_id" >
  58. <select id="mySelect" >
  59. <option>Select Products</option>
  60. </select>
  61.  
  62. </div>
  63.  
  64.  
  65. </td><td><p id="error_para3" ></p></td> </tr>
  66.  
  67.  
  68.  
  69.  
  70.  
  71. <tr><td> Payment DueDate:</td> <td>
  72.  
  73. <input type="text" class="inputpayment" id="datepicker" placeholder="Duedate" id= "Duedate" name="dueDate" value="" required />
  74.  
  75. </td><td><p id="error_para6" ></p></td></tr>
  76.  
  77.  
  78. </table>
  79.  
  80. <hr/>
  81.  
  82. <input type="hidden" name="dproduct_id" id="dproduct_id" value=""/>
  83.  
  84. <input class="btn btn-large btn-primary" name="btn-signup" type="submit" id="btnSubmit" value="Submit" />
  85. <input type="reset" class="btn btn-large btn-primary" id='button_reset' formnovalidate="formnovalidate" value="RESET"/>
  86.  
  87. </form>
  88. </div>
  89.  
  90. <link rel="stylesheet" href="http://sbdev2.kidsdial.com:81/php/site6/bootstrap/css/jquery-ui.css">
  91. <script src="http://sbdev2.kidsdial.com:81/php/site6/bootstrap/js/outthinking/jquery-ui.js"></script>
  92. <link href="http://sbdev2.kidsdial.com:81/php/site6/bootstrap/css/fSelect.css" rel="stylesheet">
  93. <script src="http://sbdev2.kidsdial.com:81/php/site6/bootstrap/js/outthinking/fSelect.js"></script>
  94.  
  95. <script type="text/javascript">
  96. function validate()
  97. {
  98. // alert("d");
  99. var error="";
  100. /*
  101. var designer_id = document.getElementById( "designer_id" );
  102. if( designer_id.value == "" )
  103. {
  104. error = " Please Select Designer";
  105. document.getElementById( "error_para1" ).innerHTML = error;
  106. return false;
  107. }
  108. */
  109.  
  110.  
  111. var error="";
  112. var designerorder_id = document.getElementById( "designerorder_id" );
  113. if( designerorder_id.value == "" )
  114. {
  115. error = " Please Select Order";
  116. document.getElementById( "error_para2" ).innerHTML = error;
  117. return false;
  118. }
  119.  
  120.  
  121. var error="";
  122. var dproduct_id = document.getElementById( "dproduct_id" );
  123.  
  124. if( dproduct_id.value == "" )
  125. {
  126. error = " Please Select Product";
  127. document.getElementById( "error_para3" ).innerHTML = error;
  128. return false;
  129. }
  130.  
  131.  
  132. var error="";
  133. var Duedate = document.getElementById( "Duedate" );
  134. if(Duedate.value == "" )
  135. {
  136. error = " Please Select Designer";
  137. document.getElementById( "error_para6" ).innerHTML = error;
  138. return false;
  139. }
  140. else
  141. {
  142. return true;
  143. }
  144. }
  145.  
  146. $(document).ready(
  147.  
  148. /* This is the function that will get executed a
  149. fter the DOM is fully loaded */
  150. function () {
  151. $( "#datepicker" ).datepicker({
  152. changeMonth: true,//this option for allowing user to select month
  153. changeYear: true //this option for allowing user to select from year range
  154. });
  155. }
  156.  
  157. );
  158. function getOrderDetail(e)
  159. {
  160. var designerId=e.target.options[e.target.selectedIndex].value;
  161. var url="http://sbdev2.kidsdial.com:81/php/site6/designerpaidstatus.php?designer_id="+designerId+"&opration=2";
  162. var request = jQuery.ajax( {
  163. url: url ,
  164. type: 'POST',
  165. } );
  166.  
  167. request.done( function (result)
  168. {
  169. document.getElementById('ordernumbers').innerHTML =result;
  170.  
  171. } );
  172. request.fail( function ( error )
  173. {
  174. console.dir(error);
  175. } );
  176. }
  177. function getProductDetail(e)
  178. {
  179. var productId = $("#dproductselect option:selected").attr("class");
  180. var finalstrig=productId.split(",");
  181.  
  182. var select='';
  183. select+='<select class="test" multiple="multiple" name="dproduct_ids" id="dproduct_ids">';
  184.  
  185. for(i=0;i<finalstrig.length;i++)
  186. {
  187. if(finalstrig[i]!=0)
  188. {
  189. select +='<option value="'+finalstrig[i]+'">'+finalstrig[i]+'</option>';
  190. }
  191. }
  192. select +='</select>';
  193. document.getElementById('productnumbers').innerHTML =select;
  194. (function($) {
  195. $(function() {
  196. $('.test').fSelect();
  197. });
  198. })(jQuery);
  199.  
  200. }
  201.  
  202. $(function(){
  203. $("#button_reset").click(function() {
  204. $("#productnumbers").html('<select id="mySelect"><option>Select Products</option></select>');
  205. });
  206. });
  207.  
  208. function selectValidate() {
  209. var check = false;
  210. $.each($('select'), function(index, data) {
  211. if (data.val() !== ''){
  212. check = true;
  213. }
  214. });
  215. return check;
  216. }
  217.  
  218.  
  219.  
  220. </script>
RAW Paste Data Copied