".get_caption($init_name_firm).""; if($init_name_model) { $vehicle_url .= " ".get_caption($init_name_model).""; } } $syear = (int)trim($_GET['syear']); if($syear<1900||$syear>2100) $syear = ""; if(sizeof($merr)<1) { if(isset($_POST['submit_review'])) { $subject = ex_my_trim($_POST['subject']); $from_and_location = ex_my_trim($_POST['from_and_location']); $contact = ex_my_trim($_POST['contact']); $email = ex_my_trim($_POST['email']); $model = ex_my_trim($_POST['model']); $year = (int)$_POST['year']; $wrong_comment = ex_my_trim($_POST['wrong_comment']); $general_comment = ex_my_trim($_POST['general_comment']); $f3 = ex_my_trim($_POST['f3']); $f4 = ex_my_trim($_POST['f4']); $f5 = ex_my_trim($_POST['f5']); $f6 = ex_my_trim($_POST['f6']); $f7 = ex_my_trim($_POST['f7']); $f8 = ex_my_trim($_POST['f8']); $f9 = ex_my_trim($_POST['f9']); $f10 = ex_my_trim($_POST['f10']); $prev_car = ex_my_trim($_POST['prev_car']); $f12 = ex_my_trim($_POST['f12']); $f13 = ex_my_trim($_POST['f13']); $ra = $_SERVER['REMOTE_ADDR']; $ua = ex_my_trim($_SERVER['HTTP_USER_AGENT']); if($year<1900||$year>(int)date('Y')) $merr['year'] = 1; if(!strlen($subject)) $merr['subject'] = 1; if(!strlen($from_and_location)) $merr['from_and_location'] = 1; //if(!strlen($wrong_comment)) $merr['wrong_comment'] = 1; if(!strlen($general_comment)) $merr['general_comment'] = 1; if(sizeof($merr)==0) { //reviews status -> //0 - not inserted or consist error //1 - inserted //2 - synced $sql = "insert into reviews (`site_id`, `gfirm`, `gmodel`, `year`, `subject`, `from`, `model`, `what_wrong_car`, `general_comments`, `engine_and_transmission`, `Performance`, `Reliability`, `Comfort`, `Dealer`, `Running_costs`, `Distance_when_acquired`, `Most_recent_distance`, `Previous_car`, `First_year_of_ownership`, `Most_recent_year_of_ownership`, `dt`, `ip`, `user_agent`, `status`, `type`, `contact`, `email`) values ('$init_site_id', '$init_name_firm', '$init_name_model', '$year', '$subject', '$from_and_location', '$model', '$wrong_comment', '$general_comment', '$f3', '$f4', '$f5', '$f6','$f7','$f8','$f9','$f10','$prev_car','$f12','$f13', UNIX_TIMESTAMP(), '$ra', '$ua', 0, 0, '{$contact}', '{$email}')"; mysql_query($sql); $real_id = mysql_insert_id(); if($real_id>0) { //put files reset($_FILES); $pics = array(); $thumbnail_is_ok = false; foreach($_FILES as $key=>$file) { if($file['error']==0&&$file['size']>0) { $save_to_path = $_SERVER['DOCUMENT_ROOT']."/$init_reviews_dir/$init_reviews_pic_dir/$real_id/"; $keyword_for_new_file = $init_name_model; list($is_caption_file, $tmp_file) = upload_file($file, $save_to_path, $keyword_for_new_file); if(!$is_caption_file) continue; $pics[] = $is_caption_file; if(!$thumbnail_is_ok) { $result_jpg = $save_to_path."{$real_id}_thumbnail.jpg"; $thumbnail_is_ok = create_thumbnail($tmp_file, $result_jpg); } } } $sql = "update reviews set real_id='{$real_id}', status='1', pic1='{$pics[0]}', pic2='{$pics[1]}', pic3='{$pics[2]}', pic4='{$pics[3]}', pic5='{$pics[4]}' where id='{$real_id}'"; mysql_query($sql); } header("location: ./add.php?firm={$init_name_firm}&model={$init_name_model}&is_okey={$real_id}"); die(); } //mail("info@toyota-supra.info","add review",$str); } else { $subject = ''; $from_and_location = ''; $contact = ''; $email = ''; $model = ''; $wrong_comment = ''; $general_comment = ''; $f3 = ''; $f4 = ''; $f5 = ''; $f6 = ''; $f7 = ''; $f8 = ''; $f9 = ''; $f10 = ''; $prev_car = ''; $f12 = ''; $f13 = ''; $year = $syear; } } $from_reviews = 1; $header_info = ""; $header_info = "
Car Reviews
$header_info"; $Title = "Write a Review".(strlen($vehicle)>1?" / {$vehicle}":""); $rz = ""; $upper_sep = ' » '; $header_info .= "Car Reviews"; $upper_path .= "

".$upper_sep."Car Reviews"; $rz = ""; $rz = " | "; $header_info .= $rz."Automotive Troubleshooting"; $upper_path .= "
".$upper_sep."Automotive Troubleshooting"; $header_info .= $rz."Solving Your Car Problems"; $upper_path .= "
".$upper_sep."Solving Your Car Problems"; include_once $_SERVER['DOCUMENT_ROOT']."/new_header.php"; if($is_okey>0) { ?>

Thanks for your review


Your review is available at this page. Your review should appear on the main site within 24 hours.

Write a Review
Photo Gallery

Write a Review1?" / {$vehicle}":""?>


Error, maker or model not selected"; //if($_SERVER['REMOTE_ADDR']=='193.34.126.102') { //select firm if($merr['firm_error']) { echo "

Select a Make

"; ?> {$car}
\n"; } if($str) { $info[] = $str; } echo ""; ?>
".implode("", $info)."


Select a Model

"; $view = "dir"; $sz = ""; $url = $_SERVER['DOCUMENT_ROOT'].'/pics/'.$init_name_firm.'/'; $dr = dir_list($url, $sz, $view); $found_files = sizeof($dr); if(sizeof($dr)<1) { $content .= "


At the moment the models is not available!

"; } else { $content .= ""; $count_in_col = 0; $cols_cnt = 0; $all_cnt = -1; $max_cols_per_page = 4; $width_per_col = intval(100/($max_cols_per_page+1)); $my_col = "";//""; $max_models_per_col = ceil($found_files/$max_cols_per_page); foreach($dr as $key=>$value) { $all_cnt++; list($mtime, $value) = $value; $fname = strtoupper(get_caption($value)); if($count_in_col==0||$count_in_col==$max_models_per_col) { if($cols_cnt>=$max_cols_per_page) break; if($count_in_col!=0) { $content .= ""; if($cols_cnt==$max_cols_per_page/2) { $content .= $my_col; } } $content .= ""; $content .= "
".@view_ads("middle_unit").""; $count_in_col = 0; $cols_cnt++; } $content .= "{$fname}
\n"; $count_in_col++; } if($count_in_col>0) $content .= "
"; } echo $content; } } } else { ?>
 Vehicle:
* Title of Your Review:The field should be filled':''?>
* Vehicle Year:The field should be filled':''?>
Modification:
* Your Name and Location:The field should be filled':''?>
 Contact: EmailThe field should be filled':''?>

Phones etc.The field should be filled':''?>
Photos of Your Car:


* General comments:The field should be filled':''?>
 What things have
gone wrong with the car:
The field should be filled':''?>
Previous car: