48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
<?php
|
|
class Pemeriksaan extends MY_Controller
|
|
{
|
|
var $db;
|
|
function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
function index()
|
|
{
|
|
echo "API : PEMERIKSAAN REPORT";
|
|
// $cek = $this->db->query("select database() as current_db")->result();
|
|
// print_r($cek);
|
|
}
|
|
|
|
function jsonpemeriksaan()
|
|
{
|
|
try {
|
|
$prm = $this->sys_input;
|
|
|
|
$PID = "";
|
|
if (isset($prm["PID"])) {
|
|
$PID = trim($prm["PID"]);
|
|
}
|
|
$username = "";
|
|
if (isset($prm["username"])) {
|
|
$username = trim($prm["username"]);
|
|
}
|
|
|
|
$sql = "CALL sp_rpt_t_006 (?,?)";
|
|
$qry = $this->db->query($sql, [$PID, $username]);
|
|
if ($qry) {
|
|
$rows = $qry->result_array();
|
|
$this->clean_mysqli_connection($this->db->conn_id);
|
|
} else {
|
|
$this->sys_error_db("call error", $this->db);
|
|
exit;
|
|
}
|
|
|
|
$this->sys_ok($rows);
|
|
} catch (Exception $exc) {
|
|
$message = $exc->getMessage();
|
|
$this->sys_error($message);
|
|
}
|
|
}
|
|
}
|