Multilinguified SIP Profiles
This commit is contained in:
parent
1073ff0dd5
commit
42359137e8
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
//SIP Profiles
|
||||
|
||||
$text['title-sip_profiles']['en-us'] = 'SIP Profiles';
|
||||
$text['title-sip_profile']['en-us'] = 'SIP Profile';
|
||||
$text['title-setting']['en-us'] = 'Profile Setting';
|
||||
|
||||
$text['header-sip_profiles']['en-us'] = 'SIP Profiles';
|
||||
$text['header-sip_profile']['en-us'] = 'SIP Profile';
|
||||
$text['header_settings']['en-us'] = 'Settings';
|
||||
$text['header-setting']['en-us'] = 'Profile Setting';
|
||||
|
||||
$text['description-sip_profiles']['en-us'] = 'Manage settings for SIP profiles.';
|
||||
$text['description-sip_profile']['en-us'] = 'Manage settings for the SIP profile.';
|
||||
|
||||
$text['label-name']['en-us'] = 'Name';
|
||||
$text['label-description']['en-us'] = 'Description';
|
||||
$text['label-setting_name']['en-us'] = 'Name';
|
||||
$text['label-setting_value']['en-us'] = 'Value';
|
||||
$text['label-setting_enabled']['en-us'] = 'Enabled';
|
||||
$text['label-setting_description']['en-us'] = 'Description';
|
||||
|
||||
$text['description-name']['en-us'] = 'Enter the SIP Profile name.';
|
||||
$text['description-description']['en-us'] = 'Enter the description.';
|
||||
$text['description-setting_name']['en-us'] = 'Enter the name.';
|
||||
$text['description-setting_value']['en-us'] = 'Enter the value.';
|
||||
$text['description-setting_enabled']['en-us'] = 'Choose to enable or disable this.';
|
||||
$text['description-setting_description']['en-us'] = 'Enter the description.';
|
||||
|
||||
$text['option-true']['en-us'] = 'True';
|
||||
$text['option-false']['en-us'] = 'False';
|
||||
|
||||
$text['button-add']['en-us'] = 'Add';
|
||||
$text['button-edit']['en-us'] = 'Edit';
|
||||
$text['button-delete']['en-us'] = 'Delete';
|
||||
$text['button-back']['en-us'] = 'Back';
|
||||
$text['button-copy']['en-us'] = 'Copy';
|
||||
$text['button-save']['en-us'] = 'Save';
|
||||
|
||||
$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
|
||||
$text['confirm-copy']['en-us'] = 'Do you really want to copy this?';
|
||||
|
||||
$text['message-add']['en-us'] = 'Add Completed';
|
||||
$text['message-update']['en-us'] = 'Update Completed';
|
||||
$text['message-delete']['en-us'] = 'Delete Completed';
|
||||
$text['message-copy']['en-us'] = 'Copy Completed';
|
||||
$text['message-required']['en-us'] = 'Please provide: ';
|
||||
|
||||
?>
|
||||
|
|
@ -27,9 +27,9 @@ include "root.php";
|
|||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "includes/paging.php";
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('outbound_route_add')
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('outbound_route_add')
|
||||
|| permission_exists('time_conditions_add')) {
|
||||
//access granted
|
||||
}
|
||||
|
|
@ -38,12 +38,18 @@ else {
|
|||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//set the http get/post variable(s) to a php variable
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$sip_profile_uuid = check_str($_REQUEST["id"]);
|
||||
}
|
||||
|
||||
//get the sip profile data
|
||||
//get the sip profile data
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
$sql = "select * from v_sip_profiles ";
|
||||
$sql .= "where sip_profile_uuid = '$sip_profile_uuid' ";
|
||||
|
|
@ -120,7 +126,7 @@ else {
|
|||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/sip_profiles/sip_profiles.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Copy Complete\n";
|
||||
echo $text['message-copy']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -49,14 +49,9 @@ require_once "includes/paging.php";
|
|||
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' width='50%' nowrap='nowrap'><b>Settings</b></td>\n";
|
||||
echo " <td align='left' width='50%' nowrap='nowrap'><b>".$text['header_settings']."</b></td>\n";
|
||||
echo " <td width='50%' align='right'> </td>\n";
|
||||
echo " </tr>\n";
|
||||
//echo " <tr>\n";
|
||||
//echo " <td align='left' colspan='2'>\n";
|
||||
//echo " Settings.<br /><br />\n";
|
||||
//echo " </td>\n";
|
||||
//echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
//prepare to page the results
|
||||
|
|
@ -79,9 +74,9 @@ require_once "includes/paging.php";
|
|||
$rows_per_page = 200;
|
||||
$param = "";
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the sip_profile list
|
||||
$sql = "select * from v_sip_profile_settings ";
|
||||
|
|
@ -100,13 +95,13 @@ require_once "includes/paging.php";
|
|||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('sip_profile_setting_name', 'Name', $order_by, $order);
|
||||
echo th_order_by('sip_profile_setting_value', 'Value', $order_by, $order);
|
||||
echo th_order_by('sip_profile_setting_enabled', 'Enabled', $order_by, $order);
|
||||
echo th_order_by('sip_profile_setting_description', 'Description', $order_by, $order);
|
||||
echo th_order_by('sip_profile_setting_name', $text['label-setting_name'], $order_by, $order);
|
||||
echo th_order_by('sip_profile_setting_value', $text['label-setting_value'], $order_by, $order);
|
||||
echo th_order_by('sip_profile_setting_enabled', $text['label-setting_enabled'], $order_by, $order);
|
||||
echo th_order_by('sip_profile_setting_description', $text['label-setting_description'], $order_by, $order);
|
||||
echo "<td align='right' width='42'>\n";
|
||||
if (permission_exists('sip_profile_add')) {
|
||||
echo " <a href='sip_profile_settings_edit.php?sip_profile_uuid=".$_GET['id']."' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='sip_profile_settings_edit.php?sip_profile_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -115,14 +110,14 @@ require_once "includes/paging.php";
|
|||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['sip_profile_setting_name']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['sip_profile_setting_value']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['sip_profile_setting_enabled']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".(($row['sip_profile_setting_enabled'] == 'true') ? $text['option-true'] : $text['option-false'])." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['sip_profile_setting_description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('sip_profile_edit')) {
|
||||
echo " <a href='sip_profile_settings_edit.php?sip_profile_uuid=".$row['sip_profile_uuid']."&id=".$row['sip_profile_setting_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='sip_profile_settings_edit.php?sip_profile_uuid=".$row['sip_profile_uuid']."&id=".$row['sip_profile_setting_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('sip_profile_delete')) {
|
||||
echo " <a href='sip_profile_settings_delete.php?sip_profile_uuid=".$row['sip_profile_uuid']."&id=".$row['sip_profile_setting_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='sip_profile_settings_delete.php?sip_profile_uuid=".$row['sip_profile_uuid']."&id=".$row['sip_profile_setting_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
|
@ -139,7 +134,7 @@ require_once "includes/paging.php";
|
|||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
if (permission_exists('sip_profile_add')) {
|
||||
echo " <a href='sip_profile_settings_edit.php?sip_profile_uuid=".$_GET['id']."' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='sip_profile_settings_edit.php?sip_profile_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ else {
|
|||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
$sip_profile_uuid = check_str($_GET["sip_profile_uuid"]);
|
||||
|
|
@ -58,7 +64,7 @@ if (strlen($id)>0) {
|
|||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=sip_profiles_edit.php?id=$sip_profile_uuid\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Delete Complete\n";
|
||||
echo $text['message-delete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ else {
|
|||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//action add or update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
|
|
@ -63,10 +69,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
|
||||
//check for all required data
|
||||
//if (strlen($sip_profile_setting_name) == 0) { $msg .= "Please provide: Name<br>\n"; }
|
||||
//if (strlen($sip_profile_setting_value) == 0) { $msg .= "Please provide: Value<br>\n"; }
|
||||
//if (strlen($sip_profile_setting_enabled) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
|
||||
//if (strlen($sip_profile_setting_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
//if (strlen($sip_profile_setting_name) == 0) { $msg .= $text['message-required'].$text['label-setting_name']."<br>\n"; }
|
||||
//if (strlen($sip_profile_setting_value) == 0) { $msg .= $text['message-required'].$text['label-setting_value']."<br>\n"; }
|
||||
//if (strlen($sip_profile_setting_enabled) == 0) { $msg .= $text['message-required'].$text['label-setting_enabled']."<br>\n"; }
|
||||
//if (strlen($sip_profile_setting_description) == 0) { $msg .= $text['message-required'].$text['label-setting_description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/persistformvar.php";
|
||||
|
|
@ -115,7 +121,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=sip_profiles_edit.php?id=$sip_profile_uuid\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Add Complete\n";
|
||||
echo $text['message-add']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
|
@ -143,12 +149,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=sip_profiles_edit.php?id=$sip_profile_uuid\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Update Complete\n";
|
||||
echo $text['message-update']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
|
|
@ -171,6 +177,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-setting'];
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
|
|
@ -183,8 +190,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>Setting</b></td>\n";
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='sip_profiles_edit.php?id=$sip_profile_uuid'\" value='Back'></td>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['header-setting']."</b></td>\n";
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='sip_profiles_edit.php?id=$sip_profile_uuid'\" value='".$text['button-back']."'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='2'>\n";
|
||||
|
|
@ -194,59 +201,59 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Name:\n";
|
||||
echo " ".$text['label-setting_name'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='sip_profile_setting_name' maxlength='255' value=\"$sip_profile_setting_name\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the name.\n";
|
||||
echo $text['description-setting_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Value:\n";
|
||||
echo " ".$text['label-setting_value'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='sip_profile_setting_value' maxlength='255' value=\"$sip_profile_setting_value\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the value.\n";
|
||||
echo $text['description-setting_value']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Enabled:\n";
|
||||
echo " ".$text['label-setting_enabled'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='sip_profile_setting_enabled'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($sip_profile_setting_enabled == "true" || strlen($sip_profile_setting_enabled) == 0) {
|
||||
echo " <option value='true' selected >true</option>\n";
|
||||
if ($sip_profile_setting_enabled == "true" || strlen($sip_profile_setting_enabled) == 0) {
|
||||
echo " <option value='true' selected >".$text['option-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>true</option>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
if ($sip_profile_setting_enabled == "false") {
|
||||
echo " <option value='false' selected >false</option>\n";
|
||||
if ($sip_profile_setting_enabled == "false") {
|
||||
echo " <option value='false' selected >".$text['option-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>false</option>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "Choose to enable or disable this.\n";
|
||||
echo $text['description-setting_enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Description:\n";
|
||||
echo " ".$text['label-setting_description'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='sip_profile_setting_description' maxlength='255' value=\"$sip_profile_setting_description\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the description.\n";
|
||||
echo $text['description-setting_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo " <tr>\n";
|
||||
|
|
@ -255,7 +262,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='sip_profile_setting_uuid' value='$sip_profile_setting_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
|
|
|
|||
|
|
@ -33,7 +33,16 @@ else {
|
|||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-sip_profiles'];
|
||||
|
||||
require_once "includes/paging.php";
|
||||
|
||||
//get variables used to control the order
|
||||
|
|
@ -49,12 +58,12 @@ require_once "includes/paging.php";
|
|||
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' width='50%' nowrap='nowrap'><b>Sip Profiles</b></td>\n";
|
||||
echo " <td align='left' width='50%' nowrap='nowrap'><b>".$text['header-sip_profiles']."</b></td>\n";
|
||||
echo " <td width='50%' align='right'> </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " Manage settings for SIP profiles.<br /><br />\n";
|
||||
echo " ".$text['description-sip_profiles']."<br /><br />\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
|
@ -78,9 +87,9 @@ require_once "includes/paging.php";
|
|||
$rows_per_page = 10;
|
||||
$param = "";
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_sip_profiles ";
|
||||
|
|
@ -99,11 +108,11 @@ require_once "includes/paging.php";
|
|||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('sip_profile_name', 'Name', $order_by, $order);
|
||||
echo "<th align='left' width='60%'>Description</th>\n";
|
||||
echo th_order_by('sip_profile_name', $text['label-name'], $order_by, $order);
|
||||
echo "<th align='left' width='60%'>".$text['label-description']."</th>\n";
|
||||
echo "<td align='right' width='42'>\n";
|
||||
if (permission_exists('sip_profile_add')) {
|
||||
echo " <a href='sip_profiles_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='sip_profiles_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
|
|
@ -115,10 +124,10 @@ require_once "includes/paging.php";
|
|||
echo " <td valign='top' class='row_stylebg'>".$row['sip_profile_description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('sip_profile_edit')) {
|
||||
echo " <a href='sip_profiles_edit.php?id=".$row['sip_profile_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='sip_profiles_edit.php?id=".$row['sip_profile_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('sip_profile_delete')) {
|
||||
echo " <a href='sip_profiles_delete.php?id=".$row['sip_profile_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='sip_profiles_delete.php?id=".$row['sip_profile_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
|
@ -135,7 +144,7 @@ require_once "includes/paging.php";
|
|||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
if (permission_exists('sip_profile_add')) {
|
||||
echo " <a href='sip_profiles_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='sip_profiles_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ else {
|
|||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
}
|
||||
|
|
@ -75,7 +81,7 @@ if (strlen($id)>0) {
|
|||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=sip_profiles.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Delete Complete\n";
|
||||
echo $text['message-delete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ else {
|
|||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//action add or update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
|
|
@ -57,8 +63,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
|
||||
//check for all required data
|
||||
//if (strlen($sip_profile_name) == 0) { $msg .= "Please provide: Name<br>\n"; }
|
||||
//if (strlen($sip_profile_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
//if (strlen($sip_profile_name) == 0) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
|
||||
//if (strlen($sip_profile_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/persistformvar.php";
|
||||
|
|
@ -113,11 +119,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=sip_profiles.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Update Complete\n";
|
||||
echo $text['message-update']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
|
|
@ -138,6 +144,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-sip_profile'];
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
|
|
@ -150,37 +157,37 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>Sip Profile</b></td>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['header-sip_profile']."</b></td>\n";
|
||||
echo "<td width='70%' align='right'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='copy' onclick=\"if (confirm('Do you really want to copy this?')){window.location='sip_profile_copy.php?id=".$sip_profile_uuid."';}\" value='Copy'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='sip_profiles.php'\" value='Back'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='sip_profile_copy.php?id=".$sip_profile_uuid."';}\" value='".$text['button-copy']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='sip_profiles.php'\" value='".$text['button-back']."'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' colspan='2'>\n";
|
||||
echo "Manage settings for the SIP profile.<br /><br />\n";
|
||||
echo $text['description-sip_profiles']."<br /><br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Name:\n";
|
||||
echo " ".$text['label-name'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='sip_profile_name' maxlength='255' value=\"$sip_profile_name\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the SIP Profile name.\n";
|
||||
echo $text['description-name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Description:\n";
|
||||
echo " ".$text['label-description'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='sip_profile_description' maxlength='255' value=\"$sip_profile_description\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the description.\n";
|
||||
echo $text['description-description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo " <tr>\n";
|
||||
|
|
@ -188,7 +195,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='sip_profile_uuid' value='$sip_profile_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
|
|
|
|||
Loading…
Reference in New Issue