4.2 vars.php fix notify errors (#2248)
* 4.2 vars.php fix notify errors * Update vars.php
This commit is contained in:
+19
-15
@@ -17,22 +17,26 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
|
||||||
require_once "resources/require.php";
|
//includes
|
||||||
require_once "resources/check_auth.php";
|
include "root.php";
|
||||||
if (permission_exists('var_view')) {
|
require_once "resources/require.php";
|
||||||
//access granted
|
require_once "resources/check_auth.php";
|
||||||
}
|
|
||||||
else {
|
//check permissions
|
||||||
echo "access denied";
|
if (permission_exists('var_view')) {
|
||||||
exit;
|
//access granted
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
@@ -110,9 +114,9 @@ else {
|
|||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
$prev_var_cat = '';
|
$prev_var_cat = '';
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$var_value = $row[var_value];
|
$var_value = $row['var_value'];
|
||||||
$var_value = substr($var_value, 0, 50);
|
$var_value = substr($var_value, 0, 50);
|
||||||
if ($prev_var_cat != $row[var_cat]) {
|
if ($prev_var_cat != $row['var_cat']) {
|
||||||
$c=0;
|
$c=0;
|
||||||
if (strlen($prev_var_cat) > 0) {
|
if (strlen($prev_var_cat) > 0) {
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
@@ -166,7 +170,7 @@ else {
|
|||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
$prev_var_cat = $row[var_cat];
|
$prev_var_cat = $row['var_cat'];
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
} //end foreach
|
} //end foreach
|
||||||
unset($sql, $result, $row_count);
|
unset($sql, $result, $row_count);
|
||||||
@@ -194,4 +198,4 @@ else {
|
|||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user