Added display of the Phone Codes and Postal Codes that are loaded into the system. Linked from the System Settings page.
git-svn-id: svn://192.168.202.10@3476 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -664,6 +664,9 @@ OTHER CHANGES:
|
|||||||
See the "agc/options-example.php" file for more information.
|
See the "agc/options-example.php" file for more information.
|
||||||
*This will not affect custom webform query strings that start with "VAR"
|
*This will not affect custom webform query strings that start with "VAR"
|
||||||
|
|
||||||
|
185. Added display of the Phone Codes and Postal Codes that are loaded into the
|
||||||
|
system. Linked from the System Settings page.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5676,12 +5676,13 @@ if ($SSscript_remove_js > 0)
|
|||||||
# 210702-0848 - Added transfer_no_dispo campaign setting
|
# 210702-0848 - Added transfer_no_dispo campaign setting
|
||||||
# 210705-1037 - Added User override for campaign manual_dial_filter setting
|
# 210705-1037 - Added User override for campaign manual_dial_filter setting
|
||||||
# 210706-0128 - Added display of Call Time Holidays to the agent screen Scheduled Callbacks calendar
|
# 210706-0128 - Added display of Call Time Holidays to the agent screen Scheduled Callbacks calendar
|
||||||
|
# 210707-0731 - Added display of phone codes and postal codes, linked from System Settings page
|
||||||
#
|
#
|
||||||
|
|
||||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||||
|
|
||||||
$admin_version = '2.14-819a';
|
$admin_version = '2.14-820a';
|
||||||
$build = '210706-0128';
|
$build = '210707-0731';
|
||||||
|
|
||||||
$STARTtime = date("U");
|
$STARTtime = date("U");
|
||||||
$SQLdate = date("Y-m-d H:i:s");
|
$SQLdate = date("Y-m-d H:i:s");
|
||||||
@@ -6726,6 +6727,8 @@ if ($ADD==999991) {$hh='reports'; echo _QXZ("SERVERS VERSIONS");}
|
|||||||
if ($ADD==999990) {$hh='reports'; echo _QXZ("SYSTEM SNAPSHOT STATS");}
|
if ($ADD==999990) {$hh='reports'; echo _QXZ("SYSTEM SNAPSHOT STATS");}
|
||||||
if ($ADD==999989) {$hh='reports'; echo _QXZ("USER CHANGE LANGUAGE");}
|
if ($ADD==999989) {$hh='reports'; echo _QXZ("USER CHANGE LANGUAGE");}
|
||||||
if ($ADD==999988) {$hh='reports'; echo _QXZ("AVAILABLE TIMEZONES");}
|
if ($ADD==999988) {$hh='reports'; echo _QXZ("AVAILABLE TIMEZONES");}
|
||||||
|
if ($ADD==999987) {$hh='reports'; echo _QXZ("PHONE CODES");}
|
||||||
|
if ($ADD==999986) {$hh='reports'; echo _QXZ("POSTAL CODES");}
|
||||||
|
|
||||||
echo "</title>\n";
|
echo "</title>\n";
|
||||||
|
|
||||||
@@ -48273,6 +48276,173 @@ date_default_timezone_set($orig_zone);
|
|||||||
##### END available timezones display page #####
|
##### END available timezones display page #####
|
||||||
|
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=999987 - phone_codes display page
|
||||||
|
######################
|
||||||
|
if ($ADD==999987)
|
||||||
|
{
|
||||||
|
$orig_zone = date_default_timezone_get();
|
||||||
|
|
||||||
|
$PCfilterSQL='';
|
||||||
|
$PCfilterTEXT='';
|
||||||
|
if ( (strlen($stage) > 2) and (preg_match("/-/",$stage)) )
|
||||||
|
{
|
||||||
|
$PSstage = explode('-',$stage);
|
||||||
|
$PCfilterSQL = "and country_code='$PSstage[0]' and state='$PSstage[1]'";
|
||||||
|
$PCfilterTEXT = " ("._QXZ("Country Code").": $PSstage[0] "._QXZ("State").": $PSstage[1]) <a href=\"$PHP_SELF?ADD=999987\">"._QXZ("reset")."</a> ";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<TABLE><TR><TD>\n";
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
# country_code | country | areacode | state | GMT_offset | DST | DST_range | geographic_description | tz_code | php_tz
|
||||||
|
$stmt="SELECT count(*),tz_code,GMT_offset,country_code,country,country_name,areacode,state,geographic_description,dst,php_tz FROM vicidial_phone_codes p,vicidial_country_iso_tld i where i.iso3=p.country and php_tz!='' $PCfilterSQL group by country_code,areacode,state,tz_code,GMT_offset,dst,php_tz order by country_code,areacode,CAST(GMT_offset as SIGNED INTEGER) desc,tz_code,dst,php_tz;";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$zones_to_print = mysqli_num_rows($rslt);
|
||||||
|
|
||||||
|
echo "<br><b>"._QXZ("PHONE CODES")."</b><br>\n";
|
||||||
|
echo "<br><font size=1>$zones_to_print "._QXZ("RECORDS")." $PCfilterTEXT</font><br>\n";
|
||||||
|
echo "<center><TABLE width=1100 cellspacing=3>\n";
|
||||||
|
echo "<tr bgcolor=#$SSstd_row3_background>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Code")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Country")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("AreaCode")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("State")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("DST")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Description")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Offset")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("TZ Code")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Current Time")."</B></td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
$o=0;
|
||||||
|
$row_color=0; $last_country='';
|
||||||
|
while ($zones_to_print > $o)
|
||||||
|
{
|
||||||
|
$rowx=mysqli_fetch_row($rslt);
|
||||||
|
date_default_timezone_set($rowx[10]);
|
||||||
|
$tz_time = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
|
if ($rowx[3] != "$last_country") {$row_color++; $last_country = $rowx[3];}
|
||||||
|
if (preg_match('/1$|3$|5$|7$|9$/i', $row_color))
|
||||||
|
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||||
|
else
|
||||||
|
{$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';}
|
||||||
|
echo "<tr $bgcolor>\n";
|
||||||
|
|
||||||
|
echo "<td align=center><font size=1>$rowx[3]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[4] - $rowx[5]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[6]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=999987&stage=$rowx[3]-$rowx[7]\"><font color=black>$rowx[7]</font></a></font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[9]</font></td>\n";
|
||||||
|
echo "<td align=left><font size=1> $rowx[8] - $rowx[5]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[2]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[1]</font></td>\n";
|
||||||
|
echo "<td align=left><font size=1> $tz_time</font></td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
$o++;
|
||||||
|
}
|
||||||
|
echo "</TABLE></center></form>\n";
|
||||||
|
}
|
||||||
|
date_default_timezone_set($orig_zone);
|
||||||
|
##### END available phone_codes display page #####
|
||||||
|
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=999986 - postal_codes display page
|
||||||
|
######################
|
||||||
|
if ($ADD==999986)
|
||||||
|
{
|
||||||
|
echo "<TABLE><TR><TD>\n";
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
$limitSQL='';
|
||||||
|
$next_prev_HTML='';
|
||||||
|
$PCentries_per_page='2000';
|
||||||
|
|
||||||
|
$stmt="SELECT count(*) from vicidial_postal_codes;";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$pc_count = $row[0];
|
||||||
|
|
||||||
|
if ( ($pc_count > $PCentries_per_page) and ($status != 'display_all') )
|
||||||
|
{
|
||||||
|
if (strlen($start_count) < 1) {$start_count=0;}
|
||||||
|
$next_count = ($start_count + $PCentries_per_page);
|
||||||
|
$nextnext_count = ($next_count + $PCentries_per_page);
|
||||||
|
if ($next_count > $pc_count)
|
||||||
|
{$next_count = $pc_count;}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($nextnext_count > $pc_count)
|
||||||
|
{
|
||||||
|
$next_temp = ($pc_count - $next_count);
|
||||||
|
$nextHTML = "<a href=\"$PHP_SELF?ADD=999986&start_count=$next_count&stage=$stage\">"._QXZ("NEXT")." $next_temp</a> ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$nextHTML = "<a href=\"$PHP_SELF?ADD=999986&start_count=$next_count&stage=$stage\">"._QXZ("NEXT")." $PCentries_per_page</a> ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$next_prev_HTML .= _QXZ("RECORDS")." $start_count - $next_count <font size=1>"._QXZ("of")." $pc_count</font> ";
|
||||||
|
$limitSQL="limit $PCentries_per_page";
|
||||||
|
if ($start_count > 0)
|
||||||
|
{
|
||||||
|
$prev_count = ($start_count - $PCentries_per_page);
|
||||||
|
$limitSQL="limit $start_count,$PCentries_per_page";
|
||||||
|
$next_prev_HTML .= "<a href=\"$PHP_SELF?ADD=999986&start_count=$prev_count&stage=$stage\">"._QXZ("PREVIOUS")." $PCentries_per_page</a> ";
|
||||||
|
}
|
||||||
|
$next_prev_HTML .= $nextHTML;
|
||||||
|
$next_prev_HTML .= " </b><a href=\"$PHP_SELF?ADD=999986&status=display_all&stage=$stage\"><font size=1 color=black>"._QXZ("show all postal codes")."</font></a><b> ";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<br><b>"._QXZ("POSTAL CODES")."</b><br>\n";
|
||||||
|
echo "<br>$next_prev_HTML\n";
|
||||||
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
||||||
|
echo "<tr bgcolor=#$SSstd_row3_background>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Country")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Postal Code")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("State")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("DST")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Offset")."</B></td>\n";
|
||||||
|
echo "<td align=center><B>"._QXZ("Current Time")."</B></td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
# postal_code | state | GMT_offset | DST | DST_range | country | country_code
|
||||||
|
$stmt="SELECT count(*),GMT_offset,country,country_name,postal_code,state,dst FROM vicidial_postal_codes p,vicidial_country_iso_tld i where i.iso3=p.country group by country_code,postal_code,state,GMT_offset,dst order by country_code,postal_code,CAST(GMT_offset as SIGNED INTEGER) desc,dst $limitSQL;";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$zones_to_print = mysqli_num_rows($rslt);
|
||||||
|
$o=0;
|
||||||
|
$row_color=0; $last_country='';
|
||||||
|
while ($zones_to_print > $o)
|
||||||
|
{
|
||||||
|
$rowx=mysqli_fetch_row($rslt);
|
||||||
|
$temp_postal_gmt_offset = $rowx[1];
|
||||||
|
if ($rowx[6] == 'Y') {$temp_postal_gmt_offset = ($temp_postal_gmt_offset + 1);}
|
||||||
|
$LOCALzone=(3600 * $temp_postal_gmt_offset);
|
||||||
|
$LOCALdate=gmdate("D j M Y H:i", time() + $LOCALzone);
|
||||||
|
|
||||||
|
if ($rowx[3] != "$last_country") {$row_color++; $last_country = $rowx[3];}
|
||||||
|
if (preg_match('/1$|3$|5$|7$|9$/i', $row_color))
|
||||||
|
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||||
|
else
|
||||||
|
{$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';}
|
||||||
|
echo "<tr $bgcolor>\n";
|
||||||
|
|
||||||
|
echo "<td align=center><font size=1>$rowx[2] - $rowx[3]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[4]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[5]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[6]</font></td>\n";
|
||||||
|
echo "<td align=center><font size=1>$rowx[1]</font></td>\n";
|
||||||
|
echo "<td align=left><font size=1> $LOCALdate</font></td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
$o++;
|
||||||
|
}
|
||||||
|
echo "</TABLE></center></form>\n";
|
||||||
|
}
|
||||||
|
##### END available postal_codes display page #####
|
||||||
|
|
||||||
|
|
||||||
echo "</TD></TR></TABLE></center>\n";
|
echo "</TD></TR></TABLE></center>\n";
|
||||||
echo "</TD></TR></TABLE></center>\n";
|
echo "</TD></TR></TABLE></center>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,7 @@
|
|||||||
# 201108-1232 - Added no_header option within short_header option
|
# 201108-1232 - Added no_header option within short_header option
|
||||||
# 210226-1547 - Added Copy Phone link
|
# 210226-1547 - Added Copy Phone link
|
||||||
# 210306-0902 - Changes for new QC module
|
# 210306-0902 - Changes for new QC module
|
||||||
|
# 210707-0730 - Added header links for timezones, phone codes and postal codes
|
||||||
#
|
#
|
||||||
|
|
||||||
$stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled,allow_emails,level_8_disable_add,allow_chats,enable_languages,admin_row_click,admin_screen_colors,user_new_lead_limit,user_territories_active,qc_features_active,agent_soundboards,enable_drop_lists,allow_ip_lists from system_settings;";
|
$stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled,allow_emails,level_8_disable_add,allow_chats,enable_languages,admin_row_click,admin_screen_colors,user_new_lead_limit,user_territories_active,qc_features_active,agent_soundboards,enable_drop_lists,allow_ip_lists from system_settings;";
|
||||||
@@ -1738,7 +1739,7 @@ background:rgb(102,255,51);
|
|||||||
font-family:HELVETICA;
|
font-family:HELVETICA;
|
||||||
font-size:11;
|
font-size:11;
|
||||||
color:BLACK;
|
color:BLACK;
|
||||||
{
|
}
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@@ -2684,12 +2685,20 @@ if ($SSenable_languages == '1')
|
|||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
|
|
||||||
if (strlen($reports_hh) > 25) {
|
if ( ($ADD=='999988') or ($ADD=='999987') or ($ADD=='999986') )
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<TR BGCOLOR=<?php echo $reports_color ?>><TD ALIGN=LEFT COLSPAN=2><FONT STYLE="font-family:HELVETICA;font-size:<?php echo $subcamp_font_size ?>;"><B> </B></TD></TR>
|
<TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT COLSPAN=2> <a href="./admin.php?ADD=999988" STYLE="text-decoration:none;"><FONT STYLE="font-family:HELVETICA;font-size:<?php echo $subcamp_font_size ?>;color:BLACK;"><?php echo _QXZ("Available Timezones"); ?> </a> | <a href="./admin.php?ADD=999987" STYLE="text-decoration:none;"><FONT STYLE="font-family:HELVETICA;font-size:<?php echo $subcamp_font_size ?>;color:BLACK;"><?php echo _QXZ("Phone Codes"); ?> </a> | <a href="./admin.php?ADD=999986" STYLE="text-decoration:none;"><FONT STYLE="font-family:HELVETICA;font-size:<?php echo $subcamp_font_size ?>;color:BLACK;"><?php echo _QXZ("Postal Codes"); ?> </a> </TD></TR>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (strlen($reports_hh) > 25) {
|
||||||
|
?>
|
||||||
|
<TR BGCOLOR=<?php echo $reports_color ?>><TD ALIGN=LEFT COLSPAN=2><FONT STYLE="font-family:HELVETICA;font-size:<?php echo $subcamp_font_size ?>;"><B> </B></TD></TR>
|
||||||
|
<?php }
|
||||||
|
}
|
||||||
|
?>
|
||||||
<TR><TD ALIGN=LEFT COLSPAN=2 HEIGHT=2 BGCOLOR=#<?php echo "$SSmenu_background" ?>></TD></TR>
|
<TR><TD ALIGN=LEFT COLSPAN=2 HEIGHT=2 BGCOLOR=#<?php echo "$SSmenu_background" ?>></TD></TR>
|
||||||
<TR><TD ALIGN=LEFT COLSPAN=2>
|
<TR><TD ALIGN=LEFT COLSPAN=2>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user