include("/home/httpd/common/p.php");
$level0=substr($_SERVER['REQUEST_URI'], 1);
if (empty($level0))
$level0 = 'index.html';
include("config.php");
include("functions/get_root_id.php");
include("functions/get_sub_title.php");
include("left_nav.php");
$wrongpage=0;
$query="SELECT * FROM content WHERE name = '{$level0}' and stat";
if (!($result=@mysql_query($query))) sql_error($query, $config[sql]);
if (!($record=mysql_fetch_object($result))) $wrongpage=1;
//$record=mysql_fetch_object($result);
$s_id=$record->id;
$body=$record->content;
$keywords=$record->keywords;
$description=$record->description;
$title=$record->title;
$subtitle=$bar_title=$record->nav_title;
if ($record->p_id!=0) {
$s_id=get_main_id($record->p_id);
$bar_title=get_sub_title($s_id);
}
mysql_free_result($result);
if ($_POST[action]=="contact_send") {
include("/home/httpd/common/sendmail.php");
if ($_POST[to]=="0") {
$err_msg="Please select a category!!";
}
elseif (!$_POST[name]) {
$err_msg="Name can not be empty!!";
}
elseif (!is_email($_POST[email])) {
$err_msg="Email incorrect!!";
}
else {
session_start();
if (md5(strtoupper($_POST[code]))!=$_SESSION[code]) {
$err_msg="You've entered incorrect security code.";
unset($_session[code]);
}
else {
$message=" Name: $_POST[name]\n Email: $_POST[email]\n Message: $_POST[message]";
if ($_POST[to]==2) { $contact_category="Marketing / Advertising"; }
if ($_POST[to]==3) { $contact_category="General"; }
smail('ab@ataramedia.com', 'Amir', 'ab@ataramedia.com', "Toe Nail Fungus - {$contact_category}", $_POST[email], "Toe Nail Fungus - {$contact_category}", $message);
$_POST="";
$err_msg="Your form have been submited.";
}
}
}
include("header.php");
if ($level0=="index.html")
include("body_home.php");
elseif ($level0=="contactus.html")
include("contactus.php");
elseif ($wrongpage)
include("ops.php");
else
include("sub_home.php");
include("footer.php");
?>