예제 #1
0
 public function actionAdd()
 {
     if (User::thisUser()->reputation < Event::MIN_REPUTATION_EVENT_CREATE) {
         return Yii::$app->getResponse()->redirect(Url::home());
     }
     $event = new Event();
     if ($event->load(Yii::$app->request->post())) {
         $eventPost = Yii::$app->request->post('Event');
         $event->country = $eventPost['country'];
         $event->description = \yii\helpers\HtmlPurifier::process($event->description, []);
         $event->user_id = Yii::$app->user->identity->getId();
         $event->date = strtotime($eventPost['date']);
         $event->like_count = 0;
         $event->show_count = 0;
         if ($event->save()) {
             // Добавляем теги
             $tagsArr = explode(',', Yii::$app->request->post('tags'));
             $tags = array_shift($tagsArr);
             $event->saveTags($tags);
             // Добавляем картинки к записи
             $imgs = Yii::$app->request->post('imgs');
             if (!empty($imgs) && is_array($imgs)) {
                 $event->saveImgs($imgs);
             } else {
                 $event->saveImgs([]);
             }
             $event->saveLocations(Yii::$app->request->post('location'));
             return Yii::$app->getResponse()->redirect($event->getUrl());
         }
     }
     Yii::$app->params['jsZoukVar']['tagsAll'] = Tags::getTags(Tags::TAG_GROUP_ALL);
     return $this->render('add', ['event' => $event]);
 }
예제 #2
0
 /**
  * Initializes the widget. 
  */
 public function init()
 {
     parent::init();
     if ($this->baseUrl === null) {
         $this->baseUrl = Url::home();
     }
 }
예제 #3
0
 public static function upload($value)
 {
     $document = new Documents();
     foreach ($value as $item => $i) {
         $document->{$item} = $i;
     }
     $document->created_at = time();
     $document->updated_at = time();
     $document->user = $value['user'];
     $token = Util::generateRandomStringCode(20);
     $document->token = $token;
     // echo \yii\helpers\Url::home(true) . $value['original_url'];die;
     $document->money_url = Util::makeOuoUrl(\yii\helpers\Url::home(true) . $value['original_url']);
     //$value['user'] = 1; //for testing
     $user = Users::findOne(['id' => $value['user']]);
     if (!$user) {
         return Util::arrayError('Error !');
     }
     if ($document->save()) {
         $user->number_upload += 1;
         $user->points += 3;
         $user->save();
         return Util::arraySuccess('Success', $document->id);
     }
     return Util::arrayError('Error !');
 }
예제 #4
0
 /**
  * @param integer $id
  * @return mixed
  */
 public function actionList($id = 0)
 {
     if (Yii::$app->request->isAjax) {
         if (!$id) {
             echo '';
             Yii::$app->end();
         }
         $tourFields = Tour::find()->with('tourFields')->where(['id' => $id])->one();
         $booking = new Booking();
         $bookingFields = new BookingFields();
         $bookingColumns = $booking->getTableSchema()->columns;
         $sort = Json::decode($tourFields->sort);
         $data = array_merge_recursive($sort, $bookingColumns);
         $addField = [];
         if ($tourFields->tourFields) {
             foreach ($tourFields->tourFields as $field) {
                 $addField['add_field_' . $field->id] = ['sort' => $field->sort, 'name' => $field->name, 'type' => $field->type, 'tour_id' => $field->tour_id];
             }
         }
         $data = array_merge($data, $addField);
         unset($data['id']);
         unset($data['tour_id']);
         $data = $booking->customMultiSort($data, 'sort');
         echo $this->renderAjax('_list', ['booking' => $booking, 'bookingFields' => $bookingFields, 'data' => $data]);
         Yii::$app->end();
     }
     return $this->redirect(Url::home());
 }
예제 #5
0
 public function actionLogin()
 {
     $this->layout = false;
     if (!$this->user->isGuest) {
         $this->redirect(Yii::$app->getHomeUrl());
     }
     $model = new LoginForm();
     if ($this->isPost) {
         $model->attributes = $this->request->post();
         if ($model->login()) {
             if (!$this->isAjax) {
                 $cookies = $this->request->cookies;
                 if (isset($cookies[$this->user->returnUrlParam])) {
                     $backUrl = $cookies[$this->user->returnUrlParam]->value;
                     Yii::$app->response->cookies->remove($this->user->returnUrlParam);
                 } else {
                     $backUrl = Url::home(true);
                 }
                 $this->redirect($backUrl);
             }
         }
     }
     if ($this->isAjax && $this->isPost) {
         throw new UserError($model->getErrors());
     } else {
         return $this->render('login', ['model' => $model]);
     }
 }
 /**
  * @param ATOM|RSS2 $feed
  * @return ATOM|RSS2
  */
 protected function generateFeed($feed)
 {
     /* @var Post[] $posts */
     $site_name = ArrayHelper::getValue(Yii::$app->params, 'site_name', Yii::$app->name);
     $posts = Post::find()->where(['status' => Post::STATUS_PUBLISHED])->orderBy(['post_time' => SORT_DESC, 'update_time' => SORT_DESC])->limit(20)->all();
     $feed->setTitle($site_name);
     $feed->setLink(Url::home(true));
     $feed->setSelfLink(Url::to(['feed/rss'], true));
     $feed->setAtomLink(Url::to(['feed/atom'], true));
     $feed->setDescription(ArrayHelper::getValue(Yii::$app->params, 'seo_description', '最新更新的文章'));
     if ($posts) {
         $feed->setDate($posts[0]->update_time);
     } else {
         $feed->setDate(time());
     }
     foreach ($posts as $post) {
         $entry = $feed->createNewItem();
         $entry->setTitle($post->title);
         $entry->setLink($post->getUrl(true));
         $entry->setDate(intval($post->post_time));
         $entry->setDescription($post->excerpt);
         $entry->setAuthor($post->author_name ? $post->author_name : $post->author->nickname);
         $entry->setId($post->alias);
         if ($feed instanceof ATOM) {
             $entry->setContent($post->content);
         }
         $feed->addItem($entry);
     }
     return $feed;
 }
예제 #7
0
 public function actionAdd()
 {
     $user = User::thisUser();
     if (Yii::$app->request->isPost) {
         $img = new Img();
         $img->user_id = $user->id;
         if ($img->save()) {
             $img->imgFile = UploadedFile::getInstance($img, 'imgFile');
             if ($img->imgFile instanceof UploadedFile && $img->validate('imgFile')) {
                 $prefix = Yii::$app->params['prefix'];
                 if (empty($prefix)) {
                     $prefix = "no_prefix";
                 }
                 $dirName = 'user' . $user->id;
                 $path = '/' . $prefix . '/img/' . $dirName . '/';
                 $fileName = 'img_' . $user->id . '_' . $img->id . '.' . pathinfo($img->imgFile->name, PATHINFO_EXTENSION);
                 if (!empty($prefix)) {
                     $fileName = $prefix . '_' . $fileName;
                 }
                 /** @var YandexDiskComponent $yandexDisk */
                 $yandexDisk = Yii::$app->yandexDisk;
                 $yandexDisk->setClientInfoImgDefault();
                 // Тест папки $path на существование
                 $pathInfo = $yandexDisk->getProperty($path);
                 if (!$pathInfo) {
                     $pathInfoMusic = $yandexDisk->getProperty('/' . $prefix . '/');
                     if (!$pathInfoMusic) {
                         $yandexDisk->createDirectory('/' . $prefix . '/');
                     }
                     $pathInfoMusic = $yandexDisk->getProperty('/' . $prefix . '/img/');
                     if (!$pathInfoMusic) {
                         $yandexDisk->createDirectory('/' . $prefix . '/img/');
                     }
                     $yandexDisk->createDirectory($path);
                 }
                 $fileInfo = $yandexDisk->getProperty($path . $fileName);
                 if (!$fileInfo) {
                     // Такого файла еще нет
                     $uploadInfo = $yandexDisk->uploadFile($path, (array) $img->imgFile, $fileName);
                 }
                 $publishInfo = $yandexDisk->startPublishing($path . $fileName);
                 if (is_string($publishInfo) && !empty($publishInfo)) {
                     $img->url = $publishInfo;
                     $shortUrl = Yii::$app->google->getShortUrl('https://getfile.dokpub.com/yandex/get/' . $publishInfo);
                     if (!empty($shortUrl['id'])) {
                         $img->short_url = $shortUrl['id'];
                     }
                 }
                 $img->key = $yandexDisk->key;
                 $img->entity_key = $yandexDisk::THIS_ENTITY;
                 $img->save();
             }
         }
         $result = ['id' => $img->id, 'short_url' => $img->short_url];
         return json_encode($result);
     }
     $this->redirect(Url::home());
 }
