base() public static method

Returns the base URL of the current request.
public static base ( boolean | string $scheme = false ) : string
$scheme boolean | string the URI scheme to use in the returned base URL: - `false` (default): returning the base URL without host info. - `true`: returning an absolute base URL whose scheme is the same as that in [[\yii\web\UrlManager::$hostInfo]]. - string: returning an absolute base URL with the specified scheme (either `http`, `https` or empty string for protocol-relative URL).
return string
コード例 #1
0
ファイル: DataController.php プロジェクト: chaimvaid/linet3
 public function actionRestore($id = null)
 {
     $model = new FormBackupFile();
     $comp = $this->loadModel($this->company);
     if (isset($_POST['FormBackupFile'])) {
         $bkup = Company::getFilePath() . "tmp.zip";
         $model->file = $_POST['FormBackupFile']['file'];
         $model->file = \yii\web\UploadedFile::getInstance($model, 'file');
         if ($model->file->saveAs($bkup)) {
             $comp->restore($bkup);
             return $this->redirect(\yii\helpers\BaseUrl::base() . '/settings/dashboard');
         }
     }
     if ($id != null) {
         $file = Files::findOne($id);
         if ($file != null) {
             $comp->restore($file->getFullFilePath());
             $this->redirect(\yii\helpers\BaseUrl::base() . '/settings/dashboard');
         } else {
             throw new \yii\web\HttpException(500, 'The backup file does not exist.');
         }
     }
     //read file
     //if DROP TABLE IF EXISTS `
     //if CREATE TABLE `
     //INSERT INTO `
     return $this->render('backupRestore', array('model' => $model));
 }
コード例 #2
0
ファイル: WsController.php プロジェクト: huylv-hust/ws
 /**
  * @inheritdoc
  */
 public function beforeAction()
 {
     $current_route = $this->getModules()[0]->requestedRoute;
     if (!Yii::$app->request->isAjax && !in_array($current_route, Yii::$app->params['route_keep_cookie'])) {
         utilities::deleteCookie('cus_info');
         //Delete coolkie cus_info
     }
     $session = \Yii::$app->session;
     if (!$session->get('login_info')) {
         $this->redirect(BaseUrl::base(true) . '/login');
         return false;
     }
     if ($login_info = $session->get('login_info') and $login_info['expired'] < time()) {
         $session->remove('login_info');
         unset($session['login_info']);
     }
     if (!$session->get('login_info')) {
         $this->redirect(BaseUrl::base(true) . '/timeout');
         return false;
     }
     if ($loginInfo = $session->get('login_info')) {
         $login_info['expired'] = time() + Yii::$app->params['timeOutLogin'];
         $session->set('login_info', $login_info);
     }
     return true;
 }
コード例 #3
0
ファイル: accReport.php プロジェクト: chaimvaid/linet3
 public function init()
 {
     //$accHist = new AccHist('search');
     //$accHist->dt=today 00:00:00 > now > today 23:59:59
     $this->content = \app\widgets\GridView::widget(array('id' => 'acchist-grid', 'dataProvider' => $this->search(), 'layout' => '{items}{pager}', 'panel' => false, 'columns' => array(array('attribute' => 'account_id', 'value' => function ($data) {
         return \yii\helpers\Html::a(\yii\helpers\Html::encode(isset($data->account) ? $data->account->name : $data->account_id), \yii\helpers\BaseUrl::base() . ("/accounts/view/" . $data->account_id));
     }, 'format' => 'raw'), 'dt', array('attribute' => 'details', 'format' => 'raw', 'value' => function ($data) {
         return $data->brief();
     }))), true);
     //parent::init();
 }
コード例 #4
0
ファイル: docReport.php プロジェクト: chaimvaid/linet3
 public function init()
 {
     //$docs->=status=?? open??
     $this->content = \app\widgets\GridView::widget(array('id' => 'docs-grid', 'dataProvider' => $this->search(), 'layout' => '{items}{pager}', 'panel' => false, 'columns' => array(array('attribute' => 'doctype', 'value' => function ($data) {
         return \yii\helpers\html::a(\yii\helpers\html::encode((isset($data->docType) ? Yii::t("app", $data->docType->name) : "") . " #" . $data->docnum), \yii\helpers\BaseUrl::base() . ("/docs/view/" . $data->id));
     }, 'format' => 'raw'), array('attribute' => 'account_id', 'value' => function ($data) {
         return \yii\helpers\html::a(yii\helpers\html::encode($data->company), \yii\helpers\BaseUrl::base() . ("/accounts/transaction/" . $data->account_id));
     }, 'format' => 'raw'), 'total', array('attribute' => 'status', 'value' => function ($data) {
         return isset($data->docStatus) ? $data->docStatus->name : "";
     }))), true);
     //parent::init();
 }
コード例 #5
0
ファイル: salesReport.php プロジェクト: chaimvaid/linet3
 public function init()
 {
     //$docs = new Docs('search');
     $this->content = \app\widgets\GridView::widget(array('id' => 'sales-grid', 'dataProvider' => $this->search(), 'layout' => '{items}{pager}', 'panel' => false, 'columns' => array(array('attribute' => 'account_id', 'value' => function ($data) {
         return \yii\helpers\html::a(\yii\helpers\html::encode($data->company), \yii\helpers\BaseUrl::base() . ("/accounts/view/" . $data->account_id));
     }, 'format' => 'raw'), array('attribute' => 'docnum', 'value' => function ($data) {
         return \yii\helpers\html::a(\yii\helpers\html::encode($data->total), \yii\helpers\BaseUrl::base() . ("/docs/view/" . $data->id));
     }, 'format' => 'raw'), array('attribute' => 'due_date', 'value' => function ($data) {
         return $data->due_date;
     }))), true);
     //parent::init();
 }
コード例 #6
0
ファイル: ZipfileController.php プロジェクト: huylv-hust/ws
 /**
  * @inheritdoc
  */
 public function beforeAction()
 {
     $session = \Yii::$app->session;
     if (!$session->get('login_admin_info')) {
         Yii::$app->response->redirect(BaseUrl::base(true) . '/operator/login');
         return false;
     }
     if ($login_info = $session->get('login_admin_info') and $login_info['expired'] < time()) {
         $session->remove('login_admin_info');
         unset($session['login_admin_info']);
     }
     if ($loginInfo = $session->get('login_admin_info')) {
         $login_info['expired'] = time() + Yii::$app->params['timeOutLogin'];
         $session->set('login_admin_info', $login_info);
     }
     return true;
 }
コード例 #7
0
ファイル: DefaultController.php プロジェクト: huylv-hust/ws
 /**
  * list order
  * @return string
  */
 public function actionIndex()
 {
     $all = new utilities();
     $branch = $all->getAllBranch();
     $data['all_ss'] = $branch['all_ss'];
     $obj = new Sdptd03denpyo();
     $obj_job = new Sdptm01sagyo();
     $filters = Yii::$app->request->get();
     $query_string = empty($filters) ? '' : '?' . http_build_query($filters);
     Yii::$app->session->set('url_list_workslip', BaseUrl::base() . '/list-workslip' . $query_string);
     if (empty($filters)) {
         $filters['start_time'] = date('Ymd');
         $filters['end_time'] = date('Ymd');
     }
     $data['filters'] = $filters;
     /*
      * Get login info
      * */
     $login_info = Yii::$app->session->get('login_info');
     if (isset($login_info['M50_SS_CD']) && $login_info['M50_SS_CD'] != '') {
         $data['filters']['m50_ss_cd'] = $login_info['M50_SS_CD'];
     }
     $count = $obj->countDataSearch($data['filters']);
     $data['pagination'] = new Pagination(['totalCount' => $count, 'defaultPageSize' => Yii::$app->params['defaultPageSize']]);
     $data['page'] = $filters = Yii::$app->request->get('page');
     $data['filters']['limit'] = $data['pagination']->limit;
     $data['filters']['offset'] = $data['pagination']->offset;
     $data['list'] = $obj->getDataSearch($data['filters']);
     if (empty($data['list'])) {
         Yii::$app->session->setFlash('empty', '入力条件に該当する作業伝票が存在しません');
     }
     $data['job'] = [];
     $all_job = $obj_job->getData();
     foreach ($all_job as $k => $v) {
         $data['job'][''] = '';
         $data['job'][$v['M01_SAGYO_NO']] = $v['M01_SAGYO_NAMEN'];
     }
     $data['status'] = Yii::$app->params['status'];
     Yii::$app->params['titlePage'] = '作業伝票一覧';
     Yii::$app->view->title = '情報検索';
     return $this->render('index', $data);
 }
コード例 #8
0
ファイル: MiniForm.php プロジェクト: chaimvaid/linet3
 /**
  * Display the widget
  * @see CWidget::run()
  */
 public function run()
 {
     //style="width:'.($this->width-$this->titlewidth-28).'px;"
     if ($this->content == '') {
         $this->content = ob_get_clean();
     }
     $helper = new \app\models\Help();
     $this->help = $helper->getHelp(str_replace(\yii\helpers\BaseUrl::base(), "", \Yii::$app->request->url));
     if ($this->help) {
         //' . \Yii::t("app", 'Help') . '
         $this->help = '<a class="btn btn-default" href="' . $this->help . '" target="_blank"><i class="glyphicon glyphicon-question-sign"></i></a>';
     } else {
         $this->help = '';
     }
     if ($this->collapse) {
         $this->collapse = '<a href="javascript:;" class="btn btn-default btn-xs collapse-box"  data-toggle="collapse">
                       <i class="fa fa-minus"></i>
                     </a> ';
         $this->collapse = '';
     } else {
         $this->collapse = '';
     }
     if ($this->height) {
         $this->height = 'style="height:' . $this->height . 'px"';
     } else {
         $this->height = '';
     }
     if ($this->fullscreen) {
         $this->fullscreen = '<a href="javascript:;" class="btn btn-default btn-xs full-box">
                       <i class="fa fa-expand"></i>
                     </a> ';
         $this->fullscreen = '';
     } else {
         $this->fullscreen = '';
     }
     //echo $this->getViewPath();
     //    exit;
     //CWidget::render();
     return $this->render("MiniForm", ["class" => $this->class, "logo" => $this->logo, "header" => $this->header, "help" => $this->help, "collapse" => $this->collapse, "fullscreen" => $this->fullscreen, "height" => $this->height, "content" => $this->content]);
     //$newform = '';
     //echo $newform;
 }
