aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch/freeswitch_vars.tmp
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-05-13 12:25:35 -0600
committermcrane <mctch@yahoo.com>2009-05-13 13:04:45 -0600
commit4d34902d09109f13bc95ee05066fda2b4501a935 (patch)
tree05a363ec69cac98474cdd6c3e75e9618dadbaf3c /config/freeswitch/freeswitch_vars.tmp
parent1d234ac49964955334883e42a15865528a34f648 (diff)
downloadpfsense-packages-4d34902d09109f13bc95ee05066fda2b4501a935.tar.gz
pfsense-packages-4d34902d09109f13bc95ee05066fda2b4501a935.tar.bz2
pfsense-packages-4d34902d09109f13bc95ee05066fda2b4501a935.zip
FreeSWITCH create lan sip profile during install, update dialplan, public, and var textareas, add set to default to the textareas, make the tab menu dynamic so it can be modified from one file rather than having to modify all php files.
Diffstat (limited to 'config/freeswitch/freeswitch_vars.tmp')
-rw-r--r--config/freeswitch/freeswitch_vars.tmp162
1 files changed, 162 insertions, 0 deletions
diff --git a/config/freeswitch/freeswitch_vars.tmp b/config/freeswitch/freeswitch_vars.tmp
new file mode 100644
index 00000000..00f2caca
--- /dev/null
+++ b/config/freeswitch/freeswitch_vars.tmp
@@ -0,0 +1,162 @@
+<?php
+/* $Id$ */
+/*
+ freeswitch_vars.php
+ Copyright (C) 2008 Mark J Crane
+ All rights reserved.
+
+ FreeSWITCH (TM)
+ http://www.freeswitch.org/
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+require("guiconfig.inc");
+require("/usr/local/pkg/freeswitch.inc");
+
+//$a_extensions = &$config['installedpackages']['freeswitchprofiles']['config'];
+
+if ($_GET['a'] == "default") {
+ conf_mount_rw();
+ exec("cp /usr/local/freeswitch/conf.orig/vars.xml /usr/local/freeswitch/conf/vars.xml");
+ $savemsg = "vars.xml: Set as Default";
+ conf_mount_ro();
+}
+
+if ($_POST['a'] == "save") {
+ conf_mount_rw();
+ $content = ereg_replace("\r","",$_POST['code']);
+ $fd = fopen("/usr/local/freeswitch/conf/vars.xml", "w");
+ fwrite($fd, $content);
+ fclose($fd);
+ $savemsg = "Saved text to the vars.xml";
+ conf_mount_ro();
+}
+
+
+$fd = fopen("/usr/local/freeswitch/conf/vars.xml", "r");
+$content = fread($fd, filesize("/usr/local/freeswitch/conf/vars.xml"));
+fclose($fd);
+
+include("head.inc");
+
+?>
+
+
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+
+<script language="Javascript">
+function sf() { document.forms[0].savetopath.focus(); }
+</script>
+<script language="Javascript" type="text/javascript" src="/edit_area/edit_area_full.js"></script>
+<script language="Javascript" type="text/javascript">
+ // initialisation
+ editAreaLoader.init({
+ id: "code" // id of the textarea to transform
+ ,start_highlight: false
+ ,allow_toggle: false
+ ,language: "en"
+ ,syntax: "html"
+ ,toolbar: "search, go_to_line,|, fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help"
+ ,syntax_selection_allow: "css,html,js,php,xml,c,cpp,sql"
+ ,show_line_colors: true
+ });
+</script>
+
+<?php include("fbegin.inc"); ?>
+<p class="pgtitle">FreeSWITCH: Variables</p>
+
+<div id="mainlevel">
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr><td class="tabnavtbl">
+<?php
+
+display_top_tabs(build_menu());
+
+?>
+</td></tr>
+</table>
+
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="tabcont" >
+
+<form action="freeswitch_vars.php" method="post" name="iform" id="iform">
+<?php
+
+?>
+ <table width="98%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td width='90%'><p><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}.
+ </p>
+ </td>
+ <td width='10%' align='right' valign='middle'><input type="submit" value="save" /></td>
+ </tr>
+ </table>
+ <br />
+ <br />
+
+ <textarea style="width:98%" id="code" name="code" rows="30" cols="<?php echo $cols; ?>" name="content"><?php echo htmlentities($content); ?></textarea>
+ <br />
+ <br />
+
+ <table width="98%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td>/usr/local/freeswitch/conf/vars.xml</td>
+ <td align='right'>
+ <input type="hidden" name="f" value="<?php echo $_GET['f']; ?>" />
+ <input type="hidden" name="a" value="save" />
+ <?php
+ echo "<input type='button' value='Set as Default' onclick=\"document.location.href='/packages/freeswitch/freeswitch_vars.php?a=default&f=vars.xml';\" />";
+ ?>
+ </td>
+ </tr>
+ </table>
+
+</form>
+
+<br>
+<br>
+
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+
+</td>
+</tr>
+</table>
+
+</div>
+
+
+
+<?php include("fend.inc"); ?>
+</body>
+</html>