Редакция 24 | Редакция 29 | К новейшей редакции | Содержимое файла | Сравнить с предыдущей | Последнее изменение | Открыть журнал | RSS
Редакция | Автор | № строки | Строка |
---|---|---|---|
5 | alex-w | 1 | <?php |
2 | |||
3 | /** |
||
4 | * KBase |
||
5 | * http://alex-w.org.ru/p/kbase/ |
||
6 | * |
||
7 | * Copyright (c) 2009 Alexander Wolf |
||
8 | * Dual licensed under the MIT and GNU LGPL licenses. |
||
9 | * http://alex-w.org.ru/p/kbase/license |
||
10 | * |
||
11 | */ |
||
12 | |||
13 | class Theme { |
||
21 | alex-w | 14 | |
15 | function showSigninForm() { |
||
16 | global $auth; |
||
17 | |||
27 | alex-w | 18 | $ID = $auth->getUserID($_COOKIE["sign"], $_COOKIE["hash"]); |
21 | alex-w | 19 | if ($ID===0) { |
23 | alex-w | 20 | $return = "<div id='yousign'><a href='sign.php?action=signup'>"._("Signup")."</a>"; |
21 | $return .= "• <form action='process.php' method='post'>"; |
||
24 | alex-w | 22 | $return .= "<input type='hidden' name='action' value='signin'>"; |
23 | $return .= _("E-mail:")." <input type='text' name='login'> "; |
||
21 | alex-w | 24 | $return .= _("Password:")." <input type='password' name='passwd'>"; |
25 | $return .= "<input type='submit' value='"._("Enter")."'></form></div>"; |
||
26 | } else { |
||
27 | $member = $auth->getUserInfo($ID); |
||
23 | alex-w | 28 | $return = "<div id='yousign'>".$member["RealName"]." [<a href='sign.php?action=exit'>"._("Exit")."</a>]</div>"; |
21 | alex-w | 29 | } |
30 | return $return; |
||
31 | } |
||
24 | alex-w | 32 | |
33 | function showSignupForm() { |
||
34 | $return = "<form action='process.php' method='post'>"; |
||
35 | $return .= "<fieldset><input type='hidden' name='action' value='signup'>"; |
||
36 | $return .= _("E-mail:")." <input type='text' name='login'><br>"; |
||
37 | $return .= _("Password:")." <input type='password' name='passwd'><br>"; |
||
38 | $return .= _("Password (again):")." <input type='password' name='passwdag'><br>"; |
||
39 | $return .= _("Real name:")." <input type='text' name='realname'><br>"; |
||
40 | $return .= "<input type='submit' value='"._("Register")."'></fieldset></form>"; |
||
41 | |||
42 | return $return; |
||
43 | } |
||
5 | alex-w | 44 | } |
45 | |||
46 | ?> |