Ejemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     if (\Classes\Auth::isLogged()) {
         header('Location: ' . URL . 'index/');
     }
 }
Ejemplo n.º 2
0
 public function edit($id)
 {
     if (!\Classes\Auth::isLogged(3)) {
         header('Location: ' . URL . 'error/');
         exit;
     }
     $this->_session->flushData('editID');
     $this->_model = $this->loadModel('addserver');
     $this->_view->data = $this->_model->edit($id, $this->_session->user_info['user_id']);
     $this->_view->checkboxes = $this->_model->getCheckboxes();
     if ($this->_session->pageData) {
         $this->_view->message = $this->_session->pageData;
     }
     $this->_view->title = $this->_view->data['title'];
     $this->_view->subTitle = $this->_view->data['subTitle'];
     $this->_view->render('server/edit');
     $this->_session->flushData('pageData');
     $this->_session->asd = $this->_model->getData()['editID'];
 }
Ejemplo n.º 3
0
        <?php 
if (!\Classes\Auth::isLogged()) {
    ?>
            <nav>
                <ul>
                    <li id="login">
                        <a id="login-trigger" href="#">Логин <span>▼</span></a>
                        <div id="login-content">
                            <form class="loginform" action="<?php 
    echo URL;
    ?>
login/loginAction" method="post">
                                <fieldset id="inputs">
                                    <input id="username" type="text" name="username" placeholder="Потребителско име">   
                                    <input id="password" type="password" name="password" placeholder="Парола">
                                </fieldset>
                                <fieldset id="actions">
                                    <input type="submit" id="submit" value="Log in">
                                </fieldset>
                            </form>
                        </div>                     
                    </li>
                    <li id="signup">
                        <a title="Регистрирай се!" href="<?php 
    echo URL;
    ?>
register">Регистрирай се!</a>
                    </li>
                </ul>
            </nav>
            <?php 
Ejemplo n.º 4
0
            <div class="menu">
                <ul>
                    <li><a class="home" title="Начало" href="<?php 
echo URL;
?>
">Начало</a></li>
                    <li><a class="addserver" title="Добави Сървър" href="<?php 
echo URL;
?>
add">Добави сървър</a></li>
                    <?php 
echo \Classes\Auth::isLogged() ? '<li><a class="profil" title="Моят Акаунт" href="' . URL . 'user/">Моят акаунт</a></li>' : '<li><a class="register" title="Регистрация" href="' . URL . 'register">Регистрация</a></li>';
?>
             
                    <li><a class="stats" title="Статистики за сайта" href="<?php 
echo URL;
?>
stats">Статистики</a></li>
                    <li><a class="advertise" title="Реклама" href="#">Реклама</a></li>
                </ul>
            </div>