File TODO changed (mode: 100644) (index 2a6640d..2711216) |
15 |
15 |
[ ] |
[ ] |
16 |
16 |
|
|
17 |
17 |
== Normal priority == |
== Normal priority == |
|
18 |
|
[ ] "Lock" button to temporary block access to repository. |
|
19 |
|
Only owner will have access. |
|
20 |
|
We may add also a text that will be output to clients. |
|
21 |
|
[ ] List chages introduced by a merge: git diff-tree --always [--cc] -m -p f7d5b5770f4c6b5a124dad6358bed310d56bf909 |
|
22 |
|
[ ] ACL per IP (only for private repos). |
18 |
23 |
[ ] Check pack-protocol.txt! |
[ ] Check pack-protocol.txt! |
19 |
24 |
[ ] When push is executed with success, show a nice message from RocketGit. |
[ ] When push is executed with success, show a nice message from RocketGit. |
20 |
25 |
[ ] Move is_private member in repo array, not test for empty on default rights |
[ ] Move is_private member in repo array, not test for empty on default rights |
File duilder changed (mode: 100755) (index f8ee87e..081d1c2) |
... |
... |
function duilder_git() |
95 |
95 |
echo -n > Changelog |
echo -n > Changelog |
96 |
96 |
|
|
97 |
97 |
# get the list of tags |
# get the list of tags |
98 |
|
i=0 |
|
99 |
98 |
number_of_tags=0 |
number_of_tags=0 |
100 |
|
for tag in `git tag -l`; do |
|
101 |
|
if [ "${tag:0:1}" != "v" ]; then |
|
102 |
|
# skip other kind of tags beside versions |
|
103 |
|
continue |
|
104 |
|
fi |
|
105 |
|
|
|
106 |
|
tags[${i}]=${tag} |
|
107 |
|
tags_commit[${i}]=`git show-ref ${tag} | cut -d' ' -f1` |
|
|
99 |
|
while read sha1 full_tag; do |
|
100 |
|
tag=`echo ${full_tag} | sed -e 's#refs/tags/##' | cut -d'^' -f1` |
|
101 |
|
tags[${number_of_tags}]=${tag} |
|
102 |
|
tags_commit[${number_of_tags}]=${sha1} |
108 |
103 |
number_of_tags=$[${number_of_tags}+1] |
number_of_tags=$[${number_of_tags}+1] |
109 |
|
|
|
110 |
|
i=$[${i}+1] |
|
111 |
|
done |
|
|
104 |
|
done < <(git show-ref --tags -d | grep refs/tags/v) |
112 |
105 |
|
|
113 |
106 |
# get the list of commits, test if is a tag and do the diff |
# get the list of commits, test if is a tag and do the diff |
114 |
107 |
prev="" |
prev="" |
File inc/admin/users/user.form.php changed (mode: 100644) (index 2c24d86..243ea91) |
1 |
1 |
<?php |
<?php |
2 |
|
$_form = ""; |
|
|
2 |
|
$_form = '<div class="formarea">'; |
3 |
3 |
|
|
4 |
4 |
if ($admin_mode == 1) { |
if ($admin_mode == 1) { |
5 |
5 |
$sel_is_admin = array(0 => "", 1 => ""); |
$sel_is_admin = array(0 => "", 1 => ""); |
6 |
6 |
$sel_is_admin[$is_admin] = " selected=\"selected\""; |
$sel_is_admin[$is_admin] = " selected=\"selected\""; |
7 |
7 |
} |
} |
8 |
8 |
|
|
9 |
|
$_form .= '<div class="formarea">'; |
|
10 |
|
|
|
11 |
9 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
12 |
|
$_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
10 |
|
$_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
13 |
11 |
|
|
14 |
12 |
$_form .= ' |
$_form .= ' |
15 |
13 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
16 |
|
<input type="hidden" name="op" value="' . $op . '"> |
|
17 |
|
<input type="hidden" name="subop" value="' . $subop . '"> |
|
18 |
|
<input type="hidden" name="subsubop" value="' . $subsubop . '"> |
|
19 |
|
<input type="hidden" name="doit" value="1"> |
|
20 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '"> |
|
21 |
|
<input type="hidden" name="uid" value="' . $uid . '"> |
|
|
14 |
|
<input type="hidden" name="op" value="' . $op . '" /> |
|
15 |
|
<input type="hidden" name="subop" value="' . $subop . '" /> |
|
16 |
|
<input type="hidden" name="subsubop" value="' . $subsubop . '" /> |
|
17 |
|
<input type="hidden" name="doit" value="1" /> |
|
18 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" /> |
|
19 |
|
<input type="hidden" name="uid" value="' . $uid . '" /> |
22 |
20 |
|
|
23 |
21 |
<label for="xuser"> |
<label for="xuser"> |
24 |
|
User name<br /> |
|
25 |
|
<input type="text" name="xuser" value="' . $xuser . '"/> |
|
|
22 |
|
<span class="form_item_title">User name</span><br /> |
|
23 |
|
<input type="text" name="xuser" value="' . $xuser . '" /> |
26 |
24 |
</label> |
</label> |
27 |
25 |
<br /> |
<br /> |
28 |
26 |
<br /> |
<br /> |
29 |
27 |
|
|
30 |
28 |
<label for="email"> |
<label for="email"> |
31 |
|
E-mail<br /> |
|
32 |
|
<input type="text" name="email" value="' . $email . '"/> |
|
|
29 |
|
<span class="form_item_title">E-mail</span><br /> |
|
30 |
|
<input type="text" name="email" value="' . $email . '" /> |
33 |
31 |
</label> |
</label> |
34 |
32 |
<br /> |
<br /> |
35 |
33 |
<br /> |
<br /> |
|
... |
... |
E-mail<br /> |
38 |
36 |
if ($pass_mode > 0) { |
if ($pass_mode > 0) { |
39 |
37 |
$_form .= ' |
$_form .= ' |
40 |
38 |
<label for="xpass"> |
<label for="xpass"> |
41 |
|
Password<br /> |
|
42 |
|
<input type="password" name="xpass" value="' . $xpass . '"/> |
|
|
39 |
|
<span class="form_item_title">Password</span><br /> |
|
40 |
|
<input type="password" name="xpass" value="' . $xpass . '" /> |
43 |
41 |
</label> |
</label> |
44 |
42 |
<br /> |
<br /> |
45 |
43 |
<br /> |
<br /> |
|
... |
... |
Password<br /> |
49 |
47 |
if ($pass_mode > 1) { |
if ($pass_mode > 1) { |
50 |
48 |
$_form .= ' |
$_form .= ' |
51 |
49 |
<label for="xpass2"> |
<label for="xpass2"> |
52 |
|
Password (confirmation)<br /> |
|
53 |
|
<input type="password" name="xpass2" value="' . $xpass2 . '"/> |
|
|
50 |
|
<span class="form_item_title">Password (confirmation)</span><br /> |
|
51 |
|
<input type="password" name="xpass2" value="' . $xpass2 . '" /> |
54 |
52 |
</label> |
</label> |
55 |
53 |
<br /> |
<br /> |
56 |
54 |
<br /> |
<br /> |
|
... |
... |
Password (confirmation)<br /> |
60 |
58 |
if ($admin_mode == 1) { |
if ($admin_mode == 1) { |
61 |
59 |
$_form .= ' |
$_form .= ' |
62 |
60 |
<label for="is_admin"> |
<label for="is_admin"> |
63 |
|
Admin?<br /> |
|
|
61 |
|
<span class="form_item_title">Admin?</span><br /> |
64 |
62 |
<select name="is_admin"> |
<select name="is_admin"> |
65 |
63 |
<option value="0"' . $sel_is_admin[0] . '>No</option> |
<option value="0"' . $sel_is_admin[0] . '>No</option> |
66 |
64 |
<option value="1"' . $sel_is_admin[1] . '>Yes</option> |
<option value="1"' . $sel_is_admin[1] . '>Yes</option> |
|
... |
... |
Admin?<br /> |
70 |
68 |
<br /> |
<br /> |
71 |
69 |
|
|
72 |
70 |
<label for="disk_quota_mb"> |
<label for="disk_quota_mb"> |
73 |
|
Disk quota (MiB)<br /> |
|
74 |
|
<input type="text" name="disk_quota_mb" value="' . $disk_quota_mb . '"/> |
|
|
71 |
|
<span class="form_item_title">Disk quota (MiB)</span><br /> |
|
72 |
|
<input type="text" name="disk_quota_mb" value="' . $disk_quota_mb . '" /> |
75 |
73 |
</label> |
</label> |
76 |
74 |
<br /> |
<br /> |
77 |
75 |
<br /> |
<br /> |
78 |
76 |
|
|
79 |
77 |
<label for="rights"> |
<label for="rights"> |
80 |
|
Rights<br /> |
|
|
78 |
|
<span class="form_item_title">Rights</span><br /> |
81 |
79 |
' . rg_rights_checkboxes("user", $rights) . ' |
' . rg_rights_checkboxes("user", $rights) . ' |
82 |
80 |
</label> |
</label> |
83 |
81 |
<br /> |
<br /> |
|
... |
... |
Rights<br /> |
87 |
85 |
|
|
88 |
86 |
$_form .= ' |
$_form .= ' |
89 |
87 |
<label for="session_time"> |
<label for="session_time"> |
90 |
|
Preferred session time (in seconds)<br /> |
|
91 |
|
<input type="text" name="session_time" value="' . $session_time . '"/> |
|
|
88 |
|
<span class="form_item_title">Preferred session time (in seconds)</span><br /> |
|
89 |
|
<input type="text" name="session_time" value="' . $session_time . '" /> |
92 |
90 |
</label> |
</label> |
93 |
91 |
<br /> |
<br /> |
94 |
92 |
<br /> |
<br /> |
95 |
93 |
|
|
96 |
94 |
<label for="button"> |
<label for="button"> |
97 |
|
<input type="submit" value="Go!"/> |
|
|
95 |
|
<input type="submit" value="Go!" /> |
98 |
96 |
</label> |
</label> |
99 |
97 |
</form> |
</form> |
100 |
98 |
</div> |
</div> |
File inc/feedback/suggestion.form.php changed (mode: 100644) (index b6935e0..58cbabc) |
1 |
1 |
<?php |
<?php |
2 |
|
|
|
3 |
|
$_form = ""; |
|
4 |
|
|
|
5 |
|
$_form .= '<div class="formarea">'; |
|
|
2 |
|
$_form = '<div class="formarea">'; |
6 |
3 |
|
|
7 |
4 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
8 |
|
$_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
9 |
6 |
|
|
10 |
7 |
$_form .= ' |
$_form .= ' |
11 |
8 |
<form method="post" action="' . rg_re_post("suggestion") . '"> |
<form method="post" action="' . rg_re_post("suggestion") . '"> |
12 |
|
<input type="hidden" name="op" value="suggestion"> |
|
13 |
|
<input type="hidden" name="doit" value="1"> |
|
14 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '"> |
|
|
9 |
|
<input type="hidden" name="op" value="suggestion" /> |
|
10 |
|
<input type="hidden" name="doit" value="1" /> |
|
11 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" /> |
15 |
12 |
|
|
16 |
13 |
<label for="email"> |
<label for="email"> |
17 |
14 |
<span class="form_item_title">E-mail</span><br /> |
<span class="form_item_title">E-mail</span><br /> |
18 |
|
<input type="text" name="email" value="' . $email . '"> |
|
|
15 |
|
<input type="text" name="email" value="' . $email . '" /> |
19 |
16 |
</label> |
</label> |
20 |
17 |
<br /> |
<br /> |
21 |
18 |
<br /> |
<br /> |
|
... |
... |
$_form .= ' |
28 |
25 |
<br /> |
<br /> |
29 |
26 |
|
|
30 |
27 |
<label for="button"> |
<label for="button"> |
31 |
|
<input type="submit" value="Send"> |
|
|
28 |
|
<input type="submit" name="button" value="Send" /> |
32 |
29 |
</label> |
</label> |
33 |
30 |
|
|
34 |
31 |
</form> |
</form> |
File inc/keys/add.form.php changed (mode: 100644) (index 744d24b..13fbc1a) |
1 |
1 |
<?php |
<?php |
2 |
|
|
|
3 |
2 |
$_form = '<div class="formarea">'; |
$_form = '<div class="formarea">'; |
4 |
3 |
|
|
5 |
4 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
6 |
|
$_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
7 |
6 |
|
|
8 |
7 |
$_form .= ' |
$_form .= ' |
9 |
8 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
10 |
|
<input type="hidden" name="op" value="' . $op . '"> |
|
11 |
|
<input type="hidden" name="subop" value="' . $subop . '"> |
|
12 |
|
<input type="hidden" name="doit" value="1"> |
|
13 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '"> |
|
|
9 |
|
<input type="hidden" name="op" value="' . $op . '" /> |
|
10 |
|
<input type="hidden" name="subop" value="' . $subop . '" /> |
|
11 |
|
<input type="hidden" name="doit" value="1" /> |
|
12 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" /> |
14 |
13 |
|
|
15 |
14 |
<label for="key"> |
<label for="key"> |
16 |
15 |
<span class="form_item_title">Key (starts with ssh-...)</span><br /> |
<span class="form_item_title">Key (starts with ssh-...)</span><br /> |
|
... |
... |
$_form .= ' |
20 |
19 |
<br /> |
<br /> |
21 |
20 |
|
|
22 |
21 |
<label for="button"> |
<label for="button"> |
23 |
|
<input type="submit" value="Add!" /> |
|
|
22 |
|
<input type="submit" name="button" value="Add!" /> |
24 |
23 |
</label> |
</label> |
25 |
24 |
|
|
26 |
25 |
</form> |
</form> |
File inc/login/login.form.php changed (mode: 100644) (index 4897d66..6113e29) |
2 |
2 |
$_form = '<div class="formarea">'; |
$_form = '<div class="formarea">'; |
3 |
3 |
|
|
4 |
4 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
6 |
6 |
|
|
7 |
7 |
$_form .= ' |
$_form .= ' |
8 |
8 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
9 |
|
<input type="hidden" name="op" value="' . $op . '"> |
|
10 |
|
<input type="hidden" name="subop" value="1"> |
|
11 |
|
<input type="hidden" name="doit" value="1"> |
|
|
9 |
|
<input type="hidden" name="op" value="' . $op . '" /> |
|
10 |
|
<input type="hidden" name="subop" value="1" /> |
|
11 |
|
<input type="hidden" name="doit" value="1" /> |
12 |
12 |
|
|
13 |
13 |
<label for="username"> |
<label for="username"> |
14 |
|
Username<br /> |
|
15 |
|
<input type="text" name="user" value="' . $user . '"> |
|
|
14 |
|
<span class="form_item_title">Username</span><br /> |
|
15 |
|
<input type="text" name="user" value="' . $user . '" /> |
16 |
16 |
</label> |
</label> |
17 |
17 |
<br /> |
<br /> |
18 |
18 |
<br /> |
<br /> |
19 |
19 |
|
|
20 |
20 |
<label for="password"> |
<label for="password"> |
21 |
|
Password<br /> |
|
22 |
|
<input type="password" name="pass" value="' . $pass . '"> |
|
|
21 |
|
<span class="form_item_title">Password</span><br /> |
|
22 |
|
<input type="password" name="pass" value="' . $pass . '" /> |
23 |
23 |
</label> |
</label> |
24 |
24 |
<br /> |
<br /> |
25 |
25 |
<br /> |
<br /> |
26 |
26 |
|
|
27 |
27 |
<label for="button"> |
<label for="button"> |
28 |
|
<input type="submit" value="Login"> |
|
|
28 |
|
<input type="submit" name="button" value="Login" /> |
29 |
29 |
</label> |
</label> |
30 |
30 |
</form> |
</form> |
31 |
31 |
<br /> |
<br /> |
|
32 |
|
|
32 |
33 |
<a href="' . rg_re_url("forgot_send") . '">Forgot your password?</a> |
<a href="' . rg_re_url("forgot_send") . '">Forgot your password?</a> |
33 |
34 |
'; |
'; |
34 |
35 |
|
|
File inc/personal/pass.form.php changed (mode: 100644) (index ad63df0..5206d86) |
1 |
1 |
<?php |
<?php |
|
2 |
|
$_chpass_form = '<div class="formarea">'; |
2 |
3 |
|
|
3 |
|
$_chpass_form = '<div class="formarea">' . "\n"; |
|
4 |
|
|
|
5 |
|
if (count($error) > 0) |
|
6 |
|
$_chpass_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
4 |
|
if (count($errmsg) > 0) |
|
5 |
|
$_chpass_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
7 |
6 |
|
|
8 |
7 |
$_chpass_form .= ' |
$_chpass_form .= ' |
9 |
8 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
10 |
|
<input type="hidden" name="op" value="' . $op . '"> |
|
11 |
|
<input type="hidden" name="doit" value="1"> |
|
12 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '"> |
|
|
9 |
|
<input type="hidden" name="op" value="' . $op . '" /> |
|
10 |
|
<input type="hidden" name="doit" value="1" /> |
|
11 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" /> |
13 |
12 |
|
|
14 |
|
<label for="pldpass"> |
|
|
13 |
|
<label for="old_pass"> |
15 |
14 |
<span class="form_item_title">Old password</span><br /> |
<span class="form_item_title">Old password</span><br /> |
16 |
|
<input type="password" name="old_pass" value=""> |
|
|
15 |
|
<input type="password" name="old_pass" value="" /> |
17 |
16 |
</label> |
</label> |
18 |
17 |
<br /> |
<br /> |
19 |
18 |
<br /> |
<br /> |
20 |
19 |
|
|
21 |
20 |
<label for="pass1"> |
<label for="pass1"> |
22 |
21 |
<span class="form_item_title">New password</span><br /> |
<span class="form_item_title">New password</span><br /> |
23 |
|
<input type="password" name="pass1" value=""> |
|
|
22 |
|
<input type="password" name="pass1" value="" /> |
24 |
23 |
</label> |
</label> |
25 |
24 |
<br /> |
<br /> |
26 |
25 |
<br /> |
<br /> |
27 |
26 |
|
|
28 |
27 |
<label for="pass2"> |
<label for="pass2"> |
29 |
28 |
<span class="form_item_title">New password (re-type)</span><br /> |
<span class="form_item_title">New password (re-type)</span><br /> |
30 |
|
<input type="password" name="pass2" value=""> |
|
|
29 |
|
<input type="password" name="pass2" value="" /> |
31 |
30 |
</label> |
</label> |
32 |
31 |
<br /> |
<br /> |
33 |
32 |
<br /> |
<br /> |
34 |
33 |
|
|
35 |
34 |
<label for="button"> |
<label for="button"> |
36 |
|
<input type="submit" value="Change password"> |
|
|
35 |
|
<input type="submit" name="button" value="Change password" /> |
37 |
36 |
</label> |
</label> |
38 |
37 |
|
|
39 |
38 |
</form> |
</form> |
File inc/personal/personal.php changed (mode: 100644) (index 518b7d4..6c62b95) |
... |
... |
if ($rg_ui['uid'] == 0) { |
9 |
9 |
} |
} |
10 |
10 |
|
|
11 |
11 |
// menu |
// menu |
12 |
|
$_url = rg_re_url($op); |
|
13 |
|
$_menu = ""; |
|
14 |
|
$_menu .= "[<a href=\"$_url&subop=1\">Edit info</a>]"; |
|
15 |
|
$_menu .= " [<a href=\"$_url&subop=2\">Change pass</a>]"; |
|
16 |
|
$_menu .= "<br />\n"; |
|
17 |
|
$_menu .= "<br />\n"; |
|
|
12 |
|
$second_menu = array( |
|
13 |
|
"edit_info" => array( |
|
14 |
|
"text" => "Edit info", |
|
15 |
|
"url" => "&subop=1" |
|
16 |
|
), |
|
17 |
|
"change_pass" => array( |
|
18 |
|
"text" => "Change password", |
|
19 |
|
"url" => "&subop=2" |
|
20 |
|
) |
|
21 |
|
); |
18 |
22 |
|
|
19 |
23 |
$errmsg = array(); |
$errmsg = array(); |
20 |
24 |
$_body = ""; |
$_body = ""; |
|
... |
... |
case 2: // change password |
72 |
76 |
|
|
73 |
77 |
while (1) { |
while (1) { |
74 |
78 |
if (!rg_token_valid($db, $sid, $token)) { |
if (!rg_token_valid($db, $sid, $token)) { |
75 |
|
$error[] = "Invalid token. Try again."; |
|
|
79 |
|
$errmsg[] = "Invalid token. Try again."; |
76 |
80 |
break; |
break; |
77 |
81 |
} |
} |
78 |
82 |
|
|
79 |
83 |
if (strcmp($pass1, $pass2) != 0) { |
if (strcmp($pass1, $pass2) != 0) { |
80 |
|
$error[] = "Passwords does not match!"; |
|
|
84 |
|
$errmsg[] = "Passwords does not match!"; |
81 |
85 |
break; |
break; |
82 |
86 |
} |
} |
83 |
87 |
|
|
84 |
88 |
if (!rg_user_pass_valid($db, $rg_ui['uid'], $old_pass)) { |
if (!rg_user_pass_valid($db, $rg_ui['uid'], $old_pass)) { |
85 |
|
$error[] = "Old password is invalid!"; |
|
|
89 |
|
$errmsg[] = "Old password is invalid!"; |
86 |
90 |
break; |
break; |
87 |
91 |
} |
} |
88 |
92 |
|
|
89 |
93 |
if (!rg_user_set_pass($db, $rg_ui['uid'], $pass1)) { |
if (!rg_user_set_pass($db, $rg_ui['uid'], $pass1)) { |
90 |
|
$error[] = rg_user_error(); |
|
|
94 |
|
$errmsg[] = rg_user_error(); |
91 |
95 |
break; |
break; |
92 |
96 |
} |
} |
93 |
97 |
|
|
|
... |
... |
case 2: // change password |
105 |
109 |
break; |
break; |
106 |
110 |
} |
} |
107 |
111 |
|
|
108 |
|
$_personal .= $_menu . $_body; |
|
|
112 |
|
$_personal .= $_body; |
109 |
113 |
?> |
?> |
File inc/repo/repo.form.php changed (mode: 100644) (index c836302..c76ed92) |
1 |
1 |
<?php |
<?php |
2 |
|
|
|
3 |
2 |
$_form = '<div class="formarea">'; |
$_form = '<div class="formarea">'; |
4 |
3 |
|
|
5 |
4 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
6 |
|
$_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
7 |
6 |
|
|
8 |
7 |
$_form .= ' |
$_form .= ' |
9 |
8 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
10 |
|
<input type="hidden" name="op" value="' . $op . '"> |
|
11 |
|
<input type="hidden" name="subop" value="' . $subop . '"> |
|
12 |
|
<input type="hidden" name="repo_id" value="' . $repo_id . '"> |
|
13 |
|
<input type="hidden" name="master_repo_id" value="' . $master_repo_id . '"> |
|
14 |
|
<input type="hidden" name="doit" value="1"> |
|
15 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '"> |
|
|
9 |
|
<input type="hidden" name="op" value="' . $op . '" /> |
|
10 |
|
<input type="hidden" name="subop" value="' . $subop . '" /> |
|
11 |
|
<input type="hidden" name="repo_id" value="' . $repo_id . '" /> |
|
12 |
|
<input type="hidden" name="master_repo_id" value="' . $master_repo_id . '" /> |
|
13 |
|
<input type="hidden" name="doit" value="1" /> |
|
14 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" /> |
16 |
15 |
|
|
17 |
16 |
'; |
'; |
18 |
17 |
|
|
|
... |
... |
$_form .= ' |
63 |
62 |
<br /> |
<br /> |
64 |
63 |
|
|
65 |
64 |
<label for="button"> |
<label for="button"> |
66 |
|
<input type="submit" value="' . $_action . '" /> |
|
|
65 |
|
<input type="submit" name="button" value="' . $_action . '" /> |
67 |
66 |
</label> |
</label> |
68 |
67 |
|
|
69 |
68 |
</form> |
</form> |
File inc/repo/rights.form.php changed (mode: 100644) (index 9028216..ebc8efd) |
1 |
1 |
<?php |
<?php |
2 |
|
|
|
3 |
2 |
$_form = '<div class="formarea">'; |
$_form = '<div class="formarea">'; |
4 |
3 |
|
|
5 |
4 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
6 |
|
$_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
7 |
6 |
|
|
8 |
7 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
9 |
|
<input type="hidden" name="op" value="' . $op . '"> |
|
10 |
|
<input type="hidden" name="subop" value="' . $subop . '"> |
|
11 |
|
<input type="hidden" name="repo_id" value="' . $repo_id . '"> |
|
12 |
|
<input type="hidden" name="doit" value="1"> |
|
13 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '"> |
|
|
8 |
|
<input type="hidden" name="op" value="' . $op . '" /> |
|
9 |
|
<input type="hidden" name="subop" value="' . $subop . '" /> |
|
10 |
|
<input type="hidden" name="repo_id" value="' . $repo_id . '" /> |
|
11 |
|
<input type="hidden" name="doit" value="1" /> |
|
12 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" /> |
14 |
13 |
|
|
15 |
14 |
<label for="user"> |
<label for="user"> |
16 |
|
<span class="form_item_title">User</span><br/> |
|
|
15 |
|
<span class="form_item_title">User</span><br /> |
17 |
16 |
<input type="text" name="user" value="' . $user . '" /> |
<input type="text" name="user" value="' . $user . '" /> |
18 |
17 |
</label> |
</label> |
19 |
18 |
<br /> |
<br /> |
|
... |
... |
if (count($errmsg) > 0) |
27 |
26 |
<br /> |
<br /> |
28 |
27 |
|
|
29 |
28 |
<label for="button"> |
<label for="button"> |
30 |
|
<input type="submit" value="Grant"> |
|
|
29 |
|
<input type="submit" name="button" value="Grant" /> |
31 |
30 |
</label> |
</label> |
32 |
31 |
|
|
33 |
32 |
</form> |
</form> |
File inc/repo/search.form.php changed (mode: 100644) (index 79d1fb8..f69148a) |
1 |
1 |
<?php |
<?php |
2 |
|
|
|
3 |
2 |
$_form = '<div class="formarea">'; |
$_form = '<div class="formarea">'; |
4 |
3 |
|
|
5 |
4 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
6 |
|
$_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
7 |
6 |
|
|
8 |
7 |
$_form .= ' |
$_form .= ' |
9 |
8 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
10 |
|
<input type="hidden" name="op" value="' . $op . '"> |
|
11 |
|
<input type="hidden" name="subop" value="' . $subop . '"> |
|
12 |
|
<input type="hidden" name="doit" value="1"> |
|
|
9 |
|
<input type="hidden" name="op" value="' . $op . '" /> |
|
10 |
|
<input type="hidden" name="subop" value="' . $subop . '" /> |
|
11 |
|
<input type="hidden" name="doit" value="1" /> |
13 |
12 |
|
|
14 |
13 |
<label for="q"> |
<label for="q"> |
15 |
14 |
<span class="form_item_title">Name</span><br /> |
<span class="form_item_title">Name</span><br /> |
16 |
|
<input type="text" name="q" value=""> |
|
|
15 |
|
<input type="text" name="q" value="" /> |
17 |
16 |
</label> |
</label> |
18 |
17 |
<br /> |
<br /> |
19 |
18 |
<br /> |
<br /> |
|
... |
... |
$_form .= ' |
28 |
27 |
<br /> |
<br /> |
29 |
28 |
<br /> |
<br /> |
30 |
29 |
|
|
31 |
|
<label="button"> |
|
32 |
|
<input type="submit" value="Search!"> |
|
|
30 |
|
<label for="button"> |
|
31 |
|
<input type="submit" name="button" value="Search!" /> |
33 |
32 |
</label> |
</label> |
34 |
33 |
|
|
35 |
34 |
</form> |
</form> |
File inc/user/forgot.form.php changed (mode: 100644) (index 874474f..c4dbc0c) |
1 |
1 |
<?php |
<?php |
2 |
|
|
|
3 |
2 |
$_forgot_form = '<div class="formarea">'; |
$_forgot_form = '<div class="formarea">'; |
4 |
3 |
|
|
5 |
4 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
6 |
|
$_forgot_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
5 |
|
$_forgot_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
7 |
6 |
|
|
8 |
7 |
$_forgot_form .= ' |
$_forgot_form .= ' |
9 |
8 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
10 |
|
<input type="hidden" name="op" value="' . $op . '"> |
|
11 |
|
<input type="hidden" name="forgot_token" value="' . $forgot_token . '"> |
|
12 |
|
<input type="hidden" name="doit" value="1"> |
|
13 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '"> |
|
|
9 |
|
<input type="hidden" name="op" value="' . $op . '" /> |
|
10 |
|
<input type="hidden" name="forgot_token" value="' . $forgot_token . '" /> |
|
11 |
|
<input type="hidden" name="doit" value="1" /> |
|
12 |
|
<input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" /> |
14 |
13 |
|
|
15 |
14 |
<label for="pass1"> |
<label for="pass1"> |
16 |
15 |
<span class="form_item_title">New password</span<br /> |
<span class="form_item_title">New password</span<br /> |
17 |
|
<input type="password" name="pass1" value=""> |
|
|
16 |
|
<input type="password" name="pass1" value="" /> |
18 |
17 |
</label> |
</label> |
19 |
18 |
<br /> |
<br /> |
20 |
19 |
<br /> |
<br /> |
21 |
20 |
|
|
22 |
21 |
<label for="pass2"> |
<label for="pass2"> |
23 |
22 |
<span class="form_item_title">New password (retype)</span><br /> |
<span class="form_item_title">New password (retype)</span><br /> |
24 |
|
<input type="password" name="pass2" value=""> |
|
|
23 |
|
<input type="password" name="pass2" value="" /> |
25 |
24 |
</label> |
</label> |
26 |
25 |
<br /> |
<br /> |
27 |
26 |
<br /> |
<br /> |
28 |
27 |
|
|
29 |
28 |
<label for="button"> |
<label for="button"> |
30 |
|
<input type="submit" value="Change password"> |
|
|
29 |
|
<input type="submit" name="button" value="Change password" /> |
31 |
30 |
</label> |
</label> |
32 |
31 |
|
|
33 |
32 |
</form> |
</form> |
File inc/user/forgot_send.form.php changed (mode: 100644) (index 7fa194b..a5c9e35) |
2 |
2 |
$_form = '<div class="formarea">'; |
$_form = '<div class="formarea">'; |
3 |
3 |
|
|
4 |
4 |
if (count($errmsg) > 0) |
if (count($errmsg) > 0) |
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $error) . '</span><br /><br />' . "\n"; |
|
|
5 |
|
$_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; |
6 |
6 |
|
|
7 |
7 |
$_form .= ' |
$_form .= ' |
8 |
8 |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
<form method="post" action="' . $_SERVER['PHP_SELF'] . '"> |
9 |
|
<input type="hidden" name="op" value="forgotsend"> |
|
10 |
|
<input type="hidden" name="subop" value="2"> |
|
11 |
|
<input type="hidden" name="doit" value="1"> |
|
|
9 |
|
<input type="hidden" name="op" value="forgotsend" /> |
|
10 |
|
<input type="hidden" name="subop" value="2" /> |
|
11 |
|
<input type="hidden" name="doit" value="1" /> |
12 |
12 |
|
|
13 |
13 |
<label for="email"> |
<label for="email"> |
14 |
14 |
<span class="form_item_title">E-mail</span><br /> |
<span class="form_item_title">E-mail</span><br /> |
15 |
|
<input type="text" name="email" value=""> |
|
|
15 |
|
<input type="text" name="email" value="' . $email . '" /> |
16 |
16 |
</label> |
</label> |
17 |
17 |
<br /> |
<br /> |
18 |
18 |
<br /> |
<br /> |
19 |
19 |
|
|
20 |
20 |
<label for="button"> |
<label for="button"> |
21 |
|
<input type="submit" value="Recover password"> |
|
|
21 |
|
<input type="submit" name="button" value="Recover password" /> |
22 |
22 |
</label> |
</label> |
23 |
23 |
|
|
24 |
24 |
</form> |
</form> |
File inc/util.inc.php changed (mode: 100644) (index 5cf5450..41c1b09) |
... |
... |
function rg_fatal($msg) |
181 |
181 |
exit(1); |
exit(1); |
182 |
182 |
} |
} |
183 |
183 |
|
|
|
184 |
|
/* |
|
185 |
|
* Generates a menu |
|
186 |
|
*/ |
|
187 |
|
function rg_menu($a, $rg_ui) |
|
188 |
|
{ |
|
189 |
|
$menu = ""; |
|
190 |
|
$menu2 = ""; |
|
191 |
|
$add = ""; |
|
192 |
|
foreach ($a as $_op => $_info) { |
|
193 |
|
// we ignore fake menus like 'home' |
|
194 |
|
if (!isset($_info['text'])) |
|
195 |
|
continue; |
|
196 |
|
|
|
197 |
|
if (isset($_info['needs_admin']) && ($rg_ui['is_admin'] == 0)) |
|
198 |
|
continue; |
|
199 |
|
|
|
200 |
|
if (isset($_info['uid0']) && ($rg_ui['uid'] > 0)) |
|
201 |
|
continue; |
|
202 |
|
|
|
203 |
|
if (!isset($_info['uid0']) && ($rg_ui['uid'] == 0)) |
|
204 |
|
continue; |
|
205 |
|
|
|
206 |
|
$_text = $_info['text']; |
|
207 |
|
$_url = rg_re_url($_op); |
|
208 |
|
$menu .= $add . "<a class=\"menu\" href=\"" |
|
209 |
|
. $_url . "\">$_text</a>\n"; |
|
210 |
|
$add = "\t"; |
|
211 |
|
|
|
212 |
|
if (!isset($_info['sub']) || (count($_info['sub']) == 0)) |
|
213 |
|
continue; |
|
214 |
|
|
|
215 |
|
foreach ($_info['sub'] as $junk => $_info2) { |
|
216 |
|
$_text2 = $_info2['text']; |
|
217 |
|
$menu2 .= "\t<a class=\"menu\" href=\"" |
|
218 |
|
. $_url . $_info2['url'] |
|
219 |
|
. "\">$_text2</a>\n"; |
|
220 |
|
} |
|
221 |
|
} |
|
222 |
|
|
|
223 |
|
$ret = array(); |
|
224 |
|
$ret[0] = $menu; |
|
225 |
|
if (!empty($menu2)) |
|
226 |
|
$ret[1] = $menu2; |
|
227 |
|
|
|
228 |
|
return $ret; |
|
229 |
|
} |
|
230 |
|
|
184 |
231 |
?> |
?> |
File root/index.php changed (mode: 100644) (index df569f9..4b44b8d) |
... |
... |
if ($db === FALSE) |
44 |
44 |
rg_user_login_by_sid($db, $sid, $rg_ui); |
rg_user_login_by_sid($db, $sid, $rg_ui); |
45 |
45 |
rg_log("After login_by_sid, rg_ui=" . print_r($rg_ui, TRUE)); |
rg_log("After login_by_sid, rg_ui=" . print_r($rg_ui, TRUE)); |
46 |
46 |
|
|
|
47 |
|
|
47 |
48 |
$body = ""; |
$body = ""; |
48 |
49 |
// Chain dispatching |
// Chain dispatching |
49 |
50 |
do { |
do { |
|
51 |
|
$redispatch = 0; |
|
52 |
|
|
|
53 |
|
// Re-init second line menu |
|
54 |
|
$second_menu = array(); |
|
55 |
|
|
50 |
56 |
include($INC . "/dispatch/dispatch.php"); |
include($INC . "/dispatch/dispatch.php"); |
51 |
|
} while (strcmp($op, "") != 0); |
|
|
57 |
|
} while ($redispatch == 1); |
52 |
58 |
|
|
53 |
59 |
|
|
54 |
60 |
// menu |
// menu |
55 |
|
$amenu = array( |
|
|
61 |
|
$first_menu = array( |
56 |
62 |
"login" => array("text" => "Login", "uid0" => 1), |
"login" => array("text" => "Login", "uid0" => 1), |
57 |
63 |
"personal" => array("text" => "Personal"), |
"personal" => array("text" => "Personal"), |
58 |
64 |
"repo" => array("text" => "Repositories"), |
"repo" => array("text" => "Repositories"), |
|
... |
... |
$amenu = array( |
61 |
67 |
"suggestion"=> array("text" => "Suggestion"), |
"suggestion"=> array("text" => "Suggestion"), |
62 |
68 |
"logout" => array("text" => "Logout") |
"logout" => array("text" => "Logout") |
63 |
69 |
); |
); |
64 |
|
|
|
65 |
|
$menu = ""; |
|
66 |
|
$add = ""; |
|
67 |
|
foreach ($amenu as $_op => $_info) { |
|
68 |
|
if (isset($_info['needs_admin']) && ($rg_ui['is_admin'] == 0)) |
|
69 |
|
continue; |
|
70 |
|
|
|
71 |
|
if (isset($_info['uid0']) && ($rg_ui['uid'] > 0)) |
|
72 |
|
continue; |
|
73 |
|
|
|
74 |
|
if (!isset($_info['uid0']) && ($rg_ui['uid'] == 0)) |
|
75 |
|
continue; |
|
76 |
|
|
|
77 |
|
$_text = $_info['text']; |
|
78 |
|
$menu .= $add . "<a class=\"menu\" href=\"" |
|
79 |
|
. rg_re_url($_op) . "\">$_text</a>\n"; |
|
80 |
|
$add = "\t "; |
|
81 |
|
} |
|
|
70 |
|
$first_menu[$op]['sub'] = $second_menu; |
|
71 |
|
$menu = implode("\t<br />\n", rg_menu($first_menu, $rg_ui)); |
82 |
72 |
|
|
83 |
73 |
if ($rg_ui['uid'] > 0) |
if ($rg_ui['uid'] > 0) |
84 |
74 |
$rg_username = $rg_ui['username']; |
$rg_username = $rg_ui['username']; |
85 |
75 |
else |
else |
86 |
76 |
$rg_username = "Not logged in"; |
$rg_username = "Not logged in"; |
87 |
77 |
|
|
|
78 |
|
$_diff = sprintf("%u", (microtime(TRUE) - $_s) * 1000); |
88 |
79 |
include($THEME . "/index.php"); |
include($THEME . "/index.php"); |
89 |
80 |
|
|
90 |
81 |
$_diff = sprintf("%u", (microtime(TRUE) - $_s) * 1000); |
$_diff = sprintf("%u", (microtime(TRUE) - $_s) * 1000); |