public function actionRegister() { $_Ref_CountriesForm = new Ref_CountriesForm(); $countries = $_Ref_CountriesForm->getAllCountries(); $is_mobile = DeviceDetectionController::is_mobile(); if ($is_mobile == true) { return $this->render('registermobile', array('countries' => $countries)); } else { return $this->render('register', array('countries' => $countries)); } }
public function actionImportanceofdiploma() { $is_mobile = DeviceDetectionController::is_mobile(); if ($is_mobile == true) { return $this->render('importanceofdiplomamobile'); } else { return $this->render('importanceofdiploma'); } }
<?php namespace frontend\controllers; use Yii; $is_mobile = DeviceDetectionController::is_mobile(); if ($is_mobile == true) { include 'mobile.php'; } else { include 'web.php'; } ?> <script> window.base_url = "<?php echo Yii::$app->params['siteHostUrl']; ?> "; </script><?php