discourse-legacysite-perl/site/Fit_Calculator/config.php

22 lines
791 B
PHP
Raw Normal View History

2024-06-17 12:42:14 +00:00
<?
include("../local/settings.php");
$sql = "SELECT * FROM ".$prefix."ResourceStates ORDER BY stateid";
$result = mysql_query($sql) OR die(mysql_error());
$state_list = array();
$state_tag_list = array();
while ($row = mysql_fetch_array($result)) {
$state_list[$row['stateid']] = $row['statelong'];
$state_tag_list[] = $row['statetag'];
}
function curPageURL() {
$isHTTPS = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on");
$port = (isset($_SERVER["SERVER_PORT"]) && ((!$isHTTPS && $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS && $_SERVER["SERVER_PORT"] != "443")));
$port = ($port) ? ':'.$_SERVER["SERVER_PORT"] : '';
$url = ($isHTTPS ? 'https://' : 'http://').$_SERVER["SERVER_NAME"].$port.$_SERVER["REQUEST_URI"];
return $url;
}
?>