session_start(); date_default_timezone_set('Asia/Ho_Chi_Minh'); error_reporting(E_ALL & ~E_NOTICE & ~8192); $session=session_id(); @define ( '_source' , './sources/'); @define ( '_lib' , './admin/lib/'); include_once _lib."Mobile_Detect.php"; $detect = new Mobile_Detect; $deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer'); if($deviceType != 'computer'){ @define ( '_template' , './m/'); }else{ @define ( '_template' , './templates/'); } @define ( _upload_folder , './upload/'); include_once _lib."config.php"; include_once _lib."constant.php"; include_once _lib."functions.php"; include_once _lib."functions_giohang.php"; include_once _lib."class.database.php"; $d = new database($config['database']); $sql = "select * from #_company limit 0,1"; $d->query($sql); $company= $d->fetch_array(); $lang=$company['lang']; $lang_arr=array("vi","en"); if (isset($_GET['lang']) == true){ if (in_array($_GET['lang'], $lang_arr)==true){$lang = $_GET['lang'];} } require_once _source."lang_$lang.php"; include_once _lib."file_requick.php"; if($_REQUEST['command']=='add' && $_REQUEST['productid']>0){ $pid=$_REQUEST['productid']; addtocart($pid,1,$data); redirect("http://$config_url/gio-hang.html"); } ?>