コード例 #9
0
ファイル: LitController.php プロジェクト: chaimvaid/linet3
 public function init()
 {
     date_default_timezone_set('Asia/Tel_Aviv');
     if (!\Yii::$app->user->isGuest) {
         \app\helpers\Linet3Helper::SetTheme();
         date_default_timezone_set(\Yii::$app->user->getParam('timezone'));
         \Yii::$app->language = Yii::$app->user->getParam('language');
     }
     if (Yii::$app->params['newInstall']) {
         if ($this->id != 'install') {
             //print "'".Yii::$app->controller->id."'";
             $this->redirect(\yii\helpers\BaseUrl::base() . '/install/index');
             Yii::$app->end();
         }
     } else {
         //include('upgrade.php');
     }
     //Yii::app()->clientScript->registerScriptFile($baseUrl.'/js/yourscript.js');
     return parent::init();
 }
コード例 #10
0
ファイル: CommodityController.php プロジェクト: huylv-hust/ws
 /**
  * action import
  * @return \yii\web\Response
  */
 public function actionImport()
 {
     $request = Yii::$app->request;
     if ($request->isPost && isset($_FILES['commodity'])) {
         $obj = new Sdptm05com();
         if (substr($_FILES['commodity']['name'], -4) == '.csv') {
             $file = utilities::convertUtf8($_FILES['commodity']['tmp_name']);
             $result = $obj->saveImport($file);
             $error = $result['error'];
         } else {
             $error[] = 'CSVのフォーマットが正しくありません';
         }
         if (empty($error) && $result['insert']) {
             Yii::$app->session->setFlash('success', 'success');
         } else {
             Yii::$app->session->setFlash('error', $error);
         }
         return $this->redirect(BaseUrl::base(true) . '/update-commodity');
     }
 }
コード例 #11
0
ファイル: PreviewController.php プロジェクト: huylv-hust/ws
 public function actionIndex()
 {
     $data['post'] = \Yii::$app->request->post();
     if (isset($data['post']['D01_SS_CD'])) {
         $branch = utilities::getAllBranch();
         $ss = $branch['all_ss'];
         $address = $branch['ss_address'];
         $tel = $branch['ss_tel'];
         $obj_job = new Sdptm01sagyo();
         $job[''] = '';
         $all_job = $obj_job->getData();
         foreach ($all_job as $k => $v) {
             $job[$v['M01_SAGYO_NO']] = $v['M01_SAGYO_NAMEN'];
         }
         $data['ss'] = isset($ss[$data['post']['D01_SS_CD']]) ? $ss[$data['post']['D01_SS_CD']] : '';
         $data['address'] = isset($address[$data['post']['D01_SS_CD']]) ? $address[$data['post']['D01_SS_CD']] : '';
         $data['tel'] = isset($tel[$data['post']['D01_SS_CD']]) ? $tel[$data['post']['D01_SS_CD']] : '';
         foreach ($data['post']['LIST_NAME'] as $k => $v) {
             $data['post']['M05_COM_NAMEN' . $k] = $v;
         }
         $data['job'] = $job;
         $data['status'] = \Yii::$app->params['status'];
         $tanto = explode('[]', $data['post']['D03_TANTO_MEI_D03_TANTO_SEI']);
         if (!empty($tanto[0]) && !empty($tanto[1])) {
             $data['post']['tanto'] = $tanto[0] . $tanto[1];
         }
         $kakunin = explode('[]', $data['post']['D03_KAKUNIN_MEI_D03_KAKUNIN_SEI']);
         if (!empty($kakunin[0]) && !empty($kakunin[1])) {
             $data['post']['kakunin'] = $kakunin[0] . $kakunin[1];
         }
         $data['post']['ss_user'] = $this->getssUser($data['post']['D01_SS_CD']);
         $data['ss_user'] = $data['post']['M08_NAME_MEI_M08_NAME_SEI'] ? $data['post']['ss_user'][$data['post']['M08_NAME_MEI_M08_NAME_SEI']] : '';
         $this->layout = '@app/views/layouts/print';
         \Yii::$app->view->title = '作業確認書';
         \Yii::$app->params['titlePage'] = '作業確認書';
         return $this->render('index', $data);
     }
     return $this->redirect(BaseUrl::base(true) . '/regist-workslip');
 }
コード例 #12
0
 public function actionLogin()
 {
     $model = new Users();
     // $username = "******";
     // $password = "******";
     $username = $_POST['username'];
     $password = $this->encrypt($_POST['password']);
     $detail_login = $model->find()->where(['FIELD3' => $username, 'FIELD4' => $password])->all();
     if ($detail_login) {
         $session = Yii::$app->session;
         foreach ($detail_login as $row) {
             $session->set('nama', $row['FIELD2']);
             $session->set('handphone', $row['FIELD6']);
             $session->set('email', $row['FIELD7']);
             $session->set('level', $row['FIELD8']);
             $session->set('company', $row['FIELD9']);
         }
         // $this->redirect(''.BaseUrl::base().'/dashboard/',302);
         echo BaseUrl::base() . "/dashboard";
     } else {
         echo "error";
     }
 }
