ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/obnovit-tracking/api/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/obnovit-tracking/api/credit_api.php

<?php 
ob_start();
session_start();
include "../config/config.php";


$conditions="";

if($_POST['filter_sites']){
    $conditions.=" and h.project_name=".$_POST['filter_sites'];
}
if($_POST['filter_products']){
    $conditions.=" and h.resource_name=".$_POST['filter_products'];
}
if($_POST['filter_department']){
    $conditions.=" and h.department=".$_POST['filter_department'];
}
if($_POST['filter_attendence_type']){
    $conditions.=" and h.attendence_type=".$_POST['filter_attendence_type'];
}
if($_POST['start_date']!="" && $_POST['end_date']!=""){
	$conditions.=" and (h.attendence_date BETWEEN '".$_POST['start_date']."' AND '".$_POST['end_date']."') ";
}


        
                        $statement = $pdo->prepare("SELECT *,(select uname from tbl_user where id=h.resource_name) as employee_name,(select site_name from tbl_site where id=h.project_name) as site_name ,(select name from tbl_department where id=h.department) as department,SUM(h.salary_per_day) as salary FROM `tbl_attendence` h where 1=1 ".$conditions);
                        $statement->execute();
                        $emp_data = $statement->fetchAll(PDO::FETCH_ASSOC);
                        $totalData = $statement->rowCount();
                        foreach ($emp_data as $data){ ?>
                        
                        <div class="row">
                                <div class="col-md-4">
                                    <button class="btn btn-warning btn-lg" style="width: 100%;height: 40px;font-size: 16px;"><span><?php echo "Total Salary Amount - " . $data['salary'] ;?></span></button>
                                </div>
                        </div>

<?php } ?>

Zerion Mini Shell 1.0