<?php
    // m_login.php
    
    global $siteSettings;
     
    if ($CURRENTUSER != "anonymous")
    {
         
        if ($siteSettings['slickurls'] == TRUE )
        {
            $logout = $siteSettings['siteurl'] . "/index.php?shard=login&amp;action=proc_logout";
        }
        else
        {
            $logout = 'index.php?shard=login&amp;action=proc_logout';
        }
         
         
        drawMenuTop("Authentication");
        print "
            <small>Welcome back, <acronym title='$CURRENTUSER sure is hot!'> <b>$CURRENTUSER</b></acronym></small><br />
			<small><a href='" . $logout ."'>[logout]</a></small>";
        drawMenuBottom();
         
         
         
    }
    else
    {
        if ($siteSettings['slickurls'] == TRUE )
        {
            $formaction = $siteSettings['siteurl'] . "/index.php?shard=login&amp;action=proc_login";
            $register = $siteSettings['siteurl'] . "/index.php?shard=adduser&amp;action=g_default";
        }
        else
        {
            $formaction = 'index.php?shard=login&amp;action=proc_login';
            $register = 'index.php?shard=adduser&amp;action=g_default';
        }
         
         
         
         
        drawMenuTop("Authentication:");
        print "
            <form method='post' action='" . $formaction . "'>
             
            Username:<br />
            <input class='search' type='text' size='10' name='login_name' /><br />
            Password:<br />
            <input class='search' type='password' size='10' name='login_pass' /><br /><br />
            <input class='button' type='submit' value='Login' /></form><br />
            <small>Don't have an account yet?
            <a href='" . $register . "'>Register</a> one!</small><br />";
         
         
        drawMenuBottom();
         
    }
     
     
     
     
     
?>
