Хранилища Subversion kbase

Редакция

Редакция 30 | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

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