File manager - Edit - /home/autoph/public_html/connect/home/init.php
Back
<?php ob_start(); session_start(); ini_set('error_reporting', 0); ini_set('display_errors', 0); //error_reporting(0); date_default_timezone_set('Asia/Singapore'); require 'database/connect.php'; require 'functions/general.php'; require 'functions/users.php'; //include 'includes/dragmesrc.php'; $toDate = date_create() ->format("Y-m-d"); $toTime =Explode(":", date('H:i:s')); $tDate = explode("/",$toDate); $mycDay=$tDate[2]; $mycMonth=$tDate[1]; $mycYear=$tDate[0]; if(!empty($_SERVER['HTTP_CLIENT_IP'])) { //check ip from share internet $ip = $_SERVER['HTTP_CLIENT_IP']; } else if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from proxy $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else{ $ip = $_SERVER['REMOTE_ADDR']; } //echo $ip; $myTime = $toTime[0]; $myMinute = $toTime[1]; $mySecond = $toTime[2]; $currentTime = $myTime . ':' . $myMinute . ':' . $mySecond; $date = new DateTime($toDate); $week = $date->format("W"); //echo "Arnel ".$currentTime; //https://www.allphptricks.com/demo/ PHP TRICKS ///*onfocus="this.value=''"> */ //error if other account is not activated all accounts cannot log in $cookieUID ="cookieID"; if (logged_in() === true){ $session_user_id = $_SESSION['u_id']; setcookie($cookieUID, $session_user_id, time() + (86400 * 30), "/"); // 86400 = 1 day $user_data = user_data($session_user_id,'u_name','u_id','dept_id','employee_id','u_fname','u_lname','dealer','company','account_type', 'CL_ADM','PAY_ADM','CHK_ADM','HRD_ADM','TRE_ADM','LEG_ADM','RES_ADM','CHK_CRE','OBL_ADM','DEL_ADM','ASA_ADM','ASA_MKTG','ASA_FNI','IT_ADM','CH_COMP','VOC','PRF','PRFPRO','PRFPUR','PRFSET','dept_head_id','MATRIX','company_GM_id','ITMASTER','AHG_NEWS','POCRE','POVAL','POAPR','POSUBM','POACTV','POPAY','UTIL'); if(user_active($user_data['u_name']) == false) { session_destroy(); Header("Refresh:0"); Header('Location: index.php'); } } function AddRewards($getEMPID,$MyPoints,$getModuleName,$myDate,$myTime){ $myRewards="INSERT INTO `ahg_pts` (`id`,`emp_id`,`points_earned`,`myDate`,`myTime`,`module_name`) VALUES('','$getEMPID','$MyPoints','$myDate','$myTime','$getModuleName')"; if(!mysql_query($myRewards)) { die('Error: ' . mysql_error()); } } //########################################################################## // ITEXMO SEND SMS API - PHP - CURL METHOD // Visit www.itexmo.com/developers.php for more info about this API //########################################################################## function itexmoCGlobalAAA($number,$message,$apicode,$passwd){ $ch = curl_init(); $itexmo = array('1' => $number, '2' => $message, '3' => $apicode, 'passwd' => $passwd); curl_setopt($ch, CURLOPT_URL,"https://www.itexmo.com/php_api/api.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($itexmo)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); return curl_exec ($ch); curl_close ($ch); } //########################################################################## // ITEXMO SEND SMS API - PHP - CURL-LESS METHOD // Visit www.itexmo.com/developers.php for more info about this API //########################################################################## //$MyAPIcode = "TR-AUTOH331398_2V9R5"; //$MyPasswd = "36k)y3(915"; function itexmoAAOLD($number,$message,$MyAPIcode,$MyPasswd){ $url = 'https://www.itexmo.com/php_api/api.php'; $itexmo = array('1' => $number, '2' => $message, '3' => $MyAPIcode, 'passwd' => $MyPasswd ); $param = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($itexmo), ), ); $context = stream_context_create($param); return file_get_contents($url, false, $context); } //########################################################################## //########################################################################## function itexmoAA($number,$message,$apicode,$passwd){ $number = "09269172111"; //$message = "Test 4"; $key = "ea9aa2fd529446b2bc046f6b05127380"; $url = 'https://api.autohub.ph/v1/sms/default'; $params = array('key' => $key, 'mobile' => $number, 'message' => $message); $param = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($params), ), ); $context = stream_context_create($param); $response = file_get_contents($url, false, $context); $decoded = json_decode($response, true); if ($decoded['status'] == 1) { return "1"; } else { return "0"; } } //########################################################################## function itexmoAAXX($number,$message,$apicode,$passwd){ $url = 'https://www.itexmo.com/php_api/api.php'; $itexmo = array('1' => $number, '2' => $message, '3' => $apicode, 'passwd' => $passwd ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($itexmo)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close ($ch); return $server_output; } //########################################################################## function itexmoCGlobal($number,$message,$apicode,$passwd){ $url = 'https://www.itexmo.com/php_api/api.php'; $itexmo = array('1' => $number, '2' => $message, '3' => $apicode, 'passwd' => $passwd ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($itexmo)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close ($ch); return $server_output; } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings