/var/www/allseasontrans.com/www/controllers
Edit: /var/www/allseasontrans.com/www/controllers/class.index.php (5042B)
view->page_index = false;
}
public function index (){
//
$this->view->css[0] = 'bootstrap.css';
$this->view->css[1] = 'style.css';
//
$this->view->jsOut[0] = '/public/js/libs.js';
$this->view->jsOut[1] = '/public/js/script.js';
$this->view->jsOut[2] = '/public/js/jquery-3.6.0.min.js';
// $this->view->jsOut[3] = '/public/js/cookie.js';
$this->view->jsOut[4] = '/public/js/bootstrap.min.js';
$this->view->page_index = true;
$this->view->title = "All Season Trans";
$this->view->description = "All Season Trans";
$this->view->keywords = "All Season Trans";
$this->view->ajax = false;
$this->view->render('index/index');
}
public function change_lang($param=0){
//if(!ajax::check_ajax_request())return false;
session::set('lang',$param['lg']);
ajax::success("true");
}
public function order (){
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$make = $_POST['make'];
$model = $_POST['model'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$pickup_city_or_zip = $_POST['pickup_city_or_zip'];
$delivery_city_or_zip = $_POST['delivery_city_or_zip'];
$transport = $_POST['transport'];
$type_of_vehicle = $transport[0]['type_of_vehicle'];
$year = $transport[0]['year'];
$type = $transport[0]['type'];
$imp = '';//implode(', ',$_POST);
$subj = "New order";
// foreach ($_POST as $key => $value)
// {
// if(!is_array($value)){
// $imp = $imp . $key.': '.$value."\n\n";
// }
// }
// foreach ($transport[0] as $key2 => $value2)
// {
// $imp = $imp . $key2.': '.$value2."\n\n";
// }
$text =
"New order\n\nFirst name: " . $first_name.
"\nLast name: " . $last_name.
"\nPhone: " . $phone.
"\nEmail: " . $email.
"\nMake: " . $make.
"\nModel: " . $model.
"\nType of vehicle: " . $type_of_vehicle.
"\nYear: " . $year.
"\nType: " . $type.
"\nPickup city or ZIP: " . $pickup_city_or_zip.
"\nDelivery city or ZIP: " . $delivery_city_or_zip.
// "\n\n"."\n\n\n\nPOST:\n ".$imp.
"\n\n"."\n\n";
$headers = 'From: no_reply@allseasontrans.com' . "\r\n" .
// 'Reply-To: g0502212339@gmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
// $mail_ret = mail("info@allseasontrans.com",$subj,$text,$headers);
// $mail_ret = mail("g0502212339@gmail.com",$subj,$text,$headers);
//$mail_ret = mail("sales@allseasontrans.com",$subj,$text,$headers);
$mail_ret = mail("virusmax2000@gmail.com",$subj,$text,$headers);
file_put_contents(PATH_LOGS."orders.log","\n\n--- ".date("Y-m-d H:i:s")." ---\nMAIL :: ".$mail_ret." :: ".$subj." :: \n".$text, FILE_APPEND);
$this->view->ajax = true;
ajax::success(true);
}
//
public function order_contact (){
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$message = $_POST['message'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$imp = '';//implode(', ',$_POST);
$subj = "New message";
foreach ($_POST as $key => $value)
{
if(!is_array($value)){
$imp = $imp . $key.': '.$value."\n\n";
}
}
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$IP = $_SERVER['HTTP_CLIENT_IP'];
} else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$IP = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$IP = $_SERVER['REMOTE_ADDR'];
}
$text =
"New message\n\nFirst name: " . $first_name.
"\nLast name: " . $last_name.
"\nPhone: " . $phone.
"\nEmail: " . $email.
"\nIP: " . $IP.
"\nMessage: \n" . $message.
// "\n\n"."\n\n\n\nPOST:\n ".$imp.
"\n\n"."\n\n";
$headers = 'From: no_reply@allseasontrans.com' . "\r\n" .
// 'Reply-To: g0502212339@gmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
// $mail_ret = mail("info@allseasontrans.com",$subj,$text,$headers);
// $mail_ret = mail("g0502212339@gmail.com",$subj,$text,$headers);
//$mail_ret = mail("sales@allseasontrans.com",$subj,$text,$headers);
$mail_ret = mail("virusmax2000@gmail.com",$subj,$text,$headers);
file_put_contents(PATH_LOGS."orders.log","\n\n--- ".date("Y-m-d H:i:s")." ---\nMAIL :: ".$mail_ret." :: ".$subj." :: \n".$text, FILE_APPEND);
$this->view->ajax = true;
ajax::success(true);
}
//
}