Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'home.php';
- $stmt = $user_home->runQuery("SELECT * FROM tbl_users");
- $stmt->execute(array(":uid" => $_SESSION['userSession']));
- $row = $stmt->fetch(PDO::FETCH_ASSOC);
- $stmt->execute();
- ?>
- <style type="text/css">
- .paymentstatus{width:70%;margin: auto!important;}
- .inputpayment{/*width: 20%;clear:both;*/}
- </style>
- <div class="paymentstatus">
- <form class="form-signin" method="post" enctype='multipart/form-data' action="update_paidstatus.php" id="" onsubmit="return validate(); ">
- <h2 class="form-signin-heading">Designer Payment Status</h2>
- <table>
- <tr><td> Designer </td><td>
- <select onchange="getOrderDetail(event);" name="designer_id" id="designer_id" >
- <option value="">Select Designer</option>
- <?php
- while($data = $stmt->fetch())
- {
- if($data['type']=="admin")continue;
- ?>
- <option value="<?php echo $data['userID'];?>">
- <?php
- echo $data['name'];
- ?>
- </option>
- <?php } ?>
- </select>
- </td><td><p id="error_para1" ></p></td></tr>
- <tr><td>Order Number: </td><td>
- <div id="ordernumbers">
- <select name="designerorder_id" id="designerorder_id" >
- <option>Select Order</option>
- </select>
- </div>
- </td><td><p id="error_para2" ></p></td></tr>
- <tr><td>Product</td><td>
- <div id="productnumbers" name="dproduct_id" id="dproduct_id" >
- <select id="mySelect" >
- <option>Select Products</option>
- </select>
- </div>
- </td><td><p id="error_para3" ></p></td> </tr>
- <tr><td> Payment DueDate:</td> <td>
- <input type="text" class="inputpayment" id="datepicker" placeholder="Duedate" id= "Duedate" name="dueDate" value="" required />
- </td><td><p id="error_para6" ></p></td></tr>
- </table>
- <hr/>
- <input type="hidden" name="dproduct_id" id="dproduct_id" value=""/>
- <input class="btn btn-large btn-primary" name="btn-signup" type="submit" id="btnSubmit" value="Submit" />
- <input type="reset" class="btn btn-large btn-primary" id='button_reset' formnovalidate="formnovalidate" value="RESET"/>
- </form>
- </div>
- <link rel="stylesheet" href="http://sbdev2.kidsdial.com:81/php/site6/bootstrap/css/jquery-ui.css">
- <script src="http://sbdev2.kidsdial.com:81/php/site6/bootstrap/js/outthinking/jquery-ui.js"></script>
- <link href="http://sbdev2.kidsdial.com:81/php/site6/bootstrap/css/fSelect.css" rel="stylesheet">
- <script src="http://sbdev2.kidsdial.com:81/php/site6/bootstrap/js/outthinking/fSelect.js"></script>
- <script type="text/javascript">
- function validate()
- {
- // alert("d");
- var error="";
- /*
- var designer_id = document.getElementById( "designer_id" );
- if( designer_id.value == "" )
- {
- error = " Please Select Designer";
- document.getElementById( "error_para1" ).innerHTML = error;
- return false;
- }
- */
- var error="";
- var designerorder_id = document.getElementById( "designerorder_id" );
- if( designerorder_id.value == "" )
- {
- error = " Please Select Order";
- document.getElementById( "error_para2" ).innerHTML = error;
- return false;
- }
- var error="";
- var dproduct_id = document.getElementById( "dproduct_id" );
- if( dproduct_id.value == "" )
- {
- error = " Please Select Product";
- document.getElementById( "error_para3" ).innerHTML = error;
- return false;
- }
- var error="";
- var Duedate = document.getElementById( "Duedate" );
- if(Duedate.value == "" )
- {
- error = " Please Select Designer";
- document.getElementById( "error_para6" ).innerHTML = error;
- return false;
- }
- else
- {
- return true;
- }
- }
- $(document).ready(
- /* This is the function that will get executed a
- fter the DOM is fully loaded */
- function () {
- $( "#datepicker" ).datepicker({
- changeMonth: true,//this option for allowing user to select month
- changeYear: true //this option for allowing user to select from year range
- });
- }
- );
- function getOrderDetail(e)
- {
- var designerId=e.target.options[e.target.selectedIndex].value;
- var url="http://sbdev2.kidsdial.com:81/php/site6/designerpaidstatus.php?designer_id="+designerId+"&opration=2";
- var request = jQuery.ajax( {
- url: url ,
- type: 'POST',
- } );
- request.done( function (result)
- {
- document.getElementById('ordernumbers').innerHTML =result;
- } );
- request.fail( function ( error )
- {
- console.dir(error);
- } );
- }
- function getProductDetail(e)
- {
- var productId = $("#dproductselect option:selected").attr("class");
- var finalstrig=productId.split(",");
- var select='';
- select+='<select class="test" multiple="multiple" name="dproduct_ids" id="dproduct_ids">';
- for(i=0;i<finalstrig.length;i++)
- {
- if(finalstrig[i]!=0)
- {
- select +='<option value="'+finalstrig[i]+'">'+finalstrig[i]+'</option>';
- }
- }
- select +='</select>';
- document.getElementById('productnumbers').innerHTML =select;
- (function($) {
- $(function() {
- $('.test').fSelect();
- });
- })(jQuery);
- }
- $(function(){
- $("#button_reset").click(function() {
- $("#productnumbers").html('<select id="mySelect"><option>Select Products</option></select>');
- });
- });
- function selectValidate() {
- var check = false;
- $.each($('select'), function(index, data) {
- if (data.val() !== ''){
- check = true;
- }
- });
- return check;
- }
- </script>
Add Comment
Please, Sign In to add comment