Add sounds true/false to conference rooms.

This commit is contained in:
Mark Crane
2013-02-01 12:23:39 +00:00
parent c389b54346
commit 2bc70201dd
5 changed files with 88 additions and 29 deletions

View File

@@ -211,10 +211,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Introduce participants as they enter the conference.';
$z++;
//$apps[$x]['db'][$y]['fields'][$z]['name'] = 'enter_sound';
//$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
//$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'The sound played when someone enters the conference.';
//$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'sounds';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Play sound when someone enters or exists the conference.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'mute';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Mute participants on entering the conference.';

View File

@@ -68,8 +68,11 @@
$text['label-enabled']['en-us'] = 'Enabled';
$text['label-enabled']['pt-pt'] = 'Activo';
$text['label-count']['en-us'] = 'Count';
$text['label-count']['pt-pt'] = '';
$text['label-sounds']['en-us'] = 'Sounds';
$text['label-sounds']['pt-pt'] = '';
$text['label-members']['en-us'] = 'Members';
$text['label-members']['pt-pt'] = '';
$text['label-tools']['en-us'] = 'Tools';
$text['label-tools']['pt-pt'] = 'Ferramentas';

View File

@@ -61,7 +61,7 @@ else {
$max_members = check_str($_POST["max_members"]);
$wait_mod = check_str($_POST["wait_mod"]);
$announce = check_str($_POST["announce"]);
//$enter_sound = check_str($_POST["enter_sound"]);
$sounds = check_str($_POST["sounds"]);
$mute = check_str($_POST["mute"]);
$created = check_str($_POST["created"]);
$created_by = check_str($_POST["created_by"]);
@@ -203,6 +203,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//if (strlen($announce) == 0) { $msg .= "Please provide: Announce<br>\n"; }
//if (strlen($enter_sound) == 0) { $msg .= "Please provide: Enter Sound<br>\n"; }
//if (strlen($mute) == 0) { $msg .= "Please provide: Mute<br>\n"; }
//if (strlen($sounds) == 0) { $msg .= "Please provide: Sounds<br>\n"; }
//if (strlen($created) == 0) { $msg .= "Please provide: Created<br>\n"; }
//if (strlen($created_by) == 0) { $msg .= "Please provide: Created By<br>\n"; }
//if (strlen($enabled) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
@@ -232,6 +233,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (strlen($announce) == 0) { $announce = 'true'; }
if (strlen($mute) == 0) { $mute = 'false'; }
if (strlen($enabled) == 0) { $enabled = 'true'; }
if (strlen($sounds) == 0) { $sounds = 'false'; }
//add a meeting
$meeting_uuid = uuid();
@@ -269,7 +271,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "max_members, ";
$sql .= "wait_mod, ";
$sql .= "announce, ";
//$sql .= "enter_sound, ";
$sql .= "sounds, ";
$sql .= "mute, ";
$sql .= "created, ";
$sql .= "created_by, ";
@@ -287,7 +289,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'$max_members', ";
$sql .= "'$wait_mod', ";
$sql .= "'$announce', ";
//$sql .= "'$enter_sound', ";
$sql .= "'$sounds', ";
$sql .= "'$mute', ";
$sql .= "now(), ";
$sql .= "'".$_SESSION['user_uuid']."', ";
@@ -367,6 +369,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (strlen($mute) > 0) {
$sql .= "mute = '$mute', ";
}
$sql .= "sounds = '$sounds', ";
if (strlen($enabled) > 0) {
$sql .= "enabled = '$enabled', ";
}
@@ -516,7 +519,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$max_members = $row["max_members"];
$wait_mod = $row["wait_mod"];
$announce = $row["announce"];
//$enter_sound = $row["enter_sound"];
$sounds = $row["sounds"];
$mute = $row["mute"];
$created = $row["created"];
$created_by = $row["created_by"];
@@ -560,10 +563,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (strlen($max_members) == 0) { $max_members = 0; }
if (strlen($wait_mod) == 0) { $wait_mod = 'true'; }
if (strlen($announce) == 0) { $announce = 'true'; }
//if ($action == "add") {
// if (strlen($enter_sound) == 0) { $enter_sound = 'tone_stream://%(200,0,500,600,700)'; }
//}
if (strlen($mute) == 0) { $mute = 'false'; }
if (strlen($sounds) == 0) { $sounds = 'false'; }
if (strlen($enabled) == 0) { $enabled = 'true'; }
//show the header
@@ -891,6 +892,31 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-sounds'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='sounds'>\n";
echo " <option value=''></option>\n";
if ($sounds == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($sounds == "false") {
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "\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";

View File

@@ -52,6 +52,7 @@ else {
$wait_mod = check_str($_GET["wait_mod"]);
$announce = check_str($_GET["announce"]);
$mute = check_str($_GET["mute"]);
$sounds = check_str($_GET["sounds"]);
$enabled = check_str($_GET["enabled"]);
//update the conference room
@@ -68,6 +69,9 @@ else {
if (strlen($mute) > 0) {
$sql .= "mute = '$mute' ";
}
if (strlen($sounds) > 0) {
$sql .= "sounds = '$sounds' ";
}
if (strlen($enabled) > 0) {
$sql .= "enabled = '$enabled' ";
}
@@ -166,9 +170,9 @@ else {
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>".$text['label-moderator-pin']."</th>\n";
echo "<th>".$text['label-participant-pin']."</th>\n";
//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);
@@ -177,9 +181,10 @@ else {
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_order_by('sounds', $text['label-sounds'], $order_by, $order);
echo "<th>".$text['label-members']."</th>\n";
echo "<th>".$text['label-tools']."</th>\n";
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
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')) {
@@ -195,12 +200,21 @@ else {
if ($result_count > 0) {
foreach($result as $row) {
$meeting_uuid = $row['meeting_uuid'];
$moderator_pin = $row['moderator_pin'];
$participant_pin = $row['participant_pin'];
if (strlen($moderator_pin) == 9) {
$moderator_pin = substr($moderator_pin, 0, 3) ."-". substr($moderator_pin, 3, 3) ."-". substr($moderator_pin, -3)."\n";
}
if (strlen($participant_pin) == 9) {
$participant_pin = substr($participant_pin, 0, 3) ."-". substr($participant_pin, 3, 3) ."-". substr($participant_pin, -3)."\n";
}
echo "<tr >\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['moderator_pin']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['participant_pin']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$moderator_pin."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$participant_pin."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_center_uuid']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['meeting_uuid']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['profile']."&nbsp;</td>\n";
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['profile']."&nbsp;</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>";
@@ -230,7 +244,6 @@ else {
echo " &nbsp;\n";
echo " </td>\n";
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['enter_sound']."&nbsp;</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>";
@@ -240,17 +253,17 @@ else {
}
echo " &nbsp;\n";
echo " </td>\n";
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['created']."&nbsp;</td>\n";
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['created_by']."&nbsp;</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>";
if ($row['sounds'] == "true") {
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&sounds=false\">".$text['label-true']."</a>";
}
else {
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&enabled=true\">".$text['label-false']."</a>";
echo " <a href=\"?conference_room_uuid=".$row['conference_room_uuid']."&sounds=true\">".$text['label-false']."</a>";
}
echo " &nbsp;\n";
echo " </td>\n";
if (strlen($conference[$meeting_uuid]["session_uuid"])) {
echo " <td valign='middle' class='".$row_style[$c]."'>".$conference[$meeting_uuid]["member_count"]."&nbsp;</td>\n";
}
@@ -261,7 +274,22 @@ else {
echo " <a href='".PROJECT_PATH."/app/conferences_active/conference_interactive.php?c=".$row['meeting_uuid']."'>".$text['label-view']."</a>&nbsp;\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']."&nbsp;</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 " &nbsp;\n";
echo " </td>\n";
echo " <td valign='middle' class='row_stylebg' width='20%' nowrap='nowrap'>";
echo " ".$row['description']."\n";
echo " &nbsp;\n";
echo " </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";
@@ -270,6 +298,7 @@ else {
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

View File

@@ -59,7 +59,7 @@
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 .= "wait_mod, announce, mute, sounds, 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."' ";
@@ -89,6 +89,7 @@
$result[$x]["announce"] = $row["announce"];
$result[$x]["mute"] = $row["mute"];
$result[$x]["record"] = $row["record"];
$result[$x]["sounds"] = $row["sounds"];
$result[$x]["profile"] = $row["profile"];
$result[$x]["meeting_user_uuid"] = $row["meeting_user_uuid"];
$result[$x]["user_uuid"] = $row["user_uuid"];