admin.php copyright date update

added webphone variables to bulk phone add script
fixed fullname dispo/start url variable

git-svn-id: svn://192.168.202.10@1770 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2012-01-05 01:44:59 +00:00
parent 668bc616cf
commit 1d5e74a1c6
3 changed files with 64 additions and 22 deletions
+14 -11
View File
@@ -1,7 +1,7 @@
<?php
# vdc_db_query.php
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2012 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to exchange information between vicidial.php and the database server for various actions
#
@@ -301,10 +301,11 @@
# 111024-1238 - Added callback_list_calltime option
# 111114-0035 - Added qm-dispo-code field to updatedispo function
# 111201-1443 - Added group_grade option
# 120104-2031 - Fixed missing fullname variable before dispo and start URLs
#
$version = '2.4-201';
$build = '111201-1443';
$version = '2.4-202';
$build = '120104-2031';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=438;
$one_mysql_log=0;
@@ -4796,7 +4797,7 @@ if ($ACTION == 'VDADcheckINCOMING')
### update the log status to INCALL
$user_group='';
$stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;";
$stmt="SELECT user_group,full_name FROM vicidial_users where user='$user' LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00111',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -4805,6 +4806,7 @@ if ($ACTION == 'VDADcheckINCOMING')
{
$row=mysql_fetch_row($rslt);
$user_group = trim("$row[0]");
$fullname = $row[1];
}
$stmt = "SELECT campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;";
@@ -7061,9 +7063,9 @@ if ($ACTION == 'updateDISPO')
$talk_time=0;
$talk_time_ms=0;
$talk_time_min=0;
if (eregi('--A--user_custom_',$dispo_call_url))
if ( (eregi('--A--user_custom_',$dispo_call_url)) or (eregi('--A--fullname',$dispo_call_url)) )
{
$stmt = "select custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user='$user';";
$stmt = "select custom_one,custom_two,custom_three,custom_four,custom_five,full_name from vicidial_users where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00288',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -7071,11 +7073,12 @@ if ($ACTION == 'updateDISPO')
if ($VUC_ct > 0)
{
$row=mysql_fetch_row($rslt);
$user_custom_one = urlencode(trim($row[0]));
$user_custom_two = urlencode(trim($row[1]));
$user_custom_three = urlencode(trim($row[2]));
$user_custom_four = urlencode(trim($row[3]));
$user_custom_five = urlencode(trim($row[4]));
$user_custom_one = urlencode(trim($row[0]));
$user_custom_two = urlencode(trim($row[1]));
$user_custom_three = urlencode(trim($row[2]));
$user_custom_four = urlencode(trim($row[3]));
$user_custom_five = urlencode(trim($row[4]));
$fullname = $row[5];
}
}
+8 -7
View File
@@ -1,7 +1,7 @@
<?php
# admin.php - VICIDIAL administration page
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2012 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
require("dbconnect.php");
@@ -3023,12 +3023,13 @@ else
# 111223-0043 - Added max stats displays for in-groups and , fixed several ereg issues
# 111227-1938 - Added Timer Action for Dx_DIAL_QUIET options
# 120102-2125 - Added Dialer Inventory Report
# 120104-2024 - Changed copyright dates, other small fixes
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.4-353a';
$build = '120102-2125';
$admin_version = '2.4-354a';
$build = '120104-2024';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -3310,7 +3311,7 @@ echo "<html>\n";
echo "<head>\n";
echo "<!-- VERSION: $admin_version BUILD: $build ADD: $ADD PHP_SELF: $PHP_SELF-->\n";
echo "<META NAME=\"ROBOTS\" CONTENT=\"NONE\">\n";
echo "<META NAME=\"COPYRIGHT\" CONTENT=\"&copy; 2011 ViciDial Group\">\n";
echo "<META NAME=\"COPYRIGHT\" CONTENT=\"&copy; 2012 ViciDial Group\">\n";
echo "<META NAME=\"AUTHOR\" CONTENT=\"ViciDial Group\">\n";
if ($SSnocache_admin=='1')
{
@@ -23835,7 +23836,7 @@ if ($ADD==301)
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=27&campaign_id=$campaigns_id_list[$o]\">$campaigns_id_list[$o]</a></td>";
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=201&campaign_id=$campaigns_id_list[$o]\">$campaigns_id_list[$o]</a></td>";
echo "<td><font size=1> $campaigns_name_list[$o] </td>";
echo "<td><font size=1> ";
@@ -32643,7 +32644,7 @@ if ($ADD==999995)
echo "<br><B> Welcome to ViciDial: copyright, trademark and license page</B><BR><BR>\n";
echo "<center><TABLE width=$section_width cellspacing=5 cellpadding=2>\n";
echo "<tr bgcolor=#B6D3FC><td align=right valign=top><B><font size=3>Copyright: </B></td><td align=left> &nbsp; The ViciDial Call Center Suite is maintained by the <a href=\"http://www.vicidial.com/\" target=\"_blank\">ViciDial Group</a>, &copy; 2011</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right valign=top><B><font size=3>Copyright: </B></td><td align=left> &nbsp; The ViciDial Call Center Suite is maintained by the <a href=\"http://www.vicidial.com/\" target=\"_blank\">ViciDial Group</a>, &copy; 2012</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right valign=top><B><font size=3>Trademark: </B></td><td align=left> &nbsp; \"VICIDIAL\" is a registered trademark of the <a href=\"http://www.vicidial.com/\" target=\"_blank\">ViciDial Group</a>. Here is our <a href=\"http://www.vicidial.com/trademark.html\" target=\"_blank\">trademark use policy</a></td></tr>\n";
@@ -32767,7 +32768,7 @@ echo "<font size=0 color=white><br><br><!-- RUNTIME: $RUNtime seconds<BR> -->";
echo "VERSION: $admin_version<BR>";
echo "BUILD: $build\n";
if (!preg_match("/_BUILD_/",$SShosted_settings))
{echo "<BR><a href=\"$PHP_SELF?ADD=999995\"><font color=white>&copy; 2011 ViciDial Group</font></a><BR><img src=\"images/pixel.gif\">";}
{echo "<BR><a href=\"$PHP_SELF?ADD=999995\"><font color=white>&copy; 2012 ViciDial Group</font></a><BR><img src=\"images/pixel.gif\">";}
echo "</font>\n";
?>
@@ -1,17 +1,18 @@
<?php
# admin_phones_bulk_insert.php
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2012 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# this screen will insert phones into your multi-server system with aliases
#
# changes:
# 101230-0501 - First Build
# 110712-0932 - Added extension suffix exception for non-SIP/IAX phones, added HELP
# 120104-2023 - Added webphone options
#
$admin_version = '2.4-2';
$build = '110712-0932';
$admin_version = '2.4-3';
$build = '120104-2023';
require("dbconnect.php");
@@ -41,6 +42,14 @@ if (isset($_GET["alias_suffix"])) {$alias_suffix=$_GET["alias_suffix"];}
elseif (isset($_POST["alias_suffix"])) {$alias_suffix=$_POST["alias_suffix"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["is_webphone"])) {$is_webphone=$_GET["is_webphone"];}
elseif (isset($_POST["is_webphone"])) {$is_webphone=$_POST["is_webphone"];}
if (isset($_GET["webphone_dialpad"])) {$webphone_dialpad=$_GET["webphone_dialpad"];}
elseif (isset($_POST["webphone_dialpad"])) {$webphone_dialpad=$_POST["webphone_dialpad"];}
if (isset($_GET["webphone_auto_answer"])) {$webphone_auto_answer=$_GET["webphone_auto_answer"];}
elseif (isset($_POST["webphone_auto_answer"])) {$webphone_auto_answer=$_POST["webphone_auto_answer"];}
if (isset($_GET["use_external_server_ip"])) {$use_external_server_ip=$_GET["use_external_server_ip"];}
elseif (isset($_POST["use_external_server_ip"])){$use_external_server_ip=$_POST["use_external_server_ip"];}
if (strlen($action) < 2)
@@ -63,6 +72,10 @@ if ($non_latin < 1)
$alias_suffix = ereg_replace("[^0-9a-zA-Z]","",$alias_suffix);
$protocol = ereg_replace("[^-_0-9a-zA-Z]","",$protocol);
$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt);
$is_webphone = ereg_replace("[^NY]","",$is_webphone);
$webphone_dialpad = ereg_replace("[^-_0-9a-zA-Z]","",$webphone_dialpad);
$webphone_auto_answer = ereg_replace("[^NY]","",$webphone_auto_answer);
$use_external_server_ip = ereg_replace("[^NY]","",$use_external_server_ip);
} # end of non_latin
else
{
@@ -202,6 +215,27 @@ if ($action == "HELP")
<B>Local GMT -</B> This is the time zone that all of the phones will be created with.
<BR><BR>
<BR>
<A NAME="is_webphone">
<BR>
<B>Set As Webphone -</B> Setting this option to Y will attempt to load a web-based phone when the agent logs into their agent screen. Default is N.
<BR>
<A NAME="webphone_dialpad">
<BR>
<B>Webphone Dialpad -</B> 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.
<BR>
<A NAME="webphone_auto_answer">
<BR>
<B>Webphone Auto-Answer -</B> 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.
<BR>
<A NAME="use_external_server_ip">
<BR>
<B>Use External Server IP -</B> 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.
</TD></TR></TABLE>
</BODY>
</HTML>
@@ -272,6 +306,10 @@ if ($action == "BLANK")
echo "<tr bgcolor=#B6D3FC><td align=right>Alias Suffix: </td><td align=left><input type=text name=alias_suffix size=2 maxlength=4> $NWB#alias_suffix$NWE </td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Client Protocol: </td><td align=left><select size=1 name=protocol><option>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option></select> $NWB#protocol$NWE </td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Local GMT: </td><td align=left><select size=1 name=local_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option selected>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option></select> (Do NOT Adjust for DST) $NWB#gmt$NWE </td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Set As Webphone: </td><td align=left><select size=1 name=is_webphone><option>Y</option><option selected>N</option></select>$NWB#is_webphone$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>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#webphone_dialpad$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Webphone Auto-Answer: </td><td align=left><select size=1 name=webphone_auto_answer><option selected>Y</option><option>N</option></select>$NWB#webphone_auto_answer$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>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#use_external_server_ip$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
echo "</TABLE></center>\n";
echo "</TD></TR></TABLE>\n";
@@ -393,7 +431,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) values('$extension','$dialplan_number','$voicemail_id','$phone_server_ip','$login','$pass','ACTIVE','Y','$phone_type','$fullname','$protocol','$local_gmt','0000000000','$conf_secret');";
$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) 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');";
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
if ($DB > 0) {echo "$s|$p|$SN[$s]|$PN[$p]|$affected_rows|$stmt\n<BR>";}