コード例 #13
0
ファイル: Refnum.php プロジェクト: chaimvaid/linet3
 /**
  * Display the widget
  * @see CWidget::run()
  */
 public function run()
 {
     //style="width:'.($this->width-$this->titlewidth-28).'px;"
     $arr = explode('\\', get_class($this->model));
     $name = array_pop($arr);
     $id = $name . "_" . $this->attribute;
     $ids = $this->attribute . "_ids";
     //if (!($this->model->hasAttribute($this->attribute)))
     //if (!($this->model->{$this->attribute}))
     //throw new CHttpException(500, Yii::t('app', 'Did not set attr or model for refnum'));
     //Yii::$app->end();
     //$baseUrl = Yii::$app->request->baseUrl;
     $text = '';
     //if(function_exists(getRef())){
     //$this->model->getRef();
     if ($this->model->Docs !== null) {
         foreach ($this->model->Docs as $doc) {
             //echo \yii\helpers\Html::link($doc->docType->name . " #" . $doc->docnum, array('docs/view', "id" => $doc->id)) . "<br />";
             $text .= "<a href='" . \yii\helpers\BaseUrl::base() . "docs/view/{$doc->id}" . "' >" . $doc->docType->name . ' #' . $doc->docnum . "</a><br />";
         }
     }
     // }
     return $this->render("Refnum", ["name" => $name, "id" => $id, "ids" => $ids, "value" => $this->model->{$ids}, "text" => $text, "label" => $this->model->getAttributeLabel($this->attribute)]);
 }
コード例 #14
0
ファイル: SiteController.php プロジェクト: chaimvaid/linet3
 public function actionBug()
 {
     //$this->layout = '//layouts/main';
     return $this->redirect(\yii\helpers\BaseUrl::base() . "/settings/bug");
 }
コード例 #15
0
ファイル: index.php プロジェクト: huylv-hust/ws
<main id="contents">
    <section class="readme">
        <p>宇佐美SSをご利用いただき、ありがとうございます。</p>
    </section>
    <article class="container">
        <p class="centering">項目を選択してください。</p>
        <nav class="navBasic">
            <ul class="ulNavBasic">
                <li><a href="#" class="btnNavBasic iconCard" onclick="fncCard();">Usappy<br />カード番号変更</a></li>
                <li><a href="#" class="btnNavBasic iconRegistWork" onclick="fncType('regist');">作業伝票作成</a></li>
                <li><a href="<?php 
echo \yii\helpers\BaseUrl::base(true);
?>
/list-workslip" class="btnNavBasic iconSearchWork">情報検索</a></li>
                <li><a href="maintenance" class="btnNavBasic iconMainte">メンテナンス</a></li>
                <?php 
$login_info = Yii::$app->session->get('login_info');
?>
                <li><a href="/asbo/?sscode=<?php 
echo $login_info['M50_SS_CD'];
?>
" class="btnNavOther iconReserve">作業予約管理へ</a></li>
                <?php 
if (in_array($login_info['M50_SS_CD'], Yii::$app->params['sateiss'])) {
    ?>
                <li><a href="/satei/?sscode=<?php 
    echo $login_info['M50_SS_CD'];
    ?>
" class="btnNavOther iconOldCar">中古車査定サイトへ</a></li>
                <?php 
}
コード例 #16
0
ファイル: header2.php プロジェクト: agungsuprayitno/sme
<?php 
    echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
    echo Alert::widget();
    ?>

<script type="text/javascript"> 
$(function() {
$("#dd_user_input").autocomplete({
source: "<?php 
    echo BaseUrl::base();
    ?>
/site/autokomplit",
minLength: 2,
select: function(event, ui) {
var getUrl = ui.item.id;
if(getUrl != '#') {
location.href = getUrl;
}
},
html: true, 
open: function(event, ui) {
$(".ui-autocomplete").css("z-index", 1000);
}
});
});
</script>
<?php 
} else {
    Yii::$app->response->redirect(BaseUrl::base());
}
コード例 #17
0
ファイル: campaign_data.php プロジェクト: agungsuprayitno/sme
			</div>
			
			<table class="table table-bordered">
			<tr id="teltop"><th>NO</th><th>NAMA CAMPAIGN</th><th>DATA SOURCE</th><th>DIVRE</th><th>PERIODE CAMPAIGN</th><th>ACTION</th></tr>
			<?php 
