ok
Direktori : /home2/selectio/www/frames-hub/ui-pages/ |
Current File : //home2/selectio/www/frames-hub/ui-pages/client-home-data.php |
<?php include"../api/config/config.php"; if(isset($_REQUEST['customer_name']) && $_REQUEST['customer_name']!='') { $customer_id = $_REQUEST['customer_name']; $statement = $pdo->prepare("SELECT frames.*,customer.cust_firstname,customer.cust_phone FROM `frames` LEFT JOIN customer ON frames.customer_id=customer.id WHERE 1=1 and customer.id=".$customer_id); $statement->execute(); $customer_result = $statement->fetchAll(PDO::FETCH_ASSOC); $total_customer_frames=$statement->rowCount(); ?> <div class="card card-body canvas_div_pdf"> <div class="row"> <div class="col-md-12 col-sm-12 col-lg-12 col-xl-12"> <center><h2 style="font-family: SFProDisplay-Bold; font-size: 20px; margin-bottom: 2rem; font-weight"><?=$customer_result[0]['cust_firstname']?></h2></center> </div> <?php foreach($customer_result as $frames_result){ ?> <div class="col=12 col-sm-12 col-md-6 col-lg-6 col-xl-6"> <div class="card radius-10 border-start border-0 border-4"> <div class="card-body" style="background-color: #d7a4d3;border-radius: 12px;box-shadow: 2px 2px 2px 2px darkgrey;"> <!-- <div class="d-flex align-items-center">--> <div class="col-12 col-md-12 col-lg-12 col-xl-12"> <label for="FisrtName" class="form-label required" style="color:black;">Lens Type</label> <input type="text" class="form-control" id="lens_type" name="lens_type" placeholder="Lens Type" value="<?=$frames_result['lens_type']?>" readonly> </div><br> <div class="row"> <div class="col-12 col-md-4 col-lg-4 col-xl-4"> <div class="row"> <div class="col-12 col-md-12 col-lg-12 col-xl-12" style="margin-bottom:10px;"> <label for="FisrtName" class="form-label required" style="color:black;">Date</label> <input type="date" class="form-control" id="lens_date" name="lens_date" value="<?=$frames_result['date']?>" readonly> </div><br> <div class="col-12 col-md-12 col-lg-12 col-xl-12"> <label for="FisrtName" class="form-label required" style="color:black;">PD</label> <div class="row"> <div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6"> <input type="text" class="form-control" id="lens_date" name="lens_date" value="<?=$frames_result['fram_pd_first']?>" readonly> </div> <div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6"> <input type="text" class="form-control" id="lens_date" name="lens_date" value="<?=$frames_result['frame_pd_second']?>" readonly> </div> </div> </div> </div> </div> <div class="col-12 col-md-8 col-lg-8 col-xl-8"> <table style="width:100%;"> <tr style="background-color: brown;padding: 10px;color: white;"> <th style="padding:20px;"></th> <th style="text-align:center;font-weight:bolder;">SPH</th> <th style="text-align:center;font-weight:bolder;">CYL</th> <th style="text-align:center;font-weight:bolder;">AXIS</th> <th style="text-align:center;font-weight:bolder;">ADD</th> </tr> <tr> <th style="background-color: brown;padding: 10px;color: white;">RE</th> <th><input type="text" name="cus_1" id="cus_1" style="width:100%;padding: 9px;background-color: lightblue;border: none;" value="<?=$frames_result['right_sph']?>" readonly></th> <th><input type="text" name="cus_2" id="cus_1" style="width:100%;padding: 9px;background-color: #7c7eaa;border: none;" value="<?=$frames_result['right_cyl']?>" readonly></th> <th><input type="text" name="cus_3" id="cus_1" style="width:100%;padding: 9px;background-color: #70bce9;border: none;" value="<?=$frames_result['right_axis']?>" readonly></th> <th><input type="text" name="cus_4" id="cus_1" style="width:100%;padding: 9px;background-color: #72c78a;border: none;" value="<?=$frames_result['right_add']?>" readonly></th> </tr> <tr> <th style="background-color: brown;padding: 10px;color: white;">LE</th> <th><input type="text" name="cus_1" id="cus_1" style="width:100%;padding: 9px;background-color: lightblue;border: none;" value="<?=$frames_result['left_sph']?>" readonly></th> <th><input type="text" name="cus_2" id="cus_1" style="width:100%;padding: 9px;background-color: #7c7eaa;border: none;" value="<?=$frames_result['left_cyl']?>" readonly></th> <th><input type="text" name="cus_3" id="cus_1" style="width:100%;padding: 9px;background-color: #70bce9;border: none;" value="<?=$frames_result['left_axis']?>" readonly></th> <th><input type="text" name="cus_4" id="cus_1" style="width:100%;padding: 9px;background-color: #72c78a;border: none;" value="<?=$frames_result['left_add']?>" readonly></th> </tr> </table> </div> </div> <!-- </div>--> </div> </div> </div> <?php } ?> </div> </div> <div class="row"> <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> <center><!--<input type='button' id='btn' value='Print' onclick='printDiv();' class="btn btn-warning btn-sm">--> <button onclick="getPDF()" class="btn btn-primary btn-sm">Download</button> <a href="https://api.whatsapp.com/send?phone=<?=$customer_result[0]['cust_phone']?>&text=" target="_blank" class="btn btn-success btn-sm "><i class="fa fa-share-alt"></i> Whatsapp </a> </center> </div> </div><br><br> <?php } ?>