public function __construct() { if ($_SERVER['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest") { $model = new spk_Model(); $shield = new Security(); switch ($_GET['mode']) { case "101": $id = $shield->shield($_GET['param']); $active_response = $model->get_active_unitcolour($id); break; case "102": $id = $shield->shield($_GET['param']); $active_response = $model->get_active_supervisor($id); break; case "103": $id = $shield->shield($_GET['param']); $id2 = $shield->shield($_GET['param2']); $active_response = $model->get_active_koordinator($id, $id2); break; case "104": $id = $shield->shield($_GET['param']); $id2 = $shield->shield($_GET['param2']); $id3 = $shield->shield($_GET['param3']); $id4 = $shield->shield($_GET['param4']); $active_response = $model->get_active_sales($id, $id2, $id3, $id4); break; case "105": $id = $shield->shield($_GET['param']); $id2 = $shield->shield($_GET['param2']); $active_response = $model->get_active_unitprice($id, $id2); break; case "106": $id = $shield->shield($_GET['param']); $active_response = $model->get_active_kecamatan($id); break; case "107": $id = $shield->shield($_GET['param']); $active_response = $model->get_active_kelurahan($id); break; case "108": $id = $shield->shield($_GET['param']); $id2 = $shield->shield($_GET['param2']); $active_response = $model->run_inquiry($id, $id2); break; case "109": $id = $shield->shield($_GET['param']); $active_response = $model->run_inquirydetail($id); break; } echo $active_response; } else { echo "[{}]"; } }
public function __construct() { $model = new spk_Model(); $userinfo = $model->userInformation(); $shield = new Security(); $modify_status = "INS"; $readonlymode = ""; if ($_GET['param'] != "") { $id = $shield->shield($_GET['param']); $dataspk = $model->get_spk($id); $modify_status = $model->modify_status; } else { $dataspk = "{}"; } $autonumber = ""; if ($modify_status == "INS") { $autonumbermode = $model->getConfiguration("100"); if ($autonumbermode == "YES") { $autonumberformat = $model->getConfiguration("107"); $autonumber = $model->AutoNumberWithFormat("TR_SALE_SPK", "NO_SPK", $autonumberformat . date("ym"), "4"); } else { $autonumber = ""; } } else { $readonlymode = "readonly"; } $active_wilayah = $model->get_active_wilayah(); $active_unittype = $model->get_active_unittype(); $active_salestype = $model->get_active_salestype(); $id = $shield->shield($_GET['param']); $active_defaultspv = $model->get_active_supervisor($id); $active_stocklocation = $model->get_active_stocklocation(); $active_fincoy = $model->get_active_fincoy(); $inquiry_filterfield = $model->get_inqury_filter(); require_once 'spk_View.php'; }