Fix the warning for the interactive conference page.
This commit is contained in:
@@ -66,31 +66,38 @@ else {
|
|||||||
else {
|
else {
|
||||||
//show the content
|
//show the content
|
||||||
$xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
$xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||||
try {
|
if (substr($xml_str, -9) == "not found") {
|
||||||
$xml = new SimpleXMLElement($xml_str);
|
$valid_xml = false;
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
else {
|
||||||
//echo $e->getMessage();
|
$valid_xml = true;
|
||||||
}
|
}
|
||||||
//$name = $xml->conference['name'];
|
if ($valid_xml) {
|
||||||
$session_uuid = $xml->conference['uuid'];
|
try {
|
||||||
$member_count = $xml->conference['member-count'];
|
$xml = new SimpleXMLElement($xml_str);
|
||||||
$locked = $xml->conference['locked'];
|
}
|
||||||
$recording = $xml->conference['recording'];
|
catch(Exception $e) {
|
||||||
if (strlen($member_count) == 0) {
|
//echo $e->getMessage();
|
||||||
$member_count = 0;
|
}
|
||||||
}
|
//$name = $xml->conference['name'];
|
||||||
|
$session_uuid = $xml->conference['uuid'];
|
||||||
//get mute_all
|
$member_count = $xml->conference['member-count'];
|
||||||
$mute_all = "true";
|
$locked = $xml->conference['locked'];
|
||||||
foreach ($xml->conference->members->member as $row) {
|
$recording = $xml->conference['recording'];
|
||||||
if ($row->flags->is_moderator == "false") {
|
if (strlen($member_count) == 0) {
|
||||||
if ($row->flags->can_speak == "true") {
|
$member_count = 0;
|
||||||
$mute_all = "false";
|
}
|
||||||
|
|
||||||
|
//get mute_all
|
||||||
|
$mute_all = "true";
|
||||||
|
foreach ($xml->conference->members->member as $row) {
|
||||||
|
if ($row->flags->is_moderator == "false") {
|
||||||
|
if ($row->flags->can_speak == "true") {
|
||||||
|
$mute_all = "false";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
@@ -142,80 +149,81 @@ else {
|
|||||||
echo "<th> </th>\n";
|
echo "<th> </th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
foreach ($xml->conference->members->member as $row) {
|
if ($valid_xml) {
|
||||||
|
if (isset($xml->conference->members->member)) foreach ($xml->conference->members->member as $row) {
|
||||||
$id = $row->id;
|
$id = $row->id;
|
||||||
$record_path = $row->record_path;
|
$record_path = $row->record_path;
|
||||||
$flag_can_hear = $row->flags->can_hear;
|
$flag_can_hear = $row->flags->can_hear;
|
||||||
$flag_can_speak = $row->flags->can_speak;
|
$flag_can_speak = $row->flags->can_speak;
|
||||||
$flag_talking = $row->flags->talking;
|
$flag_talking = $row->flags->talking;
|
||||||
$last_talking = $row->last_talking;
|
$last_talking = $row->last_talking;
|
||||||
$join_time = $row->join_time;
|
$join_time = $row->join_time;
|
||||||
$flag_has_video = $row->flags->has_video;
|
$flag_has_video = $row->flags->has_video;
|
||||||
$flag_has_floor = $row->flags->has_floor;
|
$flag_has_floor = $row->flags->has_floor;
|
||||||
$is_moderator = $row->flags->is_moderator;
|
$is_moderator = $row->flags->is_moderator;
|
||||||
$uuid = $row->uuid;
|
$uuid = $row->uuid;
|
||||||
$caller_id_name = $row->caller_id_name;
|
$caller_id_name = $row->caller_id_name;
|
||||||
$caller_id_name = urldecode($caller_id_name);
|
$caller_id_name = urldecode($caller_id_name);
|
||||||
$caller_id_number = $row->caller_id_number;
|
$caller_id_number = $row->caller_id_number;
|
||||||
|
|
||||||
//format seconds
|
//format seconds
|
||||||
$join_time_formatted = sprintf('%02d:%02d:%02d', ($join_time/3600), ($join_time/60%60), $join_time%60);
|
$join_time_formatted = sprintf('%02d:%02d:%02d', ($join_time/3600), ($join_time/60%60), $join_time%60);
|
||||||
$last_talking_formatted = sprintf('%02d:%02d:%02d', ($last_talking/3600), ($last_talking/60%60), $last_talking%60);
|
$last_talking_formatted = sprintf('%02d:%02d:%02d', ($last_talking/3600), ($last_talking/60%60), $last_talking%60);
|
||||||
|
|
||||||
if (strlen($record_path) == 0) {
|
if (strlen($record_path) == 0) {
|
||||||
if (permission_exists('conference_interactive_mute')) {
|
|
||||||
$action_mute = ($flag_can_speak == "true") ? 'mute' : 'unmute';
|
|
||||||
$td_onclick = "onclick=\"send_cmd('conference_exec.php?cmd=conference&name=".$conference_name."&data=".$action_mute."&id=".$id."');\"";
|
|
||||||
$td_title = "title=\"".$text['message-click_to_'.$action_mute]."\"";
|
|
||||||
}
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title." style='padding: 4px 6px;'><img src='resources/images/".(($is_moderator == "true") ? 'moderator' : 'participant').".png' style='width: 16px; height: 16px; border: none;' title=\"".$text['label-'.(($is_moderator == "true") ? 'moderator' : 'participant')]."\"></td>\n";
|
|
||||||
$talking_icon = ($flag_talking == "true") ? "<img src='resources/images/talking.png' style='width: 16px; height: 16px; border: none; margin: -2px 10px -2px 15px;' align='absmiddle' title=\"".$text['label-talking']."\">" : null;
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$caller_id_name.$talking_icon."</td>\n";
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$caller_id_number."</td>\n";
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title." style='padding-top: 5px;'>";
|
|
||||||
echo ($flag_can_hear == "true") ? "<img src='resources/images/hear.png' style='width: 16px; height: 16px; border: none; margin: 0px 4px -2px 0px;' align='absmiddle' title=\"".$text['label-hear']."\">" : null;
|
|
||||||
echo ($flag_can_speak == "true") ? "<img src='resources/images/speak.png' style='width: 16px; height: 16px; border: none; margin: 0px 6px -2px 0px;' align='absmiddle' title=\"".$text['label-speak']."\">" : null;
|
|
||||||
if (permission_exists('conference_interactive_video')) {
|
|
||||||
echo ($flag_has_video == "true") ? "<img src='resources/images/video.png' style='width: 16px; height: 16px; border: none; margin: 0px 4px -2px 0px;' align='absmiddle' title=\"".$text['label-video']."\">" : null;
|
|
||||||
}
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$join_time_formatted."</td>\n";
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$last_talking_formatted."</td>\n";
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$text['label-'.(($flag_has_floor == "true") ? 'yes' : 'no')]."</td>\n";
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."' style='text-align: right; padding: 1px 2px; white-space: nowrap;'>\n";
|
|
||||||
//energy
|
|
||||||
if (permission_exists('conference_interactive_energy')) {
|
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=up&cmd=conference&name=".$conference_name."&data=energy&id=".$id."');\" value='+".$text['label-energy']."'>\n";
|
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=down&cmd=conference&name=".$conference_name."&data=energy&id=".$id."');\" value='-".$text['label-energy']."'>\n";
|
|
||||||
}
|
|
||||||
//volume
|
|
||||||
if (permission_exists('conference_interactive_volume')) {
|
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=up&cmd=conference&name=".$conference_name."%&data=volume_in&id=".$id."');\" value='+".$text['label-volume']."'>\n";
|
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=down&cmd=conference&name=".$conference_name."&data=volume_in&id=".$id."');\" value='-".$text['label-volume']."'>\n";
|
|
||||||
}
|
|
||||||
if (permission_exists('conference_interactive_gain')) {
|
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=up&cmd=conference&name=".$conference_name."&data=volume_out&id=".$id."');\" value='+".$text['label-gain']."'>\n";
|
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=down&cmd=conference&name=".$conference_name."&data=volume_out&id=".$id."');\" value='-".$text['label-gain']."'>\n";
|
|
||||||
}
|
|
||||||
//mute and unmute
|
|
||||||
if (permission_exists('conference_interactive_mute')) {
|
if (permission_exists('conference_interactive_mute')) {
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?cmd=conference&name=".$conference_name."&data=".$action_mute."&id=".$id."');\" value='".$text['label-'.$action_mute]."'>\n";
|
$action_mute = ($flag_can_speak == "true") ? 'mute' : 'unmute';
|
||||||
|
$td_onclick = "onclick=\"send_cmd('conference_exec.php?cmd=conference&name=".$conference_name."&data=".$action_mute."&id=".$id."');\"";
|
||||||
|
$td_title = "title=\"".$text['message-click_to_'.$action_mute]."\"";
|
||||||
}
|
}
|
||||||
//deaf and undeaf
|
echo "<tr>\n";
|
||||||
if (permission_exists('conference_interactive_deaf')) {
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title." style='padding: 4px 6px;'><img src='resources/images/".(($is_moderator == "true") ? 'moderator' : 'participant').".png' style='width: 16px; height: 16px; border: none;' title=\"".$text['label-'.(($is_moderator == "true") ? 'moderator' : 'participant')]."\"></td>\n";
|
||||||
$action_deaf = ($flag_can_hear == "true") ? 'deaf' : 'undeaf';
|
$talking_icon = ($flag_talking == "true") ? "<img src='resources/images/talking.png' style='width: 16px; height: 16px; border: none; margin: -2px 10px -2px 15px;' align='absmiddle' title=\"".$text['label-talking']."\">" : null;
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?cmd=conference&name=".$conference_name."&data=".$action_deaf."&id=".$id."');\" value='".$text['label-'.$action_deaf]."'>\n";
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$caller_id_name.$talking_icon."</td>\n";
|
||||||
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$caller_id_number."</td>\n";
|
||||||
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title." style='padding-top: 5px;'>";
|
||||||
|
echo ($flag_can_hear == "true") ? "<img src='resources/images/hear.png' style='width: 16px; height: 16px; border: none; margin: 0px 4px -2px 0px;' align='absmiddle' title=\"".$text['label-hear']."\">" : null;
|
||||||
|
echo ($flag_can_speak == "true") ? "<img src='resources/images/speak.png' style='width: 16px; height: 16px; border: none; margin: 0px 6px -2px 0px;' align='absmiddle' title=\"".$text['label-speak']."\">" : null;
|
||||||
|
if (permission_exists('conference_interactive_video')) {
|
||||||
|
echo ($flag_has_video == "true") ? "<img src='resources/images/video.png' style='width: 16px; height: 16px; border: none; margin: 0px 4px -2px 0px;' align='absmiddle' title=\"".$text['label-video']."\">" : null;
|
||||||
}
|
}
|
||||||
//kick someone from the conference
|
echo "</td>\n";
|
||||||
if (permission_exists('conference_interactive_kick')) {
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$join_time_formatted."</td>\n";
|
||||||
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?cmd=conference&name=".$conference_name."&data=kick&id=".$id."&uuid=".$uuid."');\" value='".$text['label-kick']."'>\n";
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$last_talking_formatted."</td>\n";
|
||||||
}
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick." ".$td_title.">".$text['label-'.(($flag_has_floor == "true") ? 'yes' : 'no')]."</td>\n";
|
||||||
echo "</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."' style='text-align: right; padding: 1px 2px; white-space: nowrap;'>\n";
|
||||||
echo "</tr>\n";
|
//energy
|
||||||
|
if (permission_exists('conference_interactive_energy')) {
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=up&cmd=conference&name=".$conference_name."&data=energy&id=".$id."');\" value='+".$text['label-energy']."'>\n";
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=down&cmd=conference&name=".$conference_name."&data=energy&id=".$id."');\" value='-".$text['label-energy']."'>\n";
|
||||||
|
}
|
||||||
|
//volume
|
||||||
|
if (permission_exists('conference_interactive_volume')) {
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=up&cmd=conference&name=".$conference_name."%&data=volume_in&id=".$id."');\" value='+".$text['label-volume']."'>\n";
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=down&cmd=conference&name=".$conference_name."&data=volume_in&id=".$id."');\" value='-".$text['label-volume']."'>\n";
|
||||||
|
}
|
||||||
|
if (permission_exists('conference_interactive_gain')) {
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=up&cmd=conference&name=".$conference_name."&data=volume_out&id=".$id."');\" value='+".$text['label-gain']."'>\n";
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?direction=down&cmd=conference&name=".$conference_name."&data=volume_out&id=".$id."');\" value='-".$text['label-gain']."'>\n";
|
||||||
|
}
|
||||||
|
//mute and unmute
|
||||||
|
if (permission_exists('conference_interactive_mute')) {
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?cmd=conference&name=".$conference_name."&data=".$action_mute."&id=".$id."');\" value='".$text['label-'.$action_mute]."'>\n";
|
||||||
|
}
|
||||||
|
//deaf and undeaf
|
||||||
|
if (permission_exists('conference_interactive_deaf')) {
|
||||||
|
$action_deaf = ($flag_can_hear == "true") ? 'deaf' : 'undeaf';
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?cmd=conference&name=".$conference_name."&data=".$action_deaf."&id=".$id."');\" value='".$text['label-'.$action_deaf]."'>\n";
|
||||||
|
}
|
||||||
|
//kick someone from the conference
|
||||||
|
if (permission_exists('conference_interactive_kick')) {
|
||||||
|
echo " <input type='button' class='btn' onclick=\"send_cmd('conference_exec.php?cmd=conference&name=".$conference_name."&data=kick&id=".$id."&uuid=".$uuid."');\" value='".$text['label-kick']."'>\n";
|
||||||
|
}
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
}
|
||||||
|
$c = ($c == 0) ? 1 : 0;
|
||||||
}
|
}
|
||||||
$c = ($c == 0) ? 1 : 0;
|
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
|||||||
Reference in New Issue
Block a user