mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Multilinguified Variables.
This commit is contained in:
@@ -34,8 +34,15 @@ else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//include the header
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-variables_advanced'];
|
||||
|
||||
//restore the default vars.xml
|
||||
if ($_GET['a'] == "default" && permission_exists('variables_edit')) {
|
||||
@@ -43,7 +50,7 @@ if ($_GET['a'] == "default" && permission_exists('variables_edit')) {
|
||||
$fd = fopen($_SESSION['switch']['conf']['dir'].".orig/vars.xml", "r");
|
||||
$v_content = fread($fd, filesize($_SESSION['switch']['conf']['dir'].".orig/vars.xml"));
|
||||
fclose($fd);
|
||||
|
||||
|
||||
//write the default config fget
|
||||
$fd = fopen($_SESSION['switch']['conf']['dir']."/vars.xml", "w");
|
||||
fwrite($fd, $v_content);
|
||||
@@ -66,16 +73,16 @@ if ($_GET['a'] == "default" && permission_exists('variables_edit')) {
|
||||
fclose($fd);
|
||||
|
||||
//edit area
|
||||
echo " <script language=\"javascript\" type=\"text/javascript\" src=\"/edit_area/edit_area_full.js\"></script>\n";
|
||||
echo " <script language=\"javascript\" type=\"text/javascript\" src=\"/includes/edit_area/edit_area_full.js\"></script>\n";
|
||||
echo " <script language=\"Javascript\" type=\"text/javascript\">\n";
|
||||
echo " // initialisation //load,\n";
|
||||
echo " editAreaLoader.init({\n";
|
||||
echo " id: \"code\" // id of the textarea to transform //, |, help\n";
|
||||
echo " ,start_highlight: true\n";
|
||||
echo " ,font_size: \"8\"\n";
|
||||
echo " ,font_size: \"9\"\n";
|
||||
echo " ,allow_toggle: false\n";
|
||||
echo " ,language: \"en\"\n";
|
||||
echo " ,syntax: \"html\"\n";
|
||||
echo " ,syntax: \"xml\"\n";
|
||||
echo " ,toolbar: \"search, go_to_line,|, fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help\" //new_document,\n";
|
||||
echo " ,plugins: \"charmap\"\n";
|
||||
echo " ,charmap_default: \"arrows\"\n";
|
||||
@@ -88,21 +95,20 @@ if ($_GET['a'] == "default" && permission_exists('variables_edit')) {
|
||||
|
||||
<div align='center'>
|
||||
|
||||
<table width="90%" border="0" cellpadding="0" cellspacing="0">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="vars.php" method="post" name="iform" id="iform">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width='100%'><span class="vexpl"><span class="red"><strong>Variables<br>
|
||||
</strong></span>
|
||||
Define preprocessor variables here. Can be accessed in the xml configation with $${var_name}.
|
||||
<br />
|
||||
<br />
|
||||
<td width='100%'><span class="vexpl"><span class="red"><strong><?=$text['header-variables_advanced']?></strong></span>
|
||||
<br /><br />
|
||||
<?=$text['description-variables_advanced']?>
|
||||
<br /><br />
|
||||
</td>
|
||||
<td width='10%' align='right' valign='top'>
|
||||
<td align='right' valign='top'>
|
||||
<?php if (permission_exists('variables_edit')) { ?>
|
||||
<input type="submit" class='btn' value="save" />
|
||||
<input type="submit" class='btn' value="<?=$text['button-save']?>" />
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -128,7 +134,7 @@ if ($_GET['a'] == "default" && permission_exists('variables_edit')) {
|
||||
<input type="hidden" name="a" value="save" />
|
||||
<?php
|
||||
if (permission_exists('variables_edit')) {
|
||||
echo "<input type='button' class='btn' value='Restore Default' onclick=\"document.location.href='vars.php?a=default&f=vars.xml';\" />";
|
||||
echo "<input type='button' class='btn' value='".$text['button-restore']."' onclick=\"document.location.href='vars.php?a=default&f=vars.xml';\" />";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user