// ************************************************
// log database connection
// ************************************************
// $link = mysql_connect( "localhost", "clientinfo", "clientinfo2004" );
// if (!$link)
// {
// $status = "F";
// return;
// }
// else
// {
// $test = mysql_select_db ("clientinfo");
// if (!$test)
// {
// $status = "F";
// return;
// }
// }
// ************************************************
// check for cookies
// ************************************************
// if (!isset($_COOKIE['atlasmedical_id']))
// {
// $l_origid = 0;
// }
// else
// {
// $l_origid = $_COOKIE['atlasmedical_id'];
// }
// ************************************************
// create log file
// ************************************************
$l_date = date("Y-m-d H:i:s");
$l_ipaddr = $_SERVER["REMOTE_ADDR"];
$l_iphost = gethostbyaddr($_SERVER["REMOTE_ADDR"]);
$l_remuser = $_SERVER["REMOTE_USER"];
$l_secure = $_SERVER["HTTPS"];
$l_reqmethod = $_SERVER["REQUEST_METHOD"];
$l_httphost = $_SERVER["HTTP_HOST"];
$l_requri = $_SERVER["REQUEST_URI"];
$l_phpself = $_SERVER["PHP_SELF"];
$l_protocol = $_SERVER["SERVER_PROTOCOL"];
$l_qstring = $_SERVER["QUERY_STRING"];
$l_remport = $_SERVER["REMOTE_PORT"];
$l_referer = $_SERVER["HTTP_REFERER"];
$l_uagent = $_SERVER["HTTP_USER_AGENT"];
// $queery = "INSERT INTO atlasm (atlasm.origid, atlasm.date, atlasm.ipaddr, atlasm.iphost,
// atlasm.remuser, atlasm.secure, atlasm.reqmethod, atlasm.httphost, atlasm.requri,
// atlasm.phpself, atlasm.protocol, atlasm.qstring, atlasm.remport, atlasm.referer,
// atlasm.uagent) " .
// "VALUES ('" .
// mysql_escape_string($l_origid) . "', '" .
// mysql_escape_string($l_date) . "', '" .
// mysql_escape_string($l_ipaddr) . "', '" .
// mysql_escape_string($l_iphost) . "', '" .
// mysql_escape_string($l_remuser) . "', '" .
// mysql_escape_string($l_secure) . "', '" .
// mysql_escape_string($l_reqmethod) . "', '" .
// mysql_escape_string($l_httphost) . "', '" .
// mysql_escape_string($l_requri) . "', '" .
// mysql_escape_string($l_phpself) . "', '" .
// mysql_escape_string($l_protocol) . "', '" .
// mysql_escape_string($l_qstring) . "', '" .
// mysql_escape_string($l_remport) . "', '" .
// mysql_escape_string($l_referer) . "', '" .
// mysql_escape_string($l_uagent) . "')";
// mysql_query($queery, $link);
// $nrows = mysql_affected_rows();
// if ($nrows != "0")
// {
// $lid = mysql_insert_id();
// if ($l_origid == 0)
// {
// $l_origid = $lid;
// }
// }
// ************************************************
// check for cookies
// ************************************************
// setcookie("atlasmedical_id", $l_origid, time() + 15552000);
// ************************************************
// allowable characters in form fields
// ************************************************
$allowed = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789,.-' ";
$zallowed = "0123456789- ";
$pallowed = "0123456789.-+() ";
// ************************************************
// constants
// ************************************************
$frmdir = "/var/www/phpcode/forms/"; // form directory
$ck = "CHECKED"; // used for checkboxes/radio buttons
// ************************************************
// arrays
// ************************************************
$methods = array ("email", "phone", "mail");
$states = array ("ALAlabama", "AKAlaska", "AZArizona", "ARArkansas", "CACalifornia", "COColorado",
"CTConnecticut", "DCDC Washington", "DEDelaware", "FLFlorida", "GAGeorgia",
"HIHawaii", "IDIdaho", "ILIllinois", "INIndiana", "IAIowa", "KSKansas", "KYKentucky",
"LALouisiana", "MEMaine", "MDMaryland", "MAMassachusetts", "MIMichigan", "MNMinnesota",
"MSMississippi", "MOMissouri", "MTMontana", "NENebraska", "NVNevada", "NHNew Hampshire",
"NJNew Jersey", "NMNew Mexico", "NYNew York", "NCNorth Carolina", "NDNorth Dakota",
"OHOhio", "OKOklahoma", "OROregon", "PAPennsylvania", "RIRhode Island", "SCSouth Carolina",
"SDSouth Dakota", "TNTennessee", "TXTexas", "UTUtah", "VTVermont", "VAVirginia", "WAWashington",
"WVWest Virginia", "WIWisconsin", "WYWyoming");
// ************************************************
// functions
// ************************************************
function is_email_valid($email)
{
if(eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,3}$", $email))
return TRUE;
else
return FALSE;
}
function is_phone_valid($ph)
{
$ph = ereg_replace("[^[:digit:]]", "", $ph);
if ($ph[0] == "1")
{
$ph = substr($ph, 1);
}
if (strlen($ph) == 10)
{
return ("(" . substr($ph, 0, 3) . ") " . substr($ph, 3, 3) . "-" . substr($ph, 6));
}
else
return FALSE;
}
// ************************************************
// process forms
// ************************************************
$rtn = stripslashes($_POST['rtn']);
if ($rtn != "")
{
if ((substr($rtn,0,7) == "request") || ($rtn == "test"))
{
include ($frmdir . $rtn . ".frm");
}
}
?>
Contact Atlas Medical
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
 |
 |
 |
 |
 |
 |
` |
 |

Atlas Medical
Software
26679 W. Agoura Road, Ste 200
Calabasas, CA 91302
Tel: +1.800.333.0070
Tel: +1.818.340.7080
Fax: +1.818.340.7079 |
|
|
 |
 |
|
 |
 |
 |