From a4a1faf334e949b96bb964332c3c1a55205a8bce Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Wed, 17 Jul 2013 10:50:59 +1000 Subject: [PATCH] Added admin enable / disable settings --- admin/index.php | 1 + admin/supervisorchat.php | 83 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 admin/supervisorchat.php diff --git a/admin/index.php b/admin/index.php index b1bb7a63..5446df0b 100644 --- a/admin/index.php +++ b/admin/index.php @@ -101,6 +101,7 @@ print ""; if (VOIP_ENABLED) diff --git a/admin/supervisorchat.php b/admin/supervisorchat.php new file mode 100644 index 00000000..7e62f808 --- /dev/null +++ b/admin/supervisorchat.php @@ -0,0 +1,83 @@ + + * @copyright Australian Consortium for Social and Political Research Incorporated (ACSPRI) 2013 + * @package queXS + * @subpackage admin + * @link http://www.acspri.org.au/ queXS was writen for ACSPRI + * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 + * + * + */ + +/** + * Configuration file + */ +include("../config.inc.php"); + +/** + * Database file + */ +include ("../db.inc.php"); + +/** + * XHTML functions + */ +include("../functions/functions.xhtml.php"); + + +if (isset($_POST['update'])) +{ + set_setting("bosh_service",$_POST['bosh']); + set_setting("supervisor_xmpp",$_POST['supervisor']); + $enable = false; + + if (isset($_POST['enable'])) + $enable = true; + + set_setting("chat_enabled",$enable); +} + +xhtml_head(T_("Supervisor chat"),true,false,array("../js/window.js")); + +print "

" . T_("Allow interviewers to chat with the supervisor over XMPP (Jabber). Required is a BOSH enabled XMPP/Jabber server. The operators and the supervisor will need XMPP/Jabber accounts.") . "

"; + + $e = get_setting("chat_enabled"); + $checked = "checked='checked'"; + if (empty($e)) + $checked = ""; + + ?> +
+

+

/>
+
+
+
"/>
+

+
+