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 $titre = "Liste des contacts"; $mini = false; $liste_contact = true; require "\1..
Decoded Output download
<?php
$titre = "Liste des contacts";
$mini = false;
$liste_contact = true;
require "new_header.php";
if ($profil == 'superviseur' and !$rowPr['contacts']) {
?>
<script>
$(document).ready(function () {
bootbox.confirm("Vous n'avez pas le droit d'accder cette page !", function (result) {
window.location.href = '/';
});
});
</script>
<?php
exit;
}
if (!empty($_GET['page'])) {
$page = $_GET['page'];
} else {
$page = 1;
}
$data = array();
if (isset($_POST['data'])) {
$data = $_POST['data'];
} elseif (isset($_GET['name']) || isset($_GET['sort'])) {
$data = $_GET;
}
if (isset($data['sort'])) {
$sort = $data['sort'];
} else {
$sort = 'list_changedate';
}
if (isset($data['direction'])) {
$direction = $data['direction'];
} else {
$direction = 'desc';
}
unset($data['sort']);
unset($data['direction']);
$results_per_page = 20;
$page_first_result = ($page - 1) * $results_per_page;
$where = "list_id!='999'";
if (!empty($data['campagne'])) {
$where .= " and lists.campaign_id = '" . $data['campagne'] . "'";
}
if (!empty($data['active'])) {
$where .= " and lists.active = '" . $data['active'] . "'";
}
//if ($allow_usergroup != "1=1") {
// $allow_usergroupA = "and lists." . $allow_usergroup . "";
//} else {
// $allow_usergroupA = "";
//}
$stmtL = "select lists.* from vicidial_lists as lists LEFT JOIN vicidial_campaigns as cam on cam.campaign_id = lists.campaign_id WHERE $where and $allow_usergroup";
$rsltL = mysql_to_mysqli($stmtL, $link);
$lists_to_print = mysqli_num_rows($rsltL);
$number_of_page = ceil($lists_to_print / $results_per_page);
$stmtCC = "select lists.*,lists.active as active, lists.list_name as list_name, cam.campaign_name as campaign_name from vicidial_lists as lists LEFT JOIN vicidial_campaigns as cam on cam.campaign_id = lists.campaign_id WHERE $where and $allow_usergroup order by $sort $direction LIMIT " . $page_first_result . ',' . $results_per_page;
$rsltCC = mysql_to_mysqli($stmtCC, $link);
//echo $stmtCC;
$dataT = $data;
unset($dataT['page']);
$dataE = http_build_query($dataT);
?>
<script src="../js/listes.js"></script>
<div id="content" class="wrapper wrapper-content animated fadeIn">
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-md-9 title-with-action">
<h2>Liste des contacts</h2>
<ol class="breadcrumb">
<li><a href="/admin/">Accueil</a></li>
<li class="active"><strong>Listes des contacts</strong></li>
</ol>
</div>
<?php if ($profil != 'superviseur' or $rowPr['add_list']) : ?>
<div class="col-md-3 title-action">
<a href="/admin/add_liste" class="btn btn-outline btn-success"><i
class="fa fa-plus-circle"></i>
Nouvelle liste</a></div>
<?php endif; ?>
</div>
<div class="row ibox float-e-margins filter-form-container">
<div class="ibox-title">
<h5>Filtre et recherche</h5>
<div class="ibox-tools">
<a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
<a class="close-link"> <i class="fa fa-times"></i></a>
</div>
</div>
<div class="ibox-content">
<form action="/admin/listes" class="form-horizontal filter-form" id="ListeIndexForm" method="post"
accept-charset="utf-8">
<div style="display:none;"><input type="hidden" name="_method" value="POST"></div>
<div class="row">
<div class="col-sm-4 form-group"><label for="ListeName" class=" control-label col-sm-4">Nom de la
liste</label>
<div class="col-sm-8"><input name="data[name]" class="form-control input-sm" type="text"
id="ListeName"></div>
</div>
<div class="col-sm-4 form-group"><label for="ListeCampagne"
class=" control-label col-sm-4">Campagne</label>
<div class="col-sm-8"><select name="data[campagne]" class="form-control input-sm"
id="ListeCampagne">
<option value=""></option>
<?php
$stmtC = "SELECT campaign_id,campaign_name from vicidial_campaigns WHERE campaign_id != 'pixis' and $allow_usergroup";
$rsltC = mysql_to_mysqli($stmtC, $link);
while ($rowC = mysqli_fetch_row($rsltC)) {
$selected = '';
if (isset($data['campagne'])) {
if ($data['campagne'] == $rowC[0]) {
$selected = 'selected';
}
}
?>
<option value="<?php echo $rowC[0] ?>" <?php echo $selected; ?>><?php echo $rowC[1] ?></option>
<?php } ?>
</select></div>
</div>
<div class="col-sm-4 form-group"><label for="ListeActive"
class=" control-label col-sm-4">Active</label>
<div class="col-sm-8"><select name="data[active]" class="form-control input-sm"
id="ListeActive">
<option value=""></option>
<option value="Y" <?php echo (!empty($data['active']) and ($data['active'] == 'Y'))?'selected':'' ?>>Oui</option>
<option value="N" <?php echo (!empty($data['active']) and ($data['active'] == 'N'))?'selected':'' ?>>Non</option>
</select></div>
</div>
</div>
<div class="row search-form-actions-row">
<div class="col-sm-8 m-t-sm">
<label class="col-sm-2 control-label"></label>
<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i> Rechercher</button>
<button class="btn btn-warning search-reset" type="button"><i class="fa fa-undo"></i>
Rinitialiser
</button>
</div>
</div>
</form>
</div>
</div>
<div id="page-content" class="row ibox-content">
<?php
if ($direction == 'desc') {
$dd = 'asc';
} else {
$dd = 'desc';
}
?>
<table class="listes-table table table-striped table-condensed table-hover table-vertical-align-middle table-lists">
<thead>
<tr>
<th width="10px"><a href="/admin/listes?<?php echo $dataE; ?>&sort=active&direction=<?php echo $dd ?>">Active</a>
</th>
<th><a href="/admin/listes?<?php echo $dataE; ?>&sort=list_name&direction=<?php echo $dd ?>"><i
class="fa fa-list"></i> Nom</a></th>
<th><a href="/admin/listes?<?php echo $dataE; ?>&sort=list_changedate&direction=<?php echo $dd ?>"><i
class="fa fa-list"></i> Date</a></th>
<th><a href="/admin/listes?<?php echo $dataE; ?>&sort=campaign_name&direction=<?php echo $dd ?>"><i
class="fa fa-folder-open-o"></i>
Campagne</a></th>
<th><i class="fa fa-user"></i> Contacts</th>
<th width="30%"><i class="fa fa-bolt"></i> Traitement</th>
<th width="70px" class="actions"><i class="fa fa-gears"></i> Actions</th>
</tr>
</thead>
<tbody>
<?php
while ($rowL = mysqli_fetch_assoc($rsltCC)) {
// $rowL = mysqli_fetch_assoc($rsltL);
$stmt = "SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id,reset_time,local_call_time from vicidial_lists vls,vicidial_list vl where vls.list_id=" . $rowL['list_id'] . " and vls.list_id=vl.list_id group by list_id";
$rslt = mysql_to_mysqli($stmt, $link);
$row = mysqli_fetch_assoc($rslt);
$campaign = getCampaignInfos($rowL['campaign_id']);
$notcalled = getNombreLeadNotCalled($rowL['list_id']);
$called = $row['tally'] - $notcalled;
// echo '<pre>'; print_r($row); echo '</pre>';
$pcalled = ($called * 100) / $row['tally'];
$pcalled = number_format((float)$pcalled, 2, '.', '');
$pnotcalled = 100 - $pcalled;
?>
<tr>
<td>
<input type="checkbox" <?php echo ($rowL['active'] == 'Y') ? "checked='checked'" : ""; ?>
id="<?php echo $rowL['list_id'] ?>"
meta-list-name="<?php echo $rowL['list_name'] ?>" class="i-checks check_list">
</td>
<td><strong><a href="/admin/edit_liste?listID=<?php echo $rowL['list_id'] ?>"><?php echo $rowL['list_name'] ?></a></strong></td>
<td><strong><?php echo date('d/m/Y H:i', strtotime($rowL['list_changedate'])); ?></strong></td>
<td><?php echo $campaign['campaign_name'] ?></td>
<td>
<span class="lists-contacts-label label label-success"><?php echo $called ?></span>
/
<span class="lists-contacts-label label label-primary"><?php echo ($row['tally']) ? $row['tally'] : 0; ?></span>
</td>
<td class="liste-table-td-progress">
<div class="progress listes-appels">
<div class="progress-bar progress-bar-danger" style="width: <?php echo $pcalled; ?>%;">
<small><?php echo $pcalled; ?>%</small>
</div>
<div class="progress-bar progress-bar-success" style="width: <?php echo $pnotcalled; ?>%;">
<small><?php echo $pnotcalled; ?>%</small>
</div>
</div>
</td>
<td class="actions">
<div class="dropdown btn-group">
<a class="btn btn-xs btn-outline btn-info dropdown-toggle" data-toggle="dropdown" href="#">
Action <span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<?php if ($profil != 'superviseur' or $rowPr['recycler_leads']) : ?>
<li>
<a
href="/admin/recyclage_list?listID=<?php echo $rowL['list_id'] ?>"><i
class="fa fa-refresh"></i> Recycler</a>
</li>
<?php endif; ?>
<?php if ($profil != 'superviseur' or $rowPr['update_list']) : ?>
<li>
<a
href="/admin/edit_liste?listID=<?php echo $rowL['list_id'] ?>"><i
class="fa fa-pencil"></i> Editer</a></li>
<?php endif; ?>
<?php if ($profil != 'superviseur' or $rowPr['importer_leads']) : ?>
<li>
<a
href="/admin/import_list?listID=<?php echo $rowL['list_id'] ?>"><i
class="fa fa-plus"></i> Importer</a>
</li>
<?php endif; ?>
<?php if ($profil != 'superviseur' or $rowPr['exporter_leads']) : ?>
<li>
<a
href="/admin/export_list?listID=<?php echo $rowL['list_id'] ?>"><i
class="fa fa-download"></i> Exporter</a>
</li>
<?php endif; ?>
<?php if ($profil != 'superviseur' or $rowPr['delete_list']) : ?>
<li>
<a href="/admin/remove_list?listID=<?php echo $rowL['list_id'] ?>"
class="removeList"><i
class="fa fa-times-circle"></i> Supprimer</a></li>
<?php endif; ?>
</ul>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<div class="hr-line-dashed"></div>
<div class="text-left row">
<?php
$dataT = $data;
unset($dataT['page']);
$dataE = http_build_query($dataT);
?>
<div class="col-md-9">
<?php
echo paginate('/admin/listes?' . $dataE, "&page=", $number_of_page, $page, 3);
?>
</div>
<div class="col-md-3 text-right">
<small> Afficher <?php echo $page; ?> <?php echo $number_of_page; ?> sur
<b><?php echo $lists_to_print ?></b> total </small>
</div>
</div>
</div>
<?php
require "new_footer.php";
?>
Did this file decode correctly?
Original Code
<?php
$titre = "Liste des contacts";
$mini = false;
$liste_contact = true;
require "\156\x65\167\137\x68\x65\x61\x64\x65\x72\x2e\160\x68\x70";
if ($profil == 'superviseur' and !$rowPr['contacts']) {
?>
<script>
$(document).ready(function () {
bootbox.confirm("Vous n'avez pas le droit d'accder cette page !", function (result) {
window.location.href = '/';
});
});
</script>
<?php
exit;
}
if (!empty($_GET['page'])) {
$page = $_GET['page'];
} else {
$page = 1;
}
$data = array();
if (isset($_POST['data'])) {
$data = $_POST['data'];
} elseif (isset($_GET['name']) || isset($_GET['sort'])) {
$data = $_GET;
}
if (isset($data['sort'])) {
$sort = $data['sort'];
} else {
$sort = 'list_changedate';
}
if (isset($data['direction'])) {
$direction = $data['direction'];
} else {
$direction = 'desc';
}
unset($data['sort']);
unset($data['direction']);
$results_per_page = 20;
$page_first_result = ($page - 1) * $results_per_page;
$where = "list_id!='999'";
if (!empty($data['campagne'])) {
$where .= " and lists.campaign_id = '" . $data['campagne'] . "'";
}
if (!empty($data['active'])) {
$where .= " and lists.active = '" . $data['active'] . "'";
}
//if ($allow_usergroup != "1=1") {
// $allow_usergroupA = "and lists." . $allow_usergroup . "";
//} else {
// $allow_usergroupA = "";
//}
$stmtL = "select lists.* from vicidial_lists as lists LEFT JOIN vicidial_campaigns as cam on cam.campaign_id = lists.campaign_id WHERE $where and $allow_usergroup";
$rsltL = mysql_to_mysqli($stmtL, $link);
$lists_to_print = mysqli_num_rows($rsltL);
$number_of_page = ceil($lists_to_print / $results_per_page);
$stmtCC = "select lists.*,lists.active as active, lists.list_name as list_name, cam.campaign_name as campaign_name from vicidial_lists as lists LEFT JOIN vicidial_campaigns as cam on cam.campaign_id = lists.campaign_id WHERE $where and $allow_usergroup order by $sort $direction LIMIT " . $page_first_result . ',' . $results_per_page;
$rsltCC = mysql_to_mysqli($stmtCC, $link);
//echo $stmtCC;
$dataT = $data;
unset($dataT['page']);
$dataE = http_build_query($dataT);
?>
<script src="../js/listes.js"></script>
<div id="content" class="wrapper wrapper-content animated fadeIn">
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-md-9 title-with-action">
<h2>Liste des contacts</h2>
<ol class="breadcrumb">
<li><a href="/admin/">Accueil</a></li>
<li class="active"><strong>Listes des contacts</strong></li>
</ol>
</div>
<?php if ($profil != 'superviseur' or $rowPr['add_list']) : ?>
<div class="col-md-3 title-action">
<a href="/admin/add_liste" class="btn btn-outline btn-success"><i
class="fa fa-plus-circle"></i>
Nouvelle liste</a></div>
<?php endif; ?>
</div>
<div class="row ibox float-e-margins filter-form-container">
<div class="ibox-title">
<h5>Filtre et recherche</h5>
<div class="ibox-tools">
<a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
<a class="close-link"> <i class="fa fa-times"></i></a>
</div>
</div>
<div class="ibox-content">
<form action="/admin/listes" class="form-horizontal filter-form" id="ListeIndexForm" method="post"
accept-charset="utf-8">
<div style="display:none;"><input type="hidden" name="_method" value="POST"></div>
<div class="row">
<div class="col-sm-4 form-group"><label for="ListeName" class=" control-label col-sm-4">Nom de la
liste</label>
<div class="col-sm-8"><input name="data[name]" class="form-control input-sm" type="text"
id="ListeName"></div>
</div>
<div class="col-sm-4 form-group"><label for="ListeCampagne"
class=" control-label col-sm-4">Campagne</label>
<div class="col-sm-8"><select name="data[campagne]" class="form-control input-sm"
id="ListeCampagne">
<option value=""></option>
<?php
$stmtC = "SELECT campaign_id,campaign_name from vicidial_campaigns WHERE campaign_id != 'pixis' and $allow_usergroup";
$rsltC = mysql_to_mysqli($stmtC, $link);
while ($rowC = mysqli_fetch_row($rsltC)) {
$selected = '';
if (isset($data['campagne'])) {
if ($data['campagne'] == $rowC[0]) {
$selected = 'selected';
}
}
?>
<option value="<?php echo $rowC[0] ?>" <?php echo $selected; ?>><?php echo $rowC[1] ?></option>
<?php } ?>
</select></div>
</div>
<div class="col-sm-4 form-group"><label for="ListeActive"
class=" control-label col-sm-4">Active</label>
<div class="col-sm-8"><select name="data[active]" class="form-control input-sm"
id="ListeActive">
<option value=""></option>
<option value="Y" <?php echo (!empty($data['active']) and ($data['active'] == 'Y'))?'selected':'' ?>>Oui</option>
<option value="N" <?php echo (!empty($data['active']) and ($data['active'] == 'N'))?'selected':'' ?>>Non</option>
</select></div>
</div>
</div>
<div class="row search-form-actions-row">
<div class="col-sm-8 m-t-sm">
<label class="col-sm-2 control-label"></label>
<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i> Rechercher</button>
<button class="btn btn-warning search-reset" type="button"><i class="fa fa-undo"></i>
Rinitialiser
</button>
</div>
</div>
</form>
</div>
</div>
<div id="page-content" class="row ibox-content">
<?php
if ($direction == 'desc') {
$dd = 'asc';
} else {
$dd = 'desc';
}
?>
<table class="listes-table table table-striped table-condensed table-hover table-vertical-align-middle table-lists">
<thead>
<tr>
<th width="10px"><a href="/admin/listes?<?php echo $dataE; ?>&sort=active&direction=<?php echo $dd ?>">Active</a>
</th>
<th><a href="/admin/listes?<?php echo $dataE; ?>&sort=list_name&direction=<?php echo $dd ?>"><i
class="fa fa-list"></i> Nom</a></th>
<th><a href="/admin/listes?<?php echo $dataE; ?>&sort=list_changedate&direction=<?php echo $dd ?>"><i
class="fa fa-list"></i> Date</a></th>
<th><a href="/admin/listes?<?php echo $dataE; ?>&sort=campaign_name&direction=<?php echo $dd ?>"><i
class="fa fa-folder-open-o"></i>
Campagne</a></th>
<th><i class="fa fa-user"></i> Contacts</th>
<th width="30%"><i class="fa fa-bolt"></i> Traitement</th>
<th width="70px" class="actions"><i class="fa fa-gears"></i> Actions</th>
</tr>
</thead>
<tbody>
<?php
while ($rowL = mysqli_fetch_assoc($rsltCC)) {
// $rowL = mysqli_fetch_assoc($rsltL);
$stmt = "SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id,reset_time,local_call_time from vicidial_lists vls,vicidial_list vl where vls.list_id=" . $rowL['list_id'] . " and vls.list_id=vl.list_id group by list_id";
$rslt = mysql_to_mysqli($stmt, $link);
$row = mysqli_fetch_assoc($rslt);
$campaign = getCampaignInfos($rowL['campaign_id']);
$notcalled = getNombreLeadNotCalled($rowL['list_id']);
$called = $row['tally'] - $notcalled;
// echo '<pre>'; print_r($row); echo '</pre>';
$pcalled = ($called * 100) / $row['tally'];
$pcalled = number_format((float)$pcalled, 2, '.', '');
$pnotcalled = 100 - $pcalled;
?>
<tr>
<td>
<input type="checkbox" <?php echo ($rowL['active'] == 'Y') ? "checked='checked'" : ""; ?>
id="<?php echo $rowL['list_id'] ?>"
meta-list-name="<?php echo $rowL['list_name'] ?>" class="i-checks check_list">
</td>
<td><strong><a href="/admin/edit_liste?listID=<?php echo $rowL['list_id'] ?>"><?php echo $rowL['list_name'] ?></a></strong></td>
<td><strong><?php echo date('d/m/Y H:i', strtotime($rowL['list_changedate'])); ?></strong></td>
<td><?php echo $campaign['campaign_name'] ?></td>
<td>
<span class="lists-contacts-label label label-success"><?php echo $called ?></span>
/
<span class="lists-contacts-label label label-primary"><?php echo ($row['tally']) ? $row['tally'] : 0; ?></span>
</td>
<td class="liste-table-td-progress">
<div class="progress listes-appels">
<div class="progress-bar progress-bar-danger" style="width: <?php echo $pcalled; ?>%;">
<small><?php echo $pcalled; ?>%</small>
</div>
<div class="progress-bar progress-bar-success" style="width: <?php echo $pnotcalled; ?>%;">
<small><?php echo $pnotcalled; ?>%</small>
</div>
</div>
</td>
<td class="actions">
<div class="dropdown btn-group">
<a class="btn btn-xs btn-outline btn-info dropdown-toggle" data-toggle="dropdown" href="#">
Action <span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<?php if ($profil != 'superviseur' or $rowPr['recycler_leads']) : ?>
<li>
<a
href="/admin/recyclage_list?listID=<?php echo $rowL['list_id'] ?>"><i
class="fa fa-refresh"></i> Recycler</a>
</li>
<?php endif; ?>
<?php if ($profil != 'superviseur' or $rowPr['update_list']) : ?>
<li>
<a
href="/admin/edit_liste?listID=<?php echo $rowL['list_id'] ?>"><i
class="fa fa-pencil"></i> Editer</a></li>
<?php endif; ?>
<?php if ($profil != 'superviseur' or $rowPr['importer_leads']) : ?>
<li>
<a
href="/admin/import_list?listID=<?php echo $rowL['list_id'] ?>"><i
class="fa fa-plus"></i> Importer</a>
</li>
<?php endif; ?>
<?php if ($profil != 'superviseur' or $rowPr['exporter_leads']) : ?>
<li>
<a
href="/admin/export_list?listID=<?php echo $rowL['list_id'] ?>"><i
class="fa fa-download"></i> Exporter</a>
</li>
<?php endif; ?>
<?php if ($profil != 'superviseur' or $rowPr['delete_list']) : ?>
<li>
<a href="/admin/remove_list?listID=<?php echo $rowL['list_id'] ?>"
class="removeList"><i
class="fa fa-times-circle"></i> Supprimer</a></li>
<?php endif; ?>
</ul>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<div class="hr-line-dashed"></div>
<div class="text-left row">
<?php
$dataT = $data;
unset($dataT['page']);
$dataE = http_build_query($dataT);
?>
<div class="col-md-9">
<?php
echo paginate('/admin/listes?' . $dataE, "&page=", $number_of_page, $page, 3);
?>
</div>
<div class="col-md-3 text-right">
<small> Afficher <?php echo $page; ?> <?php echo $number_of_page; ?> sur
<b><?php echo $lists_to_print ?></b> total </small>
</div>
</div>
</div>
<?php
require "\x6e\x65\x77\137\x66\x6f\x6f\x74\145\x72\x2e\160\150\160";
?>
Function Calls
None |
Stats
MD5 | 4df1fce95bf469d86f12fee7da726016 |
Eval Count | 0 |
Decode Time | 167 ms |