Added template option to bulk phone insert page
Raised Calls Export Report record limit to 1 million(may require raising php.ini settings to use) git-svn-id: svn://192.168.202.10@3056 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -19,10 +19,11 @@
|
||||
# 141229-2101 - Added code for on-the-fly language translations display
|
||||
# 170409-1532 - Added IP List validation code
|
||||
# 180503-2015 - Added new help display
|
||||
# 181130-1304 - Added template option
|
||||
#
|
||||
|
||||
$admin_version = '2.14-12';
|
||||
$build = '170409-1532';
|
||||
$admin_version = '2.14-13';
|
||||
$build = '181130-1304';
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
@@ -62,6 +63,8 @@ if (isset($_GET["use_external_server_ip"])) {$use_external_server_ip=$_GET["us
|
||||
elseif (isset($_POST["use_external_server_ip"])){$use_external_server_ip=$_POST["use_external_server_ip"];}
|
||||
if (isset($_GET["phone_context"])) {$phone_context=$_GET["phone_context"];}
|
||||
elseif (isset($_POST["phone_context"])) {$phone_context=$_POST["phone_context"];}
|
||||
if (isset($_GET["template_id"])) {$template_id=$_GET["template_id"];}
|
||||
elseif (isset($_POST["template_id"])) {$template_id=$_POST["template_id"];}
|
||||
|
||||
if (strlen($action) < 2)
|
||||
{$action = 'BLANK';}
|
||||
@@ -112,6 +115,7 @@ if ($non_latin < 1)
|
||||
$webphone_auto_answer = preg_replace("/[^NY]/","",$webphone_auto_answer);
|
||||
$use_external_server_ip = preg_replace("/[^NY]/","",$use_external_server_ip);
|
||||
$phone_context = preg_replace("/[^-\_0-9a-zA-Z]/","",$phone_context);
|
||||
$template_id = preg_replace('/[^-_0-9a-zA-Z]/','',$template_id);
|
||||
} # end of non_latin
|
||||
else
|
||||
{
|
||||
@@ -173,13 +177,34 @@ if ( $ast_delete_phones < 1 )
|
||||
exit;
|
||||
}
|
||||
|
||||
$stmt="SELECT full_name,ast_delete_phones,ast_admin_access,user_level from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
$stmt="SELECT full_name,ast_delete_phones,ast_admin_access,user_level,user_group from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGfullname = $row[0];
|
||||
$LOGast_delete_phones = $row[1];
|
||||
$LOGast_admin_access = $row[2];
|
||||
$LOGuser_level = $row[3];
|
||||
$LOGuser_group = $row[4];
|
||||
|
||||
$stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';";
|
||||
if ($DB) {$DBout .= "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGallowed_campaigns = $row[0];
|
||||
$LOGallowed_reports = $row[1];
|
||||
$LOGadmin_viewable_groups = $row[2];
|
||||
$LOGadmin_viewable_call_times = $row[3];
|
||||
|
||||
$LOGadmin_viewable_groupsSQL='';
|
||||
$whereLOGadmin_viewable_groupsSQL='';
|
||||
if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) )
|
||||
{
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups);
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL);
|
||||
$LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
$whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
@@ -272,6 +297,11 @@ if ($action == "HELP")
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Use External Server IP"); ?> -</B> <?php echo _QXZ("If using as a web phone, you can set this to Y to use the servers External IP to register to instead of the Server IP. Default is empty."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="template_id">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Template ID"); ?> -</B> <?php echo _QXZ("Use this optoin to assign a phone template to all of the phone entries created by this bulk insert utility. Default is empty."); ?>
|
||||
|
||||
|
||||
</TD></TR></TABLE>
|
||||
</BODY>
|
||||
@@ -383,6 +413,23 @@ if ($action == "BLANK")
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Webphone Dialpad").": </td><td align=left><select size=1 name=webphone_dialpad><option selected>Y</option><option>N</option><option>TOGGLE</option><option>TOGGLE_OFF</option></select>$NWB#admin_phones_bulk_insert-webphone_dialpad$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Webphone Auto-Answer").": </td><td align=left><select size=1 name=webphone_auto_answer><option selected>Y</option><option>N</option></select>$NWB#admin_phones_bulk_insert-webphone_auto_answer$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Use External Server IP").": </td><td align=left><select size=1 name=use_external_server_ip><option>Y</option><option selected>N</option></select>$NWB#admin_phones_bulk_insert-use_external_server_ip$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Template ID")."</a>: </td><td align=left><select size=1 name=template_id>\n";
|
||||
$stmt="SELECT template_id,template_name from vicidial_conf_templates $whereLOGadmin_viewable_groupsSQL order by template_id;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$templates_to_print = mysqli_num_rows($rslt);
|
||||
$templates_list='<option value=\'\' SELECTED>--'._QXZ("NONE").'--</option>';
|
||||
$o=0;
|
||||
while ($templates_to_print > $o)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$templates_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
echo "$templates_list";
|
||||
# echo "<option SELECTED value=\"\">---NONE---</option>\n";
|
||||
echo "</select>$NWB#admin_phones_bulk_insert-template_id$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=center colspan=2><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=center colspan=2>"._QXZ("NOTE: Submitting this form will NOT trigger a conf file rebuild")."</td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
@@ -507,7 +554,7 @@ if ($action == "ADD_PHONES_SUBMIT")
|
||||
$phone_type = "CCagent";
|
||||
$fullname = "ext $PN[$p]";
|
||||
|
||||
$stmt = "INSERT INTO phones (extension,dialplan_number,voicemail_id,server_ip,login,pass,status,active,phone_type,fullname,protocol,local_gmt,outbound_cid,conf_secret,is_webphone,webphone_dialpad,webphone_auto_answer,use_external_server_ip,phone_context) values('$extension','$dialplan_number','$voicemail_id','$phone_server_ip','$login','$pass','ACTIVE','Y','$phone_type','$fullname','$protocol','$local_gmt','0000000000','$conf_secret','$is_webphone','$webphone_dialpad','$webphone_auto_answer','$use_external_server_ip','$phone_context');";
|
||||
$stmt = "INSERT INTO phones (extension,dialplan_number,voicemail_id,server_ip,login,pass,status,active,phone_type,fullname,protocol,local_gmt,outbound_cid,conf_secret,is_webphone,webphone_dialpad,webphone_auto_answer,use_external_server_ip,phone_context,template_id) values('$extension','$dialplan_number','$voicemail_id','$phone_server_ip','$login','$pass','ACTIVE','Y','$phone_type','$fullname','$protocol','$local_gmt','0000000000','$conf_secret','$is_webphone','$webphone_dialpad','$webphone_auto_answer','$use_external_server_ip','$phone_context','$template_id');";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
if ($DB > 0) {echo "$s|$p|$SN[$s]|$PN[$p]|$affected_rows|$stmt\n<BR>";}
|
||||
|
||||
@@ -538,11 +538,11 @@ if ($run_export > 0)
|
||||
{
|
||||
if ( ($export_fields == 'EXTENDED') or ($export_fields == 'EXTENDED_2') or ($export_fields == 'EXTENDED_3') )
|
||||
{
|
||||
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id,vl.uniqueid,vi.entry_list_id, ifnull(val.dispo_sec+val.dead_sec,0)$export_fields_SQL from vicidial_users vu,vicidial_list vi,".$vicidial_log_table." vl LEFT OUTER JOIN ".$vicidial_agent_log_table." val ON vl.uniqueid=val.uniqueid and vl.lead_id=val.lead_id and vl.user=val.user where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 100000;";
|
||||
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id,vl.uniqueid,vi.entry_list_id, ifnull(val.dispo_sec+val.dead_sec,0)$export_fields_SQL from vicidial_users vu,vicidial_list vi,".$vicidial_log_table." vl LEFT OUTER JOIN ".$vicidial_agent_log_table." val ON vl.uniqueid=val.uniqueid and vl.lead_id=val.lead_id and vl.user=val.user where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 1000000;";
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id,vl.uniqueid,vi.entry_list_id$export_fields_SQL from vicidial_users vu,".$vicidial_log_table." vl,vicidial_list vi where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 100000;";
|
||||
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id,vl.uniqueid,vi.entry_list_id$export_fields_SQL from vicidial_users vu,".$vicidial_log_table." vl,vicidial_list vi where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 1000000;";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$DBout .= "$stmt\n";}
|
||||
@@ -661,11 +661,11 @@ if ($run_export > 0)
|
||||
{
|
||||
if ( ($export_fields == 'EXTENDED') or ($export_fields == 'EXTENDED_2') or ($export_fields == 'EXTENDED_3') )
|
||||
{
|
||||
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id,vl.closecallid,vi.entry_list_id,vl.uniqueid, ifnull(val.dispo_sec+val.dead_sec,0)$export_fields_SQL from vicidial_users vu,vicidial_list vi,".$vicidial_closer_log_table." vl LEFT OUTER JOIN ".$vicidial_agent_log_table." val ON vl.uniqueid=val.uniqueid and vl.lead_id=val.lead_id and vl.user=val.user where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 100000;";
|
||||
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id,vl.closecallid,vi.entry_list_id,vl.uniqueid, ifnull(val.dispo_sec+val.dead_sec,0)$export_fields_SQL from vicidial_users vu,vicidial_list vi,".$vicidial_closer_log_table." vl LEFT OUTER JOIN ".$vicidial_agent_log_table." val ON vl.uniqueid=val.uniqueid and vl.lead_id=val.lead_id and vl.user=val.user where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 1000000;";
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id,vl.closecallid,vi.entry_list_id,vl.uniqueid$export_fields_SQL from vicidial_users vu,".$vicidial_closer_log_table." vl,vicidial_list vi where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 100000;";
|
||||
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id,vl.closecallid,vi.entry_list_id,vl.uniqueid$export_fields_SQL from vicidial_users vu,".$vicidial_closer_log_table." vl,vicidial_list vi where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 1000000;";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmtA, $link);
|
||||
if ($DB) {$DBout .= "$stmt\n";}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# version: 201810051743
|
||||
# version: 201811301709
|
||||
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
|
||||
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N.</QXZ>
|
||||
@@ -1249,6 +1249,7 @@ admin_phones_bulk_insert-is_webphone Set As Webphone <QXZ>Setting this option to
|
||||
admin_phones_bulk_insert-webphone_dialpad Webphone Dialpad <QXZ>This setting allows you to activate or deactivate the dialpad for this webphone. Default is Y for enabled. TOGGLE will allow the user to view and hide the dialpad by clicking a link. This feature is not available on all webphone versions. TOGGLE_OFF will default to not show the dialpad on first load, but will allow the user to show the dialpad by clicking on the dialpad link.</QXZ>
|
||||
admin_phones_bulk_insert-webphone_auto_answer Webphone Auto-Answer <QXZ>This setting allows the web phone to be set to automatically answer calls that come in by setting it to Y, or to have calls ring by setting it to N. Default is Y.</QXZ>
|
||||
admin_phones_bulk_insert-use_external_server_ip Use External Server IP <QXZ>If using as a web phone, you can set this to Y to use the servers External IP to register to instead of the Server IP. Default is empty.</QXZ>
|
||||
admin_phones_bulk_insert-template_id Template ID <QXZ>Use this optoin to assign a phone template to all of the phone entries created by this bulk insert utility. Default is empty.</QXZ>
|
||||
soundboard-soundboard_id Soundboard ID <QXZ>The unique ID of the soundboard, must contain no spaces or special characters other than letters numbers dashes or underscores.</QXZ>
|
||||
soundboard-avatar_name Soundboard Name <QXZ>The name of the soundboard, will be displayed to the agent at the top of the Soundboard control screen.</QXZ>
|
||||
soundboard-avatar_notes Soundboard Notes <QXZ>For administrative notes only, not displayed to agents.</QXZ>
|
||||
|
||||
Reference in New Issue
Block a user