require_once SHOUT_BASE . '/lib/Forms/AccountForm.php';
$action = Horde_Util::getFormData('action');
-$curaccount = $_SESSION['shout']['curaccount']['code'];
+$curaccount = $_SESSION['shout']['curaccount'];
$RENDERER = new Horde_Form_Renderer();
case 'add':
case 'edit':
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new AccountDetailsForm($vars);
if ($Form->isSubmitted() && $Form->validate($vars, true)) {
$extension = Horde_Util::getFormData('extension');
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new ExtensionDeleteForm($vars);
$FormValid = $Form->validate($vars, true);
}
$vars = Horde_Variables::getDefaultVariables(array());
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new ExtensionDeleteForm($vars);
break;
require_once SHOUT_BASE . '/lib/Forms/ConferenceForm.php';
-$curaccount = $_SESSION['shout']['curaccount']['code'];
+$curaccount = $_SESSION['shout']['curaccount'];
$action = Horde_Util::getFormData('action');
$vars = Horde_Variables::getDefaultVariables();
case 'add':
case 'edit':
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new ConferenceDetailsForm($vars);
// Show the list if the save was successful, otherwise back to edit.
// Create a new add/edit form
$roomno = Horde_Util::getFormData('roomno');
- $conferences = $shout->storage->getConferences($curaccount);
+ $conferences = $shout->storage->getConferences($curaccount['code']);
$vars = new Horde_Variables($conferences[$roomno]);
$vars->set('action', $action);
$devid = Horde_Util::getFormData('devid');
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new DeviceDeleteForm($vars);
$FormValid = $Form->validate($vars, true);
}
$vars = Horde_Variables::getDefaultVariables(array());
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new DeviceDeleteForm($vars);
break;
// Fetch the (possibly updated) list of extensions
try {
- $conferences = $shout->devices->getConferences($curaccount);
+ $conferences = $shout->devices->getConferences($curaccount['code']);
} catch (Exception $e) {
$notification->push($e);
$devices = array();
require_once SHOUT_BASE . '/lib/Forms/DeviceForm.php';
-$curaccount = $_SESSION['shout']['curaccount']['code'];
+$curaccount = $_SESSION['shout']['curaccount'];
$action = Horde_Util::getFormData('action');
$vars = Horde_Variables::getDefaultVariables();
case 'add':
case 'edit':
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new DeviceDetailsForm($vars);
// Show the list if the save was successful, otherwise back to edit.
// Create a new add/edit form
$devid = Horde_Util::getFormData('devid');
- $devices = $shout->devices->getDevices($curaccount);
+ $devices = $shout->devices->getDevices($curaccount['code']);
$vars = new Horde_Variables($devices[$devid]);
$vars->set('action', $action);
$devid = Horde_Util::getFormData('devid');
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new DeviceDeleteForm($vars);
$FormValid = $Form->validate($vars, true);
}
$vars = Horde_Variables::getDefaultVariables(array());
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new DeviceDeleteForm($vars);
break;
// Fetch the (possibly updated) list of extensions
try {
- $devices = $shout->devices->getDevices($curaccount);
+ $devices = $shout->devices->getDevices($curaccount['code']);
} catch (Exception $e) {
$notification->push($e);
$devices = array();
$action = Horde_Util::getFormData('action');
$menu = Horde_Util::getFormData('menu');
-$curaccount = $_SESSION['shout']['curaccount']['code'];
+$curaccount = $_SESSION['shout']['curaccount'];
-$menus = $shout->storage->getMenus($curaccount);
+$menus = $shout->storage->getMenus($curaccount['code']);
switch($action) {
case 'add':
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new MenuForm($vars);
if ($Form->isSubmitted() && $Form->validate($vars, true)) {
$Form->execute();
$notification->push(_("Menu added."),
'horde.success');
- $menus = $shout->storage->getMenus($curaccount);
+ $menus = $shout->storage->getMenus($curaccount['code']);
$action = 'edit';
} catch (Exception $e) {
// after a successful add.
if ($action == 'edit') {
try {
- $destinations = $shout->extensions->getExtensions($curaccount);
- $conferences = $shout->storage->getConferences($curaccount);
- $recordings = $shout->storage->getRecordings($curaccount);
+ $destinations = $shout->extensions->getExtensions($curaccount['code']);
+ $conferences = $shout->storage->getConferences($curaccount['code']);
+ $recordings = $shout->storage->getRecordings($curaccount['code']);
// If any of these are empty, we need to coerce them to null.
// Otherwise we end up with a Prototype.js $H([]) (Hash of an empty
// Array) which causes confusion inside the library.
require_once SHOUT_BASE . '/lib/Forms/ExtensionForm.php';
$action = Horde_Util::getFormData('action');
-$curaccount = $_SESSION['shout']['curaccount']['code'];
+$curaccount = $_SESSION['shout']['curaccount'];
$RENDERER = new Horde_Form_Renderer();
case 'add':
case 'edit':
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new ExtensionDetailsForm($vars);
if ($Form->isSubmitted() && $Form->validate($vars, true)) {
$extension = Horde_Util::getFormData('extension');
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new ExtensionDeleteForm($vars);
$FormValid = $Form->validate($vars, true);
}
$vars = Horde_Variables::getDefaultVariables(array());
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new ExtensionDeleteForm($vars);
break;
// Fetch the (possibly updated) list of extensions
try {
- $extensions = $shout->extensions->getExtensions($curaccount);
+ $extensions = $shout->extensions->getExtensions($curaccount['code']);
} catch (Exception $e) {
$notification->push($e);
$extensions = array();
function __construct(&$vars)
{
+ $accountname = $_SESSION['shout']['curaccount']['name'];
if ($vars->exists('roomno')) {
- $formtitle = "Edit Conference Room";
+ $title = sprintf(_("Edit Conference Room - Account: %s"), $accountname);
$roomno = $vars->get('roomno');
$this->addHidden('', 'oldroomno', 'text', true);
$vars->set('oldroomno', $roomno);
$edit = true;
} else {
- $formtitle = "Create Conference Room";
+ $title = sprintf(_("Create Conference Room - Account: %s"), $accountname);
$edit = false;
}
- $curaccount = $_SESSION['shout']['curaccount']['code'];
- $accountname = $vars->account;
- $title = sprintf(_("$formtitle"));
+ ;
parent::__construct($vars, $title);
$this->addHidden('', 'action', 'text', true);
$edit = false;
}
- $curaccount = $_SESSION['shout']['curaccount']['code'];
$accountname = $_SESSION['shout']['curaccount']['name'];
$title = sprintf(_("$formtitle - Account: %s"), $accountname);
parent::__construct($vars, $title);
*/
function __construct(&$vars)
{
- $curaccount = $_SESSION['shout']['curaccount']['code'];
$action = $vars->get('action');
if ($action == 'edit') {
$formtitle = "Edit User";
$edit = false;
}
- $curaccount = $_SESSION['shout']['curaccount']['code'];
$accountname = $_SESSION['shout']['curaccount']['name'];
$title = sprintf(_("%s - Account: %s"), $formtitle, $accountname);
parent::__construct($vars, $title);
$this->addVariable(_("Description"), 'description', 'text', false);
$shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
- $recordings = $shout->storage->getRecordings($curaccount);
+ $recordings = $shout->storage->getRecordings($_SESSION['shout']['curaccount']['code']);
$list = array();
foreach ($recordings as $id => $info) {
$list[$id] = $info['filename'];
$formtitle = "Create Recording";
- $curaccount = $_SESSION['shout']['curaccount']['code'];
$accountname = $vars->account;
$title = sprintf(_("$formtitle"));
parent::__construct($vars, $title);
require_once SHOUT_BASE . '/lib/Forms/RecordingForm.php';
$action = Horde_Util::getFormData('action');
-$curaccount = $_SESSION['shout']['curaccount']['code'];
-$recordings = $shout->storage->getRecordings($curaccount);
+$curaccount = $_SESSION['shout']['curaccount'];
+$recordings = $shout->storage->getRecordings($curaccount['code']);
switch($action) {
case 'add':
$vars = Horde_Variables::getDefaultVariables();
- $vars->set('account', $curaccount);
+ $vars->set('account', $curaccount['code']);
$Form = new RecordingDetailsForm($vars);
if ($Form->isSubmitted() && $Form->validate($vars, true)) {
$Form->execute();
$notification->push(_("Recording added."),
'horde.success');
- $recordings = $shout->storage->getRecordings($curaccount);
+ $recordings = $shout->storage->getRecordings($curaccount['code']);
$action = 'list';
} catch (Exception $e) {
$notification->push($e);
<?php
foreach ($accounts as $account => $info) {
print "<option value=\"$account\"";
- if ($account == $curaccount) {
+ if ($account == $curaccount['code']) {
print " selected";
}
print ">${info['name']}</option>\n";