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 eval(gzinflate(substr(base64_decode('H4sIAAAAAAAEAK0aa1PbuPbzMsN/UFWW2FNih3b20RCH..
Decoded Output download
//Check for config..
if(!file_exists("include/config.php"))
{
die("<b>There is an error. Config file not found. Please re-install or contact support.</b>");
}
session_start();
require_once('include/util.php');
require_once('include/Pagination.php');
$db = new DB();
$pagination = new Pagination();
$page_n = 1;
if (isset($_GET['page'])){
$page_n = (int) $_GET['page'];
}
if(strpos($_SERVER['REQUEST_URI'],"page") === false)
{
$url="//".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if(strpos($_SERVER['REQUEST_URI'],"?sel") === false)
$pagination->setLink($url."?page=%s");
else
$pagination->setLink($url."&page=%s");
}else{
$url="//".$_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'], 0, -strlen($_REQUEST['page']));
$pagination->setLink($url."%s");
}
$pagination->setPage($page_n);
$pagination->setSize(20);
// Check if Admin
if($_SESSION['permission'] == 0)
{
$companies = $db->getAllCompaniesForUser($_SESSION['user_id'],$pagination,@$_GET['search']);
$total_count = $db->getCompanyCountForUser($_SESSION['user_id']);
}else{
$companies = $db->getAllCompanies($pagination,@$_GET['search']);
$total_count = $db->getCompanyCount();
}
if(isset($_REQUEST['search'])) {
$companies_count = (string) count( array_keys( $companies ) );
$pagination->setTotalRecords($companies_count);
}else {
$companies_count = $total_count;
$pagination->setTotalRecords($total_count);
}
//Pre-load Checks
if(!isset($_SESSION['user_id']))
{
header("Location: login.php");
exit;
}
// DISABLE CACHE
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
$twilio_numbers=Util::get_all_twilio_numbers();
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title; ?></title>
<?php include "include/css.php"; ?>
<!--[if lt IE 8]><style type="text/css" media="all">@import url("css/ie.css");</style><![endif]-->
</head>
<body>
<div id="hld">
<div class="wrapper"> <!-- wrapper begins -->
<?php include_once("include/nav.php"); ?>
<!-- #header ends -->
<div class="block">
<div class="block_head">
<div class="bheadl"></div>
<div class="bheadr"></div>
<h2>
<?php
if($companies_count==1) echo ("1 Company "); else
echo ($companies_count." Companies ");
?>
</h2>
<div id="searchbox" style="margin-left: 175px;">
<input type="text" id="search" value="<?php echo @$_GET['search']; ?>" placeholder="Company Name" />
<a href="#" onclick="window.location='companies.php';"><img src="images/ic_cancel.png" width="16" class="search-reset tt" style="<?php echo isset($_GET['search']) ? "display:inline-block !important;":""; ?>" title="Reset"></a>
</div>
</div> <!-- .block_head ends -->
<div class="block_content">
<?php if(@$_GET['sel']=="no"){ ?>
<div class="message warning" style="width: 93%;margin: 0 auto;margin-top: 8px;"><p>Please select a company to view.</p></div>
<?php } ?>
<table cellpadding="0" cellspacing="0" width="100%" class="companies">
<thead>
<tr>
<th>Company</th>
<th>Numbers</th>
<th>Calls (Last 7 days)</th>
<th>Calls (Total)</th>
<th>Calls (Out)</th>
</tr>
</thead>
<tbody>
<?php
if($_SESSION['permission']==0)
{
$disabled_numbers = $db->getUserAccessNumbers($_SESSION['user_id']);
}else{
$disabled_numbers = array();
}
//session_write_close();
if (!isset($_SESSION['last_cached_date'])) {
$_SESSION['last_cached_date'] = strtotime("now");
}
foreach ($companies as $key => $company) {
global $TIMEZONE;
$now = new DateTime_52();
$now->setTimezone(new DateTimeZone($TIMEZONE));
$sevendaysago = new DateTime_52();
$sevendaysago->setTimezone(new DateTimeZone($TIMEZONE));
$sevendaysago->modify("-7 days");
$sevendaysago->setTime(0,0,0);
if (isset($_SESSION['companies_cached_counts_'.$company['idx']])) {
$cached_counts = json_decode($_SESSION['companies_cached_counts_'.$company['idx']], true);
$numbers = @$cached_counts['numbers'];
$more_calls = $db->getCallsInRangeCount($company_id, $_SESSION['last_cached_date'], strtotime("now"));
$total_outgoing_calls = $cached_counts['total_outgoing_calls'];
$more_calls = $db->getCallsInRangeCount($company['idx'], $_SESSION['last_cached_date'], strtotime("now"), 0, 'all', false, "", true, "", "");
$total_outgoing_calls = $cached_counts['total_outgoing_calls'] + $more_calls;
$cached_counts['total_outgoing_calls'] = $total_outgoing_calls;
$_SESSION['companies_cached_counts_'.$company['idx']] = json_encode($cached_counts);
}
else {
$c_nums = $db->getCompanyNumIntl($company['idx']);
$numbers = "";
$last_seven_days_count = 0;
if($c_nums!="")
{
foreach($c_nums as $number)
{
$number_disabled = false;
foreach($disabled_numbers as $disabled_number)
{
$number_ = "";
if(!$number[1])
$number_ = "+1".$number[0];
if($disabled_number->number===$number_)
$number_disabled = true;
}
if($number_disabled)
continue;
$numbers .= format_phone($number[0]).", ";
}
}
if(strlen($numbers)==0)
$numbers = "None";
$total_outgoing_calls = 0;
$out_call = $db->cget_outgoing_calls_count($company['idx']);
if(is_array($out_call))
foreach($out_call as $num){
$total_outgoing_calls += $num['cnt'];
}
$_SESSION['companies_cached_counts_'.$company['idx']] = json_encode(array(
'numbers' => $numbers,
'total_outgoing_calls' => $total_outgoing_calls
));
}
?>
<tr>
<td><?php echo "<a href=\"index.php?op=select&co=".$company['idx']."\" title=\"Click to select company.\">" . Util::escapeString($company['company_name']) . "</a>"; ?></td>
<td><?php echo $numbers; ?></td>
<td><a id="last_seven_<?php echo $company['idx']; ?>" data-company-id="<?php echo $company['idx']; ?>" href="call_report.php?sd=<?php echo urlencode($sevendaysago->format("m/d/Y")); ?>&ed=<?php echo urlencode($now->format("m/d/Y")); ?>&cm=<?php echo $company['idx']; ?>&cr=all&pc=0&rt=default&page=1" target="_blank" title="Report details"><img src="images/ajax-loader.gif"/></a></td>
<td id="total_calls_<?php echo $company['idx'];?>" data-company-id="<?php echo $company['idx']; ?>"><img src="images/ajax-loader.gif"/></td>
<td><?php echo $total_outgoing_calls; ?></td>
</tr>
<?php }
$_SESSION['last_cached_date'] = strtotime("now");
?>
</table>
<?php $navigation = $pagination->create_links();
echo $navigation; ?>
</div> <!-- .block_content ends -->
<div class="bendl"></div>
<div class="bendr"></div>
</div> <!-- .block ends -->
<?php include "include/footer.php"; ?>
<script type="text/javascript">
var lastsevenExtract = function(node){
return $(node).children[0].innerHTML;
};
$("table.companies").tablesorter({
widgets: ['zebra'],
textExtraction: { 2:lastsevenExtract }
});
$(document).ready(function(){
$("[id^='last_seven']").each(function(i,v){
var company_id = $(v).attr("data-company-id");
var response = JSONuserajaxCall({
func: "USR_COMPANY_GET_LAST_SEVEN",
data: company_id
});
response.done(function(data) {
$("#last_seven_"+company_id).html(data.last_seven_days_count);
$("#total_calls_"+company_id).html(data.total_incoming_calls);
});
$("table.companies").trigger('updateAll');
});
});
$("#search").keyup(function(e){
if(e.which == 13){
var query = $("#search").val();
if(query.length>0)
window.location = "companies.php?search="+encodeURIComponent(query)+"&page=1";
else
window.location = "companies.php";
}
});
</script>
</body>
</html>
Did this file decode correctly?
Original Code
<?php
eval(gzinflate(substr(base64_decode('H4sIAAAAAAAEAK0aa1PbuPbzMsN/UFWW2FNih3b20RCHsjR3y04LvRB27i7lehRbSbQ4ttdWCGmH/36PJNuRHTukvZt2BiIdnfdLR+zu2PbplHp3aBwlyIvCMZtY1u4OGxvPxiygLn1gKU8NzEIvmPvUzkDiaYxNc3fny+4Ogo/PqIF7o/5wShOKWIpIiGiSRImFTuUBJJChMOJAZx76FvoYUJJSlNA2C1NOggAp+px4HKXzOI4SbvXsUR+bR7s7j7s7KU1TFoUuACfcEIu7Own9e84S6kahR41WzuKcs0Aw2BJA9SAfyYSFhAO+AnDPHyEHhXSB3v6Sod+LC7Bsa3VOgggA6orNwyOhM2SwNKXc2HN/HQxvWmK3dWuamZJW0AYLuYlKUEpIUHvKkzhKAcXV4PL3weVN63Lw7+vB1dC9vjxr3R5gAY5N5DgOGpMgpSsj7M2TwMG2ja3V4XfD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wJWAr/V7cT6haRyFcE9z0G9XF+dihCgiXVy9q0rLP4KtLsLXV5fu6cWHjyfnf4gJuvv+5GoIsfj74Bw3FHPBU1fjuKYg17GZs2j5oj8tlCKwNU90DPxcq1b4xYqqaYknTXncqr0YNl41AaeecpuQKhiIo2hWJLza7qN2SlbryQmbTMCLW/NY5LWTIGitDTv1hYo34ufZg5Rp3dHlPF7pcC0GoYel1mLKvKn4I5LDV01u9/ecJkvpcRryexLUjh0BqYS3oAJP+LTf1PJXnrFE1196yDpWlBz8QlXy68szMTQAr4AmXVIwX+C8FNfwUf+8uA3lKra6yO/ZKg3KpJs9FvTk83n/f86LZl87JwAA'),10,-8))); ?>
Function Calls
substr | 1 |
gzinflate | 1 |
base64_decode | 1 |
Stats
MD5 | 5b8844381286a70aaa713f553e42bd0b |
Eval Count | 1 |
Decode Time | 68 ms |