Move the old conferences to the optional apps directory.
This commit is contained in:
parent
7df652778c
commit
ccc9ed36a7
|
|
@ -1,157 +0,0 @@
|
|||
<?php
|
||||
//application details
|
||||
$apps[$x]['name'] = 'Conferences';
|
||||
$apps[$x]['uuid'] = 'b81412e8-7253-91f4-e48e-42fc2c9a38d9';
|
||||
$apps[$x]['category'] = 'Switch';
|
||||
$apps[$x]['subcategory'] = '';
|
||||
$apps[$x]['version'] = '';
|
||||
$apps[$x]['license'] = 'Mozilla Public License 1.1';
|
||||
$apps[$x]['url'] = 'http://www.fusionpbx.com';
|
||||
$apps[$x]['description']['en-us'] = 'Conferences is used to setup conference rooms with a name, description, and optional pin number.';
|
||||
$apps[$x]['description']['es-mx'] = '';
|
||||
$apps[$x]['description']['de'] = '';
|
||||
$apps[$x]['description']['de-ch'] = '';
|
||||
$apps[$x]['description']['de-at'] = '';
|
||||
$apps[$x]['description']['fr'] = '';
|
||||
$apps[$x]['description']['fr-ca'] = '';
|
||||
$apps[$x]['description']['fr-ch'] = '';
|
||||
$apps[$x]['description']['pt-pt'] = 'Conferências é usado para configurar salas de conferências com um nome, descrição e número de pin opcional.';
|
||||
$apps[$x]['description']['pt-br'] = '';
|
||||
|
||||
//menu details
|
||||
$apps[$x]['menu'][0]['title']['en-us'] = 'Conferences';
|
||||
$apps[$x]['menu'][0]['title']['es-mx'] = '';
|
||||
$apps[$x]['menu'][0]['title']['de'] = '';
|
||||
$apps[$x]['menu'][0]['title']['de-ch'] = '';
|
||||
$apps[$x]['menu'][0]['title']['de-at'] = '';
|
||||
$apps[$x]['menu'][0]['title']['fr'] = '';
|
||||
$apps[$x]['menu'][0]['title']['fr-ca'] = '';
|
||||
$apps[$x]['menu'][0]['title']['fr-ch'] = '';
|
||||
$apps[$x]['menu'][0]['title']['pt-pt'] = 'Conferencias';
|
||||
$apps[$x]['menu'][0]['title']['pt-br'] = '';
|
||||
$apps[$x]['menu'][0]['uuid'] = '9f2a8c08-3e65-c41c-a716-3b53d42bc4d4';
|
||||
$apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
|
||||
$apps[$x]['menu'][0]['category'] = 'internal';
|
||||
$apps[$x]['menu'][0]['path'] = '/app/conferences/conferences.php';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'user';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'admin';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'conference_view';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'user';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'conference_add';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'conference_edit';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'user';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'conference_delete';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = 'v_conferences';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dialplan_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_dialplans';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'dialplan_uuid';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_name';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the conference name.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_extension';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the conference extension number.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_pin_number';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Optional pin number to secure access to the conference.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_profile';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Conference Profile is a collection of settings for the conference.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_flags';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Optional conference flags. examples: mute|deaf|waste|moderator';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_order';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the order number.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_description';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the description.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_enabled';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Select whether to enable or disable the conference.';
|
||||
|
||||
$y = 1; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = 'v_conference_users';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_user_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'conference_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_conferences';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'conference_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'user_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_users';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'user_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
|
||||
?>
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
<?php
|
||||
|
||||
//conferences
|
||||
$text['title']['en-us'] = 'Conferences';
|
||||
$text['title']['pt-pt'] = 'Conferências';
|
||||
|
||||
$text['description']['en-us'] = 'Conferences is used to setup conference rooms with a name, description, and optional pin number.';
|
||||
$text['description']['pt-pt'] = 'As conferências são utilizadas para configurar salas de conferências com um nome, descrição e número pin opcional.';
|
||||
|
||||
$text['title-2']['en-us'] = 'Active Conferences';
|
||||
$text['title-2']['pt-pt'] = 'Conferências Activas';
|
||||
|
||||
$text['title-3']['en-us'] = 'Active Conference';
|
||||
$text['title-3']['pt-pt'] = 'Conferência Activa';
|
||||
|
||||
$text['description-2']['en-us'] = 'and then select a conference to monitor and interact with it.';
|
||||
$text['description-2']['pt-pt'] = 'e selecione uma conferência para monitorizar e interagir com ele.';
|
||||
|
||||
$text['table-name']['en-us'] = 'Name';
|
||||
$text['table-name']['pt-pt'] = 'Nome';
|
||||
|
||||
$text['table-extension']['en-us'] = 'Extension';
|
||||
$text['table-extension']['pt-pt'] = 'Extensão';
|
||||
|
||||
$text['table-profile']['en-us'] = 'Profile';
|
||||
$text['table-profile']['pt-pt'] = 'Perfil';
|
||||
|
||||
$text['table-order']['en-us'] = 'Order';
|
||||
$text['table-order']['pt-pt'] = 'Ordem';
|
||||
|
||||
$text['table-enabled']['en-us'] = 'Enabled';
|
||||
$text['table-enabled']['pt-pt'] = 'Activo';
|
||||
|
||||
$text['table-description']['en-us'] = 'Description';
|
||||
$text['table-description']['pt-pt'] = 'Descrição';
|
||||
|
||||
//conferences_delete
|
||||
$text['confirm-delete']['en-us'] = 'Delete Complete';
|
||||
$text['confirm-delete']['pt-pt'] = 'Eliminação Completa';
|
||||
|
||||
//conferences_add
|
||||
$text['confirm-add']['en-us'] = 'Add Complete';
|
||||
$text['confirm-add']['pt-pt'] = 'Adição Completa';
|
||||
|
||||
$text['confirm-update']['en-us'] = 'Update Complete';
|
||||
$text['confirm-update']['pt-pt'] = 'Actualização Completa';
|
||||
|
||||
$text['confirm-name']['en-us'] = 'Please provide: Name';
|
||||
$text['confirm-name']['pt-pt'] = 'Por favor, forneça: Nome';
|
||||
|
||||
$text['confirm-extension']['en-us'] = 'Please provide: Extension';
|
||||
$text['confirm-extension']['pt-pt'] = 'Por favor, forneça: Extensão';
|
||||
|
||||
$text['confirm-profile']['en-us'] = 'Please provide: Profile';
|
||||
$text['confirm-profile']['pt-pt'] = 'Por favor, forneça: Perfil';
|
||||
|
||||
$text['confirm-enabled']['en-us'] = 'Please provide: Enabled';
|
||||
$text['confirm-enabled']['pt-pt'] = 'Por favor, forneça: Ativado';
|
||||
|
||||
$text['label-conference-add']['en-us'] = 'Conferences Add';
|
||||
$text['label-conference-add']['pt-pt'] = 'Adição de Conferências';
|
||||
|
||||
$text['label-conference-edit']['en-us'] = 'Conferences Edit';
|
||||
$text['label-conference-edit']['pt-pt'] = 'Edição de Conferências';
|
||||
|
||||
$text['button-back']['en-us'] = 'Back';
|
||||
$text['button-back']['pt-pt'] = 'Voltar';
|
||||
|
||||
$text['label-extension']['en-us'] = 'Extension';
|
||||
$text['label-extension']['pt-pt'] = 'Extensão';
|
||||
|
||||
$text['label-name']['en-us'] = 'Name';
|
||||
$text['label-name']['pt-pt'] = 'Nome';
|
||||
|
||||
$text['description-name']['en-us'] = 'Enter the conference name.';
|
||||
$text['description-name']['pt-pt'] = 'Insira o nome da conferência.';
|
||||
|
||||
$text['description-extension']['en-us'] = 'Enter the conference extension number.';
|
||||
$text['description-extension']['pt-pt'] = 'Insira a extensão da conferência';
|
||||
|
||||
$text['description-3']['en-us'] = 'to monitor and interact with the conference room.';
|
||||
$text['description-3']['pt-pt'] = 'para monitorizar e interagir com a sala de conferências.';
|
||||
|
||||
$text['label-pin']['en-us'] = 'Pin Number';
|
||||
$text['label-pin']['pt-pt'] = 'Numero Pin';
|
||||
|
||||
$text['description-pin']['en-us'] = 'Optional pin number to secure access to the conference.';
|
||||
$text['description-pin']['pt-pt'] = 'Número de pin opcional para garantir o acesso à conferência.';
|
||||
|
||||
$text['confirm-delete-2']['en-us'] = 'Do you really want to delete this?';
|
||||
$text['confirm-delete-2']['pt-pt'] = 'Deseja realmente apagar isto?';
|
||||
|
||||
$text['button-add']['en-us'] = 'Add';
|
||||
$text['button-add']['pt-pt'] = 'Adicionar';
|
||||
|
||||
$text['button-save']['en-us'] = 'Save';
|
||||
$text['button-save']['pt-pt'] = 'Gravar';
|
||||
|
||||
$text['label-description']['en-us'] = 'Description';
|
||||
$text['label-description']['pt-pt'] = 'Descrição';
|
||||
|
||||
$text['description-info']['en-us'] = 'Enter the description.';
|
||||
$text['description-info']['pt-pt'] = 'Insira a descrição.';
|
||||
|
||||
$text['description-conference-enable']['en-us'] = 'Select whether to enable or disable the conference.';
|
||||
$text['description-conference-enable']['pt-pt'] = 'Selecione se deseja ativar ou desativar a conferência.';
|
||||
|
||||
$text['description-order']['en-us'] = 'Enter the order number.';
|
||||
$text['description-order']['pt-pt'] = 'Digite o número do pedido.';
|
||||
|
||||
$text['label-order']['en-us'] = 'Order';
|
||||
$text['label-order']['pt-pt'] = 'Pedido';
|
||||
|
||||
$text['description-user-add']['en-us'] = 'Assign the users that are can manage this conference extension.';
|
||||
$text['description-user-add']['pt-pt'] = 'Atribuir os utilizadores que podem gerir esta extensão de conferência.';
|
||||
|
||||
$text['description-profile']['en-us'] = 'Conference Profile is a collection of settings for the conference.';
|
||||
$text['description-profile']['pt-pt'] = 'Perfil de conferência é um conjunto de definições para a conferência.';
|
||||
|
||||
$text['description-flags']['en-us'] = 'Optional conference flags. examples: mute|deaf|waste|moderator';
|
||||
$text['description-flags']['pt-pt'] = 'Flags opcionais de conferências. exemplos: mute|deaf|waste|moderator';
|
||||
|
||||
?>
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
require_once "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('conference_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app/calls/app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
}
|
||||
|
||||
if (strlen($id)>0) {
|
||||
|
||||
//get the dialplan uuid
|
||||
$sql = "select * from v_conferences ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and conference_uuid = '$id' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
while($row = $prep_statement->fetch(PDO::FETCH_ASSOC)) {
|
||||
$dialplan_uuid = $row['dialplan_uuid'];
|
||||
}
|
||||
|
||||
//delete conference
|
||||
$sql = "delete from v_conferences ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and conference_uuid = '$id' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql);
|
||||
|
||||
//delete the dialplan entry
|
||||
$sql = "delete from v_dialplans ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
||||
//delete the dialplan details
|
||||
$sql = "delete from v_dialplan_details ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "".$text['confirm-delete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
||||
?>
|
||||
|
|
@ -1,551 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
require_once "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('conference_add') || permission_exists('conference_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//action add or update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$conference_uuid = check_str($_REQUEST["id"]);
|
||||
}
|
||||
else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
$dialplan_uuid = check_str($_POST["dialplan_uuid"]);
|
||||
$conference_name = check_str($_POST["conference_name"]);
|
||||
$conference_extension = check_str($_POST["conference_extension"]);
|
||||
$conference_pin_number = check_str($_POST["conference_pin_number"]);
|
||||
$conference_profile = check_str($_POST["conference_profile"]);
|
||||
$conference_flags = check_str($_POST["conference_flags"]);
|
||||
$conference_order = check_str($_POST["conference_order"]);
|
||||
$conference_description = check_str($_POST["conference_description"]);
|
||||
$conference_enabled = check_str($_POST["conference_enabled"]);
|
||||
|
||||
//sanitize the conference name
|
||||
$conference_name = preg_replace("/[^A-Za-z0-9\- ]/", "", $conference_name);
|
||||
$conference_name = str_replace(" ", "-", $conference_name);
|
||||
}
|
||||
|
||||
//delete the user from the v_conference_users
|
||||
if ($_GET["a"] == "delete" && permission_exists("conference_delete")) {
|
||||
//set the variables
|
||||
$user_uuid = check_str($_REQUEST["user_uuid"]);
|
||||
$conference_uuid = check_str($_REQUEST["id"]);
|
||||
//delete the group from the users
|
||||
$sql = "delete from v_conference_users ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and conference_uuid = '".$conference_uuid."' ";
|
||||
$sql .= "and user_uuid = '".$user_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
//redirect the browser
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences_edit.php?id=$conference_uuid\">\n";
|
||||
echo "<div align='center'>".$text['confirm-delete']."</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add the user to the v_conference_users
|
||||
if (strlen($_REQUEST["user_uuid"]) > 0 && strlen($_REQUEST["id"]) > 0 && $_GET["a"] != "delete") {
|
||||
//set the variables
|
||||
$user_uuid = check_str($_REQUEST["user_uuid"]);
|
||||
$conference_uuid = check_str($_REQUEST["id"]);
|
||||
//assign the user to the extension
|
||||
$sql_insert = "insert into v_conference_users ";
|
||||
$sql_insert .= "(";
|
||||
$sql_insert .= "conference_user_uuid, ";
|
||||
$sql_insert .= "domain_uuid, ";
|
||||
$sql_insert .= "conference_uuid, ";
|
||||
$sql_insert .= "user_uuid ";
|
||||
$sql_insert .= ")";
|
||||
$sql_insert .= "values ";
|
||||
$sql_insert .= "(";
|
||||
$sql_insert .= "'".uuid()."', ";
|
||||
$sql_insert .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql_insert .= "'".$conference_uuid."', ";
|
||||
$sql_insert .= "'".$user_uuid."' ";
|
||||
$sql_insert .= ")";
|
||||
$db->exec($sql_insert);
|
||||
//redirect the browser
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences_edit.php?id=$conference_uuid\">\n";
|
||||
echo "<div align='center'>".$text['confirm-add']."</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$conference_uuid = check_str($_POST["conference_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
//if (strlen($dialplan_uuid) == 0) { $msg .= "Please provide: Dialplan UUID<br>\n"; }
|
||||
if (strlen($conference_name) == 0) { $msg .= "".$text['confirm-name']."<br>\n"; }
|
||||
if (strlen($conference_extension) == 0) { $msg .= "".$text['confirm-extension']."<br>\n"; }
|
||||
//if (strlen($conference_pin_number) == 0) { $msg .= "Please provide: Pin Number<br>\n"; }
|
||||
if (strlen($conference_profile) == 0) { $msg .= "".$text['confirm-profile']."<br>\n"; }
|
||||
//if (strlen($conference_flags) == 0) { $msg .= "Please provide: Flags<br>\n"; }
|
||||
//if (strlen($conference_order) == 0) { $msg .= "Please provide: Order<br>\n"; }
|
||||
//if (strlen($conference_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
if (strlen($conference_enabled) == 0) { $msg .= "".$text['confirm-enabled']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/persistformvar.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if ($action == "add") {
|
||||
//prepare the uuids
|
||||
$conference_uuid = uuid();
|
||||
$dialplan_uuid = uuid();
|
||||
//add the conference
|
||||
$sql = "insert into v_conferences ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "conference_uuid, ";
|
||||
$sql .= "dialplan_uuid, ";
|
||||
$sql .= "conference_name, ";
|
||||
$sql .= "conference_extension, ";
|
||||
$sql .= "conference_pin_number, ";
|
||||
$sql .= "conference_profile, ";
|
||||
$sql .= "conference_flags, ";
|
||||
$sql .= "conference_order, ";
|
||||
$sql .= "conference_description, ";
|
||||
$sql .= "conference_enabled ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$conference_uuid', ";
|
||||
$sql .= "'$dialplan_uuid', ";
|
||||
$sql .= "'$conference_name', ";
|
||||
$sql .= "'$conference_extension', ";
|
||||
$sql .= "'$conference_pin_number', ";
|
||||
$sql .= "'$conference_profile', ";
|
||||
$sql .= "'$conference_flags', ";
|
||||
$sql .= "'$conference_order', ";
|
||||
$sql .= "'$conference_description', ";
|
||||
$sql .= "'$conference_enabled' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//create the dialplan entry
|
||||
$dialplan_name = $conference_name;
|
||||
$dialplan_order ='333';
|
||||
$dialplan_context = $_SESSION['context'];
|
||||
$dialplan_enabled = 'true';
|
||||
$dialplan_description = $conference_description;
|
||||
$app_uuid = 'b81412e8-7253-91f4-e48e-42fc2c9a38d9';
|
||||
dialplan_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_name, $dialplan_order, $dialplan_context, $dialplan_enabled, $dialplan_description, $app_uuid);
|
||||
|
||||
//<condition destination_number="500" />
|
||||
$dialplan_detail_tag = 'condition'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'destination_number';
|
||||
$dialplan_detail_data = '^'.$conference_extension.'$';
|
||||
$dialplan_detail_order = '000';
|
||||
$dialplan_detail_group = '2';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="answer" />
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'answer';
|
||||
$dialplan_detail_data = '';
|
||||
$dialplan_detail_order = '010';
|
||||
$dialplan_detail_group = '2';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="answer" />
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'conference';
|
||||
$pin_number = ''; if (strlen($conference_pin_number) > 0) { $pin_number = "+".$conference_pin_number; }
|
||||
$flags = ''; if (strlen($conference_flags) > 0) { $flags = "+flags{".$conference_flags."}"; }
|
||||
$dialplan_detail_data = $conference_name.'-'.$_SESSION['domain_name']."@".$conference_profile.$pin_number.$flags;
|
||||
$dialplan_detail_order = '020';
|
||||
$dialplan_detail_group = '2';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//save the xml
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
//redirect the browser
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "".$text['confirm-add']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
if ($action == "update") {
|
||||
//update the conference extension
|
||||
$sql = "update v_conferences set ";
|
||||
$sql .= "conference_name = '$conference_name', ";
|
||||
$sql .= "conference_extension = '$conference_extension', ";
|
||||
$sql .= "conference_pin_number = '$conference_pin_number', ";
|
||||
$sql .= "conference_profile = '$conference_profile', ";
|
||||
$sql .= "conference_flags = '$conference_flags', ";
|
||||
$sql .= "conference_order = '$conference_order', ";
|
||||
$sql .= "conference_description = '$conference_description', ";
|
||||
$sql .= "conference_enabled = '$conference_enabled' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and conference_uuid = '$conference_uuid'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//udpate the conference dialplan
|
||||
$sql = "update v_dialplans set ";
|
||||
$sql .= "dialplan_name = '$conference_name', ";
|
||||
if (strlen($dialplan_order) > 0) {
|
||||
$sql .= "dialplan_order = '333', ";
|
||||
}
|
||||
$sql .= "dialplan_context = '".$_SESSION['context']."', ";
|
||||
$sql .= "dialplan_enabled = 'true', ";
|
||||
$sql .= "dialplan_description = '$conference_description' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
||||
//update dialplan detail condition
|
||||
$sql = "update v_dialplan_details set ";
|
||||
$sql .= "dialplan_detail_data = '^".$conference_extension."$' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and dialplan_detail_tag = 'condition' ";
|
||||
$sql .= "and dialplan_detail_type = 'destination_number' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
||||
//update dialplan detail action
|
||||
$pin_number = ''; if (strlen($conference_pin_number) > 0) { $pin_number = "+".$conference_pin_number; }
|
||||
$flags = ''; if (strlen($conference_flags) > 0) { $flags = "+flags{".$conference_flags."}"; }
|
||||
$dialplan_detail_data = $conference_name.'-'.$_SESSION['domain_name']."@".$conference_profile.$pin_number.$flags;
|
||||
$sql = "update v_dialplan_details set ";
|
||||
$sql .= "dialplan_detail_data = '".$dialplan_detail_data."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and dialplan_detail_tag = 'action' ";
|
||||
$sql .= "and dialplan_detail_type = 'conference' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$db->query($sql);
|
||||
|
||||
//save the xml
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
//redirect the browser
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "".$text['confirm-update']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
$conference_uuid = $_GET["id"];
|
||||
$sql = "select * from v_conferences ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and conference_uuid = '$conference_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll();
|
||||
foreach ($result as &$row) {
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
$conference_name = $row["conference_name"];
|
||||
$conference_extension = $row["conference_extension"];
|
||||
$conference_pin_number = $row["conference_pin_number"];
|
||||
$conference_profile = $row["conference_profile"];
|
||||
$conference_flags = $row["conference_flags"];
|
||||
$conference_order = $row["conference_order"];
|
||||
$conference_description = $row["conference_description"];
|
||||
$conference_enabled = $row["conference_enabled"];
|
||||
$conference_name = str_replace("-", " ", $conference_name);
|
||||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
|
||||
//set defaults
|
||||
if (strlen($conference_enabled) == 0) { $conference_enabled = "true"; }
|
||||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
echo "<form method='post' name='frm' action=''>\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
if ($action == "add") {
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['label-conference-add']."</b></td>\n";
|
||||
}
|
||||
if ($action == "update") {
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['label-conference-edit']."</b></td>\n";
|
||||
}
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='conferences.php'\" value='".$text['button-back']."'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' colspan='2'>\n";
|
||||
echo "".$text['description']." \n";
|
||||
echo "Click on <a href='".PROJECT_PATH."/app/conferences_active/conference_interactive.php?c=".str_replace(" ", "-", $conference_name)."'>".$text['title-3']."</a> \n";
|
||||
echo "".$text['description-3']."<br /><br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-name'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='conference_name' maxlength='255' value=\"$conference_name\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-extension'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='conference_extension' maxlength='255' value=\"$conference_extension\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-extension']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-pin'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='conference_pin_number' maxlength='255' value=\"$conference_pin_number\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-pin']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (if_group("admin") || if_group("superadmin")) {
|
||||
if ($action == "update") {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell' valign='top'>User List:</td>";
|
||||
echo " <td class='vtable'>";
|
||||
|
||||
echo " <table width='52%'>\n";
|
||||
$sql = "SELECT * FROM v_conference_users as e, v_users as u ";
|
||||
$sql .= "where e.user_uuid = u.user_uuid ";
|
||||
$sql .= "and u.user_enabled = 'true' ";
|
||||
$sql .= "and e.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and e.conference_uuid = '".$conference_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
$result_count = count($result);
|
||||
foreach($result as $field) {
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vtable'>".$field['username']."</td>\n";
|
||||
echo " <td>\n";
|
||||
echo " <a href='conferences_edit.php?id=".$conference_uuid."&domain_uuid=".$_SESSION['domain_uuid']."&user_uuid=".$field['user_uuid']."&a=delete' alt='delete' onclick=\"return confirm('".$text['confirm-delete-2']."')\">$v_link_label_delete</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
echo " </table>\n";
|
||||
|
||||
echo " <br />\n";
|
||||
$sql = "SELECT * FROM v_users ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and user_enabled = 'true' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
echo " <select name=\"user_uuid\" class='frm'>\n";
|
||||
echo " <option value=\"\"></option>\n";
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach($result as $field) {
|
||||
echo " <option value='".$field['user_uuid']."'>".$field['username']."</option>\n";
|
||||
}
|
||||
echo " </select>";
|
||||
echo " <input type=\"submit\" class='btn' value=\"".$text['button-add']."\">\n";
|
||||
unset($sql, $result);
|
||||
echo " <br>\n";
|
||||
echo " ".$text['description-user-add']."\n";
|
||||
echo " <br />\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['table-profile'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='conference_profile'>\n";
|
||||
//if the profile has no value set it to default
|
||||
if ($conference_profile == "") { $conference_profile = "default"; }
|
||||
if ($conference_profile == "default") { echo "<option value='default' selected='selected'>default</option>\n"; } else { echo "<option value='default'>default</option>\n"; }
|
||||
if ($conference_profile == "wideband") { echo "<option value='wideband' selected='selected'>wideband</option>\n"; } else { echo "<option value='wideband'>wideband</option>\n"; }
|
||||
if ($conference_profile == "ultrawideband") { echo "<option value='ultrawideband' selected='selected'>ultrawideband</option>\n"; } else { echo "<option value='ultrawideband'>ultrawideband</option>\n"; }
|
||||
if ($conference_profile == "cdquality") { echo "<option value='cdquality' selected='selected'>cdquality</option>\n"; } else { echo "<option value='cdquality'>cdquality</option>\n"; }
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-profile']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Flags:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='conference_flags' maxlength='255' value=\"$conference_flags\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-flags']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-order'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='conference_order' class='formfld'>\n";
|
||||
if (strlen(htmlspecialchars($dialplan_order))> 0) {
|
||||
echo " <option selected='selected' value='".htmlspecialchars($dialplan_order)."'>".htmlspecialchars($dialplan_order)."</option>\n";
|
||||
}
|
||||
$i=0;
|
||||
while($i<=999) {
|
||||
if (strlen($i) == 1) { echo " <option value='00$i'>00$i</option>\n"; }
|
||||
if (strlen($i) == 2) { echo " <option value='0$i'>0$i</option>\n"; }
|
||||
if (strlen($i) == 3) { echo " <option value='$i'>$i</option>\n"; }
|
||||
$i++;
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-order']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['table-enabled'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='conference_enabled'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($conference_enabled == "true") {
|
||||
echo " <option value='true' selected='selected'>true</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>true</option>\n";
|
||||
}
|
||||
if ($conference_enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>false</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>false</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-conference-enable']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-description'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='conference_description' maxlength='255' value=\"$conference_description\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-info']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'>\n";
|
||||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='dialplan_uuid' value=\"$dialplan_uuid\">\n";
|
||||
echo " <input type='hidden' name='conference_uuid' value='$conference_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
//include the footer
|
||||
require_once "includes/footer.php";
|
||||
?>
|
||||
|
|
@ -1,209 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
require_once "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('conference_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/paging.php";
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"center\">\n";
|
||||
echo " <br />";
|
||||
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' width='50%' nowrap><b>".$text['title']."</b></td>\n";
|
||||
echo " <td width='50%' align='right'> </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " ".$text['description']." \n";
|
||||
if (permission_exists('conferences_active_advanced_view')) {
|
||||
echo " Show <a href='".PROJECT_PATH."/app/conferences_active/v_conferences_active.php'>".$text['title-2']."</a> ".$text['description-2']."<br /><br />\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
//prepare to page the results
|
||||
if (if_group("superadmin") || if_group("admin")) {
|
||||
//show all extensions
|
||||
$sql = "select count(*) as num_rows from v_conferences ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
}
|
||||
else {
|
||||
//show only assigned extensions
|
||||
$sql = "select count(*) as num_rows from v_conferences as c, v_conference_users as u ";
|
||||
$sql .= "where c.conference_uuid = u.conference_uuid ";
|
||||
$sql .= "and c.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
|
||||
}
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] > 0) {
|
||||
$num_rows = $row['num_rows'];
|
||||
}
|
||||
else {
|
||||
$num_rows = '0';
|
||||
}
|
||||
}
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = 10;
|
||||
$param = "";
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
if (if_group("superadmin") || if_group("admin")) {
|
||||
//show all extensions
|
||||
$sql = "select * from v_conferences ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
}
|
||||
else {
|
||||
//show only assigned extensions
|
||||
$sql = "select * from v_conferences as c, v_conference_users as u ";
|
||||
$sql .= "where c.conference_uuid = u.conference_uuid ";
|
||||
$sql .= "and c.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
|
||||
}
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$sql .= "limit $rows_per_page offset $offset ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll();
|
||||
$result_count = count($result);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('conference_name', $text['table-name'], $order_by, $order);
|
||||
echo th_order_by('conference_extension', $text['table-extension'], $order_by, $order);
|
||||
echo th_order_by('conference_profile', $text['table-profile'], $order_by, $order);
|
||||
//echo th_order_by('conference_flags', 'Flags', $order_by, $order);
|
||||
echo th_order_by('conference_order', $text['table-order'], $order_by, $order);
|
||||
echo th_order_by('conference_enabled', $text['table-enabled'], $order_by, $order);
|
||||
echo th_order_by('conference_description', $text['table-description'], $order_by, $order);
|
||||
echo "<td align='right' width='42'>\n";
|
||||
if (permission_exists('conference_add')) {
|
||||
echo " <a href='conference_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
}
|
||||
else {
|
||||
echo " \n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
$conference_name = $row['conference_name'];
|
||||
$conference_name = str_replace("-", " ", $conference_name);
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$conference_name." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_extension']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_profile']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_flags']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_order']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_enabled']." </td>\n";
|
||||
echo " <td valign='top' class='row_stylebg' width='35%'>".$row['conference_description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('conference_edit')) {
|
||||
echo " <a href='conference_edit.php?id=".$row['conference_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('conference_delete')) {
|
||||
echo " <a href='conference_delete.php?id=".$row['conference_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='10' align='left'>\n";
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
if (permission_exists('conference_add')) {
|
||||
echo " <a href='conference_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
}
|
||||
else {
|
||||
echo " \n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br /><br />";
|
||||
echo "<br /><br />";
|
||||
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br /><br />";
|
||||
|
||||
//include the footer
|
||||
require_once "includes/footer.php";
|
||||
?>
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); }
|
||||
}
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]);
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
//echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."<br />\n";
|
||||
//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
|
||||
//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\n";
|
||||
|
||||
// if the project directory exists then add it to the include path otherwise add the document root to the include path
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
|
||||
if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
|
||||
}
|
||||
else {
|
||||
if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue