File Compare.txt changed (mode: 100644) (index e5236e2..09b46cb) |
... |
... |
SELinux friendly ? Yes ? ? |
7 |
7 |
Disto friendly No Yes No No |
Disto friendly No Yes No No |
8 |
8 |
Bug tracker Yes Yes Yes ? |
Bug tracker Yes Yes Yes ? |
9 |
9 |
CLI commands (SSH) ? Yes ? ? |
CLI commands (SSH) ? Yes ? ? |
10 |
|
|
|
|
10 |
|
API ? ? Yes ? |
11 |
11 |
|
|
12 |
12 |
[Details] |
[Details] |
13 |
13 |
Language Ruby+Perl PHP Ruby Ruby |
Language Ruby+Perl PHP Ruby Ruby |
File TODO changed (mode: 100644) (index 92d81dc..53e593e) |
1 |
1 |
== BEFORE FIRST RELEASE! == |
== BEFORE FIRST RELEASE! == |
2 |
|
[ ] Fix rg_user_edit everywhere! |
|
3 |
|
[ ] Fix PostgreSQL auth because httpd is in private tmp so we need TCP! |
|
4 |
|
[ ] Cannot lock the schema upgrade because both web and cron try to own the lock! |
|
5 |
|
Let only cron/q/remote to do it, in web just wait (or give error) |
|
6 |
|
(or auto retry). |
|
7 |
2 |
[ ] See diff for merge requests. |
[ ] See diff for merge requests. |
8 |
|
[ ] Add possibility to reject merge requests, to apply, to delete etc. |
|
9 |
3 |
[ ] JUNK1/JUNK2: http://rg.embedromix.ro:8000/user/catab/rocketgit/commit/afd1df2..f919c9b |
[ ] JUNK1/JUNK2: http://rg.embedromix.ro:8000/user/catab/rocketgit/commit/afd1df2..f919c9b |
10 |
4 |
[ ] Confirmation e-mail comes from rg1. |
[ ] Confirmation e-mail comes from rg1. |
11 |
5 |
[ ] rg_log: why the fd is NULL?! |
[ ] rg_log: why the fd is NULL?! |
|
13 |
7 |
[ ] "log" does not list last entries! More exactly, seems the owner does not update repo! |
[ ] "log" does not list last entries! More exactly, seems the owner does not update repo! |
14 |
8 |
[ ] @@branch@@ is not defined for merge requests. Should it? Probably yes, to filter them. |
[ ] @@branch@@ is not defined for merge requests. Should it? Probably yes, to filter them. |
15 |
9 |
[ ] Create a repo and click on it; seems we get error (gabi)! |
[ ] Create a repo and click on it; seems we get error (gabi)! |
16 |
|
[ ] Add real name to user info. |
|
17 |
10 |
[ ] Add permission to add bug tracker to a project. |
[ ] Add permission to add bug tracker to a project. |
18 |
|
[ ] Remove all @@DUMP@@s from templates. |
|
|
11 |
|
[ ] Remove all @@ DUMP @@s from templates. |
19 |
12 |
[ ] We are escaping when we insert in database _and_ when we output on screen! |
[ ] We are escaping when we insert in database _and_ when we output on screen! |
20 |
13 |
What should we do? |
What should we do? |
21 |
|
[ ] Do we need to escape some chars in console (ssh rocketgit@host repo X)? |
|
22 |
14 |
[ ] |
[ ] |
23 |
15 |
|
|
24 |
16 |
|
|
25 |
17 |
== Medium == |
== Medium == |
|
18 |
|
[ ] Check admin creatin of an account. |
|
19 |
|
[ ] Add possibility to reject merge requests, to apply, to delete etc. |
|
20 |
|
[ ] Do we need to escape some chars in console (ssh rocketgit@host repo X)? |
|
21 |
|
[ ] We need to switch to a template for the user form to get rid of a lot of |
|
22 |
|
mambo-jumbo with the _u array passed! |
|
23 |
|
[ ] Show the API on the webpage, exactly like Blender. |
26 |
24 |
[ ] We can pass in authorized_keys aslo the key id. Maybe for usage? |
[ ] We can pass in authorized_keys aslo the key id. Maybe for usage? |
27 |
25 |
[ ] Migrate to a single function to deal with a request so we can do better |
[ ] Migrate to a single function to deal with a request so we can do better |
28 |
26 |
unit testing. |
unit testing. |
File admin/init.php changed (mode: 100644) (index da9d26f..5e293ee) |
... |
... |
if ($db === FALSE) { |
21 |
21 |
exit(1); |
exit(1); |
22 |
22 |
} |
} |
23 |
23 |
|
|
24 |
|
$r = rg_sql_struct_update_if_needed($db, 0); |
|
|
24 |
|
$r = rg_sql_struct_update($db, 0); |
25 |
25 |
if ($r !== TRUE) { |
if ($r !== TRUE) { |
26 |
26 |
echo "Cannot init structure. Check the logs!\n"; |
echo "Cannot init structure. Check the logs!\n"; |
27 |
27 |
exit(1); |
exit(1); |
|
... |
... |
while (1) { |
68 |
68 |
continue; |
continue; |
69 |
69 |
} |
} |
70 |
70 |
|
|
71 |
|
$r = rg_user_edit($d $_u); |
|
|
71 |
|
$r = rg_user_edit($db, $_u); |
72 |
72 |
if ($r !== TRUE) { |
if ($r !== TRUE) { |
73 |
73 |
echo "Cannot create user (" . rg_user_error() . ")!\n"; |
echo "Cannot create user (" . rg_user_error() . ")!\n"; |
74 |
74 |
continue; |
continue; |
File inc/admin/users/add.php changed (mode: 100644) (index bb0b957..f3a981a) |
... |
... |
if ($doit == 1) { |
12 |
12 |
} |
} |
13 |
13 |
|
|
14 |
14 |
$xuser = rg_var_str("xuser"); |
$xuser = rg_var_str("xuser"); |
|
15 |
|
$realname = rg_var_str("realname"); |
15 |
16 |
$email = rg_var_str("email"); |
$email = rg_var_str("email"); |
16 |
17 |
$xpass = rg_var_str("xpass"); |
$xpass = rg_var_str("xpass"); |
17 |
18 |
$is_admin = rg_var_uint("is_admin"); |
$is_admin = rg_var_uint("is_admin"); |
|
... |
... |
if ($doit == 1) { |
41 |
42 |
break; |
break; |
42 |
43 |
} |
} |
43 |
44 |
|
|
44 |
|
if (!rg_user_edit($db, 0, $xuser, $email, $xpass, $is_admin, |
|
45 |
|
$disk_quota_mb, $rights, $session_time, "")) { |
|
|
45 |
|
$_u = array(); |
|
46 |
|
$_u['uid'] = 0; |
|
47 |
|
$_u['username'] = $xuser; |
|
48 |
|
$_u['realname'] = $realname; |
|
49 |
|
$_u['email'] = $email; |
|
50 |
|
$_u['pass'] = $xpass; |
|
51 |
|
$_u['is_admin'] = $is_admin; |
|
52 |
|
$_u['disk_quota_mb'] = $disk_quota_mb; |
|
53 |
|
$_u['rights'] = $rights; |
|
54 |
|
$_u['session_time'] = $session_time; |
|
55 |
|
$_u['confirm_token'] = ""; |
|
56 |
|
if (!rg_user_edit($db, $_u)) { |
46 |
57 |
$errmsg[] = "Cannot add user (" . rg_user_error() . ")."; |
$errmsg[] = "Cannot add user (" . rg_user_error() . ")."; |
47 |
58 |
break; |
break; |
48 |
59 |
} |
} |
|
... |
... |
if ($doit == 1) { |
54 |
65 |
} |
} |
55 |
66 |
} else { |
} else { |
56 |
67 |
$xuser = ""; |
$xuser = ""; |
|
68 |
|
$realname = ""; |
57 |
69 |
$email = ""; |
$email = ""; |
58 |
70 |
$xpass = ""; |
$xpass = ""; |
59 |
71 |
$is_admin = 0; |
$is_admin = 0; |
|
... |
... |
if ($doit == 1) { |
62 |
74 |
$session_time = $rg_session_time; |
$session_time = $rg_session_time; |
63 |
75 |
} |
} |
64 |
76 |
|
|
|
77 |
|
$create_mode = 1; |
65 |
78 |
$admin_mode = 1; |
$admin_mode = 1; |
66 |
79 |
$pass_mode = 1; |
$pass_mode = 1; |
67 |
80 |
include($INC . "/admin/users/user.form.php"); |
include($INC . "/admin/users/user.form.php"); |
File inc/admin/users/edit.php changed (mode: 100644) (index 8e48fa6..44aa430) |
... |
... |
if ($doit == 1) { |
15 |
15 |
} |
} |
16 |
16 |
|
|
17 |
17 |
$xuser = rg_var_str("xuser"); |
$xuser = rg_var_str("xuser"); |
|
18 |
|
$realname = rg_var_str("realname"); |
18 |
19 |
$email = rg_var_str("email"); |
$email = rg_var_str("email"); |
19 |
20 |
$xpass = rg_var_str("xpass"); |
$xpass = rg_var_str("xpass"); |
20 |
21 |
$is_admin = rg_var_uint("is_admin"); |
$is_admin = rg_var_uint("is_admin"); |
|
... |
... |
if ($doit == 1) { |
34 |
35 |
break; |
break; |
35 |
36 |
} |
} |
36 |
37 |
|
|
37 |
|
if (!rg_user_edit($db, $uid, $xuser, $email, $xpass, |
|
38 |
|
$is_admin, $disk_quota_mb, $rights, $session_time, "")) { |
|
|
38 |
|
$_u = array(); |
|
39 |
|
$_u['uid'] = $uid; |
|
40 |
|
$_u['username'] = $xuser; |
|
41 |
|
$_u['realname'] = $realname; |
|
42 |
|
$_u['email'] = $email; |
|
43 |
|
$_u['pass'] = $xpass; |
|
44 |
|
$_u['is_admin'] = $is_admin; |
|
45 |
|
$_u['disk_quota_mb'] = $disk_quota_mb; |
|
46 |
|
$_u['rights'] = $rights; |
|
47 |
|
$_u['session_time'] = $session_time; |
|
48 |
|
$_u['confirm_token'] = ""; |
|
49 |
|
if (!rg_user_edit($db, $_u)) { |
39 |
50 |
$errmsg[] = "Cannot change info (" . rg_user_error() . ")."; |
$errmsg[] = "Cannot change info (" . rg_user_error() . ")."; |
40 |
51 |
break; |
break; |
41 |
52 |
} |
} |
|
... |
... |
if ($doit == 1) { |
56 |
67 |
$show_form = 0; |
$show_form = 0; |
57 |
68 |
} else { |
} else { |
58 |
69 |
$xuser = $_ui['username']; |
$xuser = $_ui['username']; |
|
70 |
|
$realname = $_ui['realname']; |
59 |
71 |
$email = $_ui['email']; |
$email = $_ui['email']; |
60 |
72 |
$xpass = ""; |
$xpass = ""; |
61 |
73 |
$is_admin = $_ui['is_admin']; |
$is_admin = $_ui['is_admin']; |
|
... |
... |
if ($doit == 1) { |
66 |
78 |
} |
} |
67 |
79 |
|
|
68 |
80 |
if ($show_form == 1) { |
if ($show_form == 1) { |
|
81 |
|
$create_mode = 0; |
69 |
82 |
$admin_mode = 1; |
$admin_mode = 1; |
70 |
83 |
$pass_mode = 1; |
$pass_mode = 1; |
71 |
84 |
include($INC . "/admin/users/user.form.php"); |
include($INC . "/admin/users/user.form.php"); |
File inc/admin/users/user.form.php changed (mode: 100644) (index 1553dbc..cc5aeb8) |
1 |
1 |
<?php |
<?php |
2 |
2 |
$_form = '<div class="formarea">' . "\n"; |
$_form = '<div class="formarea">' . "\n"; |
3 |
3 |
|
|
4 |
|
$_form .= "<div class=\"formarea_title\">Change user details</div><br />\n"; |
|
|
4 |
|
if ($create_mode == 1) |
|
5 |
|
$_title = "Create a new account"; |
|
6 |
|
else |
|
7 |
|
$_title = "Change user details"; |
|
8 |
|
$_form .= "<div class=\"formarea_title\">$_title</div><br />\n"; |
5 |
9 |
|
|
6 |
10 |
if ($admin_mode == 1) { |
if ($admin_mode == 1) { |
7 |
11 |
$sel_is_admin = array(0 => "", 1 => ""); |
$sel_is_admin = array(0 => "", 1 => ""); |
|
... |
... |
$_form .= ' |
25 |
29 |
<br /> |
<br /> |
26 |
30 |
<br /> |
<br /> |
27 |
31 |
|
|
28 |
|
<label for="realname" class="form_item_title">Your name</label><br /> |
|
|
32 |
|
<label for="realname" class="form_item_title">Name</label><br /> |
29 |
33 |
<input type="text" name="realname" value="' . $realname . '" /> |
<input type="text" name="realname" value="' . $realname . '" /> |
30 |
34 |
<br /> |
<br /> |
31 |
35 |
<br /> |
<br /> |
File inc/struct.inc.php changed (mode: 100644) (index 8a200f1..d7cf83a) |
... |
... |
function rg_sql_struct_run($db, $flags, $old_schema_ver) |
222 |
222 |
} |
} |
223 |
223 |
|
|
224 |
224 |
/* |
/* |
225 |
|
* Update schema if needed |
|
226 |
|
* Returns FALSE in case of error |
|
|
225 |
|
* Tests if schema update is needed. Return old version |
227 |
226 |
*/ |
*/ |
228 |
|
function rg_sql_struct_update_if_needed($db, $flags) |
|
|
227 |
|
function rg_sql_struct_update_needed($db) |
229 |
228 |
{ |
{ |
230 |
229 |
global $rg_sql_schema_ver; |
global $rg_sql_schema_ver; |
231 |
230 |
|
|
232 |
|
rg_log("sql_struct_update: flags=$flags"); |
|
|
231 |
|
rg_log("sql_struct_update_needed:"); |
233 |
232 |
|
|
234 |
233 |
$old = rg_state_get($db, "schema_version"); |
$old = rg_state_get($db, "schema_version"); |
235 |
234 |
if (empty($old)) |
if (empty($old)) |
236 |
235 |
$old = 0; |
$old = 0; |
237 |
236 |
|
|
238 |
|
rg_log("DEBUG: old=$old new=$rg_sql_schema_ver"); |
|
|
237 |
|
rg_log("\tDEBUG: old=$old new=$rg_sql_schema_ver"); |
239 |
238 |
if ($old == $rg_sql_schema_ver) { |
if ($old == $rg_sql_schema_ver) { |
240 |
|
rg_log("DEBUG: schema is up to date!"); |
|
241 |
|
return TRUE; |
|
|
239 |
|
rg_log("\tDEBUG: schema is up to date!"); |
|
240 |
|
return FALSE; |
242 |
241 |
} |
} |
243 |
242 |
|
|
|
243 |
|
return $old; |
|
244 |
|
} |
|
245 |
|
|
|
246 |
|
/* |
|
247 |
|
* Update schema if needed |
|
248 |
|
* Returns FALSE in case of error |
|
249 |
|
* This must not be run by web user because of the owner of the locking file. |
|
250 |
|
*/ |
|
251 |
|
function rg_sql_struct_update($db, $flags) |
|
252 |
|
{ |
|
253 |
|
global $rg_sql_schema_ver; |
|
254 |
|
|
|
255 |
|
rg_log("sql_struct_update: flags=$flags"); |
|
256 |
|
|
|
257 |
|
$old = rg_sql_struct_update_needed($db); |
|
258 |
|
if ($old === FALSE) |
|
259 |
|
return TRUE; |
|
260 |
|
|
244 |
261 |
// If we cannot lock, return error |
// If we cannot lock, return error |
245 |
262 |
if (rg_lock("schema_upgrade.lock") === FALSE) |
if (rg_lock("schema_upgrade.lock") === FALSE) |
246 |
263 |
return FALSE; |
return FALSE; |
File inc/user.inc.php changed (mode: 100644) (index 797fcd0..dfe4d5f) |
... |
... |
function rg_user_edit($db, $d) |
116 |
116 |
|
|
117 |
117 |
rg_log("user_edit: data: " . rg_array2string($d)); |
rg_log("user_edit: data: " . rg_array2string($d)); |
118 |
118 |
|
|
|
119 |
|
// DEBUG |
|
120 |
|
if (!isset($d['username'])) |
|
121 |
|
rg_internal_error("username not passed"); |
|
122 |
|
|
119 |
123 |
if (rg_user_ok($d['username']) !== TRUE) |
if (rg_user_ok($d['username']) !== TRUE) |
120 |
124 |
return FALSE; |
return FALSE; |
121 |
125 |
|
|
|
... |
... |
function rg_user_edit($db, $d) |
129 |
133 |
$e_is_admin = $d['is_admin']; |
$e_is_admin = $d['is_admin']; |
130 |
134 |
$e_disk_quota_mb = $d['disk_quota_mb']; |
$e_disk_quota_mb = $d['disk_quota_mb']; |
131 |
135 |
$e_session_time = $d['session_time']; |
$e_session_time = $d['session_time']; |
132 |
|
$e_confirm_token = $d['confirm_token']; |
|
|
136 |
|
$e_confirm_token = isset($d['confirm_token']) ? $d['confirm_token'] : ""; |
133 |
137 |
|
|
134 |
138 |
if (empty($d['confirm_token'])) { |
if (empty($d['confirm_token'])) { |
135 |
139 |
// no need to confirm account |
// no need to confirm account |
|
... |
... |
function rg_user_confirm_send($email, $token) |
768 |
772 |
|
|
769 |
773 |
$headers = "From: $rg_admin_name <$rg_admin_email>"; |
$headers = "From: $rg_admin_name <$rg_admin_email>"; |
770 |
774 |
|
|
|
775 |
|
$proto = "http://"; |
|
776 |
|
if (isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'], "on") == 0)) |
|
777 |
|
$proto = "https://"; |
|
778 |
|
|
771 |
779 |
if (!mail($email, |
if (!mail($email, |
772 |
780 |
"Account creation confirmation", |
"Account creation confirmation", |
773 |
781 |
"Hello!\n\n" |
"Hello!\n\n" |
774 |
782 |
. "Please confirm your account creation following:\n" |
. "Please confirm your account creation following:\n" |
775 |
|
. (@strcmp($_SERVER['HTTPS'], "on") == 0 ? "https://" : "http://") |
|
|
783 |
|
. $proto |
776 |
784 |
. @$_SERVER['HTTP_HOST'] |
. @$_SERVER['HTTP_HOST'] |
777 |
785 |
. rg_re_url("/op/confirm") . "&token=$token", |
. rg_re_url("/op/confirm") . "&token=$token", |
778 |
786 |
$headers, |
$headers, |
File inc/user/create.php changed (mode: 100644) (index 060f44f..845a06d) |
... |
... |
rg_log("/inc/user/create"); |
4 |
4 |
$_create = "<br />\n"; |
$_create = "<br />\n"; |
5 |
5 |
|
|
6 |
6 |
if ($rg_account_allow_creation != 1) { |
if ($rg_account_allow_creation != 1) { |
7 |
|
$_create .= "Site does not allow account creation."; |
|
|
7 |
|
$_create .= "This site does not allow account creation. Ask the Admin."; |
8 |
8 |
return; |
return; |
9 |
9 |
} |
} |
10 |
10 |
|
|
|
... |
... |
if ($doit == 1) { |
53 |
53 |
break; |
break; |
54 |
54 |
} |
} |
55 |
55 |
|
|
56 |
|
$r = rg_user_confirm_send($email, $confirm_token); |
|
|
56 |
|
$r = rg_user_confirm_send($email, $_u['confirm_token']); |
57 |
57 |
if ($r === FALSE) { |
if ($r === FALSE) { |
58 |
58 |
$errmsg[] = "Cannot send e-mail (" . rg_user_error() . ")!"; |
$errmsg[] = "Cannot send e-mail (" . rg_user_error() . ")!"; |
59 |
59 |
break; |
break; |
|
... |
... |
if ($doit == 1) { |
65 |
65 |
} |
} |
66 |
66 |
} else { |
} else { |
67 |
67 |
$xuser = ""; |
$xuser = ""; |
|
68 |
|
$realname = ""; |
68 |
69 |
$email = ""; |
$email = ""; |
69 |
70 |
$xpass = ""; |
$xpass = ""; |
70 |
71 |
$xpass2 = ""; |
$xpass2 = ""; |
|
... |
... |
if ($doit == 1) { |
72 |
73 |
} |
} |
73 |
74 |
|
|
74 |
75 |
if ($show_form == 1) { |
if ($show_form == 1) { |
|
76 |
|
$create_mode = 1; |
75 |
77 |
$admin_mode = 0; |
$admin_mode = 0; |
76 |
78 |
$pass_mode = 2; |
$pass_mode = 2; |
77 |
79 |
include($INC . "/admin/users/user.form.php"); |
include($INC . "/admin/users/user.form.php"); |
File inc/user/info/info.php changed (mode: 100644) (index 29f7706..b68994f) |
... |
... |
if ($doit == 1) { |
20 |
20 |
$session_time = rg_var_uint("session_time"); |
$session_time = rg_var_uint("session_time"); |
21 |
21 |
|
|
22 |
22 |
while (1) { |
while (1) { |
23 |
|
$xpass = ""; |
|
24 |
|
if (!rg_user_edit($db, $rg_ui['uid'], $xuser, $realname, $email, |
|
25 |
|
$xpass, $is_admin, $disk_quota_mb, $rights, |
|
26 |
|
$session_time, "")) { |
|
|
23 |
|
$_u = array(); |
|
24 |
|
$_u['uid'] = $rg_ui['uid']; |
|
25 |
|
$_u['username'] = $xuser; |
|
26 |
|
$_u['realname'] = $realname; |
|
27 |
|
$_u['email'] = $email; |
|
28 |
|
$_u['pass'] = ""; |
|
29 |
|
$_u['is_admin'] = $is_admin; |
|
30 |
|
$_u['disk_quota_mb'] = $disk_quota_mb; |
|
31 |
|
$_u['rights'] = $rights; |
|
32 |
|
$_u['session_time'] = $session_time; |
|
33 |
|
if (!rg_user_edit($db, $_u)) { |
27 |
34 |
$errmsg[] = "Cannot change info (" . rg_user_error() . ")."; |
$errmsg[] = "Cannot change info (" . rg_user_error() . ")."; |
28 |
35 |
break; |
break; |
29 |
36 |
} |
} |
|
... |
... |
if ($doit == 1) { |
41 |
48 |
$session_time = $rg_ui['session_time']; |
$session_time = $rg_ui['session_time']; |
42 |
49 |
} |
} |
43 |
50 |
|
|
|
51 |
|
$create_mode = 0; |
44 |
52 |
$admin_mode = 0; |
$admin_mode = 0; |
45 |
53 |
$pass_mode = 0; |
$pass_mode = 0; |
46 |
54 |
include($INC . "/admin/users/user.form.php"); |
include($INC . "/admin/users/user.form.php"); |
File root/index.php changed (mode: 100644) (index 1e9fcc4..1f486b3) |
... |
... |
$op = ""; $subop = ""; $subsubop = ""; $cop = ""; |
25 |
25 |
$rr = array("user" => "", "repo" => "", "prefix" => ""); |
$rr = array("user" => "", "repo" => "", "prefix" => ""); |
26 |
26 |
$paras = array(); |
$paras = array(); |
27 |
27 |
$rg_ui = array(); |
$rg_ui = array(); |
|
28 |
|
$more = array(); |
28 |
29 |
|
|
29 |
30 |
// We have variable 'vv' passed from webserver - build 'op' and rest of paras |
// We have variable 'vv' passed from webserver - build 'op' and rest of paras |
30 |
31 |
$vv = rg_var_str("vv"); |
$vv = rg_var_str("vv"); |
|
... |
... |
if ($db === FALSE) { |
90 |
91 |
die("Cannot open database!"); |
die("Cannot open database!"); |
91 |
92 |
} |
} |
92 |
93 |
|
|
93 |
|
$r = rg_sql_struct_update_if_needed($db, 0); |
|
94 |
|
if ($r !== TRUE) { |
|
95 |
|
echo "Schema is not up-to-date! Try again later"; |
|
96 |
|
exit(1); |
|
|
94 |
|
while (1) { |
|
95 |
|
$r = rg_sql_struct_update_needed($db); |
|
96 |
|
if ($r === FALSE) |
|
97 |
|
break; |
|
98 |
|
|
|
99 |
|
echo "Schema is not up-to-date! Sleep 1 second..."; |
|
100 |
|
sleep(1); |
97 |
101 |
} |
} |
98 |
102 |
|
|
99 |
103 |
rg_user_login_by_sid($db, $sid, $rg_ui); |
rg_user_login_by_sid($db, $sid, $rg_ui); |
|
... |
... |
$first_menu = array( |
133 |
137 |
"op" => "/op/logout") |
"op" => "/op/logout") |
134 |
138 |
); |
); |
135 |
139 |
$first_menu[$op]['sub'] = $second_menu; |
$first_menu[$op]['sub'] = $second_menu; |
136 |
|
$menu = implode("", rg_menu($first_menu, $rg_ui, $op, $subop)); |
|
|
140 |
|
$more['HTML:rg_menu'] = implode("", rg_menu($first_menu, $rg_ui, $op, $subop)); |
137 |
141 |
|
|
138 |
142 |
if ($rg_ui['uid'] > 0) |
if ($rg_ui['uid'] > 0) |
139 |
|
$rg_username = $rg_ui['username']; |
|
|
143 |
|
$more['rg_username'] = $rg_ui['username']; |
140 |
144 |
else |
else |
141 |
|
$rg_username = "Not logged in"; |
|
|
145 |
|
$more['rg_username'] = "Not logged in"; |
142 |
146 |
|
|
143 |
147 |
rg_prof_end("MAIN"); |
rg_prof_end("MAIN"); |
144 |
148 |
|
|
145 |
|
include($rg_scripts . "/root/themes/" . $rg_theme . "/index.php"); |
|
|
149 |
|
// TODO: Do something with the profiling, here |
|
150 |
|
|
|
151 |
|
$more['HTML:rg_theme_url'] = $THEME_URL; |
|
152 |
|
$more['HTML:rg_body'] = $body; |
|
153 |
|
echo rg_template("index.html", $more); |
146 |
154 |
|
|
147 |
155 |
rg_prof_log("rg_log"); |
rg_prof_log("rg_log"); |
148 |
156 |
?> |
?> |
File root/themes/default/index.html renamed from root/themes/default/index.php (similarity 73%) (mode: 100644) (index ca5c534..4e673b5) |
3 |
3 |
<head> |
<head> |
4 |
4 |
<title>RocketGit</title> |
<title>RocketGit</title> |
5 |
5 |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
6 |
|
<link rel="stylesheet" type="text/css" href="<?php echo $THEME_URL;?>/main.css" /> |
|
|
6 |
|
<link rel="stylesheet" type="text/css" href="@@rg_theme_url@@/main.css" /> |
7 |
7 |
</head> |
</head> |
8 |
8 |
|
|
9 |
9 |
<body> |
<body> |
|
12 |
12 |
|
|
13 |
13 |
<div id="header"> |
<div id="header"> |
14 |
14 |
<div style="float: right; padding: 5px;"> |
<div style="float: right; padding: 5px;"> |
15 |
|
<b><?php echo $rg_username; ?></b> |
|
|
15 |
|
<b>@@rg_username@@</b> |
16 |
16 |
</div> |
</div> |
17 |
17 |
|
|
18 |
18 |
<div style="float: left; font-size:11pt; padding: 5px 10px 5px 0px;"> |
<div style="float: left; font-size:11pt; padding: 5px 10px 5px 0px;"> |
|
20 |
20 |
</div> |
</div> |
21 |
21 |
|
|
22 |
22 |
<div id="menus"> |
<div id="menus"> |
23 |
|
<?php echo $menu; ?> |
|
|
23 |
|
@@rg_menu@@ |
24 |
24 |
</div> |
</div> |
25 |
25 |
</div> |
</div> |
26 |
26 |
|
|
27 |
27 |
<div id="main"> |
<div id="main"> |
28 |
|
<?php echo $body; ?> |
|
|
28 |
|
@@rg_body@@ |
29 |
29 |
</div> |
</div> |
30 |
30 |
|
|
31 |
31 |
<div id="footer"> |
<div id="footer"> |
32 |
32 |
<div style="float: left; padding: 5px;"> |
<div style="float: left; padding: 5px;"> |
33 |
|
<img src="<?php echo $THEME_URL; ?>/logo/rg4.png" /><br /> |
|
|
33 |
|
<img src="@@rg_theme_url@@/logo/rg4.png" /><br /> |
34 |
34 |
<b>RocketGit</b> |
<b>RocketGit</b> |
35 |
35 |
</div> |
</div> |
36 |
36 |
|
|
|
39 |
39 |
</div> |
</div> |
40 |
40 |
</div> |
</div> |
41 |
41 |
|
|
42 |
|
<!-- |
|
43 |
|
<div id="profiling"> |
|
44 |
|
Profiling:<br /> |
|
45 |
|
<?php echo rg_prof_html(); ?> |
|
46 |
|
</div> |
|
47 |
|
--> |
|
48 |
|
|
|
49 |
42 |
</div> <!-- container --> |
</div> <!-- container --> |
50 |
43 |
|
|
51 |
44 |
</body> |
</body> |