private function getAuthorizationUserForm()
 {
     $urlHelper = new UrlHelper();
     $this->form = '';
     $this->form .= '<form class="AuthorizationForm" name="AuthorizationForm" action="' . $urlHelper->getThisPage() . '" 
         method="post" accept-charset="UTF-8" autocomplete="on">';
     $this->form .= '<center>';
     $this->form .= "<div class='AuthorizationFormBlock'>";
     $this->form .= '<table class="AuthorizationFormTable" >';
     $this->form .= '<tr>';
     $this->form .= '<td>';
     $this->form .= "<div class='AuthorizationFormLogin'></div>";
     $this->form .= '</td>';
     $this->form .= '<td>';
     $this->form .= $this->inputHelper->paternTextBox("login", "login", "login", 25, true, $this->localization->getText("login"), "[A-Za-z0-9]{3,20}", null);
     $this->form .= '</td>';
     //$this->form .= '<td rowspan="2">';
     //$this->form .= '</td>';
     $this->form .= '</tr>';
     $this->form .= '<tr>';
     $this->form .= '<td>';
     $this->form .= "<div class='AuthorizationFormPassword'></div>";
     $this->form .= '</td>';
     $this->form .= '<td>';
     $this->form .= $this->inputHelper->paternPasswordBox("password", "password", "password", 25, true, $this->localization->getText("password"), "[A-Za-z0-9]{3,20}", null);
     $this->form .= '</td>';
     $this->form .= '</tr>';
     $this->form .= '</tr>';
     $this->form .= '</table>';
     $this->form .= '<input class="AuthorizationFormButton" type="submit" name="AuthorizationFormSubmit" value="in" title="' . $this->localization->getText("authorizationFormText") . '">';
     $this->form .= "</div>";
     $this->form .= '</center>';
     $this->form .= '</form>';
 }
Example #2
0
 private function generateHTML()
 {
     $this->getSliderData();
     $out = '<div class="border_box">';
     $out .= '<div class="box_skitter box_skitter_large ' . $this->name . '">';
     $out .= '<ul>';
     foreach ($this->data['slides'] as $slide) {
         $html = "<li>";
         //            echo $this->sliderDir.$this->name.'/'.strtolower($this->thisLang).'/'.$slide['fileName']."<br>";
         $img = '<img src="' . $this->sliderDir . $this->name . '/' . strtolower($this->thisLang) . '/' . $slide['fileName'] . '" class="' . $slide['animation'] . '" />';
         $imgFile = $this->sliderDir . $this->name . '/' . strtolower($this->thisLang) . '/' . $slide['fileName'];
         if (!file_exists($imgFile)) {
             $imgFile = $this->sliderDir . $this->name . '/' . strtolower($this->defaultLang) . '/' . $slide['fileName'];
         }
         $img = '<img src="' . $imgFile . '" class="' . $slide['animation'] . '" />';
         if (isset($slide['url']) && $slide['url'] != null && $slide['url'] != "") {
             $urlHelper = new UrlHelper();
             $target = "";
             if (substr($slide['url'], 0, 1) == "#") {
                 $url = $urlHelper->getThisPage() . $slide['url'];
             } else {
                 if (substr($slide['url'], 0, 1) == "\$") {
                     $url = $urlHelper->pageUrl(substr($slide['url'], 1), null);
                 } else {
                     if (substr($slide['url'], 0, 7) == "http://") {
                         $target = 'target="_blank"';
                     }
                     $url = $slide['url'];
                 }
             }
             $html .= '<a href="' . $url . ' ' . $target . '">';
             $html .= $img;
             $html .= '</a>';
         } else {
             $html .= $img;
         }
         if (isset($slide['text']) && $slide['text'] != null && $slide['text'] != "") {
             $html .= '<div class="label_text">';
             $html .= $slide['text'];
             $html .= '</div>';
         }
         $html .= "</li>";
         $out .= $html;
     }
     $out .= '</ul>';
     $out .= '</div>';
     $out .= '</div>';
     $out .= $this->generateParams();
     $this->html = $out;
 }
Example #3
0
 /**
  * авторизация в системе
  * @param type $login - логин
  * @param type $password - пароль
  * @param type $md5 - true если пароль в md5 и false если нет
  */
 public function authorization($login, $password, $md5 = false, $reloadPage = false)
 {
     if (!$md5) {
         $password = md5($password);
     }
     // отменяем авторизацию
     $this->isAuthorization = false;
     // получаем данные о пользователе по указанным логину и паролю
     $this->getDBUserData($login);
     // если запись найдена, то
     if ($this->userData != null) {
         if ($this->userData['password'] === $password) {
             // проверяем активирован ли пользователь
             if ($this->userData['activated']) {
                 // проверяем не отключен ли пользователь
                 if (!$this->userData['disable']) {
                     if (!$this->userData['delete']) {
                         // указываем что авторизация пройдена успешно
                         $this->isAuthorization = true;
                         // сохраняем переменные сесии
                         $_SESSION['login'] = $this->userData['login'];
                         $_SESSION['password'] = $this->userData['password'];
                         if ($reloadPage) {
                             $urlHelper = new UrlHelper();
                             echo '<script language="JavaScript">';
                             echo 'window.location.href = "' . $urlHelper->getThisPage() . '"';
                             echo '</script>';
                         }
                     } else {
                         $this->error = $this->localization->getText("userIsDelete");
                     }
                 } else {
                     $this->error = $this->localization->getText("userIsDisable");
                 }
             } else {
                 $this->error = $this->localization->getText("userNoActivated");
             }
             // если пароль неверный
         } else {
             // пишем ошибку о том что пароль не верный
             $this->error = $this->localization->getText("wrongPSWD");
         }
         // если запись не найдена, то
     } else {
         // пишем ошибку о том что пользователь не зарегистрирован
         $this->error = $this->localization->getText("userNoReg");
     }
 }
 /**
  * отправка сообщения для активации
  */
 private function sendUserActivateMail2()
 {
     $urlHelper = new UrlHelper();
     $headers = "Content-Type: text/plain; charset=UTF-8\r\n";
     $headers .= "From: Служба поддержки\r\n";
     $url = $urlHelper->getThisPage() . "/" . $this->insertValue['login'] . "/" . $this->insertValue['activatedHash'];
     $message = $this->localization->getText("activateMailText") . "\r\n";
     $message .= "<a href='{$url}'>" . $this->localization->getText("activate") . "</a>\r\n";
     $message .= "Ваш логин: " . $this->insertValue['login'] . "\r\n";
     $message .= "Дата регистрации: " . date("d.m.Y - h:i:s") . "\r\n";
     # Отправляем
     return mail($this->insertValue['email'], 'Отзыв', $message, $headers);
 }
 private function jsAlert($text)
 {
     $out = "<script type='text/javascript'>";
     $out .= "alert('" . $text . "');";
     $urlHelper = new UrlHelper();
     $out .= 'window.location.href = "' . $urlHelper->getThisPage() . '"';
     $out .= "</script>";
     return $out;
 }
Example #6
0
<?php

$urlHelper = new UrlHelper();
$thisPage = 'http://' . $_SERVER["SERVER_NAME"] . '/' . $urlHelper->getThisPage();
?>
<div class="socialPanelBox">
<!-- apelsin.ru -->
<!-- vk -->
<!--<div class="socialPanelElement vk">
    <div id="vk_like"></div>
    <script type="text/javascript">
    VK.Widgets.Like("vk_like", {type: "mini", verb: 1});
    </script>
</div>-->

<!-- compuproject.com -->
<!-- vk -->
<div class="socialPanelElement vk">
    <div id="vk_like"></div>
    <script type="text/javascript">
    VK.Widgets.Like("vk_like", {type: "mini", verb: 1});
    </script>
</div>
<!-- facebook -->
<div class="socialPanelElement facebook">
    <div class="fb-like" data-href="<?php 
echo $thisPage;
?>
" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
</div>
<!-- google -->