Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php if(count(get_included_files()) == 1) exit("No direct script access allowed"); def..
Decoded Output download
<?php if(count(get_included_files()) == 1) exit("No direct script access allowed");
define("GW_API_DEBUG", true);
define("GW_SHOW_UPDATE_PROGRESS", true);
define("GW_TEXT_CONNECTION_FAILED", 'Server is unavailable at the moment, please try again.');
define("GW_TEXT_INVALID_RESPONSE", 'Server returned an invalid response, please contact support.');
define("GW_TEXT_VERIFIED_RESPONSE", 'Verified! Thanks for purchasing.');
define("GW_TEXT_PREPARING_MAIN_DOWNLOAD", 'Preparing to download main update...');
define("GW_TEXT_MAIN_UPDATE_SIZE", 'Main Update size:');
define("GW_TEXT_DONT_REFRESH", '(Please do not refresh the page).');
define("GW_TEXT_DOWNLOADING_MAIN", 'Downloading main update...');
define("GW_TEXT_UPDATE_PERIOD_EXPIRED", 'Your update period has ended or your license is invalid, please contact support.');
define("GW_TEXT_UPDATE_PATH_ERROR", 'Folder does not have write permission or the update file path could not be resolved, please contact support.');
define("GW_TEXT_MAIN_UPDATE_DONE", 'Main update files downloaded and extracted.');
define("GW_TEXT_UPDATE_EXTRACTION_ERROR", 'Update zip extraction failed.');
define("GW_TEXT_PREPARING_SQL_DOWNLOAD", 'Preparing to download SQL update...');
define("GW_TEXT_SQL_UPDATE_SIZE", 'SQL Update size:');
define("GW_TEXT_DOWNLOADING_SQL", 'Downloading SQL update...');
define("GW_TEXT_SQL_UPDATE_DONE", 'SQL update files downloaded.');
define("GW_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED", 'Application was successfully updated but automatic SQL importing failed, please import the downloaded SQL file in your database manually.');
define("GW_TEXT_UPDATE_WITH_SQL_IMPORT_DONE", 'Application was successfully updated and SQL file was automatically imported.');
define("GW_TEXT_UPDATE_WITH_SQL_DONE", 'Application was successfully updated, please import the downloaded SQL file in your database manually.');
define("GW_TEXT_UPDATE_WITHOUT_SQL_DONE", 'Application was successfully updated, there were no SQL updates.');
if(!GW_API_DEBUG){
@ini_set('display_errors', 0);
}
ini_set('display_errors', 'on');
ini_set('display_startup_errors', 'on');
error_reporting(E_ALL);
if((@ini_get('max_execution_time')!=='0')&&(@ini_get('max_execution_time'))<600){
@ini_set('max_execution_time', 600);
}
@ini_set('memory_limit', '256M');
class GatewifyUpRepoAPI{
private $product_id;
private $api_url;
private $api_key;
private $api_language;
private $current_version;
private $verify_type;
private $verification_period;
private $current_path;
private $root_path;
private $license_file;
public function __construct(){
$this->product_id = 'GWUpRepo01';
$this->api_url = 'https://uprepo.gatewify.com/';
$this->api_key = '0797ACF3211BE30D1C4C';
$this->api_language = 'english';
$this->current_version = 'v1.0.0';
$this->verify_type = 'non_envato';
$this->verification_period = 1;
$this->current_path = realpath(__DIR__);
$this->root_path = realpath($this->current_path.'/..');
$this->license_file = $this->current_path.'/.lic';
}
public function check_local_license_exist(){
return is_file($this->license_file);
}
public function get_current_version(){
return $this->current_version;
}
private function call_api($method, $url, $data = null){
$curl = curl_init();
switch ($method){
case "POST":
curl_setopt($curl, CURLOPT_POST, 1);
if($data)
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
break;
case "PUT":
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
if($data)
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
break;
default:
if($data)
$url = sprintf("%s?%s", $url, http_build_query($data));
}
$this_server_name = getenv('SERVER_NAME')?:
$_SERVER['SERVER_NAME']?:
getenv('HTTP_HOST')?:
$_SERVER['HTTP_HOST'];
$this_http_or_https = ((
(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or
(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
)?'https://':'http://');
$this_url = $this_http_or_https.$this_server_name.$_SERVER['REQUEST_URI'];
$this_ip = getenv('SERVER_ADDR')?:
$_SERVER['SERVER_ADDR']?:
$this->get_ip_from_third_party()?:
gethostbyname(gethostname());
curl_setopt($curl, CURLOPT_HTTPHEADER,
array('Content-Type: application/json',
'GW-API-KEY: '.$this->api_key,
'GW-URL: '.$this_url,
'GW-IP: '.$this_ip,
'GW-LANG: '.$this->api_language)
);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
$result = curl_exec($curl);
if(!$result&&!GW_API_DEBUG){
$rs = array(
'status' => FALSE,
'message' => GW_TEXT_CONNECTION_FAILED
);
return json_encode($rs);
}
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if($http_status != 200){
if(GW_API_DEBUG){
$temp_decode = json_decode($result, true);
$rs = array(
'status' => FALSE,
'message' => ((!empty($temp_decode['error']))?
$temp_decode['error']:
$temp_decode['message'])
);
return json_encode($rs);
}else{
$rs = array(
'status' => FALSE,
'message' => GW_TEXT_INVALID_RESPONSE
);
return json_encode($rs);
}
}
curl_close($curl);
return $result;
}
public function check_connection(){
$get_data = $this->call_api(
'POST',
$this->api_url.'api/check_connection_ext'
);
$response = json_decode($get_data, true);
return $response;
}
public function get_latest_version(){
$data_array = array(
"product_id" => $this->product_id
);
$get_data = $this->call_api(
'POST',
$this->api_url.'api/latest_version',
json_encode($data_array)
);
$response = json_decode($get_data, true);
return $response;
}
public function activate_license($license, $client, $create_lic = true){
$data_array = array(
"product_id" => $this->product_id,
"license_code" => $license,
"client_name" => $client,
"verify_type" => $this->verify_type
);
$get_data = $this->call_api(
'POST',
$this->api_url.'api/activate_license',
json_encode($data_array)
);
$response = json_decode($get_data, true);
if(!empty($create_lic)){
if($response['status']){
$licfile = trim($response['lic_response']);
file_put_contents($this->license_file, $licfile, LOCK_EX);
}else{
@chmod($this->license_file, 0777);
if(is_writeable($this->license_file)){
unlink($this->license_file);
}
}
}
return $response;
}
public function verify_license($time_based_check = false, $license = false, $client = false){
if(!empty($license)&&!empty($client)){
$data_array = array(
"product_id" => $this->product_id,
"license_file" => null,
"license_code" => $license,
"client_name" => $client
);
}else{
if(is_file($this->license_file)){
$data_array = array(
"product_id" => $this->product_id,
"license_file" => file_get_contents($this->license_file),
"license_code" => null,
"client_name" => null
);
}else{
$data_array = array();
}
}
$res = array('status' => TRUE, 'message' => GW_TEXT_VERIFIED_RESPONSE);
if($time_based_check && $this->verification_period > 0){
ob_start();
if(session_status() == PHP_SESSION_NONE){
session_start();
}
$type = (int) $this->verification_period;
$today = date('d-m-Y');
if(empty($_SESSION["5636db352224731"])){
$_SESSION["5636db352224731"] = '00-00-0000';
}
if($type == 1){
$type_text = '1 day';
}elseif($type == 3){
$type_text = '3 days';
}elseif($type == 7){
$type_text = '1 week';
}elseif($type == 30){
$type_text = '1 month';
}elseif($type == 90){
$type_text = '3 months';
}elseif($type == 365) {
$type_text = '1 year';
}else{
$type_text = $type.' days';
}
if(strtotime($today) >= strtotime($_SESSION["5636db352224731"])){
$get_data = $this->call_api(
'POST',
$this->api_url.'api/verify_license',
json_encode($data_array)
);
$res = json_decode($get_data, true);
if($res['status']==true){
$tomo = date('d-m-Y', strtotime($today. ' + '.$type_text));
$_SESSION["5636db352224731"] = $tomo;
}
}
ob_end_clean();
}else{
$get_data = $this->call_api(
'POST',
$this->api_url.'api/verify_license',
json_encode($data_array)
);
$res = json_decode($get_data, true);
}
return $res;
}
public function deactivate_license($license = false, $client = false){
if(!empty($license)&&!empty($client)){
$data_array = array(
"product_id" => $this->product_id,
"license_file" => null,
"license_code" => $license,
"client_name" => $client
);
}else{
if(is_file($this->license_file)){
$data_array = array(
"product_id" => $this->product_id,
"license_file" => file_get_contents($this->license_file),
"license_code" => null,
"client_name" => null
);
}else{
$data_array = array();
}
}
$get_data = $this->call_api(
'POST',
$this->api_url.'api/deactivate_license',
json_encode($data_array)
);
$response = json_decode($get_data, true);
if($response['status']){
@chmod($this->license_file, 0777);
if(is_writeable($this->license_file)){
unlink($this->license_file);
}
}
return $response;
}
public function check_update(){
$data_array = array(
"product_id" => $this->product_id,
"current_version" => $this->current_version
);
$get_data = $this->call_api(
'POST',
$this->api_url.'api/check_update',
json_encode($data_array)
);
$response = json_decode($get_data, true);
return $response;
}
public function download_update($update_id, $type, $version, $license = false, $client = false, $db_for_import = false){
if(!empty($license)&&!empty($client)){
$data_array = array(
"license_file" => null,
"license_code" => $license,
"client_name" => $client
);
}else{
if(is_file($this->license_file)){
$data_array = array(
"license_file" => file_get_contents($this->license_file),
"license_code" => null,
"client_name" => null
);
}else{
$data_array = array();
}
}
ob_end_flush();
ob_implicit_flush(true);
$version = str_replace(".", "_", $version);
ob_start();
$source_size = $this->api_url."api/get_update_size/main/".$update_id;
echo GW_TEXT_PREPARING_MAIN_DOWNLOAD."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 1;</script>';}
ob_flush();
echo GW_TEXT_MAIN_UPDATE_SIZE." ".$this->get_remote_filesize($source_size)." ".GW_TEXT_DONT_REFRESH."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 5;</script>';}
ob_flush();
$temp_progress = '';
$ch = curl_init();
$source = $this->api_url."api/download_update/main/".$update_id;
curl_setopt($ch, CURLOPT_URL, $source);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_array);
$this_server_name = getenv('SERVER_NAME')?:
$_SERVER['SERVER_NAME']?:
getenv('HTTP_HOST')?:
$_SERVER['HTTP_HOST'];
$this_http_or_https = ((
(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or
(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
)?'https://':'http://');
$this_url = $this_http_or_https.$this_server_name.$_SERVER['REQUEST_URI'];
$this_ip = getenv('SERVER_ADDR')?:
$_SERVER['SERVER_ADDR']?:
$this->get_ip_from_third_party()?:
gethostbyname(gethostname());
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'GW-API-KEY: '.$this->api_key,
'GW-URL: '.$this_url,
'GW-IP: '.$this_ip,
'GW-LANG: '.$this->api_language)
);
if(GW_SHOW_UPDATE_PROGRESS){curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, array($this, 'progress'));}
if(GW_SHOW_UPDATE_PROGRESS){curl_setopt($ch, CURLOPT_NOPROGRESS, false);}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
echo GW_TEXT_DOWNLOADING_MAIN."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 10;</script>';}
ob_flush();
$data = curl_exec($ch);
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($http_status != 200){
if($http_status == 401){
curl_close($ch);
exit("<br>".GW_TEXT_UPDATE_PERIOD_EXPIRED);
}else{
curl_close($ch);
exit("<br>".GW_TEXT_INVALID_RESPONSE);
}
}
curl_close($ch);
$destination = $this->root_path."/update_main_".$version.".zip";
$file = fopen($destination, "w+");
if(!$file){
exit("<br>".GW_TEXT_UPDATE_PATH_ERROR);
}
fputs($file, $data);
fclose($file);
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 65;</script>';}
ob_flush();
$zip = new ZipArchive;
$res = $zip->open($destination);
if($res === TRUE){
$zip->extractTo($this->root_path."/");
$zip->close();
unlink($destination);
echo GW_TEXT_MAIN_UPDATE_DONE."<br><br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 75;</script>';}
ob_flush();
}else{
echo GW_TEXT_UPDATE_EXTRACTION_ERROR."<br><br>";
ob_flush();
}
if($type == true){
$source_size = $this->api_url."api/get_update_size/sql/".$update_id;
echo GW_TEXT_PREPARING_SQL_DOWNLOAD."<br>";
ob_flush();
echo GW_TEXT_SQL_UPDATE_SIZE." ".$this->get_remote_filesize($source_size)." ".GW_TEXT_DONT_REFRESH."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 85;</script>';}
ob_flush();
$temp_progress = '';
$ch = curl_init();
$source = $this->api_url."api/download_update/sql/".$update_id;
curl_setopt($ch, CURLOPT_URL, $source);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_array);
$this_server_name = getenv('SERVER_NAME')?:
$_SERVER['SERVER_NAME']?:
getenv('HTTP_HOST')?:
$_SERVER['HTTP_HOST'];
$this_http_or_https = ((
(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or
(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
)?'https://':'http://');
$this_url = $this_http_or_https.$this_server_name.$_SERVER['REQUEST_URI'];
$this_ip = getenv('SERVER_ADDR')?:
$_SERVER['SERVER_ADDR']?:
$this->get_ip_from_third_party()?:
gethostbyname(gethostname());
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'GW-API-KEY: '.$this->api_key,
'GW-URL: '.$this_url,
'GW-IP: '.$this_ip,
'GW-LANG: '.$this->api_language)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
echo GW_TEXT_DOWNLOADING_SQL."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 90;</script>';}
ob_flush();
$data = curl_exec($ch);
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($http_status!=200){
curl_close($ch);
exit(GW_TEXT_INVALID_RESPONSE);
}
curl_close($ch);
$destination = $this->root_path."/update_sql_".$version.".sql";
$file = fopen($destination, "w+");
if(!$file){
exit(GW_TEXT_UPDATE_PATH_ERROR);
}
fputs($file, $data);
fclose($file);
echo GW_TEXT_SQL_UPDATE_DONE."<br><br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 95;</script>';}
ob_flush();
if(is_array($db_for_import)){
if(!empty($db_for_import["db_host"])&&!empty($db_for_import["db_user"])&&!empty($db_for_import["db_name"])){
$db_host = strip_tags(trim((string) $db_for_import["db_host"]));
$db_user = strip_tags(trim((string) $db_for_import["db_user"]));
$db_pass = strip_tags(trim((string) $db_for_import["db_pass"]));
$db_name = strip_tags(trim((string) $db_for_import["db_name"]));
$con = @mysqli_connect($db_host, $db_user, $db_pass, $db_name);
if(mysqli_connect_errno()){
echo GW_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED;
}else{
$templine = '';
$lines = file($destination);
foreach($lines as $line){
if(substr($line, 0, 2) == '--' || $line == '')
continue;
$templine .= $line;
$query = false;
if(substr(trim($line), -1, 1) == ';'){
$query = mysqli_query($con, $templine);
$templine = '';
}
}
@chmod($destination,0777);
if(is_writeable($destination)){
unlink($destination);
}
echo GW_TEXT_UPDATE_WITH_SQL_IMPORT_DONE;
}
}else{
echo GW_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED;
}
}else{
echo GW_TEXT_UPDATE_WITH_SQL_DONE;
}
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 100;</script>';}
ob_flush();
}else{
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 100;</script>';}
echo GW_TEXT_UPDATE_WITHOUT_SQL_DONE;
ob_flush();
}
ob_end_flush();
}
private function progress($resource, $download_size, $downloaded, $upload_size, $uploaded){
static $prev = 0;
if($download_size == 0){
$progress = 0;
}else{
$progress = round( $downloaded * 100 / $download_size );
}
if(($progress!=$prev) && ($progress == 25)){
$prev = $progress;
echo '<script>document.getElementById(\'prog\').value = 22.5;</script>';
ob_flush();
}
if(($progress!=$prev) && ($progress == 50)){
$prev=$progress;
echo '<script>document.getElementById(\'prog\').value = 35;</script>';
ob_flush();
}
if(($progress!=$prev) && ($progress == 75)){
$prev=$progress;
echo '<script>document.getElementById(\'prog\').value = 47.5;</script>';
ob_flush();
}
if(($progress!=$prev) && ($progress == 100)){
$prev=$progress;
echo '<script>document.getElementById(\'prog\').value = 60;</script>';
ob_flush();
}
}
private function get_ip_from_third_party(){
$curl = curl_init ();
curl_setopt($curl, CURLOPT_URL, "http://ipecho.net/plain");
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
private function get_remote_filesize($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_HEADER, TRUE);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_NOBODY, TRUE);
$this_server_name = getenv('SERVER_NAME')?:
$_SERVER['SERVER_NAME']?:
getenv('HTTP_HOST')?:
$_SERVER['HTTP_HOST'];
$this_http_or_https = ((
(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or
(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
)?'https://':'http://');
$this_url = $this_http_or_https.$this_server_name.$_SERVER['REQUEST_URI'];
$this_ip = getenv('SERVER_ADDR')?:
$_SERVER['SERVER_ADDR']?:
$this->get_ip_from_third_party()?:
gethostbyname(gethostname());
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'GW-API-KEY: '.$this->api_key,
'GW-URL: '.$this_url,
'GW-IP: '.$this_ip,
'GW-LANG: '.$this->api_language)
);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
$result = curl_exec($curl);
$filesize = curl_getinfo($curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
if ($filesize){
switch ($filesize){
case $filesize < 1024:
$size = $filesize .' B'; break;
case $filesize < 1048576:
$size = round($filesize / 1024, 2) .' KB'; break;
case $filesize < 1073741824:
$size = round($filesize / 1048576, 2) . ' MB'; break;
case $filesize < 1099511627776:
$size = round($filesize / 1073741824, 2) . ' GB'; break;
}
return $size;
}
}
}
goto d4lkaEA0;
ArSBLLuQ:define(
"DlgP6FRs",
"Connection to server failed or the server returned an error, please contact support."
);
goto qOiauKyo;
PORJoa7n:define("lbI3Kt1y", true);
goto ArSBLLuQ;
xkhPMQf4:define(
"qnpMk8T0",
"Your update period has ended or your license is invalid, please contact support."
);
goto mQuN4R1j;
mQuN4R1j:define(
"DXE5jfGR",
"Folder does not have write permission or the update file path could not be resolved, please contact support."
);
goto Dhcc7l10;
H7yIZyM2:define("RfxN84X4", "SQL Update size:");
goto lNBLNmFF;
xUE0oRyD:@ini_set("memory_limit", "256M");
goto QoeKhl7R;
mxEPmhHR:
if (!function_exists("minify_html")) {
function minify_html($q8c52m6T)
{
goto FOpmLbOU;
FOpmLbOU:$IbfL7egm = array(
"/(\n|^)(\x20+|\t)/",
"/(\n|^)\/\/(.*?)(\n|$)/", "/\n/",
"/\<\!--.*?-->/", "/(\x20+|\t)/",
"/\>\s+\</", "/(\"|')\s+\>/",
"/=\s+(\"|')/"
);
goto uxx8u4UM;
hEEu9hek:return $S0saiEjd;
goto EGPFFrKX;
uxx8u4UM:$WSeq0vg5 = array("\xa", "\xa", " ", '', " ", "><", "$1>", "=$1");
goto fETdp2Fb;
fETdp2Fb:$S0saiEjd = preg_replace($IbfL7egm, $WSeq0vg5, $q8c52m6T);
goto hEEu9hek;
EGPFFrKX:
}
}
goto ngIA5ldv;
hm_G2yxh:
if (!function_exists("thousands_currency_format")) {
function thousands_currency_format($o17C8ddB, $lpqZ8tWl = false)
{
goto KwjbT7ZJ;
PHIAoAGH:$D7lsesc5 = round($o17C8ddB);
goto s3d5UmyS;
sFXtHtn1:$j4o4sjJa = explode(",", $neCKiqCi);
goto mZaK3css;
AODCV1uM:$b6E1SFOm = array($o17C8ddB, '');
goto zlXwcPZQ;
mZaK3css:$ZLg21xLl = array("k", "m", "b", "t");
goto iDkZZ5vz;
s33ESOSi:$vRb7R5Hf = $D7lsesc5;
goto iCkDynFr;
lZ50KdZK:$b6E1SFOm = array($vRb7R5Hf, $HEJYwMRI);
goto Bo5Uel3k;
Bo5Uel3k:return !empty($lpqZ8tWl) ? $b6E1SFOm : $vRb7R5Hf . $HEJYwMRI;
goto gIDmMMvD;
zlXwcPZQ:return !empty($lpqZ8tWl) ? $b6E1SFOm : $o17C8ddB;
goto SEqXu9U7;
KwjbT7ZJ:
if ($o17C8ddB > 1000) {
goto kjIIbnXR;
}
goto AODCV1uM;
SEqXu9U7:goto ZQ29Yaay;
goto QyQy1o6m;
QyQy1o6m:kjIIbnXR:goto PHIAoAGH;
s3d5UmyS:$neCKiqCi = number_format($D7lsesc5);
goto sFXtHtn1;
demZ8kZ7:$HEJYwMRI = $ZLg21xLl[$CmPgY2Zo - 1];
goto lZ50KdZK;
iDkZZ5vz:$CmPgY2Zo = count($j4o4sjJa) - 1;
goto s33ESOSi;
gIDmMMvD:ZQ29Yaay:goto zmiUNORT;
iCkDynFr:$vRb7R5Hf = $j4o4sjJa[0] . ((int)$j4o4sjJa[1][0] !== 0 ? "." . $j4o4sjJa[1][0] : '');
goto demZ8kZ7;
zmiUNORT:
}
}
goto kBAyI0zg;
kBAyI0zg:
if (!function_exists("generate_breadcrumb")) {
function generate_breadcrumb($iltgeV97 = null)
{
goto vcGWRl72;
xGyylFY3:$xrnKj4fR .= "<li class="is-active"><a href="" . site_url($QwgTzU0d) . "">";
goto C5lRLi_d;
j5e0YBYS:e2URBgLI:goto xGyylFY3;
T_wtLHfn:osXj2Ylq:goto MTB5s3g3;
wjTG_7U3:
if (!($Ce4zfv7T <= $g5KsOuFH)) {
goto r9h0l6Ni;
}
goto v10e2gOs;
MTB5s3g3:$g5KsOuFH++;
goto GodkDXob;
J7enZQiV:$g5KsOuFH = 1;
goto UUHJDyBT;
m2y5j6nb:MSXxLhQs:goto B2pCrUI0;
I07yEhAo:$xrnKj4fR .= ucfirst($ltoxvzGt->uri->segment($g5KsOuFH)) . "</a></li>";
goto YaikCk7H;
XgAlcVsU:$xrnKj4fR .= ucfirst($ltoxvzGt->uri->segment($g5KsOuFH)) . "</a><span class="divider"></span></li>";
goto yV_AM42Q;
V8fpgIAJ:goto JJsZ3tlC;
goto m2y5j6nb;
yV_AM42Q:goto osXj2Ylq;
goto Edt2zdmU;
SFaPsB7_:
if (!($dXPI7NBd != '')) {
goto MSXxLhQs;
}
goto ma29Zu11;
ohtZLYXB:VoMBt3jB:goto T_wtLHfn;
vsUphCnh:$xrnKj4fR .= "<li><a href="" . site_url($QwgTzU0d) . "">";
goto XgAlcVsU;
C5lRLi_d:$xrnKj4fR .= ucfirst($iltgeV97) . "</a></li>";
goto ohtZLYXB;
A2E7dmo5:goto NnmeUAI2;
goto i_oiUl5F;
vcGWRl72:$ltoxvzGt = &get_instance();
goto J7enZQiV;
UUHJDyBT:$dXPI7NBd = $ltoxvzGt->uri->segment($g5KsOuFH);
goto enn2JhJ2;
i_oiUl5F:r9h0l6Ni:goto CPGjQups;
v10e2gOs:$QwgTzU0d .= $ltoxvzGt->uri->segment($Ce4zfv7T) . "/";
goto JKlLKxrB;
BxGaUzgK:return $xrnKj4fR;
goto RV0M8jv9;
MJ8FzlGf:
if ($iltgeV97) {
goto e2URBgLI;
}
goto NhGYc7dw;
ma29Zu11:$QwgTzU0d = '';
goto PCUaYnOX;
GodkDXob:$dXPI7NBd = $ltoxvzGt->uri->segment($g5KsOuFH);
goto V8fpgIAJ;
enn2JhJ2:$xrnKj4fR = "<nav class="breadcrumb" aria-label="breadcrumbs">
\x9\x9<ul><li><a href="" . base_url() . "">Home</a></li>";
goto htmKGsiy;
JWzGJYnz:$Ce4zfv7T++;
goto A2E7dmo5;
NhGYc7dw:$xrnKj4fR .= "<li class="is-active"><a href="" . site_url($QwgTzU0d) . "">";
goto I07yEhAo;
Edt2zdmU:WUMfOir9:goto MJ8FzlGf;
CPGjQups:
if ($ltoxvzGt->uri->segment($g5KsOuFH + 1) == '') {
goto WUMfOir9;
}
goto vsUphCnh;
PCUaYnOX:$Ce4zfv7T = 1;
goto V3i6tuCs;
B2pCrUI0:$xrnKj4fR .= "</ul></nav>";
goto BxGaUzgK;
YaikCk7H:goto VoMBt3jB;
goto j5e0YBYS;
JKlLKxrB:YSr0L1Ao:goto JWzGJYnz;
htmKGsiy:JJsZ3tlC:goto SFaPsB7_;
V3i6tuCs:NnmeUAI2:goto wjTG_7U3;
RV0M8jv9:
}
}
goto WLBxQFPn;
R4g2IMf0:define(
"eC9iiUrH",
"Update successful, there were no SQL updates. So you can run the updated application directly."
);
goto OZeo_kaE;
qOiauKyo:define(
"OapaIOcN",
"Server returned an invalid response, please contact support."
);
goto b0p4GqfU;
d4lkaEA0:
if (!function_exists("config_item")) {
function config_item($nRJmsZF4)
{
goto ULWg64g1;
ULWg64g1:static $ALcVNWlo;
goto H493qYgG;
yMAIhEVq:$ALcVNWlo[0] = &get_config();
goto b6wI8mQO;
H493qYgG:
if (!empty($ALcVNWlo)) {
goto vykwYJ_b;
}
goto yMAIhEVq;
oOrk2mFz:return isset($ALcVNWlo[0][$nRJmsZF4]) ? $ALcVNWlo[0][$nRJmsZF4] : null;
goto T07AZuKy;
b6wI8mQO:vykwYJ_b:goto oOrk2mFz;
T07AZuKy:
}
}
goto QvuSzgjV;
H_6ut3H_:define(
"zCxijzKj",
"Update zip extraction failed."
);
goto pCiu0Nkt;
lNBLNmFF:define(
"VOz6qFzC",
"Downloading SQL update..."
);
goto L5XCHfGv;
lUSQOS2I:exit("No direct script access allowed");
goto Mm2Hgo75;
g3k3CVPH:define(
"St4qVvxE",
"(Please do not refresh the page)."
);
goto jHjhfHmI;
Dhcc7l10:define(
"fwbqHPu0",
"Main update files downloaded and extracted."
);
goto H_6ut3H_;
Mm2Hgo75:otzSd2gZ:goto nwQfvZdV;
gsvIauhJ:@ini_set("max_execution_time", 600);
goto sfjAUpPT;
cdmtok_N:define(
"UrNTGMos",
"Update successful, SQL updates were successfully imported."
);
goto R4g2IMf0;
nwQfvZdV:define("atSEXsTF", true);
goto PORJoa7n;
i7cE1UX8:
if (!(count(get_included_files()) == 1)) {
goto otzSd2gZ;
}
goto lUSQOS2I;
pCiu0Nkt:define(
"Krr9HvME",
"Preparing to download SQL update..."
);
goto H7yIZyM2;
OZeo_kaE:
if (atSEXsTF) {
goto DOseefRb;
}
goto Rj4Duyf_;
L5XCHfGv:define(
"tWLVMDua",
"SQL update files downloaded."
);
goto J4cBnyOa;
b0p4GqfU:define(
"tHaXM0ad",
"Verified! Thanks for purchasing."
);
goto OEjhEPRn;
Rj4Duyf_:@ini_set("display_errors", 0);
goto Fq5lyJj2;
jHjhfHmI:define(
"WeogxcvY",
"Downloading main update..."
);
goto xkhPMQf4;
OEjhEPRn:define(
"e_UjjApQ",
"Preparing to download main update..."
);
goto zc50cATx;
QvuSzgjV:
if (!function_exists("html_escape")) {
function html_escape($w0SxRnFU, $JfDRXcby = true)
{
goto d8Ave_e5;
jvMvDsmK:hbCUCETT:goto w1kSGS15;
JMFBf550:jt7wImVY:goto nWZPYiJt;
hMDWtMtI:return $w0SxRnFU;
goto JMFBf550;
w1kSGS15:return $w0SxRnFU;
goto CFfRbYh2;
MUUTMMJi:
foreach (array_keys($w0SxRnFU) as $SOXFc430) {
$w0SxRnFU[$SOXFc430] = html_escape($w0SxRnFU[$SOXFc430], $JfDRXcby);
BQvu2lC2:
}
goto jvMvDsmK;
XYLS15XJ:return htmlspecialchars($w0SxRnFU, ENT_QUOTES, config_item("charset"), $JfDRXcby);
goto gtjNp0Od;
d8Ave_e5:
if (!empty($w0SxRnFU)) {
goto jt7wImVY;
}
goto hMDWtMtI;
nWZPYiJt:
if (!is_array($w0SxRnFU)) {
goto Oz6jM0sm;
}
goto MUUTMMJi;
CFfRbYh2:Oz6jM0sm:goto XYLS15XJ;
gtjNp0Od:
}
}
goto hm_G2yxh;
WLBxQFPn:
if (!function_exists("get_system_info")) {
function get_system_info($r1zEpaov)
{
$bfSbURQi = array(
"Server" => $_SERVER["SERVER_SOFTWARE"], "PHP Version" => phpversion(), "Max POST Size" => @ini_get("post_max_size"),
"Max Memory Limit" => @ini_get("memory_limit"),
"Max Upload Size" => @ini_get("upload_max_filesize"),
"Curl Version" => function_exists("curl_version") ? curl_version()["version"] : "Nil", "Core Init" => $r1zEpaov
);
return json_encode($bfSbURQi, JSON_PRETTY_PRINT);
}
}
goto mxEPmhHR;
ngIA5ldv:
if (!function_exists("password_verify")) {
function password_verify($Aci9zjqS, $suUy9m3F)
{
goto xVB41Psz;
fTBkzmEy:goto J2kW_v2f;
goto Ff0qiCeQ;
UgKF0IGj:return false;
goto LYQZu8Qg;
lemktUm0:
if (!($g5KsOuFH < 60)) {
goto eTt67P3K;
}
goto yiS2iW5o;
lVNEO6eN:J2kW_v2f:goto lemktUm0;
f37EyBjh:$EHCA0JOD = 0;
goto k11LGUhf;
yiS2iW5o:$EHCA0JOD |= ord($Aci9zjqS[$g5KsOuFH]) ^ ord($suUy9m3F[$g5KsOuFH]);
goto xwc6RU04;
xVB41Psz:
if (!(strlen($suUy9m3F) !== 60 or strlen($Aci9zjqS = crypt($Aci9zjqS, $suUy9m3F)) !== 60)) {
goto DNBHnnhJ;
}
goto UgKF0IGj;
CUGNjJ_Q:$g5KsOuFH++;
goto fTBkzmEy;
xwc6RU04:OIUFmVoK:goto CUGNjJ_Q;
AebRz1zr:return $EHCA0JOD === 0;
goto bO3m0vMb;
LYQZu8Qg:DNBHnnhJ:goto f37EyBjh;
k11LGUhf:$g5KsOuFH = 0;
goto lVNEO6eN;
Ff0qiCeQ:eTt67P3K:goto AebRz1zr;
bO3m0vMb:
}
} ?>
Did this file decode correctly?
Original Code
<?php if(count(get_included_files()) == 1) exit("No direct script access allowed");
define("GW_API_DEBUG", true);
define("GW_SHOW_UPDATE_PROGRESS", true);
define("GW_TEXT_CONNECTION_FAILED", 'Server is unavailable at the moment, please try again.');
define("GW_TEXT_INVALID_RESPONSE", 'Server returned an invalid response, please contact support.');
define("GW_TEXT_VERIFIED_RESPONSE", 'Verified! Thanks for purchasing.');
define("GW_TEXT_PREPARING_MAIN_DOWNLOAD", 'Preparing to download main update...');
define("GW_TEXT_MAIN_UPDATE_SIZE", 'Main Update size:');
define("GW_TEXT_DONT_REFRESH", '(Please do not refresh the page).');
define("GW_TEXT_DOWNLOADING_MAIN", 'Downloading main update...');
define("GW_TEXT_UPDATE_PERIOD_EXPIRED", 'Your update period has ended or your license is invalid, please contact support.');
define("GW_TEXT_UPDATE_PATH_ERROR", 'Folder does not have write permission or the update file path could not be resolved, please contact support.');
define("GW_TEXT_MAIN_UPDATE_DONE", 'Main update files downloaded and extracted.');
define("GW_TEXT_UPDATE_EXTRACTION_ERROR", 'Update zip extraction failed.');
define("GW_TEXT_PREPARING_SQL_DOWNLOAD", 'Preparing to download SQL update...');
define("GW_TEXT_SQL_UPDATE_SIZE", 'SQL Update size:');
define("GW_TEXT_DOWNLOADING_SQL", 'Downloading SQL update...');
define("GW_TEXT_SQL_UPDATE_DONE", 'SQL update files downloaded.');
define("GW_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED", 'Application was successfully updated but automatic SQL importing failed, please import the downloaded SQL file in your database manually.');
define("GW_TEXT_UPDATE_WITH_SQL_IMPORT_DONE", 'Application was successfully updated and SQL file was automatically imported.');
define("GW_TEXT_UPDATE_WITH_SQL_DONE", 'Application was successfully updated, please import the downloaded SQL file in your database manually.');
define("GW_TEXT_UPDATE_WITHOUT_SQL_DONE", 'Application was successfully updated, there were no SQL updates.');
if(!GW_API_DEBUG){
@ini_set('display_errors', 0);
}
ini_set('display_errors', 'on');
ini_set('display_startup_errors', 'on');
error_reporting(E_ALL);
if((@ini_get('max_execution_time')!=='0')&&(@ini_get('max_execution_time'))<600){
@ini_set('max_execution_time', 600);
}
@ini_set('memory_limit', '256M');
class GatewifyUpRepoAPI{
private $product_id;
private $api_url;
private $api_key;
private $api_language;
private $current_version;
private $verify_type;
private $verification_period;
private $current_path;
private $root_path;
private $license_file;
public function __construct(){
$this->product_id = 'GWUpRepo01';
$this->api_url = 'https://uprepo.gatewify.com/';
$this->api_key = '0797ACF3211BE30D1C4C';
$this->api_language = 'english';
$this->current_version = 'v1.0.0';
$this->verify_type = 'non_envato';
$this->verification_period = 1;
$this->current_path = realpath(__DIR__);
$this->root_path = realpath($this->current_path.'/..');
$this->license_file = $this->current_path.'/.lic';
}
public function check_local_license_exist(){
return is_file($this->license_file);
}
public function get_current_version(){
return $this->current_version;
}
private function call_api($method, $url, $data = null){
$curl = curl_init();
switch ($method){
case "POST":
curl_setopt($curl, CURLOPT_POST, 1);
if($data)
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
break;
case "PUT":
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
if($data)
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
break;
default:
if($data)
$url = sprintf("%s?%s", $url, http_build_query($data));
}
$this_server_name = getenv('SERVER_NAME')?:
$_SERVER['SERVER_NAME']?:
getenv('HTTP_HOST')?:
$_SERVER['HTTP_HOST'];
$this_http_or_https = ((
(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or
(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
)?'https://':'http://');
$this_url = $this_http_or_https.$this_server_name.$_SERVER['REQUEST_URI'];
$this_ip = getenv('SERVER_ADDR')?:
$_SERVER['SERVER_ADDR']?:
$this->get_ip_from_third_party()?:
gethostbyname(gethostname());
curl_setopt($curl, CURLOPT_HTTPHEADER,
array('Content-Type: application/json',
'GW-API-KEY: '.$this->api_key,
'GW-URL: '.$this_url,
'GW-IP: '.$this_ip,
'GW-LANG: '.$this->api_language)
);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
$result = curl_exec($curl);
if(!$result&&!GW_API_DEBUG){
$rs = array(
'status' => FALSE,
'message' => GW_TEXT_CONNECTION_FAILED
);
return json_encode($rs);
}
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if($http_status != 200){
if(GW_API_DEBUG){
$temp_decode = json_decode($result, true);
$rs = array(
'status' => FALSE,
'message' => ((!empty($temp_decode['error']))?
$temp_decode['error']:
$temp_decode['message'])
);
return json_encode($rs);
}else{
$rs = array(
'status' => FALSE,
'message' => GW_TEXT_INVALID_RESPONSE
);
return json_encode($rs);
}
}
curl_close($curl);
return $result;
}
public function check_connection(){
$get_data = $this->call_api(
'POST',
$this->api_url.'api/check_connection_ext'
);
$response = json_decode($get_data, true);
return $response;
}
public function get_latest_version(){
$data_array = array(
"product_id" => $this->product_id
);
$get_data = $this->call_api(
'POST',
$this->api_url.'api/latest_version',
json_encode($data_array)
);
$response = json_decode($get_data, true);
return $response;
}
public function activate_license($license, $client, $create_lic = true){
$data_array = array(
"product_id" => $this->product_id,
"license_code" => $license,
"client_name" => $client,
"verify_type" => $this->verify_type
);
$get_data = $this->call_api(
'POST',
$this->api_url.'api/activate_license',
json_encode($data_array)
);
$response = json_decode($get_data, true);
if(!empty($create_lic)){
if($response['status']){
$licfile = trim($response['lic_response']);
file_put_contents($this->license_file, $licfile, LOCK_EX);
}else{
@chmod($this->license_file, 0777);
if(is_writeable($this->license_file)){
unlink($this->license_file);
}
}
}
return $response;
}
public function verify_license($time_based_check = false, $license = false, $client = false){
if(!empty($license)&&!empty($client)){
$data_array = array(
"product_id" => $this->product_id,
"license_file" => null,
"license_code" => $license,
"client_name" => $client
);
}else{
if(is_file($this->license_file)){
$data_array = array(
"product_id" => $this->product_id,
"license_file" => file_get_contents($this->license_file),
"license_code" => null,
"client_name" => null
);
}else{
$data_array = array();
}
}
$res = array('status' => TRUE, 'message' => GW_TEXT_VERIFIED_RESPONSE);
if($time_based_check && $this->verification_period > 0){
ob_start();
if(session_status() == PHP_SESSION_NONE){
session_start();
}
$type = (int) $this->verification_period;
$today = date('d-m-Y');
if(empty($_SESSION["5636db352224731"])){
$_SESSION["5636db352224731"] = '00-00-0000';
}
if($type == 1){
$type_text = '1 day';
}elseif($type == 3){
$type_text = '3 days';
}elseif($type == 7){
$type_text = '1 week';
}elseif($type == 30){
$type_text = '1 month';
}elseif($type == 90){
$type_text = '3 months';
}elseif($type == 365) {
$type_text = '1 year';
}else{
$type_text = $type.' days';
}
if(strtotime($today) >= strtotime($_SESSION["5636db352224731"])){
$get_data = $this->call_api(
'POST',
$this->api_url.'api/verify_license',
json_encode($data_array)
);
$res = json_decode($get_data, true);
if($res['status']==true){
$tomo = date('d-m-Y', strtotime($today. ' + '.$type_text));
$_SESSION["5636db352224731"] = $tomo;
}
}
ob_end_clean();
}else{
$get_data = $this->call_api(
'POST',
$this->api_url.'api/verify_license',
json_encode($data_array)
);
$res = json_decode($get_data, true);
}
return $res;
}
public function deactivate_license($license = false, $client = false){
if(!empty($license)&&!empty($client)){
$data_array = array(
"product_id" => $this->product_id,
"license_file" => null,
"license_code" => $license,
"client_name" => $client
);
}else{
if(is_file($this->license_file)){
$data_array = array(
"product_id" => $this->product_id,
"license_file" => file_get_contents($this->license_file),
"license_code" => null,
"client_name" => null
);
}else{
$data_array = array();
}
}
$get_data = $this->call_api(
'POST',
$this->api_url.'api/deactivate_license',
json_encode($data_array)
);
$response = json_decode($get_data, true);
if($response['status']){
@chmod($this->license_file, 0777);
if(is_writeable($this->license_file)){
unlink($this->license_file);
}
}
return $response;
}
public function check_update(){
$data_array = array(
"product_id" => $this->product_id,
"current_version" => $this->current_version
);
$get_data = $this->call_api(
'POST',
$this->api_url.'api/check_update',
json_encode($data_array)
);
$response = json_decode($get_data, true);
return $response;
}
public function download_update($update_id, $type, $version, $license = false, $client = false, $db_for_import = false){
if(!empty($license)&&!empty($client)){
$data_array = array(
"license_file" => null,
"license_code" => $license,
"client_name" => $client
);
}else{
if(is_file($this->license_file)){
$data_array = array(
"license_file" => file_get_contents($this->license_file),
"license_code" => null,
"client_name" => null
);
}else{
$data_array = array();
}
}
ob_end_flush();
ob_implicit_flush(true);
$version = str_replace(".", "_", $version);
ob_start();
$source_size = $this->api_url."api/get_update_size/main/".$update_id;
echo GW_TEXT_PREPARING_MAIN_DOWNLOAD."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 1;</script>';}
ob_flush();
echo GW_TEXT_MAIN_UPDATE_SIZE." ".$this->get_remote_filesize($source_size)." ".GW_TEXT_DONT_REFRESH."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 5;</script>';}
ob_flush();
$temp_progress = '';
$ch = curl_init();
$source = $this->api_url."api/download_update/main/".$update_id;
curl_setopt($ch, CURLOPT_URL, $source);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_array);
$this_server_name = getenv('SERVER_NAME')?:
$_SERVER['SERVER_NAME']?:
getenv('HTTP_HOST')?:
$_SERVER['HTTP_HOST'];
$this_http_or_https = ((
(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or
(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
)?'https://':'http://');
$this_url = $this_http_or_https.$this_server_name.$_SERVER['REQUEST_URI'];
$this_ip = getenv('SERVER_ADDR')?:
$_SERVER['SERVER_ADDR']?:
$this->get_ip_from_third_party()?:
gethostbyname(gethostname());
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'GW-API-KEY: '.$this->api_key,
'GW-URL: '.$this_url,
'GW-IP: '.$this_ip,
'GW-LANG: '.$this->api_language)
);
if(GW_SHOW_UPDATE_PROGRESS){curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, array($this, 'progress'));}
if(GW_SHOW_UPDATE_PROGRESS){curl_setopt($ch, CURLOPT_NOPROGRESS, false);}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
echo GW_TEXT_DOWNLOADING_MAIN."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 10;</script>';}
ob_flush();
$data = curl_exec($ch);
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($http_status != 200){
if($http_status == 401){
curl_close($ch);
exit("<br>".GW_TEXT_UPDATE_PERIOD_EXPIRED);
}else{
curl_close($ch);
exit("<br>".GW_TEXT_INVALID_RESPONSE);
}
}
curl_close($ch);
$destination = $this->root_path."/update_main_".$version.".zip";
$file = fopen($destination, "w+");
if(!$file){
exit("<br>".GW_TEXT_UPDATE_PATH_ERROR);
}
fputs($file, $data);
fclose($file);
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 65;</script>';}
ob_flush();
$zip = new ZipArchive;
$res = $zip->open($destination);
if($res === TRUE){
$zip->extractTo($this->root_path."/");
$zip->close();
unlink($destination);
echo GW_TEXT_MAIN_UPDATE_DONE."<br><br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 75;</script>';}
ob_flush();
}else{
echo GW_TEXT_UPDATE_EXTRACTION_ERROR."<br><br>";
ob_flush();
}
if($type == true){
$source_size = $this->api_url."api/get_update_size/sql/".$update_id;
echo GW_TEXT_PREPARING_SQL_DOWNLOAD."<br>";
ob_flush();
echo GW_TEXT_SQL_UPDATE_SIZE." ".$this->get_remote_filesize($source_size)." ".GW_TEXT_DONT_REFRESH."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 85;</script>';}
ob_flush();
$temp_progress = '';
$ch = curl_init();
$source = $this->api_url."api/download_update/sql/".$update_id;
curl_setopt($ch, CURLOPT_URL, $source);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_array);
$this_server_name = getenv('SERVER_NAME')?:
$_SERVER['SERVER_NAME']?:
getenv('HTTP_HOST')?:
$_SERVER['HTTP_HOST'];
$this_http_or_https = ((
(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or
(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
)?'https://':'http://');
$this_url = $this_http_or_https.$this_server_name.$_SERVER['REQUEST_URI'];
$this_ip = getenv('SERVER_ADDR')?:
$_SERVER['SERVER_ADDR']?:
$this->get_ip_from_third_party()?:
gethostbyname(gethostname());
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'GW-API-KEY: '.$this->api_key,
'GW-URL: '.$this_url,
'GW-IP: '.$this_ip,
'GW-LANG: '.$this->api_language)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
echo GW_TEXT_DOWNLOADING_SQL."<br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 90;</script>';}
ob_flush();
$data = curl_exec($ch);
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($http_status!=200){
curl_close($ch);
exit(GW_TEXT_INVALID_RESPONSE);
}
curl_close($ch);
$destination = $this->root_path."/update_sql_".$version.".sql";
$file = fopen($destination, "w+");
if(!$file){
exit(GW_TEXT_UPDATE_PATH_ERROR);
}
fputs($file, $data);
fclose($file);
echo GW_TEXT_SQL_UPDATE_DONE."<br><br>";
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 95;</script>';}
ob_flush();
if(is_array($db_for_import)){
if(!empty($db_for_import["db_host"])&&!empty($db_for_import["db_user"])&&!empty($db_for_import["db_name"])){
$db_host = strip_tags(trim((string) $db_for_import["db_host"]));
$db_user = strip_tags(trim((string) $db_for_import["db_user"]));
$db_pass = strip_tags(trim((string) $db_for_import["db_pass"]));
$db_name = strip_tags(trim((string) $db_for_import["db_name"]));
$con = @mysqli_connect($db_host, $db_user, $db_pass, $db_name);
if(mysqli_connect_errno()){
echo GW_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED;
}else{
$templine = '';
$lines = file($destination);
foreach($lines as $line){
if(substr($line, 0, 2) == '--' || $line == '')
continue;
$templine .= $line;
$query = false;
if(substr(trim($line), -1, 1) == ';'){
$query = mysqli_query($con, $templine);
$templine = '';
}
}
@chmod($destination,0777);
if(is_writeable($destination)){
unlink($destination);
}
echo GW_TEXT_UPDATE_WITH_SQL_IMPORT_DONE;
}
}else{
echo GW_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED;
}
}else{
echo GW_TEXT_UPDATE_WITH_SQL_DONE;
}
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 100;</script>';}
ob_flush();
}else{
if(GW_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 100;</script>';}
echo GW_TEXT_UPDATE_WITHOUT_SQL_DONE;
ob_flush();
}
ob_end_flush();
}
private function progress($resource, $download_size, $downloaded, $upload_size, $uploaded){
static $prev = 0;
if($download_size == 0){
$progress = 0;
}else{
$progress = round( $downloaded * 100 / $download_size );
}
if(($progress!=$prev) && ($progress == 25)){
$prev = $progress;
echo '<script>document.getElementById(\'prog\').value = 22.5;</script>';
ob_flush();
}
if(($progress!=$prev) && ($progress == 50)){
$prev=$progress;
echo '<script>document.getElementById(\'prog\').value = 35;</script>';
ob_flush();
}
if(($progress!=$prev) && ($progress == 75)){
$prev=$progress;
echo '<script>document.getElementById(\'prog\').value = 47.5;</script>';
ob_flush();
}
if(($progress!=$prev) && ($progress == 100)){
$prev=$progress;
echo '<script>document.getElementById(\'prog\').value = 60;</script>';
ob_flush();
}
}
private function get_ip_from_third_party(){
$curl = curl_init ();
curl_setopt($curl, CURLOPT_URL, "http://ipecho.net/plain");
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
private function get_remote_filesize($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_HEADER, TRUE);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_NOBODY, TRUE);
$this_server_name = getenv('SERVER_NAME')?:
$_SERVER['SERVER_NAME']?:
getenv('HTTP_HOST')?:
$_SERVER['HTTP_HOST'];
$this_http_or_https = ((
(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or
(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
)?'https://':'http://');
$this_url = $this_http_or_https.$this_server_name.$_SERVER['REQUEST_URI'];
$this_ip = getenv('SERVER_ADDR')?:
$_SERVER['SERVER_ADDR']?:
$this->get_ip_from_third_party()?:
gethostbyname(gethostname());
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'GW-API-KEY: '.$this->api_key,
'GW-URL: '.$this_url,
'GW-IP: '.$this_ip,
'GW-LANG: '.$this->api_language)
);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
$result = curl_exec($curl);
$filesize = curl_getinfo($curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
if ($filesize){
switch ($filesize){
case $filesize < 1024:
$size = $filesize .' B'; break;
case $filesize < 1048576:
$size = round($filesize / 1024, 2) .' KB'; break;
case $filesize < 1073741824:
$size = round($filesize / 1048576, 2) . ' MB'; break;
case $filesize < 1099511627776:
$size = round($filesize / 1073741824, 2) . ' GB'; break;
}
return $size;
}
}
}
goto d4lkaEA0;
ArSBLLuQ:define(
"\x44\x6c\147\120\x36\106\x52\163",
"\x43\x6f\x6e\156\x65\143\164\151\157\x6e\x20\164\157\x20\x73\145\162\x76\145\x72\x20\x66\141\151\154\x65\144\x20\157\162\40\x74\150\x65\x20\x73\145\162\166\145\x72\x20\x72\145\x74\x75\x72\156\x65\144\x20\x61\x6e\x20\145\x72\x72\x6f\x72\x2c\x20\x70\x6c\x65\141\163\145\x20\x63\x6f\x6e\164\141\143\164\x20\163\165\x70\x70\x6f\x72\164\x2e"
);
goto qOiauKyo;
PORJoa7n:define("\x6c\142\111\x33\x4b\x74\x31\171", true);
goto ArSBLLuQ;
xkhPMQf4:define(
"\161\x6e\160\115\x6b\70\x54\60",
"\131\x6f\x75\x72\40\x75\160\x64\141\x74\x65\x20\160\145\x72\x69\157\144\40\150\x61\x73\x20\145\x6e\x64\x65\x64\x20\157\x72\x20\171\x6f\x75\x72\x20\154\x69\143\145\x6e\x73\x65\40\151\163\40\151\x6e\x76\x61\154\x69\144\x2c\40\x70\154\x65\141\163\145\40\x63\157\156\x74\141\143\x74\x20\163\x75\x70\x70\x6f\162\164\x2e"
);
goto mQuN4R1j;
mQuN4R1j:define(
"\104\130\x45\65\152\x66\107\122",
"\106\157\154\x64\x65\162\x20\144\157\145\163\40\x6e\157\164\40\150\x61\166\x65\40\x77\162\x69\x74\145\40\x70\x65\x72\155\x69\163\x73\151\157\x6e\x20\157\162\x20\x74\150\145\40\x75\x70\144\141\164\145\40\146\151\x6c\145\40\x70\141\164\x68\x20\x63\157\165\x6c\x64\40\x6e\x6f\x74\40\x62\145\x20\162\x65\x73\x6f\154\166\x65\x64\x2c\40\x70\x6c\x65\141\x73\x65\40\x63\157\x6e\x74\x61\x63\164\x20\163\x75\160\160\157\162\x74\56"
);
goto Dhcc7l10;
H7yIZyM2:define("\122\x66\x78\116\x38\64\130\64", "\x53\121\x4c\x20\x55\x70\x64\141\164\145\x20\163\x69\x7a\x65\72");
goto lNBLNmFF;
xUE0oRyD:@ini_set("\155\145\155\x6f\162\x79\137\x6c\151\x6d\151\164", "\62\65\x36\115");
goto QoeKhl7R;
mxEPmhHR:
if (!function_exists("\x6d\x69\x6e\151\x66\171\x5f\x68\x74\155\x6c")) {
function minify_html($q8c52m6T)
{
goto FOpmLbOU;
FOpmLbOU:$IbfL7egm = array(
"\57\x28\x5c\156\x7c\x5e\x29\50\x5c\x78\62\x30\x2b\174\134\164\51\57",
"\x2f\x28\x5c\x6e\x7c\x5e\x29\x5c\x2f\x5c\x2f\50\x2e\x2a\x3f\51\x28\x5c\x6e\x7c\x24\x29\57", "\57\134\156\x2f",
"\57\134\74\x5c\41\x2d\x2d\56\x2a\77\x2d\x2d\x3e\57", "\57\50\x5c\170\x32\60\53\x7c\134\x74\x29\57",
"\x2f\134\76\134\x73\53\x5c\74\x2f", "\x2f\50\134\x22\x7c\47\x29\134\163\53\x5c\76\57",
"\x2f\x3d\134\x73\53\x28\134\x22\x7c\x27\51\x2f"
);
goto uxx8u4UM;
hEEu9hek:return $S0saiEjd;
goto EGPFFrKX;
uxx8u4UM:$WSeq0vg5 = array("\xa", "\xa", "\40", '', "\x20", "\76\x3c", "\x24\61\76", "\x3d\44\61");
goto fETdp2Fb;
fETdp2Fb:$S0saiEjd = preg_replace($IbfL7egm, $WSeq0vg5, $q8c52m6T);
goto hEEu9hek;
EGPFFrKX:
}
}
goto ngIA5ldv;
hm_G2yxh:
if (!function_exists("\x74\150\157\x75\x73\141\x6e\144\163\x5f\143\x75\162\x72\x65\156\143\171\x5f\x66\x6f\162\x6d\x61\164")) {
function thousands_currency_format($o17C8ddB, $lpqZ8tWl = false)
{
goto KwjbT7ZJ;
PHIAoAGH:$D7lsesc5 = round($o17C8ddB);
goto s3d5UmyS;
sFXtHtn1:$j4o4sjJa = explode("\x2c", $neCKiqCi);
goto mZaK3css;
AODCV1uM:$b6E1SFOm = array($o17C8ddB, '');
goto zlXwcPZQ;
mZaK3css:$ZLg21xLl = array("\x6b", "\x6d", "\x62", "\x74");
goto iDkZZ5vz;
s33ESOSi:$vRb7R5Hf = $D7lsesc5;
goto iCkDynFr;
lZ50KdZK:$b6E1SFOm = array($vRb7R5Hf, $HEJYwMRI);
goto Bo5Uel3k;
Bo5Uel3k:return !empty($lpqZ8tWl) ? $b6E1SFOm : $vRb7R5Hf . $HEJYwMRI;
goto gIDmMMvD;
zlXwcPZQ:return !empty($lpqZ8tWl) ? $b6E1SFOm : $o17C8ddB;
goto SEqXu9U7;
KwjbT7ZJ:
if ($o17C8ddB > 1000) {
goto kjIIbnXR;
}
goto AODCV1uM;
SEqXu9U7:goto ZQ29Yaay;
goto QyQy1o6m;
QyQy1o6m:kjIIbnXR:goto PHIAoAGH;
s3d5UmyS:$neCKiqCi = number_format($D7lsesc5);
goto sFXtHtn1;
demZ8kZ7:$HEJYwMRI = $ZLg21xLl[$CmPgY2Zo - 1];
goto lZ50KdZK;
iDkZZ5vz:$CmPgY2Zo = count($j4o4sjJa) - 1;
goto s33ESOSi;
gIDmMMvD:ZQ29Yaay:goto zmiUNORT;
iCkDynFr:$vRb7R5Hf = $j4o4sjJa[0] . ((int)$j4o4sjJa[1][0] !== 0 ? "\x2e" . $j4o4sjJa[1][0] : '');
goto demZ8kZ7;
zmiUNORT:
}
}
goto kBAyI0zg;
kBAyI0zg:
if (!function_exists("\x67\145\x6e\x65\x72\141\x74\x65\x5f\142\x72\145\x61\x64\x63\x72\165\x6d\142")) {
function generate_breadcrumb($iltgeV97 = null)
{
goto vcGWRl72;
xGyylFY3:$xrnKj4fR .= "\x3c\154\x69\40\143\154\x61\x73\x73\75\42\x69\163\x2d\x61\x63\164\151\x76\145\x22\76\x3c\141\x20\150\x72\x65\x66\75\x22" . site_url($QwgTzU0d) . "\42\x3e";
goto C5lRLi_d;
j5e0YBYS:e2URBgLI:goto xGyylFY3;
T_wtLHfn:osXj2Ylq:goto MTB5s3g3;
wjTG_7U3:
if (!($Ce4zfv7T <= $g5KsOuFH)) {
goto r9h0l6Ni;
}
goto v10e2gOs;
MTB5s3g3:$g5KsOuFH++;
goto GodkDXob;
J7enZQiV:$g5KsOuFH = 1;
goto UUHJDyBT;
m2y5j6nb:MSXxLhQs:goto B2pCrUI0;
I07yEhAo:$xrnKj4fR .= ucfirst($ltoxvzGt->uri->segment($g5KsOuFH)) . "\74\x2f\141\x3e\74\57\154\x69\76";
goto YaikCk7H;
XgAlcVsU:$xrnKj4fR .= ucfirst($ltoxvzGt->uri->segment($g5KsOuFH)) . "\x3c\57\141\76\74\163\x70\141\x6e\40\143\154\x61\163\x73\x3d\x22\144\151\x76\151\x64\x65\162\42\76\x3c\x2f\163\160\141\x6e\x3e\x3c\57\x6c\151\x3e";
goto yV_AM42Q;
V8fpgIAJ:goto JJsZ3tlC;
goto m2y5j6nb;
yV_AM42Q:goto osXj2Ylq;
goto Edt2zdmU;
SFaPsB7_:
if (!($dXPI7NBd != '')) {
goto MSXxLhQs;
}
goto ma29Zu11;
ohtZLYXB:VoMBt3jB:goto T_wtLHfn;
vsUphCnh:$xrnKj4fR .= "\74\154\x69\x3e\74\x61\40\150\x72\x65\146\75\42" . site_url($QwgTzU0d) . "\x22\x3e";
goto XgAlcVsU;
C5lRLi_d:$xrnKj4fR .= ucfirst($iltgeV97) . "\x3c\57\141\76\x3c\x2f\x6c\151\x3e";
goto ohtZLYXB;
A2E7dmo5:goto NnmeUAI2;
goto i_oiUl5F;
vcGWRl72:$ltoxvzGt = &get_instance();
goto J7enZQiV;
UUHJDyBT:$dXPI7NBd = $ltoxvzGt->uri->segment($g5KsOuFH);
goto enn2JhJ2;
i_oiUl5F:r9h0l6Ni:goto CPGjQups;
v10e2gOs:$QwgTzU0d .= $ltoxvzGt->uri->segment($Ce4zfv7T) . "\x2f";
goto JKlLKxrB;
BxGaUzgK:return $xrnKj4fR;
goto RV0M8jv9;
MJ8FzlGf:
if ($iltgeV97) {
goto e2URBgLI;
}
goto NhGYc7dw;
ma29Zu11:$QwgTzU0d = '';
goto PCUaYnOX;
GodkDXob:$dXPI7NBd = $ltoxvzGt->uri->segment($g5KsOuFH);
goto V8fpgIAJ;
enn2JhJ2:$xrnKj4fR = "\74\156\141\x76\x20\x63\x6c\141\x73\x73\75\42\142\x72\x65\x61\144\x63\162\165\155\142\42\x20\x61\162\151\141\55\x6c\141\x62\145\x6c\x3d\x22\x62\x72\145\141\x64\x63\x72\165\155\x62\163\x22\76\15\12\x9\x9\x3c\165\154\x3e\x3c\154\x69\76\74\141\x20\x68\x72\145\146\75\42" . base_url() . "\x22\x3e\x48\x6f\155\145\x3c\57\141\x3e\x3c\57\x6c\151\x3e";
goto htmKGsiy;
JWzGJYnz:$Ce4zfv7T++;
goto A2E7dmo5;
NhGYc7dw:$xrnKj4fR .= "\x3c\x6c\x69\40\143\154\x61\163\163\75\x22\x69\x73\55\x61\x63\x74\x69\166\145\x22\x3e\74\141\x20\x68\x72\x65\146\x3d\x22" . site_url($QwgTzU0d) . "\42\x3e";
goto I07yEhAo;
Edt2zdmU:WUMfOir9:goto MJ8FzlGf;
CPGjQups:
if ($ltoxvzGt->uri->segment($g5KsOuFH + 1) == '') {
goto WUMfOir9;
}
goto vsUphCnh;
PCUaYnOX:$Ce4zfv7T = 1;
goto V3i6tuCs;
B2pCrUI0:$xrnKj4fR .= "\74\x2f\165\154\x3e\x3c\57\x6e\141\x76\x3e";
goto BxGaUzgK;
YaikCk7H:goto VoMBt3jB;
goto j5e0YBYS;
JKlLKxrB:YSr0L1Ao:goto JWzGJYnz;
htmKGsiy:JJsZ3tlC:goto SFaPsB7_;
V3i6tuCs:NnmeUAI2:goto wjTG_7U3;
RV0M8jv9:
}
}
goto WLBxQFPn;
R4g2IMf0:define(
"\x65\x43\71\151\151\125\162\110",
"\125\x70\x64\x61\x74\x65\x20\x73\x75\143\143\145\163\x73\x66\165\x6c\x2c\x20\164\150\x65\x72\145\x20\167\x65\x72\x65\40\156\x6f\x20\x53\x51\x4c\40\165\x70\144\141\164\x65\x73\x2e\40\x53\157\x20\x79\x6f\x75\x20\143\141\x6e\x20\162\x75\156\x20\164\150\x65\40\x75\160\x64\x61\164\x65\144\40\141\160\160\154\151\x63\141\x74\x69\x6f\156\x20\x64\x69\162\x65\x63\x74\x6c\171\x2e"
);
goto OZeo_kaE;
qOiauKyo:define(
"\117\x61\x70\x61\x49\x4f\143\116",
"\x53\x65\162\x76\x65\162\40\162\145\164\x75\162\x6e\x65\x64\40\141\156\40\x69\156\166\141\154\151\144\x20\162\x65\163\160\157\156\163\x65\x2c\40\160\x6c\x65\141\x73\x65\x20\x63\157\x6e\x74\x61\143\x74\x20\x73\165\160\160\157\162\x74\x2e"
);
goto b0p4GqfU;
d4lkaEA0:
if (!function_exists("\143\157\156\146\151\x67\137\151\x74\145\x6d")) {
function config_item($nRJmsZF4)
{
goto ULWg64g1;
ULWg64g1:static $ALcVNWlo;
goto H493qYgG;
yMAIhEVq:$ALcVNWlo[0] = &get_config();
goto b6wI8mQO;
H493qYgG:
if (!empty($ALcVNWlo)) {
goto vykwYJ_b;
}
goto yMAIhEVq;
oOrk2mFz:return isset($ALcVNWlo[0][$nRJmsZF4]) ? $ALcVNWlo[0][$nRJmsZF4] : null;
goto T07AZuKy;
b6wI8mQO:vykwYJ_b:goto oOrk2mFz;
T07AZuKy:
}
}
goto QvuSzgjV;
H_6ut3H_:define(
"\x7a\x43\170\151\x6a\x7a\x4b\152",
"\x55\x70\x64\x61\164\x65\40\x7a\x69\x70\40\145\170\x74\x72\141\x63\164\151\157\x6e\40\146\141\x69\x6c\x65\x64\x2e"
);
goto pCiu0Nkt;
lNBLNmFF:define(
"\x56\x4f\172\66\161\x46\x7a\103",
"\104\x6f\x77\156\x6c\157\141\144\x69\x6e\x67\40\123\x51\114\40\165\x70\x64\141\x74\145\56\x2e\x2e"
);
goto L5XCHfGv;
lUSQOS2I:exit("\116\x6f\x20\144\x69\162\x65\x63\164\40\163\143\162\151\x70\x74\40\141\143\143\x65\x73\x73\40\141\154\154\157\167\145\x64");
goto Mm2Hgo75;
g3k3CVPH:define(
"\x53\x74\x34\x71\126\x76\170\x45",
"\x28\x50\x6c\145\x61\x73\145\40\x64\x6f\40\156\157\164\40\x72\145\146\162\145\x73\x68\x20\x74\x68\145\40\160\141\x67\145\51\x2e"
);
goto jHjhfHmI;
Dhcc7l10:define(
"\x66\x77\x62\161\x48\x50\x75\x30",
"\x4d\141\x69\x6e\x20\x75\x70\x64\141\164\x65\40\x66\151\154\145\x73\40\144\x6f\x77\156\154\157\141\144\145\x64\40\141\156\x64\40\x65\x78\164\x72\141\x63\164\x65\x64\56"
);
goto H_6ut3H_;
Mm2Hgo75:otzSd2gZ:goto nwQfvZdV;
gsvIauhJ:@ini_set("\155\141\170\137\145\170\145\143\165\x74\x69\157\x6e\137\164\x69\x6d\x65", 600);
goto sfjAUpPT;
cdmtok_N:define(
"\125\162\x4e\124\x47\x4d\x6f\163",
"\x55\160\144\141\x74\145\40\163\x75\143\143\145\163\x73\146\165\x6c\54\40\x53\121\114\x20\x75\x70\x64\141\x74\145\x73\x20\x77\145\162\145\x20\163\165\x63\x63\x65\163\x73\x66\165\x6c\x6c\171\x20\151\155\160\157\162\164\145\x64\x2e"
);
goto R4g2IMf0;
nwQfvZdV:define("\141\164\x53\105\130\163\x54\x46", true);
goto PORJoa7n;
i7cE1UX8:
if (!(count(get_included_files()) == 1)) {
goto otzSd2gZ;
}
goto lUSQOS2I;
pCiu0Nkt:define(
"\x4b\x72\x72\71\110\166\x4d\x45",
"\120\x72\145\160\141\162\151\156\x67\40\x74\x6f\x20\x64\157\x77\x6e\x6c\x6f\141\144\x20\x53\x51\114\40\x75\x70\x64\x61\x74\x65\x2e\x2e\x2e"
);
goto H7yIZyM2;
OZeo_kaE:
if (atSEXsTF) {
goto DOseefRb;
}
goto Rj4Duyf_;
L5XCHfGv:define(
"\x74\127\114\126\115\104\165\141",
"\123\121\114\x20\x75\x70\144\x61\164\145\40\x66\x69\x6c\145\x73\40\144\157\167\156\x6c\x6f\141\144\x65\x64\56"
);
goto J4cBnyOa;
b0p4GqfU:define(
"\164\110\x61\x58\x4d\60\x61\x64",
"\x56\145\x72\151\146\151\x65\x64\41\40\124\150\141\x6e\153\163\x20\146\157\162\40\x70\165\x72\x63\x68\x61\163\151\x6e\147\56"
);
goto OEjhEPRn;
Rj4Duyf_:@ini_set("\144\x69\x73\160\x6c\x61\171\137\145\x72\162\x6f\x72\163", 0);
goto Fq5lyJj2;
jHjhfHmI:define(
"\127\145\157\147\x78\x63\166\131",
"\104\157\x77\156\154\x6f\141\144\x69\156\147\40\155\141\151\156\x20\x75\x70\144\x61\x74\x65\x2e\x2e\x2e"
);
goto xkhPMQf4;
OEjhEPRn:define(
"\145\137\125\152\x6a\x41\160\x51",
"\x50\162\145\x70\141\x72\151\x6e\147\40\x74\157\x20\144\x6f\x77\156\154\157\141\144\x20\155\141\151\x6e\x20\x75\160\x64\x61\x74\x65\56\x2e\x2e"
);
goto zc50cATx;
QvuSzgjV:
if (!function_exists("html_escape")) {
function html_escape($w0SxRnFU, $JfDRXcby = true)
{
goto d8Ave_e5;
jvMvDsmK:hbCUCETT:goto w1kSGS15;
JMFBf550:jt7wImVY:goto nWZPYiJt;
hMDWtMtI:return $w0SxRnFU;
goto JMFBf550;
w1kSGS15:return $w0SxRnFU;
goto CFfRbYh2;
MUUTMMJi:
foreach (array_keys($w0SxRnFU) as $SOXFc430) {
$w0SxRnFU[$SOXFc430] = html_escape($w0SxRnFU[$SOXFc430], $JfDRXcby);
BQvu2lC2:
}
goto jvMvDsmK;
XYLS15XJ:return htmlspecialchars($w0SxRnFU, ENT_QUOTES, config_item("\x63\x68\x61\162\x73\x65\164"), $JfDRXcby);
goto gtjNp0Od;
d8Ave_e5:
if (!empty($w0SxRnFU)) {
goto jt7wImVY;
}
goto hMDWtMtI;
nWZPYiJt:
if (!is_array($w0SxRnFU)) {
goto Oz6jM0sm;
}
goto MUUTMMJi;
CFfRbYh2:Oz6jM0sm:goto XYLS15XJ;
gtjNp0Od:
}
}
goto hm_G2yxh;
WLBxQFPn:
if (!function_exists("get_system_info")) {
function get_system_info($r1zEpaov)
{
$bfSbURQi = array(
"\123\145\162\166\x65\x72" => $_SERVER["\123\105\122\x56\x45\x52\x5f\x53\x4f\106\x54\x57\x41\x52\105"], "\x50\110\120\40\126\145\162\x73\151\x6f\156" => phpversion(), "\115\x61\170\40\x50\x4f\123\x54\x20\123\151\x7a\x65" => @ini_get("\160\x6f\x73\x74\137\155\141\x78\137\163\151\x7a\x65"),
"\x4d\x61\x78\x20\x4d\x65\155\157\162\171\x20\x4c\151\155\151\x74" => @ini_get("\155\x65\155\157\x72\x79\x5f\x6c\x69\155\x69\164"),
"\x4d\x61\x78\x20\x55\x70\x6c\157\x61\x64\x20\123\x69\x7a\x65" => @ini_get("\x75\160\x6c\x6f\x61\144\137\x6d\141\x78\137\146\151\x6c\x65\x73\151\x7a\x65"),
"\x43\165\x72\x6c\40\x56\145\162\x73\151\157\x6e" => function_exists("\x63\165\x72\154\x5f\x76\x65\x72\163\151\157\156") ? curl_version()["\x76\145\x72\163\x69\157\156"] : "\x4e\x69\x6c", "\x43\x6f\162\145\x20\x49\x6e\151\164" => $r1zEpaov
);
return json_encode($bfSbURQi, JSON_PRETTY_PRINT);
}
}
goto mxEPmhHR;
ngIA5ldv:
if (!function_exists("password_verify")) {
function password_verify($Aci9zjqS, $suUy9m3F)
{
goto xVB41Psz;
fTBkzmEy:goto J2kW_v2f;
goto Ff0qiCeQ;
UgKF0IGj:return false;
goto LYQZu8Qg;
lemktUm0:
if (!($g5KsOuFH < 60)) {
goto eTt67P3K;
}
goto yiS2iW5o;
lVNEO6eN:J2kW_v2f:goto lemktUm0;
f37EyBjh:$EHCA0JOD = 0;
goto k11LGUhf;
yiS2iW5o:$EHCA0JOD |= ord($Aci9zjqS[$g5KsOuFH]) ^ ord($suUy9m3F[$g5KsOuFH]);
goto xwc6RU04;
xVB41Psz:
if (!(strlen($suUy9m3F) !== 60 or strlen($Aci9zjqS = crypt($Aci9zjqS, $suUy9m3F)) !== 60)) {
goto DNBHnnhJ;
}
goto UgKF0IGj;
CUGNjJ_Q:$g5KsOuFH++;
goto fTBkzmEy;
xwc6RU04:OIUFmVoK:goto CUGNjJ_Q;
AebRz1zr:return $EHCA0JOD === 0;
goto bO3m0vMb;
LYQZu8Qg:DNBHnnhJ:goto f37EyBjh;
k11LGUhf:$g5KsOuFH = 0;
goto lVNEO6eN;
Ff0qiCeQ:eTt67P3K:goto AebRz1zr;
bO3m0vMb:
}
}
Function Calls
None |
Stats
MD5 | 97ecb5f3ab18688ffcc8bfc4860fdd0c |
Eval Count | 0 |
Decode Time | 128 ms |