$page = "Add a review";
include ("include/params.inc.php");
include ("include/stats.inc.php");
include ("include/header.inc.php");
print "
ADD A REVIEW
";
if (!isset($type)){
?>
}elseif(!isset($action)){
if ($type == "albums"){
?>
}else{
?>
}
?>
}elseif($action == "save"){
$author = str_replace("<", "<", str_replace(">", ">", $author));
$mail = str_replace("<", "<", str_replace(">", ">", $mail));
$manufacturer = str_replace("<", "<", str_replace(">", ">", $manufacturer));
$model = str_replace("<", "<", str_replace(">", ">", $model));
$intro = str_replace("<", "<", str_replace(">", ">", $intro));
$technical = str_replace("<", "<", str_replace(">", ">", $technical));
$strong = str_replace("<", "<", str_replace(">", ">", $strong));
$weak = str_replace("<", "<", str_replace(">", ">", $weak));
$opinion = str_replace("<", "<", str_replace(">", ">", $opinion));
$q = "INSERT INTO reviews VALUES ('', ".time().", '$author', '$mail', '$type', '".addslashes($manufacturer)."', '".addslashes($model)."', '".addslashes($intro)."', '".addslashes($technical)."', '".addslashes($strong)."', '".addslashes($weak)."', '".addslashes($opinion)."', $rank, 0)";
if (mysql_query($q)){
$id = mysql_insert_id();
if ($image != "none"){
$ext = substr($image_name, -3);
@copy($image, "images/reviews/".$id.".".$ext);
}
print "Thank you for submitting this review, $author!
See your review";
@mail("fabz@e-tabs.org", "[E-TABS] Review: ".addslashes($manufacturer)." - ".addslashes($model)." [$type]", "http://www.e-tabs.org/reviews.php?item=$id", "From: e-tabs@e-tabs.org\r\nX-Reply: e-tabs@e-tabs.org");
}else{
print "Sorry, an error occurs with your submission.";
}
}
include ("include/footer.inc.php");
?>