<?php
/**
 * Login DMI
 */
require_once 'Platy/DMI.php';

class Platy_DMI_Login extends Platy_DMI
{
    function install() { return true; }
    function uninstall() { return true; }
    
    public function getSummary()
    {
        return 'Login';
    }
    
    public function show()
    {
        global $Me;
        if ($Me->isLoggedIn() == false) {
            echo '<a href="' . BASE_URL . 'Manage/">';
            echo 'Login';
            echo '</a>';
        }
        else {
            echo '<a href="' . BASE_URL . 'Manage/Logout/">';
            echo 'Logout';
            echo '</a>';
        }
        return true;
    }
    
    public function getVersion()
    {
        return '0.0.0';
    }
    
    public function getAuthor()
    {
        return 'altkraft';
    }
}
?>
