mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 02:23:48 +00:00
Add a new conference center class. Add moderator and participant pins to the conference rooms.
This commit is contained in:
@@ -129,184 +129,174 @@ else {
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) as num_rows from v_conference_rooms as r, v_meeting_users as u ";
|
||||
$sql .= "where r.domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and r.meeting_uuid = u.meeting_uuid ";
|
||||
if (!if_group("admin") && !if_group("superadmin")) {
|
||||
$sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' ";
|
||||
}
|
||||
//$sql .= "and r.meeting_uuid = 'fbd2214a-39db-4a93-bd84-3fd830f63dba' ";
|
||||
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';
|
||||
}
|
||||
}
|
||||
//get the conference room count
|
||||
require_once "app/conference_centers/resources/classes/conference_center.php";
|
||||
$conference_center = new conference_center;
|
||||
$conference_center->db = $db;
|
||||
$conference_center->domain_uuid = $_SESSION['domain_uuid'];
|
||||
$conference_center->voicemail_uuid = $voicemail_uuid;
|
||||
$conference_center->voicemail_id = $voicemail_id;
|
||||
$row_count = $conference_center->room_count() * 2;
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = 10;
|
||||
$rows_per_page = 150;
|
||||
$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);
|
||||
$page = check_str($_GET['page']);
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
$rows_per_page = $rows_per_page * 2;
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($row_count, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_conference_rooms as r, v_meeting_users as u ";
|
||||
$sql .= "where r.domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and r.meeting_uuid = u.meeting_uuid ";
|
||||
if (!if_group("admin") && !if_group("superadmin")) {
|
||||
$sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' ";
|
||||
//get the conference rooms
|
||||
$conference_center->rows_per_page = $rows_per_page;
|
||||
$conference_center->offset = $offset;
|
||||
$conference_center->order_by = $order_by;
|
||||
$conference_center->order = $order;
|
||||
$result = $conference_center->rooms();
|
||||
$result_count = $conference_center->count;
|
||||
|
||||
//prepare to alternate the row styles
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//table header
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
//echo th_order_by('conference_center_uuid', 'Conference UUID', $order_by, $order);
|
||||
//echo th_order_by('meeting_uuid', 'Meeting UUID', $order_by, $order);
|
||||
echo th_order_by('profile', $text['label-moderator-pin'], $order_by, $order);
|
||||
echo th_order_by('profile', $text['label-participant-pin'], $order_by, $order);
|
||||
echo th_order_by('profile', $text['label-profile'], $order_by, $order);
|
||||
echo th_order_by('record', $text['label-record'], $order_by, $order);
|
||||
//echo th_order_by('max_members', 'Max', $order_by, $order);
|
||||
echo th_order_by('wait_mod', $text['label-wait-moderator'], $order_by, $order);
|
||||
echo th_order_by('announce', $text['label-announce'], $order_by, $order);
|
||||
//echo th_order_by('enter_sound', 'Enter Sound', $order_by, $order);
|
||||
echo th_order_by('mute', $text['label-mute'], $order_by, $order);
|
||||
//echo th_order_by('created', 'Created', $order_by, $order);
|
||||
//echo th_order_by('created_by', 'Created By', $order_by, $order);
|
||||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
|
||||
echo "<th>".$text['label-count']."</th>\n";
|
||||
echo "<th>".$text['label-tools']."</th>\n";
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order);
|
||||
echo "<td align='right' width='42' nowrap='nowrap'>\n";
|
||||
if (permission_exists('conference_room_add')) {
|
||||
echo " <a href='conference_room_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
}
|
||||
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);
|
||||
else {
|
||||
echo " \n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
//table data
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
$meeting_uuid = $row['meeting_uuid'];
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['moderator_pin']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['participant_pin']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_center_uuid']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['meeting_uuid']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['profile']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['record'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&record=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&record=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['max_members']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['wait_mod'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&wait_mod=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&wait_mod=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['announce'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&announce=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&announce=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['enter_sound']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['mute'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&mute=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&mute=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['created']." </td>\n";
|
||||
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['created_by']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['enabled'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&enabled=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&enabled=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
if (strlen($conference[$meeting_uuid]["session_uuid"])) {
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>".$conference[$meeting_uuid]["member_count"]." </td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>0</td>\n";
|
||||
}
|
||||
echo " <td valign='middle' class='".$row_style[$c]."' nowrap='nowrap'>\n";
|
||||
echo " <a href='".PROJECT_PATH."/app/conferences_active/conference_interactive.php?c=".$row['meeting_uuid']."'>".$text['label-view']."</a> \n";
|
||||
echo " <a href='conference_sessions.php?id=".$row['meeting_uuid']."'>".$text['label-sessions']."</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='middle' class='row_stylebg' width='20%' nowrap='nowrap'>".$row['description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('conference_room_edit')) {
|
||||
echo " <a href='conference_room_edit.php?id=".$row['conference_room_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('conference_room_delete')) {
|
||||
echo " <a href='conference_room_delete.php?id=".$row['conference_room_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 th_order_by('conference_center_uuid', 'Conference UUID', $order_by, $order);
|
||||
//echo th_order_by('meeting_uuid', 'Meeting UUID', $order_by, $order);
|
||||
echo th_order_by('profile', $text['label-profile'], $order_by, $order);
|
||||
echo th_order_by('record', $text['label-record'], $order_by, $order);
|
||||
//echo th_order_by('max_members', 'Max', $order_by, $order);
|
||||
echo th_order_by('wait_mod', $text['label-wait-moderator'], $order_by, $order);
|
||||
echo th_order_by('announce', $text['label-announce'], $order_by, $order);
|
||||
//echo th_order_by('enter_sound', 'Enter Sound', $order_by, $order);
|
||||
echo th_order_by('mute', $text['label-mute'], $order_by, $order);
|
||||
//echo th_order_by('created', 'Created', $order_by, $order);
|
||||
//echo th_order_by('created_by', 'Created By', $order_by, $order);
|
||||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
|
||||
echo "<th>".$text['label-count']."</th>\n";
|
||||
echo "<th>".$text['label-tools']."</th>\n";
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order);
|
||||
echo "<td align='right' width='42' nowrap='nowrap'>\n";
|
||||
if (permission_exists('conference_room_add')) {
|
||||
echo " <a href='conference_room_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) {
|
||||
$meeting_uuid = $row['meeting_uuid'];
|
||||
echo "<tr >\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_center_uuid']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['meeting_uuid']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['profile']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['record'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&record=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&record=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['max_members']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['wait_mod'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&wait_mod=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&wait_mod=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['announce'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&announce=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&announce=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
|
||||
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['enter_sound']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['mute'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&mute=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&mute=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['created']." </td>\n";
|
||||
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['created_by']." </td>\n";
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>";
|
||||
if ($row['enabled'] == "true") {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&enabled=false\">".$text['label-true']."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&enabled=true\">".$text['label-false']."</a>";
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
if (strlen($conference[$meeting_uuid]["session_uuid"])) {
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>".$conference[$meeting_uuid]["member_count"]." </td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>0</td>\n";
|
||||
}
|
||||
echo " <td valign='middle' class='".$row_style[$c]."'>\n";
|
||||
echo " <a href='".PROJECT_PATH."/app/conferences_active/conference_interactive.php?c=".$row['meeting_uuid']."'>".$text['label-view']."</a> \n";
|
||||
echo " <a href='conference_sessions.php?id=".$row['meeting_uuid']."'>".$text['label-sessions']."</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='middle' class='row_stylebg' width='20%' nowrap='nowrap'>".$row['description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('conference_room_edit')) {
|
||||
echo " <a href='conference_room_edit.php?id=".$row['conference_room_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('conference_room_delete')) {
|
||||
echo " <a href='conference_room_delete.php?id=".$row['conference_room_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='12' 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_room_add')) {
|
||||
echo " <a href='conference_room_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";
|
||||
//show paging
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='12' 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_room_add')) {
|
||||
echo " <a href='conference_room_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";
|
||||
|
||||
//close the tables
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br /><br />";
|
||||
|
||||
131
app/conference_centers/resources/classes/conference_center.php
Normal file
131
app/conference_centers/resources/classes/conference_center.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?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-2013
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//define the voicemail class
|
||||
class conference_center {
|
||||
public $db;
|
||||
public $domain_uuid;
|
||||
public $order_by;
|
||||
public $order;
|
||||
public $rows_per_page;
|
||||
public $offset;
|
||||
private $fields;
|
||||
public $count;
|
||||
|
||||
public function room_count() {
|
||||
//get the room count
|
||||
$sql = "select count(*) as num_rows from v_conference_rooms as r, v_meeting_users as u ";
|
||||
$sql .= "where r.domain_uuid = '".$this->domain_uuid."' ";
|
||||
$sql .= "and r.meeting_uuid = u.meeting_uuid ";
|
||||
if (!if_group("admin") && !if_group("superadmin")) {
|
||||
$sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' ";
|
||||
}
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] > 0) {
|
||||
return $row['num_rows'];
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function rooms() {
|
||||
//get the list of rooms
|
||||
$fields = "r.domain_uuid, r.conference_room_uuid, r.conference_center_uuid, r.meeting_uuid max_members, ";
|
||||
$fields .= "wait_mod, announce, mute, created, created_by, r.enabled, r.description, record, ";
|
||||
$fields .= "profile, meeting_user_uuid, user_uuid, meeting_pin_uuid, member_pin, member_type ";
|
||||
$sql = "select ".$fields." from v_conference_rooms as r, v_meeting_users as u, v_meeting_pins as p ";
|
||||
$sql .= "where r.domain_uuid = '".$this->domain_uuid."' ";
|
||||
$sql .= "and r.meeting_uuid = u.meeting_uuid ";
|
||||
$sql .= "and r.meeting_uuid = p.meeting_uuid ";
|
||||
if (!if_group("admin") && !if_group("superadmin")) {
|
||||
$sql .= "and u.user_uuid = '".$_SESSION["user_uuid"]."' ";
|
||||
}
|
||||
if (strlen($this->order_by)> 0) { $sql .= "order by $this->order_by $this->order "; }
|
||||
$sql .= "limit $this->rows_per_page offset $this->offset ";
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$rows = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$this->count = count($rows);
|
||||
if ($this->count > 0) {
|
||||
$x = 0;
|
||||
foreach($rows as $row) {
|
||||
//increment the array index
|
||||
if (isset($previous) && $row["conference_room_uuid"] != $previous) { $x++; }
|
||||
//build the array
|
||||
$result[$x]["domain_uuid"] = $row["domain_uuid"];
|
||||
$result[$x]["conference_room_uuid"] = $row["conference_room_uuid"];
|
||||
$result[$x]["conference_center_uuid"] = $row["conference_center_uuid"];
|
||||
$result[$x]["meeting_uuid"] = $row["meeting_uuid"];
|
||||
$result[$x]["max_members"] = $row["max_members"];
|
||||
$result[$x]["wait_mod"] = $row["wait_mod"];
|
||||
$result[$x]["announce"] = $row["announce"];
|
||||
$result[$x]["mute"] = $row["mute"];
|
||||
$result[$x]["record"] = $row["record"];
|
||||
$result[$x]["profile"] = $row["profile"];
|
||||
$result[$x]["meeting_user_uuid"] = $row["meeting_user_uuid"];
|
||||
$result[$x]["user_uuid"] = $row["user_uuid"];
|
||||
if ($row["member_type"] == "moderator") {
|
||||
$result[$x]["moderator_pin"] = $row["member_pin"];
|
||||
}
|
||||
if ($row["member_type"] == "participant") {
|
||||
$result[$x]["participant_pin"] = $row["member_pin"];
|
||||
}
|
||||
$result[$x]["created"] = $row["created"];
|
||||
$result[$x]["created_by"] = $row["created_by"];
|
||||
$result[$x]["enabled"] = $row["enabled"];
|
||||
$result[$x]["description"] = $row["description"];
|
||||
//set the previous uuid
|
||||
$previous = $row["conference_room_uuid"];
|
||||
}
|
||||
unset($rows);
|
||||
}
|
||||
unset ($prep_statement, $sql);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
//example conference center
|
||||
/*
|
||||
require_once "app/conference_centers/resources/classes/conference_center.php";
|
||||
$conference_center = new conference_center;
|
||||
$conference_center->db = $db;
|
||||
$conference_center->domain_uuid = $_SESSION['domain_uuid'];
|
||||
$conference_center->voicemail_uuid = $voicemail_uuid;
|
||||
$conference_center->voicemail_id = $voicemail_id;
|
||||
$conference_center->rows_per_page = 150;
|
||||
$conference_center->offset = 0;
|
||||
$conference_center->order_by = $order_by;
|
||||
$conference_center->order = $order;
|
||||
$result = $conference_center->rooms();
|
||||
print_r($result);
|
||||
*/
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user