Esempio n. 1
0
<form action='?r=users/login' method="POST">
    <p>
    <label>Username
    <input name="username" /></label>
    </p>
    <p>
    <label>Password
        <input name="password" /></label>
    </p>
    <p>
    <input type="submit" />
    </p>
</form>

<a href="<?php 
echo \helpers\Url::to(['users/register']);
?>
">Register</a>
Esempio n. 2
0
 public function redirect($url)
 {
     $url = Url::to($url);
     header('Location: ' . $url);
 }
Esempio n. 3
0
if (\classes\F::$app->getUser()->getId()) {
    ?>

    <a href="<?php 
    echo \helpers\Url::to(['users/logout']);
    ?>
">Logout</a>
    <a href="<?php 
    echo \helpers\Url::to(['users/profile']);
    ?>
">Profile</a>
<?php 
} else {
    ?>
    <a href="<?php 
    echo \helpers\Url::to(['users/login']);
    ?>
">Login</a>
<?php 
}
?>
<?php// print_r($_SESSION) ?>


</body>

<?php 
echo $content;
?>

<h1>Подвал</h1>
Esempio n. 4
0
<h1>Список Объявлений</h1>

<?php 
foreach ($items as $item) {
    ?>

    <p><?php 
    echo $item['title'];
    ?>
 by <?php 
    echo \models\User::findUserById($item['owner'])->username;
    ?>
 at <?php 
    echo date('Y:m:d', \models\User::findUserById($item['owner'])->date_created);
    ?>
</p>

<?php 
}
?>
<a href="<?php 
echo \helpers\Url::to(['items/create']);
?>
">Create new</a>
Esempio n. 5
0
 public static function actionColumn($model, $param)
 {
     return '<a href="' . Url::to(['view/' . $model->{$param}]) . '"><i class="glyphicon glyphicon-eye-open"></i></a> 
         <a href="' . Url::to(['update/' . $model->{$param}]) . '"><i class="glyphicon glyphicon-pencil"></i></a> 
         <a onclick="if (confirm(\'Are you sure want to delete this item?\') == false) return false" href="' . Url::to(['delete/' . $model->{$param}]) . '"><i class="glyphicon glyphicon-trash"></i></a>';
 }