예제 #8
0
파일: CoreView.php 프로젝트: oakcms/oakcms
 public function isAdmin()
 {
     $rHostInfo = Url::home(true);
     if (!\Yii::$app->user->isGuest && strpos(\Yii::$app->request->absoluteUrl, $rHostInfo . 'admin') !== false) {
         return true;
     } else {
         return false;
     }
 }
예제 #9
0
 /**
  * Deletes this Space
  */
 public function actionDelete()
 {
     $this->ownerOnly();
     $model = new DeleteForm();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         $this->getSpace()->delete();
         return $this->redirect(Url::home());
     }
     return $this->render('delete', array('model' => $model, 'space' => $this->getSpace()));
 }
예제 #10
0
 /**
  * {@url to="/path" /}
  * {@url /}
  *
  * @return callable
  */
 public function getCallback()
 {
     return function ($chunk, $context, $bodies, $params) {
         if ($params->to) {
             $code = Url::to($params->to);
         } else {
             $code = Url::home();
         }
         return $chunk->write($code);
     };
 }
예제 #11
0
파일: snippets.php 프로젝트: jacmoe/bugitor
 public function lightbox($title, $source, $target, $align = "left", $size = "")
 {
     $target_url = Url::home(true) . "images/" . $target;
     $image_url = Url::home(true) . "images/" . $source;
     $image_path = \Yii::getAlias('@app/web/images/') . $source;
     if (is_file($image_path)) {
         $image_info = array_values(getimagesize($image_path));
         list($width, $height, $type, $attr) = $image_info;
     }
     return "<a href=\"" . $target_url . "\"" . " data-lightbox=\"" . str_replace('.', '_', str_replace('/', '_', $target)) . "\"" . " data-title=\"" . $title . "\"" . " title=\"" . $title . "\" class=\"sb\"><span class=\"imagewrap\"><img src=\"" . $image_url . "\" alt=\"" . $title . "\" title=\"" . $title . "\" class=\"gallery th " . $align . " floated image\"" . (!isset($width) ? "" : " width=\"" . $width . "\" ") . (!isset($height) ? "" : " height=\"" . $height . "\" ") . "/></span></a>";
 }
예제 #12
0
파일: NavBar.php 프로젝트: Penton/MoBlog
 public function init()
 {
     $pages = Page::find()->selectNoText()->published()->all();
     $this->_htmlStr = '<ul class="menu">';
     $this->_htmlStr .= '<li role="presentation" ' . ($this->active('site', 'index', '') ? 'class="nav-current"' : '') . '>' . Html::a('首页', Url::home()) . '</li>';
     if (!empty($pages)) {
         foreach ($pages as $page) {
             $this->_htmlStr .= '<li role="presentation" ' . ($this->active('site', 'page', $page->slug) ? 'class="nav-current"' : '') . '>' . Html::a($page->title, ['site/page', 'slug' => $page->slug, $this->options]) . '</li>';
         }
     }
     $this->_htmlStr .= '</ul>';
 }
예제 #13
0
 public function actionFeedback()
 {
     $model = new Feedback();
     if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
         Yii::$app->response->format = Response::FORMAT_JSON;
         return ActiveForm::validate($model);
     }
     if ($model->load($_POST) && $model->validate()) {
         $model->send();
         Yii::$app->controller->redirect(Url::home());
     }
 }
