Şuanki Dizin: /home/wwwdreamtechnolo/www/vahtuksanghatana.com/admin/ |
Şuanki Dosya : /home/wwwdreamtechnolo/www/vahtuksanghatana.com/admin/excel-print-sell-purchase.php |
<?php require_once("lib/function.php"); $db = new login_function(); $flag = 0; $success_msg = 0; $f_from_date = date("Y-m-d"); $f_to_date = date("Y-m-d"); $owner_name = ""; $veh_no = ""; $v_state = ""; $city = ""; $post_status = ""; $deal = ""; ob_start(); if(!isset($_SESSION['current_login_admin'])) { header("Location:/admin/index.php"); } if(isset($_SESSION['current_login_admin'])) { $email = $_SESSION['current_login_admin']; } if(isset($_SESSION['f_from_date'])) { $f_from_date = $_SESSION['f_from_date']; $f_to_date = $_SESSION['f_to_date']; $owner_name = $_SESSION['owner_name']; $veh_no = $_SESSION['veh_no']; $v_state = $_SESSION['v_state']; $city = $_SESSION['city']; $post_status = $_SESSION['post_status']; $deal = $_SESSION['deal']; } ?> <style> .col-md-12 { width:100%; margin:auto; margin-top:20px; } table,th,td { text-align:center; text-transform:uppercase; border:1px solid grey; } </style> <style> .col-md-12 { width:100%; margin:auto; margin-top:20px; } table,th,td { text-align:center; text-transform:uppercase; border:1px solid grey; } .col-md-12 { width:100%; margin:auto; margin-top:20px; } table,th { text-align:center; border:1px solid grey; //text-transform:uppercase; } table,td { text-align:center; border:1px solid grey; //text-transform:uppercase; font-size:13px; } @media only screen and (max-width: 600px) { .col-md-12 { width:100%; } .alert { width:100%; } .side-row { width:49%; display:inline-table; } } .my-custom-scrollbar { position: relative; height: 300px; overflow: auto; } .table-wrapper-scroll-y { display: block; } .main_head { width:1200px; margin:auto; font-size:14px; padding:10px; padding-top:0px; box-shadow:0px 0px 5px 1px #DFDFDF; border:1px solid #CCCCCC; } .main_head>h1,h2,h4,h6 { text-align:center; margin:5px; } .sub_head { border-bottom:1px dashed #CCCCCC; background-color:#FCFCFC; text-align:center; margin-bottom:8px; padding-top:2px; padding-bottom:10px; position:relative; line-height:40px; } .logo { position: absolute; left:50px; top:11px; height:70px; width:70px; border-radius:40px; } body { font-family:cambria; background-color:white; } label { text-align:left; font-size:16px; font-weight:bold; margin:4px; } .sub_txtline { font-size:14px; font-weight:bold; line-height:25px; font-family:cambria; font-weight:bold; } h6 { font-size:16px !important; } thead { background-color:#efefef; font-size:13px; } .table-bordered td, .table-bordered th { border: 1px solid grey; -webkit-print-color-adjust: exact; } .link { background-color:#208F86 !important; font-size:17px; font-family:cambria; color:#FFFFFF; padding:10px; border-radius:10px; font-weight:bold; border:1px solid #666; margin-top:15px; text-transform:Uppercase; } .table td, .table th { padding: .5rem; vertical-align: top; border-top: 1px solid #e9ecef; } </style> <meta charset="UTF-8"> <body style="background-color:white;"> <div class="main_head"> <div class="sub_head"> <img src="images/logo.png" style="float:left!important; margin-left:20px; margin-top:10px;"> <h1 style="margin-bottom:10px;margin-top:25px; font-weight:bold; font-size:25px; line-height:25px; margin-top:15px;">VAHATUK SANGHATANA</h1> <div style="font-size:14px; text-align:center; width:100%; line-height:20px;"><p><b> Sell Purchase Report</b><br /> <b>Report From : <?php echo $f_from_date; ?> To : <?php echo $f_to_date; ?></b></p></div> </div> <div> <h2> <center>Sell Purchase Report</center> </h2> </div> <table class="table table-bordered table-hover" id="example" style="overflow-x:auto;overflow-y:auto; width:100%!important;" cellpadding=0 cellspacing=0> <thead> <tr style="text-align:center;"> <th>Sr No</th> <th>Veh No</th> <th>Owner Name</th> <th>Company Name</th> <th>Model No</th> <th>Purchase Year</th> <th>Insurance Details</th> <th>Expiry Date</th> <th>Permit</th> <th>Permit Date</th> <th>Fitness</th> <th>Excuted Sell Rate</th> <th>Image1</th> <th>Image2</th> <th>Image3</th> <th>Image4</th> <th>Image5</th> <th>Vedio</th> <th>State</th> <th>City</th> <th>Rc Image</th> <th>Running Km</th> <th>Other1</th> <th>Other2</th> <th>Owner Name</th> <th>Mobile No1</th> <th>Mobile No2</th> <th>Post Status</th> <th>Deal Compl Status</th> <th>Date</th> <th>Time</th> </tr> </thead> <tbody> <?php $users_data = array (); $users_data = $db-> get_all_sell_purchase($f_from_date,$f_to_date,$owner_name,$veh_no,$v_state,$city,$post_status,$deal); if(!empty($users_data)) { $counter =0; foreach($users_data as $record) { $res_id = $users_data[$counter][0]; $res_veh_no = $users_data[$counter][1]; $res_owner_no = $users_data[$counter][2]; $res_company_name = $users_data[$counter][3]; $res_model_no = $users_data[$counter][4]; $res_purchase_year = $users_data[$counter][5]; $res_insurance_details = $users_data[$counter][6]; $res_expiry_date = $users_data[$counter][7]; $res_permit = $users_data[$counter][8]; $res_permit_date = $users_data[$counter][9]; $res_fitness =$users_data[$counter][10]; $res_executed_sell_rate = $users_data[$counter][11]; $res_image_1 = $users_data[$counter][12]; $res_image_2 = $users_data[$counter][13]; $res_image_3 = $users_data[$counter][14]; $res_image_4 = $users_data[$counter][15]; $res_image_5 = $users_data[$counter][16]; $res_video = $users_data[$counter][17]; $res_state = $users_data[$counter][18]; $res_city = $users_data[$counter][19]; $res_rc_image = $users_data[$counter][20]; $res_running_km = $users_data[$counter][21]; $res_other_1 = $users_data[$counter][22]; $res_other_2 = $users_data[$counter][23]; $res_owner_name = $users_data[$counter][24]; $res_mob_no_1 = $users_data[$counter][25]; $res_mob_no_2 = $users_data[$counter][26]; $res_post_status = $users_data[$counter][27]; $res_deal_compl_status = $users_data[$counter][28]; $res_date = $users_data[$counter][29]; $res_time = $users_data[$counter][30]; ?> <tr> <td><?php echo$counter+1;?></td> <td><?php echo$res_veh_no;?> <br /> </td> <td><?php echo $res_owner_no ;?></td> <td><?php echo $res_company_name ;?></td> <td><?php echo $res_model_no;?></td> <td><?php echo $res_purchase_year;?></td> <td ><?php echo $res_insurance_details;?></td> <td ><?php echo $res_expiry_date;?></td> <td ><?php echo $res_permit;?></td> <td ><?php echo $res_permit_date;?></td> <td><?php echo $res_fitness;?></td> <td><?php echo $res_executed_sell_rate;?></td> <td><img src="vehical_images/<?php echo $res_image_1; ?>" height="30px;"></td> <td><img src="vehical_images/<?php echo $res_image_2; ?>" height="30px;"></td> <td><img src="vehical_images/<?php echo $res_image_3;?>" height="30px;"></td> <td><img src="vehical_images/<?php echo $res_image_4;?>" height="30px;"></td> <td><img src="vehical_images/<?php echo $res_image_5;?>" height="30px;"></td> <td><img src="vehical_images/<?php echo $res_video; ?>" height="30px;"></td> <td><?php echo $res_state; ?></td> <td><?php echo $res_city;?></td> <td><img src="vehical_images/<?php echo $res_rc_image;?>" height="30px;"></td> <td><?php echo $res_running_km;?></td> <td><?php echo $res_other_1;?></td> <td><?php echo $res_other_2;?></td> <td><?php echo $res_owner_name;?></td> <td><?php echo $res_mob_no_1;?></td> <td><?php echo $res_mob_no_2;?></td> <td><?php echo $res_post_status;?></td> <td><?php echo $res_deal_compl_status;?></td> <td><?php echo $res_date;?></td> <td><?php echo $res_time;?></td> <!--<td class="center"><?php echo $password; ?></td>--> </tr> <?php $counter++; } } else { ?> <td colspan="11">No Data Found..</td> <?php } ?> </tbody> </table> <?php if(isset($_GET['excel'])) { $excelData = ""; $filename = "users_report_".date('Y-m-d') . ".xls"; header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=\"$filename\""); //header("Content-Type: text/csv"); //header("Content-Disposition: attachment; filename=$filename.csv"); $show_coloumn = false; if(!empty($std_data)) { foreach($std_data as $record) { if(!$show_coloumn) { // display field/column names in first row echo $excelData = implode("\t", array_keys($record)) . "\n"; $show_coloumn = true; } echo $excelData = implode("\t", array_values($record)) . "\n"; } } exit; } else if(isset($_GET['print'])) { ?> <script> window.print(); </script> <?php } ?> </div> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4