Files
BE_CPONE/application/controllers/mockup/masterdata/Whatsappreport.php
2026-04-27 10:31:17 +07:00

43 lines
873 B
PHP

<?php
class Whatsappreport extends MY_Controller
{
var $db_onedev;
public function index()
{
echo "Patient API";
}
public function __construct()
{
parent::__construct();
$this->db_onedev = $this->load->database("onedev", true);
}
public function add_notes($orderid){
}
function getdataselect(){
if (! $this->isLogin) {
$this->sys_error("Invalid Token");
exit;
}
$rows = [];
$query ="
SELECT 0 as M_BranchID, 'Semua' as M_BranchName
UNION
SELECT M_BranchID, M_BranchName
FROM m_branch
WHERE
M_BranchIsActive = 'Y'";
//echo $query;
$rows['branchs'] = $this->db_onedev->query($query)->result_array();
$result = array(
"total" => count($rows) ,
"records" => $rows,
);
$this->sys_ok($result);
exit;
}
}