예제 #14
0
 /**
  * Runs the action
  *
  * @return string result content
  */
 public function run()
 {
     $this->controller->layout = $this->layout;
     if (Yii::$app->auth0->sdk()->getUser()) {
         if (Yii::$app->auth0->login()) {
             Yii::$app->user->login(Yii::$app->auth0->localUser);
             Yii::$app->tenant->login();
         }
         return $this->controller->redirect(isset($this->redirectUrl) ? $this->redirectUrl : Url::home());
     }
     return $this->controller->render($this->view);
 }
 public function actionUrl()
 {
     $urls = [];
     $urls[] = Url::base();
     $urls[] = Url::current();
     $urls[] = Url::previous();
     // use before Url::remember()
     $urls[] = Url::home();
     $urls[] = Url::to('/');
     $urls[] = Url::to('/test');
     $urls[] = Url::to(['book']);
     return VarDumper::dumpAsString($urls, 10, true);
 }
예제 #16
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     $view = $this->getView();
     if (!isset($this->url)) {
         $this->url = Url::home();
     }
     if (!isset($this->title)) {
         $this->title = Yii::$app->name;
     }
     UserAsset::register($view);
     $asset = $view->assetBundles[UserAsset::classname()];
     $image = Html::img($asset->baseUrl . self::LOGO_IMAGE, $this->imageOptions);
     echo Html::a($image . $this->title, $this->url, $this->options);
 }
예제 #17
0
파일: Tag.php 프로젝트: cmsgears/widget-tag
 public function renderWidget($tags = [])
 {
     $htmlData = "<ul class='tags'>";
     if (isset($tags) && count($tags) == 0) {
         $tags = TagService::getIdNameMap();
         foreach ($tags as $tag) {
             $htmlData .= '<li><a href="' . Url::home() . 'tag/' . $tag . '">' . $tag . '</a></li>';
         }
     } else {
         foreach ($tags as $tag) {
             $htmlData .= '<li><a href="' . Url::home() . 'tag/' . $tag->slug . '">' . $tag->name . '</a></li>';
         }
     }
     return $htmlData .= "</ul>";
 }
 /**
  * 图片上传
  * @return array
  */
 public function actionImageUpload()
 {
     Yii::$app->response->format = Response::FORMAT_JSON;
     if (!Yii::$app->request->isPost) {
         return ['status' => 'error', 'message' => 'Invalid Method.'];
     }
     //上传结果检测
     $imageFile = UploadedFile::getInstanceByName('file');
     if (!$imageFile) {
         return ['status' => 'error', 'message' => 'Not File Uploaded.'];
     }
     if ($imageFile->hasError) {
         return ['status' => 'error', 'message' => $imageFile->error];
     }
     //后缀检测
     if (!empty(Yii::$app->params['upload']['imageExtension']) && is_array(Yii::$app->params['upload']['imageExtension'])) {
         $imageExtension = Yii::$app->params['upload']['imageExtension.'];
     } else {
         $imageExtension = ['png', 'jpg'];
     }
     if (!in_array($imageFile->extension, $imageExtension)) {
         return ['status' => 'error', 'message' => 'Invalid extension.'];
     }
     if (empty(Yii::$app->params['upload']['savePath'])) {
         $savePath = 'upload' . DIRECTORY_SEPARATOR . 'image' . DIRECTORY_SEPARATOR . date('Ymd') . DIRECTORY_SEPARATOR;
     } else {
         $savePath = Yii::$app->params['upload']['savePath'] . DIRECTORY_SEPARATOR . 'image' . DIRECTORY_SEPARATOR . date('Ymd') . DIRECTORY_SEPARATOR;
     }
     $basePath = Yii::getAlias('@webroot');
     if (!file_exists($basePath . DIRECTORY_SEPARATOR . $savePath) && !FileHelper::createDirectory($basePath . DIRECTORY_SEPARATOR . $savePath, 0755)) {
         return ['status' => 'error', 'message' => 'Invalid Save Path.'];
     }
     $imageName = date('his') . '_' . substr(md5(Yii::$app->security->generateRandomString()), 8, 16) . '.' . $imageFile->extension;
     if (!$imageFile->saveAs($basePath . DIRECTORY_SEPARATOR . $savePath . DIRECTORY_SEPARATOR . $imageName)) {
         Yii::$app->response->statusCode = 500;
         return ['status' => 'error', 'message' => 'Save Image Failed.'];
     }
     if (substr($savePath, 0, 1) == '/') {
         $savePath = substr($savePath, 1);
     }
     $url = Url::home(true) . str_replace(['\\', '//'], '/', "{$savePath}/{$imageName}");
     $headers = ['Expires' => 'Mon, 26 Jul 1997 05:00:00 GMT', 'Last-Modified' => gmdate("D, d M Y H:i:s") . ' GMT', 'Cache-Control' => 'no-store, no-cache, must-revalidate', 'Pragma' => ' no-cache'];
     foreach ($headers as $key => $value) {
         Yii::$app->response->headers->set($key, $value);
     }
     return ['status' => 'success', 'url' => $url];
 }
