Update time_conditions.php
This commit is contained in:
parent
24e985fdec
commit
6e360176a1
|
|
@ -131,8 +131,7 @@
|
|||
$sql .= " limit $rows_per_page offset $offset ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
$dialplans = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//show the content
|
||||
|
|
@ -173,7 +172,7 @@
|
|||
echo "<input type='hidden' name='app_uuid' value='".escape($app_uuid)."'>\n";
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
if (permission_exists('dialplan_delete') && $result_count > 0) {
|
||||
if (permission_exists('time_condition_delete') && is_array($dialplans)) {
|
||||
echo "<th style='text-align: center;' style='text-align: center; padding: 3px 0px 0px 0px;' width='1'><input type='checkbox' onchange=\"(this.checked) ? check('all') : check('none');\"></th>";
|
||||
}
|
||||
echo th_order_by('dialplan_name', $text['label-name'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null));
|
||||
|
|
@ -194,8 +193,8 @@
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
if (is_array($dialplans)) {
|
||||
foreach($dialplans as $row) {
|
||||
$app_uuid = $row['app_uuid'];
|
||||
|
||||
$tr_link = "href='".PROJECT_PATH."/app/time_conditions/time_condition_edit.php?id=".escape($row['dialplan_uuid']).(($app_uuid != '') ? "&app_uuid=".escape($app_uuid) : null)."'";
|
||||
|
|
|
|||
Loading…
Reference in New Issue