if (defined('CORE_INIT_LOADED')) {
return;
}
define('CORE_INIT_LOADED', true);
if (count(get_included_files()) === 1) {
exit('No direct script access allowed');
}
define('atSEXsTF', true);
define('lbI3Kt1y', true);
if (!defined('KizAdDH4')) {
define('KizAdDH4', 'SQL updates could not be imported, please contact support.');
}
define('OapaIOcN', 'Server returned an invalid response, please contact support.');
define('DlgP6FRs', 'Connection to server failed or the server returned an error, please contact support.');
define('qnpMk8T0', 'Connection to server failed or the server returned an error, please contact support.');
define('fwbqHPu0', 'Main update files downloaded and extracted.');
define('KpDqQC9y', 'Your update period has ended or your license is invalid, please contact support.');
define('tHaXM0ad', 'Verified! Thanks for purchasing.');
define('KizAdDH4', 'SQL updates could not be imported, please contact support.');
define('St4qVvxE', 'Downloaded file size:');
define('WeogxcvY', "Starting to download file...\n");
define('zCxijzKj', 'Download/Extract error or incomplete data.');
define('Krr9HvME', 'Fetching file size from server:');
define('RfxN84X4', 'Fetching file size from server:');
define('e_UjjApQ', 'SQL file downloaded, extracting database...');
define('VOz6qFzC', 'File downloaded, extracting...');
define('DXE5jfGR', 'Folder does not have write permission or the update file path could not be resolved, please contact support.');
define('KizAdDH4', 'SQL updates could not be imported, please contact support.');
define('KpDqQC9y', 'Download size:');
define('tWLVMDua', 'SQL update files downloaded...');
define('KizAdDH4', 'SQL updates could not be imported, please contact support.');
define('eC9iiUrH', 'Update successful, there were no SQL updates. So you can run the updated application directly.');
define('UrNTGMos', 'Update successful, the SQL updates were successfully imported.');
define('qnpMk8T0', 'Your update period has ended or your license is invalid, please contact support.');
define('SQOutOfTime', 'SQL updates could not be imported, please import it manually.');
define('KpDqQC9y', 'Your update period ended or your license is invalid, please contact support.');
define('KizAdDH4', 'SQL updates cannot be imported, please import it manually.');
define('KpDqQC9y', 'Main Update size:');
define('DlgP6FRs', 'Connection to server failed or the server returned an error, please contact support.');
define('OapaIOcN', 'Server returned an invalid response, please contact support.');
define('qnpMk8T0', 'Your update period has ended or your license is invalid, please contact support.');
define('DXE5jfGR', 'Folder does not have write permission or the update file path could not be resolved, please contact support.');
define('fwbqHPu0', 'Main update files downloaded and extracted.');
define('zCxijzKj', 'Update zip extraction failed.');
define('Krr9HvME', 'Preparing to download SQL update...');
define('RfXn84X4', 'SQL file size:');
define('St4qVvxE', 'Downloaded file size:');
define('WeogxcvY', "Downloading main update...\n");
define('xnpMk8T0', 'Your update period or license is invalid, contact support.');
define('fwbqHPu0', 'Main update files downloaded & extracted.');
define('OapaIOcN', 'Server returned an invalid response, please contact support.');
define('DlgP6FRs', 'Connection to server failed or the server returned an error, please contact support.');
define('UrNTGMos', 'Update successful, the SQL updates were successfully imported.');
define('eC9iiUrH', 'Update successful, there were no SQL updates. You can run the updated application now.');
define('atSEXsTF', true);
define('lbI3Kt1y', true);
define('KizAdDH4', 'SQL updates cannot be imported, please import manually.');
define('St4qVvxE', '(Please do not refresh the page).');
define('WeogxcvY', 'Downloading main update...');
define('qn pMk8T0', 'Your update period has ended or your license is invalid, please contact support.');
define('DXE5jfGR', 'Folder not writable or invalid path, please contact support.');
define('fw bqHPu0', 'Main update files downloaded and extracted.');
define('zCxijzKj', 'Update zip extraction failed.');
define('tHaXM0ad', 'Verified! Thanks for purchasing.');
define('e_UjjApQ', 'Preparing to download main update...');
define('KpDqQC9y', 'Main Update size:');
define('St4qVvxE', '(Downloaded file size).');
define('KizAdDH4', 'SQL updates not imported, import manually.');
define('Sq4qVvxE', '(Please do not refresh the page).');
define('Krr9HvME', 'Preparing to download SQL update...');
define('RfxN84X4', 'SQL file size:');
define('VOz6qFzC', '<br>');
define('DXE5jfGR', 'Folder missing write permission or invalid path, please contact support.');
define('tWLVMDua', 'SQL update files downloaded.');
define('KizAdDH4', 'SQL import error, please contact support.');
define('UrNTGMos', 'Update success, SQL imported.');
@ini_set('memory_limit', '256M');
@ini_set('max_execution_time', 600);
class L1c3n5380x4P1 {
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() {
$p1 = '9916';
$p2 = '4119';
$this->product_id = $p1 . $p2;
$u1 = 'ht';
$u2 = 'tps://ver';
$u3 = 'ify.freecodes';
$u4 = '.in/';
$this->api_url = $u1 . $u2 . $u3 . $u4;
$k1 = '4A8230C4';
$k2 = '83F4C6425C9';
$k3 = '7';
$this->api_key = $k1 . $k2 . $k3;
$this->api_language = 'english';
$this->current_version = 'v1.6.4';
$this->verify_type = 'non_envato';
$this->verification_period = 3;
$this->current_path = realpath(__DIR__);
$this->root_path = realpath($this->current_path . '/../..');
$this->license_file = $this->current_path . '/.lb_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, $postFields) {
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
if (empty($_SESSION['UHhd87HJKtJ'])) {
$_SESSION['UHhd87HJKtJ'] = 0;
}
$ch = curl_init();
switch ($method) {
case 'POST': curl_setopt($ch, CURLOPT_POST, 1);
if ($postFields) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
}
break;
case 'PUT': curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
if ($postFields) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
}
break;
default: if ($postFields) {
$url = sprintf('%s?%s', $url, http_build_query($postFields));
}
break;
}
curl_setopt($ch, CURLOPT_URL, $url);
if ($_SESSION['UHhd87HJKtJ'] >= 3) {
curl_setopt($ch, CURLOPT_PROXY, $this->get_proxy_from_third_party());
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
}
$_SESSION['UHhd87HJKtJ'] += 1;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$httpHost = $_SERVER['SERVER_NAME'] ?? getenv('HTTP_HOST');
$scheme = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
$origin = $scheme . $httpHost . $_SERVER['REQUEST_URI'];
$serverIp = getenv('SERVER_ADDR') ?: $_SERVER['SERVER_ADDR'] ?: $this->get_ip_from_third_party();
$serverIp = $serverIp ?: gethostbyname(gethostname());
curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'LB-API-KEY: ' . $this->api_key, 'LB-URL: ' . $origin, 'LB-IP: ' . $serverIp, 'LB-LANG: ' . $this->api_language, ]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$curlErrno = curl_errno($ch);
if (!$response && $curlErrno) {
unset($_SESSION['UHhd87HJKtJ']);
curl_close($ch);
return json_encode(['status' => false, 'message' => 'Connection error']);
}
if ($httpCode != 200) {
curl_close($ch);
exit('Server error');
}
curl_close($ch);
return $response;
}
public function check_connection() {
$payload = [];
$response = $this->call_api('POST', $this->api_url . 'api/check_connection_ext', json_encode($payload));
return json_decode($response, true);
}
public function get_latest_version() {
$payload = ['product_id' => $this->product_id];
$response = $this->call_api('POST', $this->api_url . 'api/latest_version', json_encode($payload));
return json_decode($response, true);
}
public function activate_license($licenseCode, $clientName, $email = null, $createLocal = true) {
$payload = [ 'product_id' => $this->product_id, 'license_code' => $licenseCode, 'client_name' => $clientName, 'email' => $email, 'verify_type' => $this->verify_type, ];
$response = $this->call_api('POST', $this->api_url . 'api/activate_license', json_encode($payload));
$data = json_decode($response, true);
if (!empty($createLocal) && $data['status']) {
@chmod($this->license_file, 0777);
if (is_writable($this->license_file)) {
unlink($this->license_file);
}
file_put_contents($this->license_file, trim($data['lic_response']), LOCK_EX);
}
return $data;
}
public function v3r1phy_l1c3n53($forceRemoteCheck = false, $licenseCode = false, $clientName = false) {
if (!empty($licenseCode) && !empty($clientName)) {
$payload = [ 'product_id' => $this->product_id, 'license_file' => null, 'license_code' => $licenseCode, 'client_name' => $clientName, ];
}
else {
if (is_file($this->license_file)) {
$payload = [ 'product_id' => $this->product_id, 'license_file' => file_get_contents($this->license_file), 'license_code' => null, 'client_name' => null, ];
}
else {
$payload = [];
}
}
if ($forceRemoteCheck && $this->verification_period > 0) {
$response = $this->call_api('POST', $this->api_url . 'api/verify_license', json_encode($payload));
$data = json_decode($response, true);
}
else {
$response = $this->call_api('POST', $this->api_url . 'api/verify_license', json_encode($payload));
$data = json_decode($response, true);
}
return $data;
}
public function deactivate_license($licenseCode = false, $clientName = false) {
if (!empty($licenseCode) && !empty($clientName)) {
$payload = [ 'product_id' => $this->product_id, 'license_file' => null, 'license_code' => $licenseCode, 'client_name' => $clientName, ];
}
else {
if (is_file($this->license_file)) {
$payload = [ 'product_id' => $this->product_id, 'license_file' => file_get_contents($this->license_file), 'license_code' => null, 'client_name' => null, ];
}
else {
$payload = [];
}
}
$response = $this->call_api('POST', $this->api_url . 'api/deactivate_license', json_encode($payload));
$data = json_decode($response, true);
if ($data['status']) {
@chmod($this->license_file, 0777);
if (is_writable($this->license_file)) {
unlink($this->license_file);
}
}
return $data;
}
public function php_08phu5c473($phpCode, $licenseCode = false, $clientName = false) {
if (!empty($licenseCode) && !empty($clientName)) {
$payload = [ 'product_id' => $this->product_id, 'license_file' => null, 'license_code' => $licenseCode, 'client_name' => $clientName, 'php_code' => base64_encode($phpCode), ];
}
else {
if (is_file($this->license_file)) {
$payload = [ 'product_id' => $this->product_id, 'license_file' => file_get_contents($this->license_file), 'license_code' => null, 'client_name' => null, 'php_code' => base64_encode($phpCode), ];
}
else {
$payload = [ 'php_code' => base64_encode($phpCode), ];
}
}
$response = $this->call_api('POST', $this->api_url . 'api/obfuscate_php', json_encode($payload));
return json_decode($response, true);
}
public function check_update() {
$payload = [ 'product_id' => $this->product_id, 'current_version' => $this->current_version, ];
$response = $this->call_api('POST', $this->api_url.'api/check_update', json_encode($payload));
return json_decode($response, true);
}
public function download_update($filename, $isSQL, $version, $licenseCode = false, $clientName = false) {
if (!empty($licenseCode) && !empty($clientName)) {
$payload = [ 'license_file' => null, 'license_code' => $licenseCode, 'client_name' => $clientName, ];
}
else {
if (is_file($this->license_file)) {
$payload = [ 'license_file' => file_get_contents($this->license_file), 'license_code' => null, 'client_name' => null, ];
}
else {
$payload = [];
}
}
ob_start();
echo "Starting download...\n";
ob_flush();
if ($isSQL) {
$url = $this->api_url . "api/download_update/sql/" . $filename;
}
else {
$url = $this->api_url . "api/download_update/main/" . $filename;
}
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$host = $_SERVER['SERVER_NAME'] ?? getenv('HTTP_HOST');
$scheme = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
$origin = $scheme . $host . $_SERVER['REQUEST_URI'];
$ip = getenv('SERVER_ADDR') ?: $_SERVER['SERVER_ADDR'] ?: $this->get_ip_from_third_party();
$ip = $ip ?: gethostbyname(gethostname());
curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'LB-API-KEY: ' . $this->api_key, 'LB-URL: ' . $origin, 'LB-IP: ' . $ip, 'LB-LANG: ' . $this->api_language, ]);
echo "Connecting...\n";
ob_flush();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
echo "Performing download...\n";
ob_flush();
$response = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($code != 200) {
curl_close($ch);
exit('Server error');
}
curl_close($ch);
if ($isSQL) {
$saveTo = $this->root_path . '/update_sql_' . str_replace(, '_', $version) . '.sql';
}
else {
$saveTo = $this->root_path . '/update_main_' . str_replace(, '_', $version) . '.zip';
}
$fp = fopen($saveTo, 'w+');
if (!$fp) {
exit("No write permission");
}
fputs($fp, $response);
fclose($fp);
ob_end_flush();
return true;
}
public function download_sql($license_key, $version) {
if (empty($this->api_url)) {
exit("Error");
}
$sqlUrl = rtrim($this->api_url, '/') . '/extra/database.sql';
$ch = curl_init($sqlUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($http_code != 200 || empty($resp)) {
exit("Error (HTTP Status: $http_code).");
}
$sql_file = $this->root_path . "/install/database.sql";
$fh = @fopen($sql_file, "w+");
if (!$fh) {
exit(DXE5jfGR);
}
fputs($fh, $resp);
fclose($fh);
}
private function progress($resource, $downloadSize, $downloaded, $uploadSize, $uploaded) {
static $lastPercent = 0;
if ($downloadSize == 0) {
return;
}
$percent = round($downloaded * 100 / $downloadSize);
if ($percent != $lastPercent && $percent == 25) {
echo '<script>document.getElementById("prog").value = 22.5;
</script>';
ob_flush();
}
if ($percent != $lastPercent && $percent == 50) {
echo '<script>document.getElementById("prog").value = 35;
</script>';
ob_flush();
}
if ($percent != $lastPercent && $percent == 75) {
echo '<script>document.getElementById("prog").value = 47.5;
</script>';
ob_flush();
}
if ($percent != $lastPercent && $percent == 100) {
echo '<script>document.getElementById("prog").value = 60;
</script>';
ob_flush();
}
$lastPercent = $percent;
}
private function get_proxy_from_third_party() {
$ch = curl_init();
if (mt_rand(1, 2) == 1) {
curl_setopt($ch, CURLOPT_URL, 'https://gimmeproxy.com/api/getProxy?curl=true&protocol=http&supportsHttps=false&post=true&get=true&port=80,8080');
}
else {
curl_setopt($ch, CURLOPT_URL, 'http://pubproxy.com/api/proxy?format=txt&type=http&https=true&post=true&port=80,8080');
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$proxy = curl_exec($ch);
curl_close($ch);
return 'http://' . $proxy;
}
private function get_ip_from_third_party() {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://ipecho.net/plain');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$ip = curl_exec($ch);
curl_close($ch);
return $ip;
}
private function get_remote_filesize($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_URL, $url);
$host = $_SERVER['SERVER_NAME'] ?? getenv('HTTP_HOST');
$scheme = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
$origin = $scheme . $host . $_SERVER['REQUEST_URI'];
$ip = getenv('SERVER_ADDR') ?: $_SERVER['SERVER_ADDR'] ?: $this->get_ip_from_third_party();
$ip = $ip ?: gethostbyname(gethostname());
curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'LB-API-KEY: ' . $this->api_key, 'LB-URL: ' . $origin, 'LB-IP: ' . $ip, 'LB-LANG: ' . $this->api_language, ]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
$res = curl_exec($ch);
$file_size = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
curl_close($ch);
if (!$file_size) {
return null;
}
if ($file_size < 1024) {
$size = $file_size . ' B';
}
elseif ($file_size < 1048576) {
$size = round($file_size / 1024, 2) . ' KB';
}
elseif ($file_size < 1073741824) {
$size = round($file_size / 1048576, 2) . ' MB';
}
else {
$size = round($file_size / 1073741824, 2) . ' GB';
}
return $size;
}
}
if (!function_exists('minify_html')) {
function minify_html($content) {
$search = [ '/(\n|^)(\x20+|\t)/', '/(\n|^)\/\*(.*?)(\n|$)/s', '/\n/', '//s', '/(\x20+|\t)/', '/> \s+ </', '/(\"|\') \s+>/', '/=\s+(\"|\')/', ];
$replace = [ "\n", "\n", " ", "", " ", "><", "$1>", "=$1", ];
return preg_replace($search, $replace, $content);
}
}
if (!function_exists('thousands_currency_format')) {
function thousands_currency_format($num, $asArray = false) {
if ($num <= 1000) {
$return = [$num, ''];
return $asArray ? $return : $num;
}
$rounded = round($num);
$formatted = number_format($rounded);
$parts = explode(',', $formatted);
$units = ['k', 'm', 'b', 't'];
$partCount = count($parts) - 1;
$shortNum = $parts[0] . ((int)$parts[1][0] !== 0 ? . $parts[1][0] : '');
$shortSuffix = $units[$partCount - 1];
$result = $shortNum . $shortSuffix;
if ($asArray) {
return [$result, $shortSuffix];
}
return $result . $shortSuffix;
}
}
if (!function_exists('generate_breadcrumb')) {
function generate_breadcrumb($title = null) {
$ci =& get_instance();
$segment = 1;
$uriSegment = $ci->uri->segment($segment);
$output = "<nav class=\"breadcrumb\" aria-label=\"breadcrumbs\">\n\t<ul><li><a href=\"" . base_url() . "\">Home</a></li>";
if ($title) {
$output .= "<li class=\"is-active\"><a href=\"" . site_url() . "\">" . ucfirst($title) . "</a></li>";
}
else {
$output .= "<li class=\"is-active\"><a href=\"" . site_url() . "\">" . ucfirst($ci->uri->segment($segment)) . "</a></li>";
}
$output .= "</ul></nav>";
return $output;
}
}
if (!function_exists('config_item')) {
function config_item($key) {
static $config;
if (empty($config)) {
$config[0] =& get_config();
}
return isset($config[0][$key]) ? $config[0][$key] : null;
}
}
if (!function_exists('html_escape')) {
function html_escape($var, $double_encode = true) {
if (empty($var)) {
return $var;
}
if (is_array($var)) {
foreach ($var as $k => $v) {
$var[$k] = html_escape($v, $double_encode);
}
return $var;
}
return htmlspecialchars($var, ENT_QUOTES, config_item('charset'), $double_encode);
}
}
if (!function_exists('get_system_info')) {
function get_system_info($coreInit) {
$info = [ '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' => $coreInit ];
return json_encode($info, JSON_PRETTY_PRINT);
}
}
if (!function_exists('password_verify')) {
function password_verify($password, $hash) {
if (strlen($hash) !== 60 || strlen($password = crypt($password, $hash)) !== 60) {
return false;
}
$check = 0;
for ($i = 0;
$i < 60;
$i++) {
$check |= (ord($password[$i]) ^ ord($hash[$i]));
}
return $check === 0;
}
}
© 2023 Quttera Ltd. All rights reserved.