Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

eval("?>".base64_decode("PD9waHANCg0KaWYgKCFkZWZpbmVkKCdCQVNFUEFUSCcpKSBleGl0KCdObyBkaXJlY..

Decoded Output download

?>b'<?php

if (!defined(\'BASEPATH\')) exit(\'No direct script access allowed\');

class Accesscontrol_Helper
{
	// IdUnique, CodeName, UsrName, UsrId, Name, Data
	public static function LoginActivity_Log($ActivityLogIdUnique, $ActivityLogCodeName, $ActivityLogUsrName, $ActivityLogUsrId, $ActivityLogName, $ActivityLogData, $ActivityLogStatus)
	{
		$CI = &get_instance();

		// load model
		$CI->load->model(\'M_Activity\');

		if (strtolower($ActivityLogCodeName) == \'login\') {
			$ActivityLogCode = 0;
		} else if (strtolower($ActivityLogCodeName) == \'logout\') {
			$ActivityLogCode = 1;
		}

		$param[\'LAL_IdUnique\'] 			= $ActivityLogIdUnique;
		$param[\'LAL_Code\'] 				= $ActivityLogCode;
		$param[\'LAL_CodeName\'] 			= $ActivityLogCodeName;
		$param[\'LAL_UsrName\'] 			= $ActivityLogUsrName;
		$param[\'LAL_Name\'] 				= $ActivityLogName;
		$param[\'LAL_Data\'] 				= $ActivityLogData;
		$param[\'LAL_Status\'] 			= $ActivityLogStatus;
		$param[\'LAL_UsrId\'] 			= $ActivityLogUsrId;
		$param[\'LAL_Created_TypeID\'] 	= date(\'d-F-Y H:i:s\');

		// save to db
		$CI->M_Activity->Save_LoginActivityLog($param);
	}


	// IdUnique, CodeName, UsrName, UsrId, Name, Data
	public static function Activity_Log($ActivityLogIdUnique, $ActivityLogCodeName, $ActivityLogUsrName, $ActivityLogUsrId, $ActivityLogName, $ActivityLogData, $ActivityLogStatus)
	{
		$CI = &get_instance();

		// load model
		$CI->load->model(\'M_Activity\');

		if (strtolower($ActivityLogCodeName) == \'login\') {
			$ActivityLogCode = 0;
		} else if (strtolower($ActivityLogCodeName) == \'logout\') {
			$ActivityLogCode = 1;
		} else if (strtolower($ActivityLogCodeName) == \'add\') {
			$ActivityLogCode = 2;
		} else if (strtolower($ActivityLogCodeName) == \'update\') {
			$ActivityLogCode = 3;
		} else if (strtolower($ActivityLogCodeName) == \'delete\') {
			$ActivityLogCode = 4;
		}

		$param[\'AL_IdUnique\'] 			= $ActivityLogIdUnique;
		$param[\'AL_Code\'] 				= $ActivityLogCode;
		$param[\'AL_CodeName\'] 			= $ActivityLogCodeName;
		$param[\'AL_UsrName\'] 			= $ActivityLogUsrName;
		$param[\'AL_Name\'] 				= $ActivityLogName;
		$param[\'AL_Data\'] 				= $ActivityLogData;
		$param[\'AL_Status\'] 			= $ActivityLogStatus;
		$param[\'AL_UsrId\'] 				= $ActivityLogUsrId;
		$param[\'AL_Created_TypeID\'] 	= date(\'d-F-Y H:i:s\');

		// save to db
		$CI->M_Activity->Save_ActivityLog($param);
	}


	// Page / Controller
	public static function Visitor_Counter($VisitorCounter_Page)
	{
		$CI = &get_instance();

		// load model
		$CI->load->library(\'user_agent\');

		$param[\'VC_Page\'] 			= $VisitorCounter_Page;
		$param[\'VC_Version\'] 		= $CI->agent->version();
		$param[\'VC_Browser\'] 		= $CI->agent->browser();
		$param[\'VC_Platform\'] 		= $CI->agent->platform();
		$param[\'VC_IP_Address\'] 	= $CI->input->ip_address();
		$param[\'VC_UserAgent\'] 		= $CI->agent->agent_string();
		$param[\'VC_Date_TypeID\'] 	= date(\'d-F-Y H:i:s\');
		$param[\'VC_Counter\'] 		= 1;

		// save to db
		$CI->M_Activity->Save_VisitorCounter($param);
	}


	public static function Is_Mode()
	{
		$CI = &get_instance();

		// load model
		$CI->load->model(\'M_IsMode\');

		if (@count($CI->M_IsMode->isSetting_Get(\'Status\')) > 0) {
			if ($CI->M_IsMode->isSetting_Get(\'Status\')->SettingValue == \'Default Mode\') {
				return true;
			} else {
				return false;
			}
		} else {
			return false;
		}
	}


	public static function Get_Is_Mode($Sttg_Name)
	{
		$CI = &get_instance();

		// load model
		$CI->load->model(\'M_IsMode\');

		return $CI->M_IsMode->isSetting_Get($Sttg_Name);
	}


	public static function GettingsMsg()
	{
		$time = date("H");
		$timeZone = date("e");
		$msg = \'\';

		if ($time < "06") {
			$msg = "Selamat Dini Hari";
		} else
		if ($time >= "06" && $time < "10") {
			$msg = "Selamat Pagi";
		} else
		if ($time >= "10" && $time < "15") {
			$msg = "Selamat Siang";
		} else
		if ($time >= "15" && $time < "18") {
			$msg = "Selamat Sore";
		} else
		if ($time >= "18" && $time < "19") {
			$msg = "Selamat Petang";
		} else
		if ($time >= "19") {
			$msg = "Selamat Malam";
		}

		return $msg;
	}


	public static function Is_Loggin_In()
	{
		$CI = &get_instance();

		if (!empty($CI->session->userdata[\'UsrName\']) && $CI->session->userdata[\'is_logged_in\'] == TRUE && $CI->session->userdata[\'loggin_in_bmt2_payroll_system\'] == TRUE) {
			return true;
		} else {
			return false;
		}
	}


	public static function AddZero_BeforeTen($number = null)
	{
		$numberDefault = !$number ? \'10\' : $number;

		return ($numberDefault < 10 ? \'0\' . $numberDefault : $numberDefault);
	}


	public static function Array_Month_Short_English($data = null)
	{
		$months = [
			1 => \'Jan\',
			2 => \'Feb\',
			3 => \'Mar\',
			4 => \'Apr\',
			5 => \'May\',
			6 => \'Jun\',
			7 => \'Jul\',
			8 => \'Aug\',
			9 => \'Sep\',
			10 => \'Oct\',
			11 => \'Nov\',
			12 => \'Dec\',
		];

		return $months[(int) $data];
	}


	public static function Array_Month_Indonesian($data = null)
	{
		$months = [
			1 => \'Januari\',
			2 => \'Februari\',
			3 => \'Maret\',
			4 => \'April\',
			5 => \'Mei\',
			6 => \'Juni\',
			7 => \'Juli\',
			8 => \'Agustus\',
			9 => \'September\',
			10 => \'Oktober\',
			11 => \'November\',
			12 => \'Desember\',
		];

		return $months[(int) $data];
	}


	public static function Array_Month_English($data = null)
	{
		$months = [
			0 => \'December\',
			1 => \'January\',
			2 => \'February\',
			3 => \'March\',
			4 => \'April\',
			5 => \'May \',
			6 => \'June\',
			7 => \'July\',
			8 => \'August\',
			9 => \'September\',
			10 => \'October\',
			11 => \'November\',
			12 => \'December\',
		];

		return $months[(int) $data];
	}


	public static function Array_Day_Indonesian($data = null)
	{
		$days = [
			\'Sunday\' 		=> \'Minggu\',
			\'Monday\' 		=> \'Senin\',
			\'Tuesday\' 		=> \'Selasa\',
			\'Wednesday\' 	=> \'Rabu\',
			\'Thursday\' 		=> \'Kamis\',
			\'Friday\' 		=> \'Jumat\',
			\'Saturday\' 		=> \'Sabtu\',
		];

		return $days[$data];
	}


	public static function DateReplace_Ymd_to_dmY($date = null)
	{
		// var date eg-> 2019-07-17
		$dateExplode = explode(\'-\', $date);
		@$dateNew = $dateExplode[2] . \'-\' . $this->array_Month_Indonesian($dateExplode[1]) . \'-\' . $dateExplode[2];

		return $dateNew;
	}


	public static function DateReplace_to_Ymd($date = null)
	{
		$dateDefault = strtotime($date);

		$newFormat = date(\'Y-m-d\', $dateDefault);

		return $newFormat;
	}


	public static function DateTimeReplace_to_12Hours_Format($date = null)
	{
		// var date eg = \'2019-07-17 22:15:00\' \'2019-07-17 22:35:00\'
		$new_DateTime = date(\'h:i A\', strtotime($date));

		return $new_DateTime;
	}


	public static function Base64URL_Encode($data)
	{
		return rtrim(strtr(base64_encode($data), \'+/\', \'-_\'), \'=\');
	}


	public static function Base64URL_Decode($data)
	{
		return base64_decode(str_pad(strtr($data, \'-_\', \'+/\'), strlen($data) % 4, \'=\', STR_PAD_RIGHT));
	}


	public static function Encrypt($str)
	{
		$rslt = \'\';
		$key = \'QXJpZ2hvIEd1bWVyeSBTYW1vc2lyBMT2ReportPayrollSystem\';
		for ($i = 0; $i < strlen($str); $i++) {
			$character = substr($str, $i, 1);
			$character_key = substr($key, ($i % strlen($key)) - 1, 1);
			$character = chr(ord($character) + ord($character_key));
			$rslt .= $character;
		}
		return urlencode(base64_encode($rslt));
	}


	public static function Decrypt($str)
	{
		$str = base64_decode(urldecode($str));
		$rslt = \'\';
		$key = \'QXJpZ2hvIEd1bWVyeSBTYW1vc2lyBMT2ReportPayrollSystem\';
		for ($i = 0; $i < strlen($str); $i++) {
			$character = substr($str, $i, 1);
			$character_key = substr($key, ($i % strlen($key)) - 1, 1);
			$character = chr(ord($character) - ord($character_key));
			$rslt .= $character;
		}
		return $rslt;
	}


	public static function UniqueId($str = null)
	{
		// return substr($str, -3, 3) . date(\'ymdHis\') . gettimeofday()[\'usec\'] . rand(10,99);
		return date(\'ymdHis\') . gettimeofday()[\'usec\'] . rand(10, 99);
	}


	public static function UniqIdReal($lenght = 13)
	{
		// uniqid gives 13 chars, but you could adjust it to your needs.
		if (function_exists("random_bytes")) {
			$bytes = random_bytes(ceil($lenght / 2));
		} elseif (function_exists("openssl_random_pseudo_bytes")) {
			$bytes = openssl_random_pseudo_bytes(ceil($lenght / 2));
		} else {
			throw new Exception("no cryptographically secure random function available");
		}
		return substr(bin2hex($bytes), 0, $lenght);
	}


	public static function Valdt_ThreeNum_Zero($str)
	{
		if ($str >= 1 && $str <= 9) {
			$str_new = \'00\' . $str;
		} else if ($str >= 9 && $str <= 99) {
			$str_new = \'0\' . $str;
		} else if ($str >= 99) {
			$str_new = $str;
		} else {
			$str_new = \'001\';
		}

		return $str_new;
	}


	public static function nbsp($count = null)
	{
		$counts = $count == null ? 0 : $count;
		$str = \'\';

		for ($i = 1; $i < $counts; $i++) {
			$str .= \'&nbsp;\';
		}

		return $str;
	}


	public static function Date_Min_EN_ID($date = null)
	{
		$date_expl = explode(\'-\', $date);

		return $date_expl[0] . \'-\' . Accesscontrol_Helper::Array_Month_Indonesian($date_expl[1]) . \'-\' . $date_expl[2];
	}


	public static function Date_Min_ID_EN($date = null)
	{
		$date_expl = explode(\'-\', $date);

		return $date_expl[2] . \'-\' . Accesscontrol_Helper::Array_Month_Indonesian($date_expl[1]) . \'-\' . $date_expl[0];
	}


	public static function Date_Slash_EN_ID($date = null)
	{
		$date_expl = explode(\'/\', $date);

		return $date_expl[2] . \'/\' . Accesscontrol_Helper::Array_Month_Indonesian($date_expl[1]) . \'/\' . $date_expl[0];
	}


	public static function Date_Slash_ID_EN($date = null)
	{
		$date_expl = explode(\'/\', $date);

		return $date_expl[0] . \'/\' . Accesscontrol_Helper::Array_Month_Indonesian($date_expl[1]) . \'/\' . $date_expl[2];
	}


	public static function Day_Min_EN($date = null)
	{
		return date(\'l\', strtotime($date));
	}


	public static function Day_Min_ID($date = null)
	{
		$date_new =  date(\'l\', strtotime($date));

		return Accesscontrol_Helper::Array_Day_Indonesian($date_new);
	}


	public static function Remaining_Time($date_1 = null, $date_2 = null)
	{
		$date1 = $date_1;
		$date2 = $date_2;

		$ts1 = strtotime($date1);
		$ts2 = strtotime($date2);

		$year1 = date(\'Y\', $ts1);
		$year2 = date(\'Y\', $ts2);

		$month1 = date(\'m\', $ts1);
		$month2 = date(\'m\', $ts2);

		$day1 = date(\'d\', $ts1);
		$day2 = date(\'d\', $ts2);

		$diff = (($year2 - $year1) * 12) + ($month2 - $month1);

		$tahun = round($diff / 12);
		if (!is_integer($diff / 12)) {
			$tahun = $tahun - 1;
		}
		if ($tahun < 10) {
			$tahun = \'0\' . $tahun;
		}
		$sisabulan = $diff % 12;

		if ($sisabulan < 10) {
			$sisabulan = \'0\' . $sisabulan;
		}
		$data[\'jumlah_bulan\'] = $diff;


		$d1 = new DateTime($date1);
		$d2 = new DateTime($date2);

		$diff = $d2->diff($d1);

		$data[\'MasaKerja\'] = $diff->y . \',\' . $sisabulan;

		return $data[\'MasaKerja\'];
	}


	public static function Date_Repl_Min_DDMMYYYY_2_YYYYMMDD($date = null)
	{
		$date_original = $date;

		// Creating timestamp from given date
		$timestamp = strtotime($date_original);

		// Creating new date format from that timestamp
		$date_new = date("Y-m-d", $timestamp);
		return $date_new; // Outputs
	}


	public static function Date_Repl_Min_YYYYMMDD_2_DDMMYYYY($date = null)
	{
		$date_original = $date;

		// Creating timestamp from given date
		$timestamp = strtotime($date_original);

		// Creating new date format from that timestamp
		$date_new = date("d-m-Y", $timestamp);
		return $date_new; // Outputs
	}

	public static function Date_Repl_Min_YYYYMMDD_2_DDMMYYYY_English($date = null)
	{
		$date_original = $date;

		// Creating timestamp from given date
		$timestamp = strtotime($date_original);

		// Creating new date format from that timestamp
		$date_new = date(\'d-F-Y\', $timestamp);
		return $date_new; // Outputs
	}

	public static function MonthName_toNumber($month = null)
	{
		$arry = [
			\'January\' 		=> 1,
			\'February\' 		=> 2,
			\'March\' 		=> 3,
			\'April\' 		=> 4,
			\'May\' 			=> 5,
			\'June\' 			=> 6,
			\'July\' 			=> 7,
			\'August\' 		=> 8,
			\'September\' 	=> 9,
			\'October\' 		=> 10,
			\'November\' 		=> 11,
			\'December\' 		=> 12,
		];

		return Accesscontrol_Helper::AddZero_BeforeTen($arry[$month]);
	}

	public static function MonthName_Short_toLong($month = null)
	{
		$months = [
			\'Jan\' => \'January\',
			\'Feb\' => \'February\',
			\'Mar\' => \'March\',
			\'Apr\' => \'April\',
			\'May\' => \'May\',
			\'Jun\' => \'June\',
			\'Jul\' => \'July\',
			\'Aug\' => \'August\',
			\'Sep\' => \'September\',
			\'Oct\' => \'October\',
			\'Nov\' => \'November\',
			\'Dec\' => \'December\',
		];

		return $months[$month];
	}

	public static function MonthName_Long_toShort($month = null)
	{
		$months = [
			\'January\' => \'Jan\',
			\'February\' => \'Feb\',
			\'March\' => \'Mar\',
			\'April\' => \'Apr\',
			\'May\' => \'May\',
			\'June\' => \'Jun\',
			\'July\' => \'Jul\',
			\'August\' => \'Aug\',
			\'September\' => \'Sep\',
			\'October\' => \'Oct\',
			\'November\' => \'Nov\',
			\'December\' => \'Dec\',
		];

		return $months[$month];
	}

	public static function Time_Difference($date1, $date2, $format = false) {
		$diff = date_diff( date_create($date1), date_create($date2) );
		if ($format)
		return $diff->format($format);

		return [\'y\' => $diff->y,
			\'m\' => $diff->m,
			\'d\' => $diff->d,
			\'h\' => $diff->h,
			\'i\' => $diff->i,
			\'s\' => $diff->s
		];
	}
}
'

Did this file decode correctly?

Original Code

eval("?>".base64_decode("PD9waHANCg0KaWYgKCFkZWZpbmVkK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