if (isset($lengkap)) {
    $no = 1;
    foreach ($lengkap as $ar) {
        $dari = substr($ar['DARI'], 0, 10);
        $sampai = substr($ar['SAMPAI'], 0, 10);
        if (isset($ar['DIVRE']) and $ar['DIVRE'] != "") {
            $divre = $ar['DIVRE'];
        } else {
            $divre = "ALL";
        }
        echo "<tr><td>" . $no . "</td><td>" . $ar['CAMPAIGN'] . "</td><td>" . $ar['DATASOURCE'] . "</td><td>" . $divre . "</td><td>" . $dari . " &nbsp; s/d &nbsp; " . $sampai . "</td>\n\t\t\t<td><a class='detail' href='#' tabelid='" . $ar['ID'] . "'><img src='" . BaseUrl::base() . "/assets/img/edit_find.png' title='Detail' /></a> \n\t\t\t&nbsp; &nbsp; <a class='update' href='#' idtabel='" . $ar['ID'] . "' datasource='" . $ar['DATASOURCE'] . "' campaign='" . $ar['CAMPAIGN'] . "' dari='" . substr($ar['DARI'], 0, 10) . "' sampai='" . substr($ar['SAMPAI'], 0, 10) . "' product='" . $ar['PRODUCT'] . "' divre='" . $ar['DIVRE'] . "' witel='" . $ar['WITEL'] . "' uslocal='" . $ar['USLOCAL'] . "'\tussljj='" . $ar['USSLJJ'] . "' ussli='" . $ar['USSLI'] . "'\tusmobile='" . $ar['USMOBLIE'] . "' long='" . $ar['LSTAY'] . "' arpu='" . $ar['ARPU'] . "'\tinternetus='" . $ar['INUSAGE'] . "' arpuin='" . $ar['ARPUIN'] . "' categorydom='" . $ar['DOMAIN'] . "' losin='" . $ar['LOSIN'] . "' tjar='" . $ar['TJAR'] . "'\tpinternet='" . $ar['PINTERNET'] . "' utusage='" . $ar['USUSAGE'] . "' utarpu='" . $ar['USARPU'] . "' utpaket='" . $ar['USPAKET'] . "' utchannel='" . $ar['USCHANNEL'] . "'><img src='" . BaseUrl::base() . "/assets/img/update.png' title='Update' /></a> \n\t\t\t&nbsp; &nbsp; <a href=" . BaseUrl::base() . "/site/delskjcampaign?id='" . $ar['ID'] . "'><img src='" . BaseUrl::base() . "/assets/img/delete.png' title='Delete' /></a></td></tr>";
        $no++;
    }
}
?>
			</table>
			
	<div class="modal fade" id="my-modal2">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <a href="#" class="close" data-dismiss="modal"><img src="/bigdata/frontend/web/assets/img/close_pop.png"></a>
		<table width="990" ><tr><td>	

		
	  </td></tr></table>
コード例 #18
0
ファイル: DefaultController.php プロジェクト: huylv-hust/ws
 /**
  *export pdf
  * @author: Dang Bui
  */
 public function actionPdf()
 {
     $info_warranty = ['number' => 'test19022016', 'date' => 'info_warranty_date', 'expired' => 'info_warranty_expired'];
     $info_car = ['customer_name' => 'info_car_customer', 'car_name' => 'info_car_name', 'car_license' => 'info_car_license'];
     $info_bill = ['front_wheel_right' => ['info_market' => 'Thông tin market1', 'product_name' => '321', 'size' => '12', 'serial' => '1223'], 'front_wheel_left' => ['info_market' => 'Thông tin market2', 'product_name' => '123', 'size' => '123', 'serial' => '123'], 'back_wheel_right' => ['info_market' => 'Thông tin market3', 'product_name' => '', 'size' => '', 'serial' => ''], 'back_wheel_left' => ['info_market' => 'Thông tin market4', 'product_name' => '', 'size' => '', 'serial' => ''], 'otherA' => ['info_market' => 'Thông tin market5', 'product_name' => '', 'size' => '', 'serial' => ''], 'otherB' => ['info_market' => 'Thông tin market6', 'product_name' => '', 'size' => '', 'serial' => '']];
     $info_ss = ['name' => 'SS name', 'address' => 'Address', 'mobile' => 'Mobile'];
     $data = ['info_warranty' => $info_warranty, 'info_car' => $info_car, 'info_bill' => $info_bill, 'info_ss' => $info_ss];
     $pdf_export = new PdfController();
     $pdf_export->exportBill($info_warranty, $info_car, $info_bill, $info_ss, 'save', 1);
     $file = BaseUrl::base(true) . '/data/pdf/' . $info_warranty['number'] . '.pdf';
     var_dump($file);
 }
コード例 #19
0
ファイル: AlertsController.php プロジェクト: AnduZhang/nws
 private function generatePDF($alertData)
 {
     $pdf = Yii::$app->pdf;
     // or new Pdf();
     $mpdf = $pdf->api;
     // fetches mpdf api
     $mpdf->SetHeader('NRESStormTracker Affected Properties for alertId = ' . $alertData->id);
     // call methods or set any properties
     $this->layout = 'print';
     $content = $this->render('//site/pdf', ['alert' => $alertData, 'affected' => $this->_affectedProperties]);
     $filename = date('Ymd_His') . '_' . $alertData->id . '.pdf';
     $mpdf->WriteHtml($content);
     echo $mpdf->Output(Yii::$app->basePath . '/web/' . $this->tmpPath . '/' . $filename, 'F');
     // call the mpdf api output as needed
     return BaseUrl::base(true) . '/' . $this->tmpPath . '/' . $filename;
 }
コード例 #20
0
ファイル: index.php プロジェクト: chaimvaid/linet3
?>
", {Company: id}, function (data) {
                    //alert( "Data Loaded: " + data );
                    window.location = "<?php 
echo yii\helpers\BaseUrl::base() . '/settings/admin';
?>
";

                });

            }
            
            function chose(id) {//shuld be dashboard
                //var id = obj.getAttribute("href")
                $.post("<?php 
echo \yii\helpers\BaseUrl::base() . '/company/index';
?>
", {Company: id}, function (data) {
                    //alert( "Data Loaded: " + data );
                    //console.log(data);

                    window.location = "<?php 
echo yii\helpers\BaseUrl::base() . $home;
?>
";

        });

    }

コード例 #21
0
 public function actionBrowsefile()
 {
     $dir = BaseUrl::base() . '/assets/images/';
     echo $dir;
     if (is_dir($dir)) {
         if ($dh = opendir($dir)) {
             while (($file = readdir($dh)) !== false) {
                 if ($file != "." and $file != "..") {
                     echo "<img src='images/{$file}' width='150'>";
                 }
             }
             closedir($dh);
         }
     }
 }
