Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
commit
f91622f918
|
|
@ -555,32 +555,35 @@ require_once "resources/require.php";
|
|||
echo "<select id='device_template' name='device_template' class='formfld'>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
|
||||
if ($dh = opendir($template_dir)) {
|
||||
while($dir = readdir($dh)) {
|
||||
if($file != "." && $dir != ".." && $dir[0] != '.') {
|
||||
if(is_dir($template_dir . "/" . $dir)) {
|
||||
echo "<optgroup label='$dir'>";
|
||||
if($dh_sub = opendir($template_dir.'/'.$dir)) {
|
||||
while($dir_sub = readdir($dh_sub)) {
|
||||
if($file_sub != '.' && $dir_sub != '..' && $dir_sub[0] != '.') {
|
||||
if(is_dir($template_dir . '/' . $dir .'/'. $dir_sub)) {
|
||||
if ($device_template == $dir."/".$dir_sub) {
|
||||
echo "<option value='".$dir."/".$dir_sub."' selected='selected'>".$dir."/".$dir_sub."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='".$dir."/".$dir_sub."'>".$dir."/".$dir_sub."</option>\n";
|
||||
if (is_dir($template_dir)) {
|
||||
$templates = scandir($template_dir);
|
||||
foreach($templates as $dir) {
|
||||
if($file != "." && $dir != ".." && $dir[0] != '.') {
|
||||
if(is_dir($template_dir . "/" . $dir)) {
|
||||
echo "<optgroup label='$dir'>";
|
||||
$dh_sub=$template_dir . "/" . $dir;
|
||||
if(is_dir($dh_sub)) {
|
||||
$templates_sub = scandir($dh_sub);
|
||||
foreach($templates_sub as $dir_sub) {
|
||||
if($file_sub != '.' && $dir_sub != '..' && $dir_sub[0] != '.') {
|
||||
if(is_dir($template_dir . '/' . $dir .'/'. $dir_sub)) {
|
||||
if ($device_template == $dir."/".$dir_sub) {
|
||||
echo "<option value='".$dir."/".$dir_sub."' selected='selected'>".$dir."/".$dir_sub."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='".$dir."/".$dir_sub."'>".$dir."/".$dir_sub."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dh_sub);
|
||||
}
|
||||
closedir($dh_sub);
|
||||
echo "</optgroup>";
|
||||
}
|
||||
echo "</optgroup>";
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-device_template']."\n";
|
||||
|
|
|
|||
|
|
@ -1258,13 +1258,16 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$template_dir = $device->get_template_dir();
|
||||
echo "<select id='device_template' name='device_template' class='formfld'>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
if($dh = opendir($template_dir)) {
|
||||
while($dir = readdir($dh)) {
|
||||
if (is_dir($template_dir)) {
|
||||
$templates = scandir($template_dir);
|
||||
foreach($templates as $dir) {
|
||||
if($file != "." && $dir != ".." && $dir[0] != '.') {
|
||||
if(is_dir($template_dir . "/" . $dir)) {
|
||||
echo "<optgroup label='$dir'>";
|
||||
if($dh_sub = opendir($template_dir.'/'.$dir)) {
|
||||
while($dir_sub = readdir($dh_sub)) {
|
||||
$dh_sub=$template_dir . "/" . $dir;
|
||||
if(is_dir($dh_sub)) {
|
||||
$templates_sub = scandir($dh_sub);
|
||||
foreach($templates_sub as $dir_sub) {
|
||||
if($file_sub != '.' && $dir_sub != '..' && $dir_sub[0] != '.') {
|
||||
if(is_dir($template_dir . '/' . $dir .'/'. $dir_sub)) {
|
||||
if ($device_template == $dir."/".$dir_sub) {
|
||||
|
|
|
|||
|
|
@ -3017,16 +3017,26 @@ programablekey.1.label =
|
|||
#expansion_module.x.key.y.label =
|
||||
#expansion_module.X.key.Y.xml_phonebook =
|
||||
|
||||
{$rownum = 1}
|
||||
|
||||
{foreach $keys as $row}
|
||||
{if $row.device_key_category == "expansion"}
|
||||
#Expansion module 1 key {$row.device_key_id}
|
||||
{if $rownum <= 40}
|
||||
expansion_module.1.key.{$row.device_key_id}.type = {$row.device_key_type}
|
||||
expansion_module.1.key.{$row.device_key_id}.line = {$row.device_key_line}
|
||||
expansion_module.1.key.{$row.device_key_id}.value = {$row.device_key_value}
|
||||
expansion_module.1.key.{$row.device_key_id}.extension = {$row.device_key_extension}
|
||||
expansion_module.1.key.{$row.device_key_id}.label = {$row.device_key_label}
|
||||
expansion_module.1.key.{$row.device_key_id}.xml_phonebook =
|
||||
|
||||
expansion_module.1.key.{$row.device_key_id}.xml_phonebook =
|
||||
{else}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.type = {$row.device_key_type}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.line = {$row.device_key_line}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.value = {$row.device_key_value}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.extension = {$row.device_key_extension}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.label = {$row.device_key_label}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.xml_phonebook =
|
||||
{/if}
|
||||
{$rownum = $rownum + 1}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue