mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update time_condition_edit.php
Fix the time condition edit and improve the indentation on the code.
This commit is contained in:
@@ -23,18 +23,20 @@
|
|||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
|
||||||
require_once "resources/require.php";
|
|
||||||
require_once "resources/check_auth.php";
|
|
||||||
if (permission_exists('time_condition_add') || permission_exists('time_condition_edit')) {
|
|
||||||
//access granted
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "access denied";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
require_once "resources/header.php";
|
|
||||||
|
|
||||||
|
//includes
|
||||||
|
include "root.php";
|
||||||
|
require_once "resources/require.php";
|
||||||
|
require_once "resources/check_auth.php";
|
||||||
|
|
||||||
|
//check permissions
|
||||||
|
if (permission_exists('time_condition_add') || permission_exists('time_condition_edit')) {
|
||||||
|
//access granted
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
@@ -554,6 +556,9 @@ require_once "resources/header.php";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//include the header
|
||||||
|
require_once "resources/header.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -803,7 +808,6 @@ echo " <tr>\n";
|
|||||||
echo " <td align='left' valign='top'>\n";
|
echo " <td align='left' valign='top'>\n";
|
||||||
echo " <span class='title'>".$text['title-time_conditions']."</span>";
|
echo " <span class='title'>".$text['title-time_conditions']."</span>";
|
||||||
echo " <br /><br />\n";
|
echo " <br /><br />\n";
|
||||||
echo " ".$text['description-time_conditions']."\n";
|
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td align='right' valign='top'>\n";
|
echo " <td align='right' valign='top'>\n";
|
||||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='".PROJECT_PATH."/app/time_conditions/time_conditions.php?app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-back']."'>\n";
|
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='".PROJECT_PATH."/app/time_conditions/time_conditions.php?app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-back']."'>\n";
|
||||||
@@ -813,6 +817,11 @@ if (if_group("superadmin") && $action == 'update') {
|
|||||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
echo " <tr>\n";
|
||||||
|
echo " <td colspan='2'>\n";
|
||||||
|
echo " ".$text['description-time_conditions']."\n";
|
||||||
|
echo " </td>\n";
|
||||||
|
echo " </tr>\n";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
|
|
||||||
@@ -1048,68 +1057,68 @@ if ($action == 'update') {
|
|||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td id='td_alt_dest' class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td id='td_alt_dest' class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-alternate-destination']."\n";
|
echo " ".$text['label-alternate-destination']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo $destination->select('dialplan', 'dialplan_anti_action', $dialplan_anti_action);
|
echo $destination->select('dialplan', 'dialplan_anti_action', $dialplan_anti_action);
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-order']."\n";
|
echo " ".$text['label-order']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select name='dialplan_order' class='formfld'>\n";
|
echo " <select name='dialplan_order' class='formfld'>\n";
|
||||||
for ($i = 300; $i <= 999; $i += 10) {
|
for ($i = 300; $i <= 999; $i += 10) {
|
||||||
$padded_i = str_pad($i, 3, '0', STR_PAD_LEFT);
|
$padded_i = str_pad($i, 3, '0', STR_PAD_LEFT);
|
||||||
$selected = ($dialplan_order == $i) ? "selected='selected'" : null;
|
$selected = ($dialplan_order == $i) ? "selected='selected'" : null;
|
||||||
echo "<option value='".$padded_i."' ".$selected.">".$padded_i."</option>\n";
|
echo "<option value='".$padded_i."' ".$selected.">".$padded_i."</option>\n";
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-enabled']."\n";
|
echo " ".$text['label-enabled']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo "<select class='formfld' name='dialplan_enabled'>\n";
|
echo "<select class='formfld' name='dialplan_enabled'>\n";
|
||||||
echo " <option value='true' ".(($dialplan_enabled == "true") ? "selected='selected'" : null).">".$text['label-true']."</option>\n";
|
echo " <option value='true' ".(($dialplan_enabled == "true") ? "selected='selected'" : null).">".$text['label-true']."</option>\n";
|
||||||
echo " <option value='false' ".(($dialplan_enabled == "false") ? "selected='selected'" : null).">".$text['label-false']."</option>\n";
|
echo " <option value='false' ".(($dialplan_enabled == "false") ? "selected='selected'" : null).">".$text['label-false']."</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-description']."\n";
|
echo " ".$text['label-description']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td colspan='4' class='vtable' align='left'>\n";
|
echo "<td colspan='4' class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='dialplan_description' maxlength='255' value=\"".$dialplan_description."\">\n";
|
echo " <input class='formfld' type='text' name='dialplan_description' maxlength='255' value=\"".$dialplan_description."\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
echo "<div align='right'>\n";
|
echo "<div align='right'>\n";
|
||||||
if ($action == "update") {
|
if ($action == "update") {
|
||||||
echo " <input type='hidden' name='dialplan_uuid' value='".$dialplan_uuid."'>\n";
|
echo " <input type='hidden' name='dialplan_uuid' value='".$dialplan_uuid."'>\n";
|
||||||
}
|
}
|
||||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user