One Hat Cyber Team
Your IP :
216.73.216.155
Server IP :
122.155.17.190
Server :
Linux cat17190.thaihostserver.com 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64
Server Software :
Apache/2
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
neunkho
/
public_html
/
hpp
/
module
/
Systems_main
/
View File Name :
header_web.php
<?php require_once 'module/Systems_Authenticate/Verify_user.php'; require_once 'module/Systems_Authenticate/Verify_admin.php'; require_once 'module/Systems_Connect/DBConnect.php'; require_once("build/function/function.inc.php"); $iduserchk = $_SESSION['UserID']; $TypeUser = $_SESSION['UserType']; $DataProgramSQL = 'SELECT * FROM tbl_config_program'; $DataProgramQuery = mysqli_query($con, $DataProgramSQL); $DataProgramResult = mysqli_fetch_array($DataProgramQuery); $DataConfig = 'SELECT * FROM tbl_config_institution'; $DataConfigQuery = mysqli_query($con, $DataConfig); $DataConfigResult = mysqli_fetch_array($DataConfigQuery); if ($DataConfigResult['institution_logo'] == '') { $LogoImageShow = 'no_logo.png'; } else { $LogoImageShow = $DataConfigResult['institution_logo']; } $DataUserSQL = "SELECT * FROM tbl_member,tbl_type_member WHERE tbl_member.member_level=tbl_type_member.id_type_member AND tbl_member.member_id='$iduserchk'"; $DataUserQuery = mysqli_query($con, $DataUserSQL); $DataUserResult = mysqli_fetch_array($DataUserQuery); if ($DataUserResult['member_img'] == '') { $ProfileImage = 'avatar.png'; } else { $ProfileImage = $DataUserResult['member_img']; } if (isset($_GET['page'])) { $GetPageValue = $_GET['page']; } if (isset($_GET['typedoc'])) { $typedocnow = $_GET['typedoc']; } else { $typedocnow = ''; } $DataChkPage = "SELECT * FROM tbl_type_document WHERE type_document_code='$typedocnow'"; $DataChkPageQuery = mysqli_query($con, $DataChkPage); $DataChkPageResult = mysqli_fetch_array($DataChkPageQuery); $DataTypeLicense = "SELECT * FROM tbl_type_document WHERE type_document_style='1'"; $DataTypeLicenseQuery = mysqli_query($con, $DataTypeLicense); $DataTypeCertificate = "SELECT * FROM tbl_type_document WHERE type_document_style='2'"; $DataTypeCertificateQuery = mysqli_query($con, $DataTypeCertificate); $DataTypePetition = "SELECT * FROM tbl_type_document WHERE type_document_style='3'"; $DataTypePetitionQuery = mysqli_query($con, $DataTypePetition); $DataTypeAllReportDay = 'SELECT * FROM tbl_type_document Order by type_document_id ASC'; $DataTypeAllReportDayQuery = mysqli_query($con, $DataTypeAllReportDay); $DataTypeAllReportMonth = 'SELECT * FROM tbl_type_document Order by type_document_id ASC'; $DataTypeAllReportMonthQuery = mysqli_query($con, $DataTypeAllReportMonth); $DataTypeAllReportYear = 'SELECT * FROM tbl_type_document Order by type_document_id ASC'; $DataTypeAllReportYearQuery = mysqli_query($con, $DataTypeAllReportYear); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title><?php echo $ShowPageTitle . ' | ' . $DataProgramResult['name_program']; ?></title> <!-- Tell the browser to be responsive to screen width --> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Font Awesome --> <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css"> <!-- Ionicons --> <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <!-- Tempusdominus Bbootstrap 4 --> <link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css"> <!-- iCheck --> <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css"> <!-- JQVMap --> <link rel="stylesheet" href="plugins/jqvmap/jqvmap.min.css"> <!-- Theme style --> <link rel="stylesheet" href="dist/css/adminlte.min.css"> <!-- overlayScrollbars --> <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css"> <!-- Daterange picker --> <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css"> <!-- summernote --> <link rel="stylesheet" href="plugins/summernote/summernote-bs4.css"> <!-- Ekko Lightbox --> <link rel="stylesheet" href="plugins/ekko-lightbox/ekko-lightbox.css"> <!-- Google Font: Source Sans Pro --> <link href="https://fonts.googleapis.com/css2?family=Kanit:wght@400&display=swap" rel="stylesheet"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:wght@500;600&display=swap" rel="stylesheet"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Sarabun:wght@200;300&display=swap" rel="stylesheet"> <!-- sweetalert --> <script src="plugins/sweetalert2.all.min.js"></script> <style> body { font-family: 'Sarabun', sans-serif; font-size: 15px; } </style> </head> <body class="hold-transition sidebar-mini layout-fixed"> <div class="wrapper"> <!-- Navbar --> <nav class="main-header navbar navbar-expand navbar-primary navbar-dark"> <!-- Left navbar links --> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a> </li> <li class="nav-item d-none d-sm-inline-block"> <a href="#" class="nav-link"><?php echo $DataProgramResult['message_welcome']; ?></a> </li> </ul> <!-- SEARCH FORM --> <!-- Right navbar links --> </nav> <!-- /.navbar --> <!-- Main Sidebar Container --> <aside class="main-sidebar sidebar-light-blue elevation-4 "> <!-- Brand Logo --> <!-- <a href="#" class="brand-link bg-blue"> <img src="dist/img/logo_institution/<?php echo $LogoImageShow; ?>" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8"> <span class="brand-text font-weight-light"> </span> </a> --> <!-- Sidebar --> <div class="sidebar"> <!-- Sidebar user panel (optional) --> <div class="user-panel mt-3 pb-3 mb-0 d-flex"> <div class="image"> <img src="dist/img/profile/<?php echo $ProfileImage; ?>" class="img-circle elevation-2" alt="User Image"> </div> <div class="info"> <a href="#" class="d-block"><strong><?php echo $DataUserResult['member_firstname'] . '   ' . $DataUserResult['member_lastname']; ?></strong></a> <div style="color:;font-size:12px"><?php echo $DataUserResult['name_type_member']; ?>  <i style="color:#00cc00;" class="fa fa-circle" aria-hidden="true"></i></div> </div> </div> <div class="user-panel mt-3 pb-3 mb-3"> <ul class="nav nav-pills nav-sidebar nav-child-indent flex-column " data-widget="treeview" role="menu" data-accordion="false"> <li class="nav-item has-treeview <?php if ( $GetPageValue == 'help' ) { echo 'active'; } ?>""> <a href=" index.php?page=help" class="nav-link bg-gray-dark"> <i class="nav-icon fas fa-question-circle"></i> <p> ช่วยเหลือ </p> </a> </li> <li class="nav-item has-treeview menu-open "> <a href="index.php?page=profile" class="nav-link bg-success"> <i class="nav-icon fas fa-user-edit"></i> <p> ข้อมูลส่วนตัว </p> </a> </li> </li> <li class="nav-item has-treeview menu-open"> <a href="index.php?page=logout" class="nav-link bg-danger"> <i class="nav-icon fas fa-sign-out-alt"></i> <p> ออกจากระบบ </p> </a> </li> </ul> </div> <!-- Sidebar Menu --> <nav class="mt-2"> <ul class="nav nav-pills nav-sidebar nav-child-indent flex-column " data-widget="treeview" role="menu" data-accordion="false"> <!-- Add icons to the links using the .nav-icon class with font-awesome or any other icon font library --> <li class="nav-item has-treeview "> <a href="index.php?page=dashboard" class="nav-link <?php if ( $GetPageValue == 'dashboard' || $GetPageValue == '' ) { echo 'active'; } ?>"> <i class="nav-icon fas fa-tachometer-alt"></i> <p> แผงควบคุม </p> </a> <!--<ul class="nav nav-treeview"> <li class="nav-item"> <a href="./index.html" class="nav-link active"> <i class="far fa-circle nav-icon"></i> <p>Dashboard v1</p> </a> </li> <li class="nav-item"> <a href="./index2.html" class="nav-link"> <i class="far fa-circle nav-icon"></i> <p>Dashboard v2</p> </a> </li> <li class="nav-item"> <a href="./index3.html" class="nav-link"> <i class="far fa-circle nav-icon"></i> <p>Dashboard v3</p> </a> </li> </ul> --> </li> <li class="nav-item has-treeview"> <a href="index.php?page=dataBusinessmanSystems" class="nav-link <?php if ( $GetPageValue == 'NewDataBus' || $GetPageValue == 'dataBusinessmanSystems' || $GetPageValue == 'dataShowBusinessmanSystems' ) { echo 'active'; } ?>"> <i class="nav-icon fas fa-clipboard"></i> <p> ทะเบียนผู้ประกอบการ </p> </a> </li> <li class="nav-item has-treeview <?php if ( $GetPageValue == 'dataLincense' || $GetPageValue == 'InsertDataLincense' || $GetPageValue == 'AppicationShow' || $GetPageValue == 'UpdateAppicationShow' and $DataChkPageResult['type_document_style'] == '1' ) { echo 'menu-open'; } ?>"> <a href="#" class="nav-link <?php if ( $GetPageValue == 'dataLincense' || $GetPageValue == 'InsertDataLincense' || $GetPageValue == 'AppicationShow' || $GetPageValue == 'UpdateAppicationShow' and $DataChkPageResult['type_document_style'] == '1' ) { echo 'active'; } ?>"> <i class="nav-icon fas fa-passport"></i> <p> ข้อมูลใบอนุญาต <i class="fas fa-angle-left right"></i> </p> </a> <ul class="nav nav-treeview"> <?php while ( $DataTypeLicenseResult = mysqli_fetch_array( $DataTypeLicenseQuery ) ) { ?> <li class="nav-item"> <a href="index.php?page=dataLincense&typedoc=<?php echo $DataTypeLicenseResult['type_document_code']; ?>" class="nav-link <?php if ( $typedocnow == $DataTypeLicenseResult['type_document_code'] ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p><?php echo $DataTypeLicenseResult['type_document_title_menu']; ?></p> </a> </li> <?php } ?> </ul> </li> <li class="nav-item has-treeview <?php if ( $GetPageValue == 'dataCertificate' || $GetPageValue == 'AppicationShow' || $GetPageValue == 'InsertDataLincense' || $GetPageValue == 'AppicationShow' || $GetPageValue == 'UpdateAppicationShow' and $DataChkPageResult['type_document_style'] == '2' ) { echo 'menu-open'; } ?>"> <a href="#" class="nav-link <?php if ( $GetPageValue == 'dataCertificate' || $GetPageValue == 'AppicationShow' || $GetPageValue == 'InsertDataLincense' || $GetPageValue == 'AppicationShow' || $GetPageValue == 'UpdateAppicationShow' and $DataChkPageResult['type_document_style'] == '2' ) { echo 'active'; } ?>"> <i class="nav-icon fas fa-book"></i> <p> ข้อมูลหนังสือรับรองฯ <i class="fas fa-angle-left right"></i> </p> </a> <ul class="nav nav-treeview"> <?php while ( $DataTypeCertificateResult = mysqli_fetch_array( $DataTypeCertificateQuery ) ) { ?> <li class="nav-item"> <a href="index.php?page=dataCertificate&typedoc=<?php echo $DataTypeCertificateResult['type_document_code']; ?>" class="nav-link <?php if ( $typedocnow == $DataTypeCertificateResult['type_document_code'] ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p><?php echo $DataTypeCertificateResult['type_document_title_menu']; ?></p> </a> </li> <?php } ?> </ul> </li> <li class="nav-item has-treeview <?php if ( $GetPageValue == 'AppicationOtherShow' || $GetPageValue == 'InsertDataOther' || $GetPageValue == 'dataPetition' ) { echo 'menu-open'; } ?>"> <a href="#" class="nav-link <?php if ( $GetPageValue == 'AppicationOtherShow' || $GetPageValue == 'InsertDataOther' || $GetPageValue == 'dataPetition' ) { echo 'active'; } ?>"> <i class="nav-icon fas fa-file-powerpoint"></i> <p> ข้อมูลเอกสารอื่นๆ <i class="fas fa-angle-left right"></i> </p> </a> <ul class="nav nav-treeview"> <?php while ( $DataTypePetitionResult = mysqli_fetch_array( $DataTypePetitionQuery ) ) { ?> <li class="nav-item"> <a href="index.php?page=dataPetition&typedoc=<?php echo $DataTypePetitionResult['type_document_code']; ?>" class="nav-link <?php if ( $typedocnow == $DataTypePetitionResult['type_document_code'] ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p><?php echo $DataTypePetitionResult['type_document_title']; ?></p> </a> </li> <?php } ?> </ul> </li> <li class="nav-item has-treeview <?php if ( $GetPageValue == 'reportall' || $GetPageValue == 'reportallday' || $GetPageValue == 'reportallmonth' || $GetPageValue == 'reportallyear' ) { echo 'menu-open'; } ?>"> <a href="#" class="nav-link <?php if ( $GetPageValue == 'reportall' || $GetPageValue == 'reportallday' || $GetPageValue == 'reportallmonth' || $GetPageValue == 'reportallyear' ) { echo 'active'; } ?>"> <i class="nav-icon fas fa-file-invoice"></i> <p> รายงาน <i class="fas fa-angle-left right"></i> </p> </a> <ul class="nav nav-treeview"> <li class="nav-item"> <a href="index.php?page=reportall&typedoc=day" class="nav-link <?php if ( $typedocnow == 'day' || $GetPageValue == 'reportallday' ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p>รายงานตามเอกสาร</p> </a> </li> <!-- <li class="nav-item"> <a href="index.php?page=reportall&typedoc=month" class="nav-link <?php if ( $typedocnow == 'month' || $GetPageValue == 'reportallmonth' ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p>รายงานประจำเดือน</p> </a> </li> <li class="nav-item"> <a href="index.php?page=reportall&typedoc=year" class="nav-link <?php if ( $typedocnow == 'year' || $GetPageValue == 'reportallyear' ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p>รายงานประจำปี</p> </a> </li> --> </ul> </li> <li class="nav-item has-treeview <?php if ( $GetPageValue == 'configSystems' || $GetPageValue == 'memberSystems' || $GetPageValue == 'institutionSystems' || $GetPageValue == 'nametitleSystems' || $GetPageValue == 'roadSystems' || $GetPageValue == 'soiSystems' || $GetPageValue == 'zoneSystems' || $GetPageValue == 'typecusSystems' || $GetPageValue == 'statusSystems' ) { echo 'menu-open'; } ?>"> <a href="#" class="nav-link <?php if ( $GetPageValue == 'configSystems' || $GetPageValue == 'memberSystems' || $GetPageValue == 'institutionSystems' || $GetPageValue == 'nametitleSystems' || $GetPageValue == 'roadSystems' || $GetPageValue == 'soiSystems' || $GetPageValue == 'zoneSystems' || $GetPageValue == 'typecusSystems' || $GetPageValue == 'statusSystems' ) { echo 'active'; } ?>"> <i class="nav-icon fas fa-cogs"></i> <p> ตั้งค่าระบบ <i class="fas fa-angle-left right"></i> </p> </a> <ul class="nav nav-treeview"> <?php if ($TypeUser == '1') { ?> <li class="nav-item"> <a href="index.php?page=configSystems" class="nav-link <?php if ( $GetPageValue == 'configSystems' ) { echo 'active'; } ?>"> <i class="fas fa-cog nav-icon"></i> <p>ข้อมูลโปรแกรม</p> </a> </li> <?php } ?> <li class="nav-item"> <a href="index.php?page=institutionSystems" class="nav-link <?php if ( $GetPageValue == 'institutionSystems' ) { echo 'active'; } ?>"> <i class="fas fa-laptop-house nav-icon"></i> <p>ข้อมูลพื้นฐาน</p> </a> </li> <?php if ($TypeUser == '1' || $TypeUser == '2') { ?> <li class="nav-item"> <a href="index.php?page=memberSystems" class="nav-link <?php if ( $GetPageValue == 'memberSystems' ) { echo 'active'; } ?>"> <i class="fas fa-users nav-icon"></i> <p>ข้อมูลผู้ใช้งานระบบ</p> </a> </li> <?php } ?> <li class="nav-item"> <a href="index.php?page=nametitleSystems" class="nav-link <?php if ( $GetPageValue == 'nametitleSystems' ) { echo 'active'; } ?>"> <i class="fas fa-text-height nav-icon"></i> <p>ข้อมูลคำนำหน้าชื่อ</p> </a> </li> <!-- <li class="nav-item"> <a href="index.php?page=roadSystems" class="nav-link <?php if ( $GetPageValue == 'roadSystems' ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p>ข้อมูลถนน</p> </a> </li> <li class="nav-item"> <a href="index.php?page=soiSystems" class="nav-link <?php if ( $GetPageValue == 'soiSystems' ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p>ข้อมูลซอย</p> </a> </li> <li class="nav-item"> <a href="index.php?page=statusSystems" class="nav-link <?php if ( $GetPageValue == 'statusSystems' ) { echo 'active'; } ?>"> <i class="far fa-circle nav-icon"></i> <p>ข้อมูลสถานะ</p> </a> </li> --> </ul> </li> </ul> <?php $codecus = $DataProgramResult["code_cus"]; $url = 'http://crm2.pasworld.co.th/datawebsite.php?company_code=' . $codecus; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); // ดึงข้อมูลจาก URL $json = curl_exec($ch); // ตรวจสอบข้อผิดพลาด if (curl_errno($ch)) { echo 'cURL Error: ' . curl_error($ch); curl_close($ch); exit(); } curl_close($ch); // แปลง JSON เป็น array $location_json = json_decode($json, JSON_UNESCAPED_UNICODE); ?> <div class="user-panel mt-3 pb-3 mb-3"></div> <div class="card card-primary card-outline"> <div class="card-body box-profile"> <h3 class="profile-username text-center"><?php print_r($location_json[0]['com_name']); ?></h3> <p class="text-success text-center">Online</p> <ul class="list-group list-group-unbordered mb-3"> <li class="list-group-item"> <b>เลขที่สัญญา </b> <a class="float-right"><?php print_r($location_json[0]['com_contact']); ?></a> </li> <li class="list-group-item"> <b>วันเริ่มสัญญา</b> <a class="float-right"><?php print_r(ThaiShortDateTime3($location_json[0]['com_contact_start'])); ?></a> </li> <li class="list-group-item"> <b>วันหมดสัญญา</b> <a class="float-right"><?php print_r(ThaiShortDateTime3($location_json[0]['com_contact_end'])); ?></a> </li> <li class="list-group-item"> <b>ใช้งานเว็บไซต์ได้อีก</b> <a class="float-right"> <?php $today = date('Y-m-d'); $start = $location_json[0]['com_contact_start']; $end = $location_json[0]['com_contact_end']; $free_use = $location_json[0]['com_after_expire']; $syy = substr("$start", 0, 4); $smm = substr("$start", 5, 2); $sdd = substr("$start", 8, 2); $stime = substr("$start", 11, 8); $eyy = substr("$end", 0, 4); $emm = substr("$end", 5, 2); $edd = substr("$end", 8, 2); $etime = substr("$end", 11, 8); $tyy = substr("$today", 0, 4); $tmm = substr("$today", 5, 2); $tdd = substr("$today", 8, 2); $ttime = substr("$today", 11, 8); $start = mktime(0, 0, 0, $smm, $sdd + 365, $syy); $end = mktime(0, 0, 0, $emm, $edd, $eyy); $today = mktime(0, 0, 0, $tmm, $tdd, $tyy); $countdown_day = (($end - $today) / 86400); if ($countdown_day > 0) echo number_format($countdown_day); else echo "0"; ?> วัน</a> </li> <li class="list-group-item"> <b>มีเวลาใช้งานหลังจาก <br>หมดสัญญาอีก</b> <a class="float-right"> <?php $start_free = mktime(0, 0, 0, $emm, $edd + $free_use, $eyy); $end_free = mktime(0, 0, 0, $tmm, $tdd, $tyy); $countdown_user = (($start_free - $end_free) / 86400); if($start<>"") { if($countdown_user < 0) { //include("include/close_db.php"); //echo "<meta http-equiv='refresh' content='0;URL=crm1.pasworld.co.th/expire.php?com_code=".$company_code."'>"; //exit(); } } if ($countdown_day >= 0) { echo number_format($free_use); } elseif ($countdown_day < 0) { echo number_format($countdown_user); } ?> วัน</a> </li> </ul> <button type="button" id="button" class="btn btn-danger deep-purple btn-block " data-toggle="modal" data-target="#exampleModal"><i class="fa fa-bug"></i> พบปัญหาการใช้งาน</button> </div> </div> </nav> <!-- /.sidebar-menu --> </div> <!-- /.sidebar --> </aside> <!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel"><i class="fa fa-bug"></i> พบปัญหาการใช้งาน!</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div>บริษัท พีเอเอส เวิลด์คอมมิวนิเคชั่นจำกัด</div> <div>Call.0-2727-7478</div> <div>ศูนย์บริการภาคใต้ 075-774-558</div> <div>มือถือ 08-6470-4438,09-4584-5783</div> <div>Fax.075-355-850</div> <div>Email - nakhonsurat@gmail.com</div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">ปิด</button> </div> </div> </div> </div>