Added postal code cities display
git-svn-id: svn://192.168.202.10@3665 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -35,6 +35,7 @@ $domain = "http://phonecodes.vicidial.com";
|
||||
$URL1 = "$domain/phone_codes_GMT-latest-24.txt";
|
||||
$URL2 = "$domain/GMT_USA_zip-latest.txt";
|
||||
$URL3 = "$domain/country_ISO_TLD-latest.txt";
|
||||
$URL4 = "$domain/GMT_USA_zip-cities-latest.txt";
|
||||
|
||||
|
||||
### begin parsing run-time options ###
|
||||
@@ -57,6 +58,7 @@ if (length($ARGV[0])>1)
|
||||
print " [--use-local-files] = Do not download files, use local copies\n";
|
||||
print " [--load-NANPA-prefix] = Only loads the special NANPA list into the database\n";
|
||||
print " NOTE: NANPA data must be purchased from 'http://vicidial.org/store.php'\n";
|
||||
print " [--load-zip-cities] = Load the optional USA Zipcode-Cities data into the database\n";
|
||||
print " [--purge-table] = Purges the table to be inserted before inserting\n";
|
||||
print "\n";
|
||||
print " Files used by this script are:\n";
|
||||
@@ -108,6 +110,11 @@ if (length($ARGV[0])>1)
|
||||
$nanpa_load=1;
|
||||
print "\n----- NANPA PHONE PREFIX DATA LOAD -----\n\n";
|
||||
}
|
||||
if ($args =~ /--load-zip-cities/i)
|
||||
{
|
||||
$postal_city_load=1;
|
||||
print "\n----- ZIP-CITIES DATA LOAD -----\n\n";
|
||||
}
|
||||
if ($args =~ /--purge-table/i)
|
||||
{
|
||||
$purge_table=1;
|
||||
@@ -330,11 +337,15 @@ else
|
||||
`mv -f $PATHhome/phone_codes_GMT-latest-24.txt $PATHhome/phone_codes_GMT-latest-24-old.txt`;
|
||||
`mv -f $PATHhome/GMT_USA_zip-latest.txt $PATHhome/GMT_USA_zip-latest-old.txt`;
|
||||
`mv -f $PATHhome/country_ISO_TLD-latest.txt $PATHhome/country_ISO_TLD-latest-old.txt`;
|
||||
if ($postal_city_load > 0)
|
||||
{`mv -f $PATHhome/GMT_USA_zip-cities-latest.txt $PATHhome/GMT_USA_zip-cities-latest-old.txt`;}
|
||||
|
||||
# get files
|
||||
`wget $URL1`;
|
||||
`wget $URL2`;
|
||||
`wget $URL3`;
|
||||
if ($postal_city_load > 0)
|
||||
{`wget $URL4`;}
|
||||
}
|
||||
|
||||
#### BEGIN vicidial_phone_codes population from phone_codes_GMT-latest-24.txt file ####
|
||||
@@ -437,6 +448,58 @@ else
|
||||
#### END vicidial_postal_codes population ####
|
||||
|
||||
|
||||
#### BEGIN -optional- vicidial_postal_codes_cities population ####
|
||||
if ($postal_city_load > 0)
|
||||
{
|
||||
open(zipcityfile, "$PATHhome/GMT_USA_zip-cities-latest.txt") || die "can't open $PATHhome/GMT_USA_zip-cities-latest.txt: $!\n";
|
||||
@zipcityfile = <zipcityfile>;
|
||||
close(zipcityfile);
|
||||
if ( ($purge_table > 0) && ($#zipcityfile > 10) )
|
||||
{
|
||||
print "\n----- PURGING DATA IN vicidial_postal_codes_cities TABLE -----\n\n";
|
||||
|
||||
$stmtA = "DELETE from vicidial_postal_codes_cities;";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$stmtA = "OPTIMIZE table vicidial_postal_codes_cities;";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
}
|
||||
$pc=0;
|
||||
$ins_stmt="insert into vicidial_postal_codes_cities VALUES ";
|
||||
foreach (@zipcityfile)
|
||||
{
|
||||
@row=split(/\t/, $zipcityfile[$pc]);
|
||||
$pc++;
|
||||
$row[0] =~ s/\r|\n|\t| $//gi;
|
||||
$row[1] =~ s/\r|\n|\t| $//gi;
|
||||
$row[2] =~ s/\r|\n|\t| $//gi;
|
||||
$row[3] =~ s/\r|\n|\t| $//gi;
|
||||
$row[4] =~ s/\r|\n|\t| $//gi;
|
||||
$row[5] =~ s/\r|\n|\t| $//gi;
|
||||
$row[6] =~ s/\r|\n|\t| $//gi;
|
||||
$row[7] =~ s/\r|\n|\t| $//gi;
|
||||
$row[8] =~ s/\r|\n|\t| $//gi;
|
||||
$ins_stmt.="('$row[0]', '$row[1]', '$row[2]', '$row[3]', '$row[4]', '$row[5]', '$row[6]', '$row[7]', '$row[8]'), ";
|
||||
if ($pc =~ /00$/)
|
||||
{
|
||||
chop($ins_stmt);
|
||||
chop($ins_stmt);
|
||||
$affected_rows = $dbhA->do($ins_stmt) || die "can't execute query: |$ins_stmt| $!\n";
|
||||
$ins_stmt="insert into vicidial_postal_codes_cities VALUES ";
|
||||
print STDERR "$pc\r";
|
||||
}
|
||||
}
|
||||
|
||||
chop($ins_stmt);
|
||||
chop($ins_stmt);
|
||||
$affected_rows = $dbhA->do($ins_stmt);
|
||||
$ins_stmt="insert into vicidial_postal_codes_cities VALUES ";
|
||||
print STDERR "$pc\n";
|
||||
}
|
||||
#### END -optional- vicidial_postal_codes_cities population ####
|
||||
|
||||
|
||||
#### BEGIN vicidial_country_iso_tld population from GMT_USA_zip-latest.txt file ####
|
||||
open(isofile, "$PATHhome/country_ISO_TLD-latest.txt") || die "can't open $PATHhome/country_ISO_TLD-latest.txt: $!\n";
|
||||
@isofile = <isofile>;
|
||||
|
||||
@@ -4824,6 +4824,19 @@ source VARCHAR(20) default '',
|
||||
index (call_date)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_postal_codes_cities (
|
||||
postal_code VARCHAR(10) NOT NULL,
|
||||
state VARCHAR(4),
|
||||
city VARCHAR(60),
|
||||
county VARCHAR(60),
|
||||
latitude VARCHAR(17),
|
||||
longitude VARCHAR(17),
|
||||
areacode CHAR(3),
|
||||
country_code SMALLINT(5) UNSIGNED,
|
||||
country CHAR(3),
|
||||
index (postal_code)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
|
||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||
|
||||
@@ -5180,4 +5193,4 @@ INSERT INTO `wallboard_reports` VALUES ('AGENTS_AND_QUEUES','Agents and Queues',
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1672',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1673',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -2075,3 +2075,18 @@ ALTER TABLE vicidial_inbound_groups MODIFY group_color VARCHAR(20);
|
||||
ALTER TABLE vicidial_scripts MODIFY script_color VARCHAR(20) default 'white';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1672',db_schema_update_date=NOW() where db_schema_version < 1672;
|
||||
|
||||
CREATE TABLE vicidial_postal_codes_cities (
|
||||
postal_code VARCHAR(10) NOT NULL,
|
||||
state VARCHAR(4),
|
||||
city VARCHAR(60),
|
||||
county VARCHAR(60),
|
||||
latitude VARCHAR(17),
|
||||
longitude VARCHAR(17),
|
||||
areacode CHAR(3),
|
||||
country_code SMALLINT(5) UNSIGNED,
|
||||
country CHAR(3),
|
||||
index (postal_code)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1673',db_schema_update_date=NOW() where db_schema_version < 1673;
|
||||
|
||||
+1
-1
@@ -2576,7 +2576,7 @@ if ($WEBONLY < 1)
|
||||
|
||||
if ( ($VARKhompEnabled eq '1') || ($VARKhompEnabled eq 'YES') )
|
||||
{
|
||||
print "Enabling Khomp in FastAGI_log.pl and agi-VDAD_ALL_outbound-orig.agi scripts... \n";
|
||||
print "Enabling Khomp in FastAGI_log.pl and agi-VDAD_ALL_outbound.agi scripts... \n";
|
||||
`cp -f $PATHhome/FastAGI_log.pl $PATHhome/FastAGI_log-orig.pl `;
|
||||
`cp -f $PATHagi/agi-VDAD_ALL_outbound.agi $PATHagi/agi-VDAD_ALL_outbound-orig.agi `;
|
||||
`sed -i 's/#UC#//g' $PATHhome/FastAGI_log.pl `;
|
||||
|
||||
+138
-3
@@ -2728,6 +2728,12 @@ if (isset($_GET["user_group_script"])) {$user_group_script=$_GET["user_group_s
|
||||
elseif (isset($_POST["user_group_script"])) {$user_group_script=$_POST["user_group_script"];}
|
||||
if (isset($_GET["login_kickall"])) {$login_kickall=$_GET["login_kickall"];}
|
||||
elseif (isset($_POST["login_kickall"])) {$login_kickall=$_POST["login_kickall"];}
|
||||
if (isset($_GET["city_rule"])) {$city_rule=$_GET["city_rule"];}
|
||||
elseif (isset($_POST["city_rule"])) {$city_rule=$_POST["city_rule"];}
|
||||
if (isset($_GET["county_rule"])) {$county_rule=$_GET["county_rule"];}
|
||||
elseif (isset($_POST["county_rule"])) {$county_rule=$_POST["county_rule"];}
|
||||
if (isset($_GET["ac_rule"])) {$ac_rule=$_GET["ac_rule"];}
|
||||
elseif (isset($_POST["ac_rule"])) {$ac_rule=$_POST["ac_rule"];}
|
||||
|
||||
$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
|
||||
|
||||
@@ -4100,6 +4106,9 @@ if ($non_latin < 1)
|
||||
$user_location = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$user_location);
|
||||
$queue_group_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$queue_group_name);
|
||||
$qc_scorecard_id = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$qc_scorecard_id);
|
||||
$city_rule = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$city_rule);
|
||||
$county_rule = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$county_rule);
|
||||
$ac_rule = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$ac_rule);
|
||||
|
||||
### ALPHA-NUMERIC and underscore and dash and slash and at and dot
|
||||
$call_out_number_group = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$call_out_number_group);
|
||||
@@ -4816,6 +4825,9 @@ else
|
||||
$user_location = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$user_location);
|
||||
$queue_group_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$queue_group_name);
|
||||
$qc_scorecard_id = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$qc_scorecard_id);
|
||||
$city_rule = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$city_rule);
|
||||
$county_rule = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$county_rule);
|
||||
$ac_rule = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$ac_rule);
|
||||
|
||||
### ALPHA-NUMERIC and underscore and dash and slash and at and dot
|
||||
$call_out_number_group = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$call_out_number_group);
|
||||
@@ -5943,12 +5955,13 @@ if ($SSscript_remove_js > 0)
|
||||
# 221020-1632 - Added login_kickall system setting
|
||||
# 221021-1038 - Added webphone_settings option to phones, pointed to a settings container
|
||||
# 221214-1153 - Added $HTMLcolors validation for color form entry fields
|
||||
# 221230-2231 - Added Postal Codes Cities display
|
||||
#
|
||||
|
||||
# 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-870a';
|
||||
$build = '221214-1153';
|
||||
$admin_version = '2.14-871a';
|
||||
$build = '221230-2231';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -7017,6 +7030,7 @@ if ($ADD==999989) {$hh='reports'; echo _QXZ("USER CHANGE LANGUAGE");}
|
||||
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");}
|
||||
if ($ADD==999985) {$hh='reports'; echo _QXZ("POSTAL CODES CITIES");}
|
||||
|
||||
echo "</title>\n";
|
||||
|
||||
@@ -42532,6 +42546,11 @@ if ($ADD==311111111111111)
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$vicidial_postal_codes_count = $row[0];
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_postal_codes_cities;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$vicidial_postal_codes_cities_count = $row[0];
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_nanpa_prefix_codes;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
@@ -42854,7 +42873,7 @@ if ($ADD==311111111111111)
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Install Date").": </td><td align=left> $install_date</td></tr>\n";
|
||||
$pcblinkB=''; $pcblinkE='';
|
||||
if ($vicidial_phone_codes_count < 1000) {$pcblinkB='<b><font color=red><blink>'; $pcblinkE='</blink></font></b>';}
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right><a href=\"$PHP_SELF?ADD=999988\">"._QXZ("Phone Codes")."</a>: </td><td align=left> $pcblinkB$vicidial_phone_codes_count - $vicidial_postal_codes_count - $vicidial_nanpa_prefix_codes_count$pcblinkE - $nanpa_prefix_exchanges_master_count - $nanpa_prefix_exchanges_fast_count - $nanpa_wired_to_wireless_count - $nanpa_wireless_to_wired_count</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right><a href=\"$PHP_SELF?ADD=999988\">"._QXZ("Phone Codes")."</a>: </td><td align=left> $pcblinkB$vicidial_phone_codes_count - $vicidial_postal_codes_count - $vicidial_postal_codes_cities_count - $vicidial_nanpa_prefix_codes_count$pcblinkE - $nanpa_prefix_exchanges_master_count - $nanpa_prefix_exchanges_fast_count - $nanpa_wired_to_wireless_count - $nanpa_wireless_to_wired_count</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Today System Stats").": </td><td align=left> $ALLtotal_calls - $ALLmax_inbound - $ALLmax_outbound - $ALLchannels_count - $ALLcalls_count - $ALLagent_count</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Use Non-Latin")."(UTF-8): </td><td align=left><select size=1 name=use_non_latin><option>1</option><option>0</option><option selected>$use_non_latin</option></select>$NWB#settings-use_non_latin$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Enable Languages").": </td><td align=left><select size=1 name=enable_languages><option>1</option><option>0</option><option selected>$enable_languages</option></select>$NWB#settings-enable_languages$NWE</td></tr>\n";
|
||||
@@ -50616,6 +50635,122 @@ if ($ADD==999986)
|
||||
##### END available postal_codes display page #####
|
||||
|
||||
|
||||
######################
|
||||
# ADD=999985 - postal_codes_cities display page
|
||||
######################
|
||||
if ($ADD==999985)
|
||||
{
|
||||
echo "<TABLE><TR><TD>\n";
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
|
||||
$limitSQL='';
|
||||
$next_prev_HTML='';
|
||||
$PCentries_per_page='1000';
|
||||
|
||||
$stageSQL='';
|
||||
$stateSQL='';
|
||||
$citySQL='';
|
||||
$countySQL='';
|
||||
$acSQL='';
|
||||
if (strlen($stage) > 0) {$stageSQL = "and postal_code='$stage'";}
|
||||
if (strlen($state_rule) > 0) {$stateSQL = "and state='$state_rule'";}
|
||||
if (strlen($city_rule) > 0) {$citySQL = "and city='$city_rule'";}
|
||||
if (strlen($county_rule) > 0) {$countySQL = "and county='$county_rule'";}
|
||||
if (strlen($ac_rule) > 0) {$acSQL = "and areacode='$ac_rule'";}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_postal_codes_cities where postal_code!='' $stageSQL $stateSQL $citySQL $countySQL $acSQL;";
|
||||
$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=999985&start_count=$next_count&stage=$stage&city_rule=$city_rule&county_rule=$county_rule&state_rule=$state_rule&ac_rule=$ac_rule\">"._QXZ("NEXT")." $next_temp</a> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$nextHTML = "<a href=\"$PHP_SELF?ADD=999985&start_count=$next_count&stage=$stage&city_rule=$city_rule&county_rule=$county_rule&state_rule=$state_rule&ac_rule=$ac_rule\">"._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=999985&start_count=$prev_count&stage=$stage&city_rule=$city_rule&county_rule=$county_rule&state_rule=$state_rule&ac_rule=$ac_rule\">"._QXZ("PREVIOUS")." $PCentries_per_page</a> ";
|
||||
}
|
||||
$next_prev_HTML .= $nextHTML;
|
||||
$next_prev_HTML .= " </b><a href=\"$PHP_SELF?ADD=999985&status=display_all&stage=$stage&city_rule=$city_rule&county_rule=$county_rule&state_rule=$state_rule&ac_rule=$ac_rule\"><font size=1 color=black>"._QXZ("show all postal codes")."</font></a><b> ";
|
||||
}
|
||||
else
|
||||
{$next_prev_HTML .= _QXZ("RECORDS")." 1 - $pc_count <font size=1>"._QXZ("of")." $pc_count</font> ";}
|
||||
|
||||
echo "<table border=0 width=900><tr><td valign=middle>";
|
||||
echo "<br><b>"._QXZ("POSTAL CODES CITIES")."</b><br>\n";
|
||||
echo "<br></td><td valign=middle align=right><font size=1> <br></font><form>"._QXZ("Search")."-";
|
||||
echo "<input type=hidden name=ADD value=\"$ADD\">";
|
||||
echo " <font size=2>"._QXZ("postal").":</font><input type=text size=5 maxlength=10 name=stage value=\"$stage\" class=\"cust_form\">";
|
||||
echo " <font size=2>"._QXZ("city").":</font><input type=text size=15 maxlength=60 name=city_rule value=\"$city_rule\" class=\"cust_form\">";
|
||||
echo " <font size=2>"._QXZ("county").":</font><input type=text size=15 maxlength=60 name=county_rule value=\"$county_rule\" class=\"cust_form\">";
|
||||
echo " <font size=2>"._QXZ("state").":</font><input type=text size=2 maxlength=4 name=state_rule value=\"$state_rule\" class=\"cust_form\">";
|
||||
echo " <font size=2>"._QXZ("ac").":</font><input type=text size=3 maxlength=4 name=ac_rule value=\"$ac_rule\" class=\"cust_form\">";
|
||||
echo "<input type=submit value=submit>";
|
||||
echo "</form></td></tr></table>";
|
||||
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("County")."</B></td>\n";
|
||||
echo "<td align=center><B>"._QXZ("City")."</B></td>\n";
|
||||
echo "<td align=center><B>"._QXZ("Areacode")."</B></td>\n";
|
||||
echo "<td align=center><B>"._QXZ("Latitude x Longitude")."</B></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
# postal_code | state | city | county | latitude | longitude | areacode | country_code | country
|
||||
$stmt="SELECT count(*),city,country,country_name,postal_code,state,county,areacode,latitude,longitude FROM vicidial_postal_codes_cities p,vicidial_country_iso_tld i where i.iso3=p.country $stageSQL $stateSQL $citySQL $countySQL $acSQL group by country_code,postal_code,state,city,county,areacode,latitude,longitude order by country_code,postal_code $limitSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$zones_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB > 0) {echo "$zones_to_print|$stmt\n";}
|
||||
$o=0;
|
||||
$row_color=0; $last_country='';
|
||||
while ($zones_to_print > $o)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
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=center><font size=1>$rowx[7]</font></td>\n";
|
||||
echo "<td align=left><font size=1> $rowx[8] x $rowx[9] - (<a href=\"https://www.openstreetmap.org/?mlat=$rowx[8]&mlon=$rowx[9]\">OpenSM</a> | <a href=\"https://www.google.com/maps/search/$rowx[8],$rowx[9]\">google</a> | <a href=\"https://www.bing.com/maps/?v=2&cp=$rowx[8]~$rowx[9]&style=r&lvl=12&sp=Point.$rowx[8]_$rowx[9]_$rowx[4]-postal-code\">bing</a>)</font></td>\n";
|
||||
echo "</tr>\n";
|
||||
$o++;
|
||||
}
|
||||
echo "</TABLE></center></form>\n";
|
||||
}
|
||||
##### END available postal_codes_cities display page #####
|
||||
|
||||
|
||||
echo "</TD></TR></TABLE></center>\n";
|
||||
echo "</TD></TR></TABLE></center>\n";
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
# 220829-1017 - Changed 'admin.php' links to "$ADMIN" variable
|
||||
# 220830-2303 - Fix for ADMIN change, issue #1370
|
||||
# 221214-1321 - Added HTML color chooser
|
||||
# 221230-2230 - Added Postal Codes Cities submenu
|
||||
#
|
||||
|
||||
$HTMLcolors = 'IndianRed,CD5C5C|LightCoral,F08080|Salmon,FA8072|DarkSalmon,E9967A|LightSalmon,FFA07A|Crimson,DC143C|Red,FF0000|FireBrick,B22222|DarkRed,8B0000|Pink,FFC0CB|LightPink,FFB6C1|HotPink,FF69B4|DeepPink,FF1493|MediumVioletRed,C71585|PaleVioletRed,DB7093|LightSalmon,FFA07A|Coral,FF7F50|Tomato,FF6347|OrangeRed,FF4500|DarkOrange,FF8C00|Orange,FFA500|Gold,FFD700|Yellow,FFFF00|LightYellow,FFFFE0|LemonChiffon,FFFACD|LightGoldenrodYellow,FAFAD2|PapayaWhip,FFEFD5|Moccasin,FFE4B5|PeachPuff,FFDAB9|PaleGoldenrod,EEE8AA|Khaki,F0E68C|DarkKhaki,BDB76B|Lavender,E6E6FA|Thistle,D8BFD8|Plum,DDA0DD|Violet,EE82EE|Orchid,DA70D6|Fuchsia,FF00FF|Magenta,FF00FF|MediumOrchid,BA55D3|MediumPurple,9370DB|RebeccaPurple,663399|BlueViolet,8A2BE2|DarkViolet,9400D3|DarkOrchid,9932CC|DarkMagenta,8B008B|Purple,800080|Indigo,4B0082|SlateBlue,6A5ACD|DarkSlateBlue,483D8B|MediumSlateBlue,7B68EE|GreenYellow,ADFF2F|Chartreuse,7FFF00|LawnGreen,7CFC00|Lime,00FF00|LimeGreen,32CD32|PaleGreen,98FB98|LightGreen,90EE90|MediumSpringGreen,00FA9A|SpringGreen,00FF7F|MediumSeaGreen,3CB371|SeaGreen,2E8B57|ForestGreen,228B22|Green,008000|DarkGreen,006400|YellowGreen,9ACD32|OliveDrab,6B8E23|Olive,808000|DarkOliveGreen,556B2F|MediumAquamarine,66CDAA|DarkSeaGreen,8FBC8B|LightSeaGreen,20B2AA|DarkCyan,008B8B|Teal,008080|Aqua,00FFFF|Cyan,00FFFF|LightCyan,E0FFFF|PaleTurquoise,AFEEEE|Aquamarine,7FFFD4|Turquoise,40E0D0|MediumTurquoise,48D1CC|DarkTurquoise,00CED1|CadetBlue,5F9EA0|SteelBlue,4682B4|LightSteelBlue,B0C4DE|PowderBlue,B0E0E6|LightBlue,ADD8E6|SkyBlue,87CEEB|LightSkyBlue,87CEFA|DeepSkyBlue,00BFFF|DodgerBlue,1E90FF|CornflowerBlue,6495ED|MediumSlateBlue,7B68EE|RoyalBlue,4169E1|Blue,0000FF|MediumBlue,0000CD|DarkBlue,00008B|Navy,000080|MidnightBlue,191970|Cornsilk,FFF8DC|BlanchedAlmond,FFEBCD|Bisque,FFE4C4|NavajoWhite,FFDEAD|Wheat,F5DEB3|BurlyWood,DEB887|Tan,D2B48C|RosyBrown,BC8F8F|SandyBrown,F4A460|Goldenrod,DAA520|DarkGoldenrod,B8860B|Peru,CD853F|Chocolate,D2691E|SaddleBrown,8B4513|Sienna,A0522D|Brown,A52A2A|Maroon,800000|White,FFFFFF|Snow,FFFAFA|HoneyDew,F0FFF0|MintCream,F5FFFA|Azure,F0FFFF|AliceBlue,F0F8FF|GhostWhite,F8F8FF|WhiteSmoke,F5F5F5|SeaShell,FFF5EE|Beige,F5F5DC|OldLace,FDF5E6|FloralWhite,FFFAF0|Ivory,FFFFF0|AntiqueWhite,FAEBD7|Linen,FAF0E6|LavenderBlush,FFF0F5|MistyRose,FFE4E1|Gainsboro,DCDCDC|LightGray,D3D3D3|Silver,C0C0C0|DarkGray,A9A9A9|Gray,808080|DimGray,696969|LightSlateGray,778899|SlateGray,708090|DarkSlateGray,2F4F4F|Black,000000';
|
||||
@@ -2786,10 +2787,10 @@ if ($SSenable_languages == '1')
|
||||
<?php }
|
||||
|
||||
|
||||
if ( ($ADD=='999988') or ($ADD=='999987') or ($ADD=='999986') )
|
||||
if ( ($ADD=='999988') or ($ADD=='999987') or ($ADD=='999986') or ($ADD=='999985') )
|
||||
{
|
||||
?>
|
||||
<TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT COLSPAN=2> <a href="<?php echo $ADMIN ?>?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="<?php echo $ADMIN ?>?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="<?php echo $ADMIN ?>?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>
|
||||
<TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT COLSPAN=2> <a href="<?php echo $ADMIN ?>?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="<?php echo $ADMIN ?>?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="<?php echo $ADMIN ?>?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> | <a href="<?php echo $ADMIN ?>?ADD=999985" STYLE="text-decoration:none;"><FONT STYLE="font-family:HELVETICA;font-size:<?php echo $subcamp_font_size ?>;color:BLACK;"><?php echo _QXZ("Postal Codes Cities"); ?> </a> </TD></TR>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# vicidial_stylesheet.php
|
||||
#
|
||||
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CSS/PHP file that uses the system-defined screen colors to display report elements
|
||||
#
|
||||
@@ -9,6 +9,7 @@
|
||||
# 180501-0045 - New elements added
|
||||
# 190129-1303 - New mobile display elements added
|
||||
# 200309-1819 - Modifications for display formatting
|
||||
# 221230-2220 - Added cust_form style for text input fields
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -140,6 +141,8 @@ redalert {font-size: 18px; font-weight:bold; font-family: Arial, Sans-Serif; col
|
||||
.autosize_10 {width: 10vw; max-width: 160px;}
|
||||
.autosize_12 {width: 12vw; max-width: 180px;}
|
||||
|
||||
.cust_form {font-family: sans-serif; font-size: 10px; overflow: hidden;}
|
||||
|
||||
/*
|
||||
LEVEL ONE MENU
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user