예제 #19
0
파일: Module.php 프로젝트: oakcms/oakcms
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if (Yii::$app->cache === null) {
         throw new \yii\web\ServerErrorHttpException('Please configure Cache component.');
     }
     if (Yii::$app instanceof \yii\web\Application) {
         if (!defined('LIVE_EDIT')) {
             define('LIVE_EDIT', !Yii::$app->user->isGuest && Yii::$app->session->get('oak_live_edit'));
         }
     }
     $rHostInfo = Url::home(true);
     if (!Yii::$app->user->isGuest && strpos(Yii::$app->request->absoluteUrl, $rHostInfo . 'admin') !== false) {
         \Yii::$app->view->theme->basePath = '@app/templates/backend/base';
         \Yii::$app->view->theme->baseUrl = '@web/templates/backend/base/web';
         \Yii::$app->view->theme->pathMap = ['@app/views' => '@app/templates/backend/base/views', '@app/modules' => '@app/templates/backend/base/views/modules', '@app/widgets' => '@app/templates/backend/base/views/widgets'];
     }
 }
예제 #20
0
 /**
  * рассылка приглашений на почту и телефоны
  * @param type $data
  */
 public static function send($data)
 {
     $message = 'Получи скидку тут ' . \yii\helpers\Url::home(true);
     $data = array_unique(array_map('trim', explode("\n", $data)));
     foreach ($data as $item) {
         try {
             if (strpos($item, '@') > 0) {
                 Yii::$app->mailer->compose('recommend', ['message' => $message])->setFrom(Yii::$app->params['emailFrom'])->setTo($item)->setSubject('Рекомендация')->send();
             } else {
                 $phone = str_replace('+', '', $item);
                 if ($phone[0] == 7 && is_numeric($phone) && strlen($phone) > 10) {
                     Yii::$app->sms->send_sms($phone, $message);
                 }
             }
         } catch (Exception $ex) {
         }
     }
 }
예제 #21
0
 public function actionAdd()
 {
     if (User::thisUser()->reputation < Comment::MIN_REPUTATION_COMMENT_CREATE) {
         return Yii::$app->getResponse()->redirect(Url::home());
     }
     $anchor = '';
     $comment = new Comment();
     if ($comment->load(Yii::$app->request->post())) {
         $comment->description = nl2br($comment->description);
         $comment->description = \yii\helpers\HtmlPurifier::process($comment->description, []);
         $comment->entity_id = (int) $comment->entity_id;
         $comment->parent_id = (int) $comment->parent_id;
         $comment->user_id = Yii::$app->user->identity->getId();
         $comment->like_count = 0;
         if ($comment->save()) {
             $anchor = $comment->id;
         }
     }
     return json_encode(['content' => \frontend\widgets\CommentsWidget::widget(['entity' => $comment->entity, 'entity_id' => $comment->entity_id, 'showDialog' => false]), 'anchor' => $anchor]);
 }
예제 #22
0
 /**
  * @return string|\yii\web\Response
  * @throws BadRequestHttpException
  */
 public function actionSetCurrency()
 {
     if (!Yii::$app->request->isPost) {
         throw new BadRequestHttpException();
     }
     $code = Yii::$app->request->post('code');
     $currency = CurrencyHelper::get($code);
     if ($currency) {
         CurrencyHelper::change($currency->code);
     }
     if (!Yii::$app->request->isAjax) {
         $returnUrl = Yii::$app->request->post('returnUrl');
         if (isset($returnUrl)) {
             return $this->redirect($returnUrl);
         } else {
             return $this->redirect(Url::home());
         }
     }
     return Json::encode(1);
 }
