aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch/freeswitch_ivr.tmp
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-05-14 23:47:20 -0600
committermcrane <mctch@yahoo.com>2009-05-14 23:48:34 -0600
commit0e432ea1d03bc9e0093498d887a03ac89f3e6baa (patch)
treec521558c071334afe5e9ec20af4a65d9d61edac2 /config/freeswitch/freeswitch_ivr.tmp
parentc78b004d166bb8ead6c1d9e5984f55f0fd97f866 (diff)
downloadpfsense-packages-0e432ea1d03bc9e0093498d887a03ac89f3e6baa.tar.gz
pfsense-packages-0e432ea1d03bc9e0093498d887a03ac89f3e6baa.tar.bz2
pfsense-packages-0e432ea1d03bc9e0093498d887a03ac89f3e6baa.zip
FreeSWITCH package make sure xml config file are deleted when they are deleted in the GUI
Diffstat (limited to 'config/freeswitch/freeswitch_ivr.tmp')
-rw-r--r--config/freeswitch/freeswitch_ivr.tmp42
1 files changed, 8 insertions, 34 deletions
diff --git a/config/freeswitch/freeswitch_ivr.tmp b/config/freeswitch/freeswitch_ivr.tmp
index 38309ab5..67084f07 100644
--- a/config/freeswitch/freeswitch_ivr.tmp
+++ b/config/freeswitch/freeswitch_ivr.tmp
@@ -40,6 +40,7 @@ $a_ivr = &$config['installedpackages']['freeswitchivr']['config'];
if ($_GET['act'] == "del") {
if ($_GET['type'] == 'ivr') {
if ($a_ivr[$_GET['id']]) {
+ unlink("/usr/local/freeswitch/scripts/ivr_".$_GET['ivrid'].".js");
unset($a_ivr[$_GET['id']]);
write_config();
sync_package_freeswitch_ivr();
@@ -73,37 +74,7 @@ display_top_tabs(build_menu());
<td class="tabcont" >
<form action="freeswitch_ivr.php" method="post" name="iform" id="iform">
-<?php
-
-
-//echo "<pre>";
-//print_r ($a_ivr);
-//echo "</pre>";
-
-//build a list of recordings from the config.xml
-//$config_recording_list = '';
-//$i = 0;
-//if (count($a_ivr) > 0) {
-// foreach ($a_ivr as $ivrent) {
-// $config_recording_list .= $ivrent['filename']."|";
-// $i++;
-// }
-//}
-//echo "config recording list: ".$config_recording_list."<br />\n";
-
-
-//if ($config_change == 1) {
-// write_config();
-// $config_change = 0;
-//}
-//if ($savemsg) print_info_box($savemsg);
-//if (file_exists($d_hostsdirty_path)): echo"<p>";
-//print_info_box_np("The FreeSWITCH recordings have been changed.<br>You must apply the changes in order for them to take effect.");
-//echo"<br />";
-//endif;
-
-?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td><p><span class="vexpl"><span class="red"><strong>IVR<br />
@@ -130,20 +101,23 @@ display_top_tabs(build_menu());
</tr>
</table>
</td>
- </tr>
+ </tr>
- <?php
+ <?php
$i = 0;
if (count($a_ivr) > 0) {
foreach ($a_ivr as $ent) {
if (strlen($ent['ivrid']) > 0) {
+
+ $ivrid = str_replace(array("{", "}"), "", $ent['ivrid']);
+
?>
<tr>
<td class="listlr" ondblclick="document.location='freeswitch_ivr_edit.php?id=<?=$i;?>'">
<?=$ent['ivrextension']?>
</td>
<td class="listr" ondblclick="document.location='freeswitch_ivr_edit.php?id=<?=$i;?>';">
- <?=$ent['ivrname'];?>&nbsp;
+ <?=$ent['ivrname'];?>&nbsp;<?=$ent['ivrid'];?>&nbsp;
</td>
<td class="listbg" ondblclick="document.location='freeswitch_ivr_edit.php?id=<?=$i;?>';">
<font color="#FFFFFF"><?=htmlspecialchars($ent['ivrdescr']);?>&nbsp;
@@ -152,7 +126,7 @@ display_top_tabs(build_menu());
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="freeswitch_ivr_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td><a href="freeswitch_ivr.php?type=ivr&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td><a href="freeswitch_ivr.php?type=ivr&act=del&id=<?=$i;?>&ivrid=<?php echo $ivrid; ?>" onclick="return confirm('Do you really want to delete this?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>