Fix more tabbing, line feeds and domain_uuid to the session domain uuid.
This commit is contained in:
parent
bf215c6499
commit
9cb7a97857
|
|
@ -98,7 +98,7 @@ else {
|
|||
from
|
||||
v_call_center_tiers
|
||||
where
|
||||
domain_uuid = '".$domain_uuid."' and
|
||||
domain_uuid = '".$_SESSION['domain_uuid']."' and
|
||||
call_center_tier_uuid = '".$tier_uuid."'
|
||||
";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
|
|
@ -111,19 +111,19 @@ else {
|
|||
}
|
||||
unset ($prep_statement);
|
||||
//delete the agent from freeswitch
|
||||
//get the domain using the $domain_uuid
|
||||
$tmp_domain = $_SESSION['domains'][$domain_uuid]['domain_name'];
|
||||
//get the domain using the $_SESSION['domain_uuid']
|
||||
$tmp_domain = $_SESSION['domains'][$_SESSION['domain_uuid']]['domain_name'];
|
||||
//setup the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
//delete the agent over event socket
|
||||
if ($fp) {
|
||||
//callcenter_config tier del [queue_name] [agent_name]
|
||||
$cmd = "api callcenter_config tier del ".$queue_name."@".$tmp_domain." ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name'];
|
||||
$cmd = "api callcenter_config tier del ".$queue_name."@".$tmp_domain." ".$agent_name."@".$_SESSION['domains'][$_SESSION['domain_uuid']]['domain_name'];
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
//delete the tier from the database
|
||||
if (strlen($tier_uuid)>0) {
|
||||
$sql = "delete from v_call_center_tiers where domain_uuid = '".$domain_uuid."' and call_center_tier_uuid = '".$tier_uuid."'";
|
||||
$sql = "delete from v_call_center_tiers where domain_uuid = '".$_SESSION['domain_uuid']."' and call_center_tier_uuid = '".$tier_uuid."'";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql);
|
||||
|
|
@ -138,7 +138,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
|
||||
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
|
||||
if (strlen($queue_name) == 0) { $msg .= $text['message-required'].$text['label-queue_name']."<br>\n"; }
|
||||
if (strlen($queue_extension) == 0) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
|
||||
if (strlen($queue_strategy) == 0) { $msg .= $text['message-required'].$text['label-strategy']."<br>\n"; }
|
||||
|
|
@ -206,7 +206,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'$call_center_queue_uuid', ";
|
||||
$sql .= "'$queue_name', ";
|
||||
$sql .= "'$queue_extension', ";
|
||||
|
|
@ -274,7 +274,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$sql .= "queue_announce_frequency = '$queue_announce_frequency', ";
|
||||
}
|
||||
$sql .= "queue_description = '$queue_description' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and call_center_queue_uuid = '$call_center_queue_uuid'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
|
@ -338,7 +338,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'$call_center_tier_uuid', ";
|
||||
$sql .= "'$agent_name', ";
|
||||
$sql .= "'$queue_name', ";
|
||||
|
|
@ -363,7 +363,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
$call_center_queue_uuid = $_GET["id"];
|
||||
$sql = "select * from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and call_center_queue_uuid = '$call_center_queue_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
|
|
@ -537,7 +537,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('call_center_tier_view')) {
|
||||
|
||||
echo "<tr>";
|
||||
echo " <td class='vncell' valign='top'>".$text['label-tiers'].":</td>";
|
||||
echo " <td class='vtable' align='left'>";
|
||||
|
|
@ -550,18 +549,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " </tr>\n";
|
||||
|
||||
if ($call_center_queue_uuid != '') {
|
||||
|
||||
//replace the space in the queue name with a dash
|
||||
$db_queue_name = str_replace(" ", "-", $queue_name);
|
||||
|
||||
$sql = "select * from v_call_center_tiers ";
|
||||
$sql .= "where queue_name = '".$db_queue_name."' ";
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "order by tier_level asc, tier_position asc, agent_name asc";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
foreach($result as $field) {
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vtable'>".$field['agent_name']."</td>\n";
|
||||
|
|
@ -579,13 +576,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$assigned_agents[] = $field['agent_name'];
|
||||
}
|
||||
unset ($prep_statement, $sql, $result);
|
||||
|
||||
}
|
||||
|
||||
if (permission_exists('call_center_tier_add')) {
|
||||
|
||||
//get agents
|
||||
$sql = "select agent_name from v_call_center_agents where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql = "select agent_name from v_call_center_agents where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
foreach($assigned_agents as $assigned_agent) {
|
||||
$sql .= "and agent_name <> '".$assigned_agent."' ";
|
||||
}
|
||||
|
|
@ -593,16 +588,15 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
|
||||
if (sizeof($result)>0) {
|
||||
if (sizeof($result) > 0) {
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vtable'>\n";
|
||||
echo " <select id='agent_name' name='agent_name' class='formfld'>\n";
|
||||
echo "<select id='agent_name' name='agent_name' class='formfld'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($result as $field) {
|
||||
echo " <option value='".$field['agent_name']."'>".$field['agent_name']."</option>\n";
|
||||
}
|
||||
unset($sql, $result);
|
||||
unset($sql,$prep_statement);
|
||||
echo " </select>";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' style='text-align: center;'>\n";
|
||||
|
|
@ -624,7 +618,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo " </table>\n";
|
||||
|
|
@ -633,7 +626,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " <br />\n";
|
||||
echo " </td>";
|
||||
echo "</tr>";
|
||||
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
|
|
@ -696,7 +688,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " ".$text['label-record_template'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
$record_ext=($_SESSION['record_ext']=='mp3'?'mp3':'wav');
|
||||
$record_ext=($_SESSION['record_ext']=='mp3'?'mp3':'wav');
|
||||
$record_template = $_SESSION['switch']['recordings']['dir']."/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.".$record_ext;
|
||||
echo " <select class='formfld' name='queue_record_template'>\n";
|
||||
if (strlen($queue_record_template) > 0) {
|
||||
|
|
@ -915,29 +907,27 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-caller_announce_sound'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='queue_announce_sound' maxlength='255' value='$queue_announce_sound'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-caller_announce_sound']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-caller_announce_sound'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='queue_announce_sound' maxlength='255' value='$queue_announce_sound'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-caller_announce_sound']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-caller_announce_frequency'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='queue_announce_frequency' maxlength='255' value='$queue_announce_frequency'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-caller_announce_frequency']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-caller_announce_frequency'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='queue_announce_frequency' maxlength='255' value='$queue_announce_frequency'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-caller_announce_frequency']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue