예제 #1
0
 public function actionIndex($slugInput = "")
 {
     $error = false;
     $slug = !empty($_GET["slug"]) ? $slug = SiteHelper::checkedVaribal($_GET["slug"]) : "";
     if (empty($slug) && !empty($slugInput)) {
         $slug = $slugInput;
     }
     if (!empty($slug)) {
         $page = CatalogContent::fetchBySlug($slug);
     }
     if (!empty($page) && $page->id > 0) {
         $this->render('index', array("page" => $page));
     } else {
         $this->redirect("/site/error");
     }
 }
예제 #2
0
 public static function getAnimateText($slug, $link = "")
 {
     if (is_array($slug)) {
         if (!empty($slug[Yii::app()->getLanguage()])) {
             $slug = $slug[Yii::app()->getLanguage()];
         } else {
             $slug = "";
         }
     }
     if (!empty($slug)) {
         $textModel = CatalogContent::fetchBySlug($slug);
         $cout = '<div class="blockquote">' . $textModel->description;
         if (!empty($link)) {
             $cout .= "<div class='textAlignRight'><a href='" . $link . "' title='" . Yii::t("page", "подробнее о туристическом портале Узбекистана") . "'>" . Yii::t("page", "подробнее") . "...</div>";
         }
         $cout .= '</div>';
         return $cout;
     }
 }
예제 #3
0
 /**
  * Displays the contact page
  */
 public function actionContact()
 {
     $model = new ContactForm();
     if (isset($_POST['ContactForm'])) {
         $model->attributes = $_POST['ContactForm'];
         if ($model->validate()) {
             $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';
             $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';
             $headers = "From: {$name} <{$model->email}>\r\n" . "Reply-To: {$model->email}\r\n" . "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8";
             mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);
             Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');
             $this->refresh();
         }
     }
     $pageInfo = CatalogContent::fetchBySlug("contact");
     $this->render('contact', ['model' => $model, "content" => $pageInfo]);
 }
예제 #4
0
        ?>
</ul><?php 
    }
    ?>
            </li>
        <?php 
}
?>
        </ul>
    </div>
    <div class="titleLIneLeft">
        <div class="blockName">&nbsp;&nbsp;Информация&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
        <br/>
        <?php 
$n = 0;
foreach (CatalogContent::fetchAll(DBQueryParamsClass::CreateParams()->setLimit(6)->setConditions("category_id=:category_id")->setParams(array(":category_id" => 2))->setOrderBy("id DESC")) as $item) {
    ?>
            <div class="NItem">
                <div class="NIFHeader"><a href="<?php 
    echo SiteHelper::createUrl("/news/index", array("id" => $item->id));
    ?>
" title="<?php 
    echo $item->name;
    ?>
"><?php 
    echo $item->name;
    ?>
</a> </div>
                <?php 
    if ($n < 5) {
        ?>
예제 #5
0
<?php

$this->widget('addressLineWidget', array('links' => array($activeTitle)));
//if( $this->beginCache( 'add_page', array('duration'=>3600) ) ) :
?>

<?php 
$firm = CatalogContent::fetchBySlug("add_firm");
$kurorts = CatalogContent::fetchBySlug("add_kurorts");
$hotels = CatalogContent::fetchBySlug("add_hotels");
$vacansy = CatalogContent::fetchBySlug("add_vacansy");
$items = CatalogContent::fetchBySlug("add_items");
$otherInfo = CatalogContent::fetchBySlug("other-info");
?>

<div id="InnerText" class="innerPage">
    <h1><?php 
echo Yii::t("add", "Бесплатное добавление туристической информации на сайт");
?>
</h1>
    <div id="dopMenu">
        <a href="#" id="travel-agency" class="<?php 
echo $activeTab == "travel-agency" ? "activeDM " : "";
?>
dopMenuPages"><?php 
echo Yii::t("add", "Добавление фирмы");
?>
</a>
        <a href="#" id="curorts" class="<?php 
echo $activeTab == "curorts" ? "activeDM " : "";
?>
예제 #6
0
 public function actionTerm()
 {
     $text = CatalogContent::fetchBySlug("site_rules");
     if (!empty($text) && $text->id > 0) {
         $this->render("term", array("text" => $text));
     }
 }
예제 #7
0
<div id="PageText">
    <?php 
$this->widget('addressLineWidget', array('links' => array(Yii::t("user", "Регистрация"))));
echo CHtml::form('user/default/registration/', 'post', array('enctype' => 'multipart/form-data', 'id' => 'validateForm'));
?>
<h1><?php 
echo $title;
?>
</h1>
    <?php 
if (empty($okMessage)) {
    ?>
        <div class="messageSummary">
            <?php 
    $text = CatalogContent::fetchBySlug("after_registration");
    echo $text->description;
    ?>
        </div>
        <br/>
    <?php 
}
echo CHtml::errorSummary($form);
if (!empty($okMessage)) {
    ?>
    <div class="messageSummary"><p><?php 
    echo $okMessage;
    ?>
</p></div>
<?php 
} else {