0 ){ return [$eMail,$mobileNo,$LastName,$FirstName]; }else{ return 'NA'; } } //########################################################################## function getBrandName($bID) { include '../../../cfg/conn.php'; $querySQL = "SELECT * FROM pms_brand WHERE id='$bID'"; $queryResult=mysqli_query($conn, $querySQL); while ($row = mysqli_fetch_array($queryResult)) { $brandName = $row['brand_name']; $brandCode = $row['code']; } return [$brandName,$brandCode]; } //########################################################################## function getSalesGroup($grpID) { $gCode=''; $gName=''; include '../../../cfg/conn.php'; $querySQL = "SELECT * FROM pms_sales_group WHERE id='$grpID'"; $queryResult=mysqli_query($conn, $querySQL); while ($row = mysqli_fetch_array($queryResult)) { $gCode = $row['group_code']; $gName= $row['group_name']; } return [$gCode,$gName]; } //########################################################################## function checkViewAccessM1024($roleID, $moduleID){ include '../../../cfg/conn.php'; $viewAccess = 0; $canAdd = 0; $canEdit = 0; $canDelete = 0; $download = 0; $print = 0; $chkAccess ="SELECT `can_view`,`can_add`, `can_edit`,`can_delete`,`print`,`download` FROM `user_profile_data` WHERE `profile_id`='$roleID' AND `deleted`=0 AND `module_id`='$moduleID'"; $qAccess = mysqli_query($conn,$chkAccess); while($row = mysqli_fetch_array($qAccess)){ $viewAccess = $row['can_view']; $canAdd = $row['can_add']; $canEdit = $row['can_edit']; $canDelete = $row['can_delete']; $print = $row['print']; $download = $row['download']; } return [$viewAccess,$canAdd,$canEdit,$canDelete,$print,$download]; } //########################################################################## function RemoveSpecialChar($str) { // Using str_replace() function // to replace the word $res = str_replace( array( '\'', '"','&', '$', '*','!','?','\\', ',' , ';', '<', '>' ), '', $str); // Returning the result return $res; } //########################################################################## function sanitize($str) { // Using str_replace() function // to replace the word $res = str_replace( array( '\'', '"','&', '$', '*','!','?','\\', ',' , ';', '<', '>' ), '', $str); // Returning the result return $res; } //########################################################################## // ITEXMO SEND SMS API - PHP - CURL METHOD // Visit www.itexmo.com/developers.php for more info about this API //########################################################################## function itexmoAA($number,$message){ $SendToNumber = $number; try { $ch = curl_init(); $itexmo = array( 'Email' => 'aendaya@autohubgroup.com', 'Password' => 'JRE@jre0911', 'ApiCode' => 'PR-AUTOH172111_IE74I', 'SenderId'=> 'AUTOHUB GRP', 'Recipients' => [$SendToNumber], 'Message' => $message ); curl_setopt($ch, CURLOPT_URL,"https://api.itexmo.com/api/broadcast"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($itexmo)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); //return curl_exec ($ch); curl_close ($ch); return $response; }catch (Exception $ex){ return $ex->getMessage(); } } //########################################################################## // ITEXMO SEND SMS API - PHP - CURL METHOD // Visit www.itexmo.com/developers.php for more info about this API //########################################################################## //########################################################################## function getEmpKRAName($kraID){ include '../../../cfg/conn.php'; $gKra ="SELECT * FROM `kra_employee_tbl` WHERE `id`='$kraID' AND `deleted`=0"; $qgKra = mysqli_query($conn,$gKra); while($row = mysqli_fetch_array($qgKra)){ $kraName = $row['kra_name']; } return [$kraName]; } //########################################################################## function getEmpKPIName($kpiID){ $kpiTarget=0; $kpiName=''; include '../../../cfg/conn.php'; $gKra ="SELECT * FROM `kpi_employee` WHERE `kra_id`='$kpiID' AND `deleted`=0"; $qgKra = mysqli_query($conn,$gKra); while($row = mysqli_fetch_array($qgKra)){ $kpiName = $row['kpi_name']; $kpiTarget = $row['kpi_target']; } return [$kpiName,$kpiTarget]; } //########################################################################## ?>