File: examples/blog/app/templates/user/login.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil  >  PHP Skeleton Framework  >  examples/blog/app/templates/user/login.php  >  Download  
File: examples/blog/app/templates/user/login.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 5 years ago
Size: 984 bytes
 

Contents

Class file image Download
<div>

<?php if ($user->isLoggedIn()) { ?>
<h1>Logout</h1>
    <div>
        <p>You are logged-in as <?php echo $user->get('username') . ' ' . $user->get('firstname') . ' ' . $user->get('lastname'); ?></p>
        <form action="user/logout/" method="post">
            <p><input type="submit" name="logout" value="Logout"/></p>
        </form>
    </div>
<?php } else { ?>
<h1>Login</h1>
    <div>
        <span style="color:red"><?php
       
if(isset($errmsg)) {
            if(
is_array($errmsg)) {
                foreach(
$errmsg as $msg){
                    echo
$msg;
                }
            }
        }
        
?></span>
        <form action="user/login/" method="post">
            <p>
                <label>Username</label>
                <input type="text" name="username" value="<?php echo $username; ?>" size="20"/>
            </p>
            <p>
                <label>Password</label>
                <input type="password" name="password" value="" size="20"/>
            </p>

            <p><input type="submit" name="login" value="Login"/></p>
        </form>
        <a href="user/password/">Forgot password?</a>
    </div>
<?php } ?>

</div>

For more information send a message to info at phpclasses dot org.