예제 #23
0
 public function actionRouteToUrl()
 {
     \Yii::$app->response->format = Response::FORMAT_JSON;
     $route = \Yii::$app->request->get('route');
     if ($route === null) {
         throw new NotAcceptableHttpException();
     }
     if (is_string($route)) {
         switch ($route) {
             case 'home':
                 return ['success' => true, 'url' => Url::home()];
             default:
                 throw new NotSupportedException();
         }
     } else {
         if (ArrayHelper::isIndexed($route)) {
             $url = Url::to($route);
         } else {
             $url = Url::to(array_merge([ArrayHelper::getValue($route, 'route', '')], ArrayHelper::getValue($route, 'params', [])));
         }
         return ['success' => true, 'url' => $url];
     }
 }
예제 #24
0
 /**
  * Edits a user
  *
  * @return type
  */
 public function actionEdit()
 {
     $user = UserEditForm::findOne(['id' => Yii::$app->request->get('id')]);
     $user->initGroupSelection();
     if ($user == null) {
         throw new \yii\web\HttpException(404, Yii::t('AdminModule.controllers_UserController', 'User not found!'));
     }
     $user->scenario = 'editAdmin';
     $user->profile->scenario = 'editAdmin';
     $profile = $user->profile;
     // Build Form Definition
     $definition = [];
     $definition['elements'] = [];
     // Add User Form
     $definition['elements']['User'] = ['type' => 'form', 'title' => 'Account', 'elements' => ['username' => ['type' => 'text', 'class' => 'form-control', 'maxlength' => 25], 'email' => ['type' => 'text', 'class' => 'form-control', 'maxlength' => 100], 'groupSelection' => ['id' => 'user_edit_groups', 'type' => 'multiselectdropdown', 'items' => UserEditForm::getGroupItems()], 'status' => ['type' => 'dropdownlist', 'class' => 'form-control', 'items' => [User::STATUS_ENABLED => Yii::t('AdminModule.controllers_UserController', 'Enabled'), User::STATUS_DISABLED => Yii::t('AdminModule.controllers_UserController', 'Disabled'), User::STATUS_NEED_APPROVAL => Yii::t('AdminModule.controllers_UserController', 'Unapproved')]]]];
     // Add Profile Form
     $definition['elements']['Profile'] = array_merge(array('type' => 'form'), $profile->getFormDefinition());
     // Get Form Definition
     $definition['buttons'] = array('save' => array('type' => 'submit', 'label' => Yii::t('AdminModule.controllers_UserController', 'Save'), 'class' => 'btn btn-primary'), 'become' => array('type' => 'submit', 'label' => Yii::t('AdminModule.controllers_UserController', 'Become this user'), 'class' => 'btn btn-danger'), 'delete' => array('type' => 'submit', 'label' => Yii::t('AdminModule.controllers_UserController', 'Delete'), 'class' => 'btn btn-danger'));
     $form = new HForm($definition);
     $form->models['User'] = $user;
     $form->models['Profile'] = $profile;
     if ($form->submitted('save') && $form->validate()) {
         if ($form->save()) {
             return $this->redirect(['/admin/user']);
         }
     }
     // This feature is used primary for testing, maybe remove this in future
     if ($form->submitted('become')) {
         Yii::$app->user->switchIdentity($form->models['User']);
         return $this->redirect(Url::home());
     }
     if ($form->submitted('delete')) {
         return $this->redirect(['/admin/user/delete', 'id' => $user->id]);
     }
     return $this->render('edit', array('hForm' => $form, 'user' => $user));
 }
 public function actionIndex($id)
 {
     if (Yii::$app->user->isGuest) {
         return $this->redirect(Url::home());
     }
     $user = User::findOne(Yii::$app->user->id);
     if ($user->company->id != $id) {
         return $this->redirect(Url::home());
     }
     $company = Company::findOne($id);
     $shedule = Shedule::getSheduleString($company->id, $company->twenty_four_hours);
     $categories = Category::find()->all();
     $countries = Country::find()->all();
     $cInfFrm = new CompanyInfoForm();
     $cInfFrm->loadInfo($id);
     $cPasFrm = new ChangePasswordForm();
     $cEmailFrm = new ChangeEmailForm();
     $cEmailFrm->loadEmail();
     $cOptFrm = new OptionsForm();
     $cOptFrm->loadData($id);
     $cities = City::find()->asArray()->all();
     $cities = ArrayHelper::map($cities, 'name', 'name');
     return $this->render('/private-room/private-room', ['company' => $company, 'shedule' => $shedule, 'categories' => $categories, 'countries' => $countries, 'cInfFrm' => $cInfFrm, 'cPasFrm' => $cPasFrm, 'cEmailFrm' => $cEmailFrm, 'cOptFrm' => $cOptFrm, 'cities' => $cities]);
 }