コード例 #22
0
ファイル: header.php プロジェクト: AnduZhang/nws
<?php
use yii\helpers\Html;
use yii\widgets\Menu;
use yii\helpers\Url;
use yii\helpers\BaseUrl;

$themePath = '/themes/nres/assets/';
?>
<header class="hdr-fixed hdr-dark">
    <div class="strip"></div>
    <div class="hdr-main">
        <div class="hdr-main-inner">
            <div class="hdr-a">
                <a href="<?= BaseUrl::base(true) ?>" class="logo"><img src="<?= Yii::getAlias('@nresThemeAssets') ?>img/logo.png" alt="WeatherSmart"></a>
            </div>
            <?php
            if (!\Yii::$app->user->isGuest) { ?>
                <?php echo Menu::widget(array(
                    'options' => array('class' => 'hdr-b'),
                    'items' => array(
                        array('label' => 'Alerts', 'url' => array('/account/alerts'),'options'=> ['class'=>'btn btn-black']),
                        array('label' => 'Properties', 'url' => array('/nresproperty/index'),'options'=> ['class'=>'btn btn-black'])
                    ),
                )); ?>
            <?php } ?>

            <div class="hdr-c">
                <ul>
                    <li><span class="date"><?= date('d F, Y') ?></span></li>
                    <li><?= Html::a(Yii::t('user', 'Help'), ['/site/help'],['class'=>'help']) ?></li>
                    <?php if (\Yii::$app->user->isGuest) { ?>
コード例 #23
0
 public function actionDelete($id)
 {
     //only admin
     //if (Yii::$app->request->isPostRequest) {
     // we only allow deletion via POST request
     $model = $this->loadModel($id);
     $model->delete();
     $this->company = 0;
     $this->redirect(\yii\helpers\BaseUrl::base() . '/company/admin');
     // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
     //if(!isset($_GET['ajax']))
     //$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
     //} else {
     //    throw new \yii\web\HttpException(400, 'Invalid request. Please do not repeat this request again.');
     //}
 }
コード例 #24
0
 private function generateCSV($alertData)
 {
     // output headers so that the file is downloaded rather than displayed
     header('Content-Type: text/csv; charset=utf-8');
     header('Content-Disposition: attachment; filename=data.csv');
     $filename = date('Ymd_His') . '_' . $alertData->id . '.csv';
     $output = fopen(Yii::$app->basePath . '/web/' . $this->tmpPath . '/' . $filename, 'w');
     fputcsv($output, array('AlertID', 'AlertDate', 'AlertMagnitude', 'AlertSeverity', 'PropertyID', 'PropertyStreetAddress', 'PropertyCity', 'PropertyState', 'PropertyZipcode', 'PropertyClient', 'PropertyLatitude', 'PropertyLongitude', 'PropertyStatus'));
     foreach ($this->_affectedProperties as $property) {
         $csvLine = [];
         $csvLine[] = $alertData->id;
         $csvLine[] = $alertData->date;
         $csvLine[] = $alertData->magnitude;
         $csvLine[] = $alertData->severity;
         $csvLine[] = $property->id;
         $csvLine[] = $property->streetAddress;
         $csvLine[] = $property->city;
         $csvLine[] = $property->state;
         $csvLine[] = $property->zipcode;
         $csvLine[] = $property->client;
         $csvLine[] = $property->latitude;
         $csvLine[] = $property->longitude;
         $csvLine[] = $property->status;
         fputcsv($output, $csvLine);
     }
     return BaseUrl::base(true) . '/' . $this->tmpPath . '/' . $filename;
 }
コード例 #25
0
ファイル: InitialData.php プロジェクト: alefernie/intranet
 public static function bootstrap()
 {
     // Seems database is already initialized
     if (Setting::Get('paginationSize') == 10) {
         return;
     }
     //Yii::$app->search->rebuild();
     Setting::Set('baseUrl', \yii\helpers\BaseUrl::base(true));
     Setting::Set('paginationSize', 10);
     Setting::Set('displayNameFormat', '{profile.firstname} {profile.lastname}');
     // Authentication
     Setting::Set('authInternal', '1', 'authentication');
     Setting::Set('authLdap', '0', 'authentication');
     Setting::Set('refreshUsers', '1', 'authentication_ldap');
     Setting::Set('needApproval', '0', 'authentication_internal');
     Setting::Set('anonymousRegistration', '1', 'authentication_internal');
     Setting::Set('internalUsersCanInvite', '1', 'authentication_internal');
     // Mailing
     Setting::Set('transportType', 'php', 'mailing');
     Setting::Set('systemEmailAddress', '*****@*****.**', 'mailing');
     Setting::Set('systemEmailName', 'My Social Network', 'mailing');
     Setting::Set('receive_email_activities', User::RECEIVE_EMAIL_DAILY_SUMMARY, 'mailing');
     Setting::Set('receive_email_notifications', User::RECEIVE_EMAIL_WHEN_OFFLINE, 'mailing');
     // File
     Setting::Set('maxFileSize', '1048576', 'file');
     Setting::Set('maxPreviewImageWidth', '200', 'file');
     Setting::Set('maxPreviewImageHeight', '200', 'file');
     Setting::Set('hideImageFileInfo', '0', 'file');
     // Caching
     Setting::Set('type', 'CFileCache', 'cache');
     Setting::Set('expireTime', '3600', 'cache');
     Setting::Set('installationId', md5(uniqid("", true)), 'admin');
     // Design
     Setting::Set('theme', "HumHub");
     Setting::Set('spaceOrder', 0, 'space');
     // Basic
     Setting::Set('enable', 1, 'tour');
     Setting::Set('defaultLanguage', Yii::$app->language);
     // Notification
     Setting::Set('enable_html5_desktop_notifications', 0, 'notification');
     // Add Categories
     $cGeneral = new ProfileFieldCategory();
     $cGeneral->title = "General";
     $cGeneral->sort_order = 100;
     $cGeneral->visibility = 1;
     $cGeneral->is_system = 1;
     $cGeneral->description = '';
     if (!$cGeneral->save()) {
         throw new Exception(print_r($cGeneral->getErrors(), true));
     }
     $cCommunication = new ProfileFieldCategory();
     $cCommunication->title = "Communication";
     $cCommunication->sort_order = 200;
     $cCommunication->visibility = 1;
     $cCommunication->is_system = 1;
     $cCommunication->description = '';
     $cCommunication->save();
     $cSocial = new ProfileFieldCategory();
     $cSocial->title = "Social bookmarks";
     $cSocial->sort_order = 300;
     $cSocial->visibility = 1;
     $cSocial->is_system = 1;
     $cSocial->description = '';
     $cSocial->save();
     // Add Fields
     $field = new ProfileField();
     $field->internal_name = "firstname";
     $field->title = 'Firstname';
     $field->sort_order = 100;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->ldap_attribute = 'givenName';
     $field->is_system = 1;
     $field->required = 1;
     $field->show_at_registration = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 20;
         $field->fieldType->save();
     } else {
         throw new Exception(print_r($field->getErrors(), true));
     }
     $field = new ProfileField();
     $field->internal_name = "lastname";
     $field->title = 'Lastname';
     $field->sort_order = 200;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->ldap_attribute = 'sn';
     $field->show_at_registration = 1;
     $field->required = 1;
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 30;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "title";
     $field->title = 'Title';
     $field->sort_order = 300;
     $field->ldap_attribute = 'title';
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 50;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "gender";
     $field->title = 'Gender';
     $field->sort_order = 300;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = 'ProfileFieldTypeSelect';
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->options = "male=>Male\nfemale=>Female\ncustom=>Custom";
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "street";
     $field->title = 'Street';
     $field->sort_order = 400;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 150;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "zip";
     $field->title = 'Zip';
     $field->sort_order = 500;
     $field->profile_field_category_id = $cGeneral->id;
     $field->is_system = 1;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     if ($field->save()) {
         $field->fieldType->maxLength = 10;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "city";
     $field->title = 'City';
     $field->sort_order = 600;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "country";
     $field->title = 'Country';
     $field->sort_order = 700;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "state";
     $field->title = 'State';
     $field->sort_order = 800;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "birthday";
     $field->title = 'Birthday';
     $field->sort_order = 900;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Birthday::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "about";
     $field->title = 'About';
     $field->sort_order = 900;
     $field->profile_field_category_id = $cGeneral->id;
     $field->field_type_class = 'ProfileFieldTypeTextArea';
     $field->is_system = 1;
     if ($field->save()) {
         #$field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "phone_private";
     $field->title = 'Phone Private';
     $field->sort_order = 100;
     $field->profile_field_category_id = $cCommunication->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "phone_work";
     $field->title = 'Phone Work';
     $field->sort_order = 200;
     $field->profile_field_category_id = $cCommunication->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "mobile";
     $field->title = 'Mobile';
     $field->sort_order = 300;
     $field->profile_field_category_id = $cCommunication->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "fax";
     $field->title = 'Fax';
     $field->sort_order = 400;
     $field->profile_field_category_id = $cCommunication->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "im_skype";
     $field->title = 'Skype Nickname';
     $field->sort_order = 500;
     $field->profile_field_category_id = $cCommunication->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "im_msn";
     $field->title = 'MSN';
     $field->sort_order = 600;
     $field->profile_field_category_id = $cCommunication->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->maxLength = 100;
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "im_icq";
     $field->title = 'ICQ Number';
     $field->sort_order = 700;
     $field->profile_field_category_id = $cCommunication->id;
     $field->field_type_class = 'ProfileFieldTypeNumber';
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "im_xmpp";
     $field->title = 'XMPP Jabber Address';
     $field->sort_order = 800;
     $field->profile_field_category_id = $cCommunication->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'email';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url";
     $field->title = 'Url';
     $field->sort_order = 100;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_facebook";
     $field->title = 'Facebook URL';
     $field->sort_order = 200;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_linkedin";
     $field->title = 'LinkedIn URL';
     $field->sort_order = 300;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_xing";
     $field->title = 'Xing URL';
     $field->sort_order = 400;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_youtube";
     $field->title = 'Youtube URL';
     $field->sort_order = 500;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_vimeo";
     $field->title = 'Vimeo URL';
     $field->sort_order = 600;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_flickr";
     $field->title = 'Flickr URL';
     $field->sort_order = 700;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_myspace";
     $field->title = 'MySpace URL';
     $field->sort_order = 800;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_googleplus";
     $field->title = 'Google+ URL';
     $field->sort_order = 900;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $field = new ProfileField();
     $field->internal_name = "url_twitter";
     $field->title = 'Twitter URL';
     $field->sort_order = 1000;
     $field->profile_field_category_id = $cSocial->id;
     $field->field_type_class = \humhub\modules\user\models\fieldtype\Text::className();
     $field->is_system = 1;
     if ($field->save()) {
         $field->fieldType->validator = 'url';
         $field->fieldType->save();
     }
     $group = new Group();
     $group->name = "Users";
     $group->description = "Example Group by Installer";
     $group->save();
 }
コード例 #26
0
ファイル: blast.php プロジェクト: agungsuprayitno/sme
    $("#sendtwitter").click(function(){
      $('#loding1').show();
      $('#ngumpet').hide();
      var message = $("#message").val();
      $.ajax({
        url : "<?php 
echo Url::toRoute(['sendtwittersblast']);
?>
",
        type : "POST",
        data : {message:message},
        success : function(data){
          $('#loding1').hide();
          alert("Success !!!");
          window.location.href = '<?php 
echo BaseUrl::base(['blast']);
?>
';
        },
        error: function(data){
          //alert("Success !!!");
          $('#loding1').hide();
        }
      });
    });
  });
  $(function() {
    CKEDITOR.replace('message');
  });
</script>
コード例 #27
0
ファイル: thankyou2.php プロジェクト: agungsuprayitno/sme
  <div class="wrapp-layanan">
    <div class="all-layanan">

      <?php 
if (isset($paket)) {
    if ($paket == "BOSTOKO") {
        echo "<div class='layanan'>\n        <img src='" . BaseUrl::base() . "/assets/landingpage/images/logobostoko.png' />\n      </div>";
    }
    if ($paket == "STARCONNECT") {
        echo "<div class='layanan'>\n        <img src='" . BaseUrl::base() . "/assets/landingpage/images/logostarconnect.png' />\n      </div>";
    }
    if ($paket == "STARCARE") {
        echo "<div class='layanan'>\n        <img src='" . BaseUrl::base() . "/assets/landingpage/images/logostarcare.png' />\n      </div>";
    }
    if ($paket == "JARVIS") {
        echo "<div class='layanan'>\n        <img src='" . BaseUrl::base() . "/assets/landingpage/images/logojarvis.png' />\n      </div>";
    }
    /* else if($paket == "OFFERING 2"){
              echo "<div class='layanan'>
            <img src='". BaseUrl:: base()."/assets/landingpage/images/tlp_rumah.png' />
          </div>
    
          <div class='layanan'>
            <img src='". BaseUrl:: base()."/assets/landingpage/images/paytv.png' />
          </div>";
            }else if($paket == "OFFERING 3"){
              echo "<div class='layanan'>
            <img src='". BaseUrl:: base()."/assets/landingpage/images/tlp_rumah.png' />
          </div>
    
          <div class='layanan'>
コード例 #28
0
ファイル: index.php プロジェクト: agungsuprayitno/sme
				      </h5>
				    </div>
			
			<table class="table table-bordered">
			<tr id="teltop"><th>NO</th><th>NAMA</th><th>EMAIL</th><th>PESAN</th><th>WAKTU</th><th>VIEW</th></tr>
			<?php 
if (isset($lengkap)) {
    $no = 1;
    foreach ($lengkap as $ar) {
        $waktu = substr($ar['TIME'], 0, 10);
        $pesan = substr($ar['PESAN'], 0, 100);
        if (isset($ar['DIVRE']) and $ar['DIVRE'] != "") {
            $divre = $ar['DIVRE'];
        } else {
            $divre = "ALL";
        }
        echo "<tr><td>" . $no . "</td><td>" . $ar['NAMA'] . "</td><td>" . $ar['EMAIL'] . "</td><td>" . $pesan . "</td><td>" . $waktu . "</td>\n\t\t\t<td><a class='detail' href='#' tabelid='" . $ar['ID'] . "'><img src='" . BaseUrl::base() . "/assets/img/edit_find.png' title='Detail' /></a> </td></tr>";
        $no++;
    }
}
?>
			</table>
			
	<div id="form_detail">
       <div id="ketok"></div>
	</div>
			
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
			
コード例 #29
0
ファイル: usermanag.php プロジェクト: agungsuprayitno/sme
</td>
			<td><a href="#" id="edituser" <?php 
        echo "iduser='******'ID'] . "' nama='" . $ar['NAMA'] . "' email='" . $ar['EMAIL'] . "' kompani='" . $ar['COMPANY'] . "' nik='" . $ar['NIK'] . "' ";
        ?>
>
				<img src="<?php 
        echo BaseUrl::base();
        ?>
/assets/img/update.png" title="Update" /></a> 
				<a href="<?php 
        echo BaseUrl::base();
        ?>
/site/deleteuser?id=<?php 
        echo $ar["ID"];
        ?>
"><img src="<?php 
        echo BaseUrl::base();
        ?>
/assets/img/delete.png" title="Delete" /></a></td></tr>
			<?php 
        $no++;
    }
}
?>
			</table><br><br><br>
			

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
			
コード例 #30
0
 public function actionDeletecontact()
 {
     $id = $_GET['id'];
     $model = new Contactemail();
     $model->deleteAll("FIELD1 = '{$id}'");
     $this->redirect('' . BaseUrl::base() . '/email/contact', 302);
 }