Редакция 24 | Редакция 29 | К новейшей редакции | Авторство | Сравнить с предыдущей | Последнее изменение | Открыть журнал | Скачать | RSS
<?php
/**
* KBase
* http://alex-w.org.ru/p/kbase/
*
* Copyright (c) 2009 Alexander Wolf
* Dual licensed under the MIT and GNU LGPL licenses.
* http://alex-w.org.ru/p/kbase/license
*
*/
class Theme {
function showSigninForm() {
global $auth;
$ID = $auth->getUserID($_COOKIE["sign"], $_COOKIE["hash"]);
if ($ID===0) {
$return = "<div id='yousign'><a href='sign.php?action=signup'>"._("Signup")."</a>";
$return .= "• <form action='process.php' method='post'>";
$return .= "<input type='hidden' name='action' value='signin'>";
$return .= _("E-mail:")." <input type='text' name='login'> ";
$return .= _("Password:")." <input type='password' name='passwd'>";
$return .= "<input type='submit' value='"._("Enter")."'></form></div>";
} else {
$member = $auth->getUserInfo($ID);
$return = "<div id='yousign'>".$member["RealName"]." [<a href='sign.php?action=exit'>"._("Exit")."</a>]</div>";
}
return $return;
}
function showSignupForm() {
$return = "<form action='process.php' method='post'>";
$return .= "<fieldset><input type='hidden' name='action' value='signup'>";
$return .= _("E-mail:")." <input type='text' name='login'><br>";
$return .= _("Password:")." <input type='password' name='passwd'><br>";
$return .= _("Password (again):")." <input type='password' name='passwdag'><br>";
$return .= _("Real name:")." <input type='text' name='realname'><br>";
$return .= "<input type='submit' value='"._("Register")."'></fieldset></form>";
return $return;
}
}
?>