예제 #26
0
<?php

/* @var $this yii\web\View */
$this->title = 'Поиск';
use yii\helpers\Url;
?>

<div class="jumbotron">
    <h1>Поиск завершен!</h1>

    <p class="lead">Вам прийдет смс на ваш номер <?php 
echo Yii::$app->user->identity->phone;
?>
</p>

    <p><a class="btn btn-lg btn-success" href="<?php 
echo Url::home();
?>
">Искать еще</a></p>
</div>
예제 #27
0
파일: index.php 프로젝트: phucnv206/pinut
use app\assets\AppAsset;
?>
<nav class="navbar navbar-dark bg-dark-opacity navbar-fixed-top" id="nav">
    <div class="container p-lang text-xs-right pull-xs-right pull-md-none">
        <a href="#" ng-click="main.changeLanguage('vi')">VN</a>
        <a href="#" ng-click="main.changeLanguage('en')">EN</a>
    </div>
    <button class="navbar-toggler hidden-md-up" type="button" data-toggle="collapse" data-target="#collapse-nav">
        &#9776;
    </button>
    <div class="container">
        <div class="collapse navbar-toggleable-sm text-xs-center" id="collapse-nav">
            <div class="row nav navbar-nav" id="scrollby-nav">
                <div class="nav-logo col-md-2 col-md-push-5">
                    <a class="nav-link" href="<?php 
echo Url::home(true);
?>
"><img src="/images/logo.png"></a>
                </div>
                <div class="p-nav-item col-md-5 col-md-pull-2">
                    <div class="row">
                        <div class="col-xs-4">
                            <a class="nav-link" href="#home"><?php 
echo \Yii::t('app', 'Home');
?>
</a>
                        </div>
                        <div class="col-xs-4">
                            <a class="nav-link" href="#about"><?php 
echo \Yii::t('app', 'About');
?>
예제 #28
0
 /**
  * Init default variables for autoreplace
  *
  * @return $this
  */
 protected function _prepareVars()
 {
     $this->setVar(['HOME_URL' => Url::home(true), 'CANONICAL_URL' => Url::canonical(), 'LOCALE' => Yii::$app->formatter->locale]);
     return $this;
 }
<?php

use yii\helpers\Html;
use yii\helpers\Url;
/** @var $this yii\web\View */
/** @var $user app\models\User */
$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['user/password-reset', 'token' => $user->reset_token]);
?>
<div class="password-reset">
    <p>Hello <?php 
echo Html::encode($user->name);
?>
,</p>

    <p>A request to reset the password for your account has been made at <?php 
echo Html::a(Yii::$app->name, Url::home(true));
?>
</p>
    <p>Follow the link below to reset your password:</p>

    <p><?php 
echo Html::a(Html::encode($resetLink), $resetLink);
?>
</p>
</div>
예제 #30
0
?>

<style type="text/css">
.breadcrumbs{
	font-size:15px;
}
.breadcrumbs a{

}
</style>

<div id="main-content">
	<div class="user-create">
		<div class="wrapper-150">
			<h1 class="page-title">Dispatching</h1>
			<p class="breadcrumbs"><a href="<?php echo Url::home() ?>dispatching/index">Back to Search Dispatch</a> &raquo; Search Result: </p>
			<div class="desktop-only" style="padding:20px 0" >
				<?= $this->render('_print-form.php', [
					'dispatch_model_1' => $dispatch_model_1,
					'dispatch_model_2' => $dispatch_model_2,
					'dispatch_model_3' => $dispatch_model_3,
					'full_dispatch_id' => $full_dispatch_id,
					'sap_dispatch' => $sap_dispatch
				]) ?>

			</div>
		</div>
	</div>
</div>