diff --git a/app/sip_profiles/app_languages.php b/app/sip_profiles/app_languages.php new file mode 100644 index 0000000000..5787e1535c --- /dev/null +++ b/app/sip_profiles/app_languages.php @@ -0,0 +1,50 @@ + \ No newline at end of file diff --git a/app/sip_profiles/sip_profile_copy.php b/app/sip_profiles/sip_profile_copy.php index f43f252865..61e1ff2b2e 100644 --- a/app/sip_profiles/sip_profile_copy.php +++ b/app/sip_profiles/sip_profile_copy.php @@ -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 "\n"; echo "
| Settings | \n"; + echo "".$text['header_settings']." | \n"; echo "\n"; echo " |
| \n";
- //echo " Settings. \n"; - //echo " | \n";
- //echo " ||
| \n"; if (permission_exists('sip_profile_add')) { - echo " $v_link_label_add\n"; + echo " $v_link_label_add\n"; } echo " | \n"; echo "|||||
| ".$row['sip_profile_setting_name']." | \n"; echo "".$row['sip_profile_setting_value']." | \n"; - echo "".$row['sip_profile_setting_enabled']." | \n"; + echo "".(($row['sip_profile_setting_enabled'] == 'true') ? $text['option-true'] : $text['option-false'])." | \n"; echo "".$row['sip_profile_setting_description']." | \n"; echo "\n"; if (permission_exists('sip_profile_edit')) { - echo " $v_link_label_edit\n"; + echo " $v_link_label_edit\n"; } if (permission_exists('sip_profile_delete')) { - echo " $v_link_label_delete\n"; + echo " $v_link_label_delete\n"; } echo " | \n"; echo "$paging_controls | \n"; echo "\n"; if (permission_exists('sip_profile_add')) { - echo " $v_link_label_add\n"; + echo " $v_link_label_add\n"; } echo " | \n"; echo " \n"; diff --git a/app/sip_profiles/sip_profile_settings_delete.php b/app/sip_profiles/sip_profile_settings_delete.php index 507e27bfda..49d3eca056 100644 --- a/app/sip_profiles/sip_profile_settings_delete.php +++ b/app/sip_profiles/sip_profile_settings_delete.php @@ -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 "\n"; echo "
| Setting | \n"; - echo "\n"; + echo " | ".$text['header-setting']." | \n"; + echo "\n"; echo " |
| \n"; @@ -194,59 +201,59 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " | |||
| \n"; - echo " Name:\n"; + echo " ".$text['label-setting_name'].":\n"; echo " | \n"; echo "\n";
echo " \n";
echo " \n"; - echo "Enter the name.\n"; + echo $text['description-setting_name']."\n"; echo " | \n";
echo "||
| \n"; - echo " Value:\n"; + echo " ".$text['label-setting_value'].":\n"; echo " | \n"; echo "\n";
echo " \n";
echo " \n"; - echo "Enter the value.\n"; + echo $text['description-setting_value']."\n"; echo " | \n";
echo "||
| \n"; - echo " Enabled:\n"; + echo " ".$text['label-setting_enabled'].":\n"; echo " | \n"; echo "\n";
echo " \n";
echo " \n"; - echo "Choose to enable or disable this.\n"; + echo $text['description-setting_enabled']."\n"; echo " | \n";
echo "||
| \n"; - echo " Description:\n"; + echo " ".$text['label-setting_description'].":\n"; echo " | \n"; echo "\n";
echo " \n";
echo " \n"; - echo "Enter the description.\n"; + echo $text['description-setting_description']."\n"; echo " | \n";
echo "||
| Sip Profiles | \n"; + echo "".$text['header-sip_profiles']." | \n"; echo "\n"; echo " |
| \n";
- echo " Manage settings for SIP profiles. \n"; + echo " ".$text['description-sip_profiles']." \n"; echo " | \n";
echo " ||
| Description | \n"; + echo th_order_by('sip_profile_name', $text['label-name'], $order_by, $order); + echo "".$text['label-description']." | \n"; echo "\n"; if (permission_exists('sip_profile_add')) { - echo " $v_link_label_add\n"; + echo " $v_link_label_add\n"; } echo " | \n"; echo "
|---|---|---|
| ".$row['sip_profile_description']." | \n"; echo "\n"; if (permission_exists('sip_profile_edit')) { - echo " $v_link_label_edit\n"; + echo " $v_link_label_edit\n"; } if (permission_exists('sip_profile_delete')) { - echo " $v_link_label_delete\n"; + echo " $v_link_label_delete\n"; } echo " | \n"; echo "$paging_controls | \n"; echo "\n"; if (permission_exists('sip_profile_add')) { - echo " $v_link_label_add\n"; + echo " $v_link_label_add\n"; } echo " | \n"; echo " \n"; diff --git a/app/sip_profiles/sip_profiles_delete.php b/app/sip_profiles/sip_profiles_delete.php index 53af4e4828..0d67627984 100644 --- a/app/sip_profiles/sip_profiles_delete.php +++ b/app/sip_profiles/sip_profiles_delete.php @@ -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 "\n"; echo "
| Sip Profile | \n"; + echo "".$text['header-sip_profile']." | \n"; echo "\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo " | \n"; echo "
| \n";
- echo "Manage settings for the SIP profile. \n"; + echo $text['description-sip_profiles']." \n"; echo " | \n";
echo "||
| \n"; - echo " Name:\n"; + echo " ".$text['label-name'].":\n"; echo " | \n"; echo "\n";
echo " \n";
echo " \n"; - echo "Enter the SIP Profile name.\n"; + echo $text['description-name']."\n"; echo " | \n";
echo "|
| \n"; - echo " Description:\n"; + echo " ".$text['label-description'].":\n"; echo " | \n"; echo "\n";
echo " \n";
echo " \n"; - echo "Enter the description.\n"; + echo $text['description-description']."\n"; echo " | \n";
echo "|