xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit 4a55c6d1cbe7d70e3982412d93c451d1f22e9448

Bulk changes.
Author: Catalin(ux) M. BOIE
Author date (UTC): 2011-03-04 21:57
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2011-03-04 21:57
Parent(s): be67fd56b67c6bafb054aed02500a597c33b7f5d
Signing key:
Tree: 2e9299e54b1132d66ea61a134b4167c9123def44
File Lines added Lines deleted
TODO 3 0
admin/sql.php 19 5
inc/admin/admin.php 21 0
inc/admin/users/users.php 21 0
inc/db.inc.php 1 0
inc/login/login.form.php 14 0
inc/login/login.php 14 0
inc/repo.inc.php 57 1
inc/repo/repo.form.php 35 0
inc/repo/repo.php 33 0
inc/sess.inc.php 96 0
inc/user.inc.php 171 0
inc/xlog.inc.php 7 0
root/index.php 37 3
File TODO changed (mode: 100644) (index 54f3017..1192868)
1 1 [ ] Count the numbers of clones/pushes/pulls. [ ] Count the numbers of clones/pushes/pulls.
2 2 [ ] Add memcache caching for all database lookups. [ ] Add memcache caching for all database lookups.
3 [ ] Allow to configure the limit of the patch size to prevent abuses.
4 [ ] Allow to configure to refuse binary files.
5 [ ] Allow to configure to refuse commits with broken spcaes/tab mixes.
3 6 [ ] [ ]
File admin/sql.php changed (mode: 100644) (index bcbc1b1..cbbf521)
... ... if ($db === FALSE)
13 13 fatal("Internal error (db)!"); fatal("Internal error (db)!");
14 14
15 15 // create repos table // create repos table
16 $sql = "CREATE TABLE repos (repo_id INT PRIMARY KEY, uid INT, itime INT)";
16 $sql = "CREATE TABLE repos (repo_id INTEGER PRIMARY KEY, name TEXT, uid INTEGER"
17 . ", itime INTEGER"
18 . ", public INTEGER)";
17 19 $res = sql_query($db, $sql); $res = sql_query($db, $sql);
18 20 if ($res === FALSE) if ($res === FALSE)
19 21 echo "WARN: Cannot create 'repo_access' table!\n"; echo "WARN: Cannot create 'repo_access' table!\n";
20 22
21 23 // create repo_access table // create repo_access table
22 $sql = "CREATE TABLE repo_access (repo_id INT, uid INT, perm CHAR(1), itime INT)";
24 $sql = "CREATE TABLE repo_access (repo_id INTEGER, uid INTEGER, perm CHAR(1)"
25 . ", itime INTEGER)";
23 26 $res = sql_query($db, $sql); $res = sql_query($db, $sql);
24 27 if ($res === FALSE) if ($res === FALSE)
25 28 echo "WARN: Cannot create 'repo_access' table!\n"; echo "WARN: Cannot create 'repo_access' table!\n";
 
... ... $res = sql_query($db, $sql);
29 32 if ($res === FALSE) if ($res === FALSE)
30 33 echo "WARN: Cannot create 'state' table!\n"; echo "WARN: Cannot create 'state' table!\n";
31 34
32 $sql = "CREATE TABLE keys (key_id INT PRIMARY KEY, itime INT, uid INT, key TEXT)";
35 $sql = "CREATE TABLE keys (key_id INTEGER PRIMARY KEY, itime INTEGER"
36 . ", uid INTEGER, key TEXT)";
33 37 $res = sql_query($db, $sql); $res = sql_query($db, $sql);
34 38 if ($res === FALSE) if ($res === FALSE)
35 39 echo "WARN: Cannot create 'keys' table!\n"; echo "WARN: Cannot create 'keys' table!\n";
36 40
37 $sql = "CREATE TABLE users (uid INT PRIMARY KEY, user TEXT, salt TEXT, pass TEXT, itime INT)";
41 $sql = "CREATE TABLE users (uid INT PRIMARY KEY, user TEXT, salt TEXT"
42 . ", pass TEXT, email TEXT, itime INTEGER"
43 . ", suspended INTEGER"
44 . ", session_time INTEGER"
45 . ", last_seen INTEGER)";
38 46 $res = sql_query($db, $sql); $res = sql_query($db, $sql);
39 47 if ($res === FALSE) if ($res === FALSE)
40 echo "WARN: Cannot create 'keys' table!\n";
48 echo "WARN: Cannot create 'users' table!\n";
49
50 $sql = "CREATE TABLE sess (sid TEXT PRIMARY KEY, uid INTEGER, expire INTEGER"
51 . ", session_time INTEGER, ip TEXT)";
52 $res = sql_query($db, $sql);
53 if ($res === FALSE)
54 echo "WARN: Cannot create 'sess' table!\n";
41 55
42 56 echo "Done!\n"; echo "Done!\n";
43 57 ?> ?>
File inc/admin/admin.php added (mode: 100644) (index 0000000..f8a6d58)
1 <?php
2 $subop = @intval($_REQUEST['subop']);
3
4 // menu
5 $_admin_url = $_SERVER['PHP_SELF'] . "?op=$op";
6 $_admin_menu = "";
7 $_admin_menu .= "[<a href=\"$_admin_url&amp;subop=1\">Users</a>]";
8 $_admin_menu .= "&nbsp;[<a href=\"$_admin_url&amp;subop=2\">Repos</a>]";
9 $_admin_menu .= "<br />\n";
10
11 $_admin_body = "";
12
13 switch ($subop) {
14 case 1: // users
15 include($INC . "/admin/users/users.php");
16 $_admin_body .= $_admin_users;
17 break;
18 }
19
20 $_admin = $_admin_menu . $_admin_body;
21 ?>
File inc/admin/users/users.php added (mode: 100644) (index 0000000..d98ec17)
1 <?php
2 $subsubop = @intval($_REQUEST['subsubop']);
3
4 // menu
5 $_admin_users_url = $_SERVER['PHP_SELF'] . "?op=$op&amp;subop=$subop";
6 $_admin_users_menu = "";
7 $_admin_users_menu .= "[<a href=\"$_admin_users_url&amp;subsubop=1\">List</a>]";
8 $_admin_users_menu .= "&nbsp;[<a href=\"$_admin_users_url&amp;subsubop=2\">Add</a>]";
9 $_admin_users_menu .= "<br />\n";
10 $_admin_users_menu .= "<br />\n";
11
12 $_admin_users_body = "";
13
14 switch ($subop) {
15 case 1: // users
16 $_admin_users_body .= user_list($db);
17 break;
18 }
19
20 $_admin_users = $_admin_users_menu . $_admin_users_body;
21 ?>
File inc/db.inc.php changed (mode: 100644) (index 3a54b7b..f3d5de1)
... ... function sql_set_error($str)
12 12 { {
13 13 global $sql_error; global $sql_error;
14 14
15 xlog("\tError: $str");
15 16 $sql_error = $str; $sql_error = $str;
16 17 } }
17 18
File inc/login/login.form.php added (mode: 100644) (index 0000000..9c0c8a9)
1 <?php
2
3 $_form = '
4 <form type="post" action="' . $_SERVER['PHP_SELF'] . '">
5 <input type="hidden" name="op" value="' . $op . '">
6 <input type="hidden" name="doit" value="1">
7
8 User: <input type="text" name="user" value="' . $user . '"><br />
9 Password: <input type="password" name="pass" value="' . $pass . '"><br />
10 <input type="submit" value="Go!">
11 ';
12
13
14 ?>
File inc/login/login.php added (mode: 100644) (index 0000000..c832fb0)
1 <?php
2
3 $doit = @intval($_REQUEST['doit']);
4 $user = @$_COOKIE['user'];
5 $pass = "";
6
7 $_login = "";
8
9 if ($doit == 0) {
10 include($INC . "/login/login.form.php");
11 $_login .= $_form;
12 }
13
14 ?>
File inc/repo.inc.php changed (mode: 100644) (index efea197..b730482)
1 1 <?php <?php
2 2 require_once($INC . "/xlog.inc.php"); require_once($INC . "/xlog.inc.php");
3 3 require_once($INC . "/db.inc.php"); require_once($INC . "/db.inc.php");
4 require_once($INC . "/state.inc.php");
4 require_once($INC . "/user.inc.php");
5 5
6 6 $repo_error = ""; $repo_error = "";
7 7
8 8 function repo_set_error($str) function repo_set_error($str)
9 9 { {
10 10 global $repo_error; global $repo_error;
11
12 xlog("\tError: $str");
11 13 $repo_error = $str; $repo_error = $str;
12 14 } }
13 15
 
... ... function repo_allow($db, $repo_id, $uid, $perms)
56 58 return TRUE; return TRUE;
57 59 } }
58 60
61 /*
62 * Add a repository
63 */
64 function repo_create($db, $uid, $name, $public)
65 {
66 xlog("repo_create: name=[$name], public=$public...");
67
68 $name = htmlspecialchars($name);
69 $e_name = sql_escape($db, $name);
70
71 $itime = time();
72
73 $sql = "INSERT INTO repos (uid, name, itime, public)"
74 . " VALUES ($uid, '$e_name', $itime, $public)";
75 $res = sql_query($db, $sql);
76 if ($res === FALSE) {
77 repo_set_error("Cannot insert (" . sql_error() . ")");
78 return FALSE;
79 }
80 sql_free_result($res);
81 }
82
83 /*
84 * List repositories
85 */
86 function repo_list($db, $uid)
87 {
88 xlog("repo_list: uid=$uid...");
89
90 $sql = "SELECT * FROM repos WHERE uid = $uid";
91 $res = sql_query($db, $sql);
92 if ($res === FALSE)
93 return FALSE;
94
95 $ret = "<table>\n";
96 $ret .= "<tr>\n";
97 $ret .= " <th>Name</th>\n";
98 $ret .= " <th>Creation date (UTC)</th>\n";
99 $ret .= " <th>Public</th>\n";
100 $ret .= " <th>Operations</th>\n";
101 $ret .= "</tr>\n";
102 while (($row = sql_fetch_array($res))) {
103 $ret .= "<tr>\n";
104 $ret .= " <td>" . $row['name'] . "</td>\n";
105 $ret .= " <td>" . date("Y-m-d H:i:s", $row['itime']) . "</td>\n";
106 $ret .= " <td>" . ($row['public'] == 1 ? "Yes" : "No") . "</td>\n";
107 $ret .= " <td>-</td>\n";
108 $ret .= "</tr>\n";
109 }
110 $ret .= "</table>\n";
111 sql_free_result($res);
112
113 return $ret;
114 }
59 115 ?> ?>
File inc/repo/repo.form.php added (mode: 100644) (index 0000000..5a5f4f9)
1 <?php
2
3 $_form = '
4 <form type="post" action="' . $_SERVER['PHP_SELF'] . '">
5 <input type="hidden" name="op" value="' . $op . '">
6 <input type="hidden" name="subop" value="' . $subop . '">
7 <input type="hidden" name="doit" value="1">
8
9 <table>
10 <tr>
11 <td>Name:</td>
12 <td>
13 <input type="text" name="name" value="' . $name . '"><br />
14 </td>
15 </tr>
16
17 <tr>
18 <td>Public?</td>
19 <td>
20 <select name="public">
21 <option value="1">Yes</option>
22 <option value="0">No</option>
23 </select>
24 </td>
25 </tr>
26
27 <tr>
28 <td colspan="2"><input type="submit" value="Go!"></td>
29 </tr>
30
31 </table>
32 ';
33
34
35 ?>
File inc/repo/repo.php added (mode: 100644) (index 0000000..fda7752)
1 <?php
2 $subop = @intval($_REQUEST['subop']);
3 $public = @intval($_REQUEST['public']);
4 $name = @$_REQUEST['name'];
5
6 // menu
7 $_url = $_SERVER['PHP_SELF'] . "?op=$op";
8 $_menu = "";
9 $_menu .= "[<a href=\"$_url&amp;subop=1\">Create</a>]";
10 $_menu .= "&nbsp;[<a href=\"$_url&amp;subop=2\">List</a>]";
11 $_menu .= "<br />\n";
12 $_menu .= "<br />\n";
13
14 $_body = "";
15
16 switch ($subop) {
17 case 1: // create
18 if ($doit == 1) {
19 $_r = repo_create($db, $uid, $name, $public);
20 $_body = "bau!";
21 } else {
22 include($INC . "/repo/repo.form.php");
23 $_body .= $_form;
24 }
25 break;
26
27 case 2: //list
28 $_body .= repo_list($db, $uid);
29 break;
30 }
31
32 $_repo = $_menu . $_body;
33 ?>
File inc/sess.inc.php added (mode: 100644) (index 0000000..d5ad020)
1 <?php
2 require_once($INC . "/xlog.inc.php");
3 require_once($INC . "/db.inc.php");
4
5 /*
6 * Add a session
7 */
8 function sess_add($db, $uid, $sid, $session_time)
9 {
10 xlog("sess_add: uid=$uid, sid=$sid, session_time=$session_time.");
11
12 $ip = @$_SERVER['REMOTE_ADDR'];
13 $now = time();
14
15 $sql = "INSERT INTO sess (sid, uid, expire, session_time, ip)"
16 . " VALUES ('$sid', $uid"
17 . ", " . ($now + $session_time) . ", $session_time, '$ip')";
18 $res = sql_query($db, $sql);
19 if ($res === FALSE) {
20 xlog("\tCannot insert (" . sql_error() . ")!");
21 return FALSE;
22 }
23 sql_free_result($res);
24 }
25
26 /*
27 * Returns if a session is still valid. Will return FALSE or uid
28 */
29 function sess_valid($db, $sid)
30 {
31 xlog("sess_valid: sid=$sid...");
32
33 if (empty($sid))
34 return FALSE;
35
36 $uid = FALSE;
37
38 $e_sid = sql_escape($db, $sid);
39
40 $sql = "SELECT uid FROM sess WHERE sid = '$e_sid'";
41 $res = sql_query($db, $sql);
42 if ($res === FALSE) {
43 xlog("\tCannot select (" . sql_error() . ")!");
44 return FALSE;
45 }
46 $row = sql_fetch_array($res);
47 sql_free_result($res);
48 if (isset($row['uid']))
49 $uid = $row['uid'];
50
51 xlog("\tuid=$uid.");
52
53 return $uid;
54 }
55
56 /*
57 * Refresh a session
58 */
59 function sess_update($db, $sid)
60 {
61 xlog("sess_update: sid=$sid...");
62
63 $e_sid = sql_escape($db, $sid);
64
65 $sql = "UPDATE sess SET expire = " . time() . " + session_time"
66 . " WHERE sid = '$e_sid'";
67 $res = sql_query($db, $sql);
68 if ($res === FALSE) {
69 xlog("\tCannot update (" . sql_error() . ")!");
70 return FALSE;
71 }
72 sql_free_result($res);
73
74 return TRUE;
75 }
76
77 /*
78 * Destroy session
79 */
80 function sess_destroy($db, $sid)
81 {
82 xlog("sess_destroy: sid=$sid...");
83
84 $e_sid = sql_escape($db, $sid);
85
86 $sql = "DELETE FROM sess WHERE sid = '$e_sid'";
87 $res = sql_query($db, $sql);
88 if ($res === FALSE) {
89 xlog("\tCannot delete (" . sql_error() . ")!");
90 return FALSE;
91 }
92 sql_free_result($res);
93
94 return TRUE;
95 }
96 ?>
File inc/user.inc.php added (mode: 100644) (index 0000000..ab17c87)
1 <?php
2 require_once($INC . "/xlog.inc.php");
3 require_once($INC . "/db.inc.php");
4 require_once($INC . "/sess.inc.php");
5
6 function gg_user_set_error($str)
7 {
8 global $_gg_user_error;
9
10 xlog("\tError: $str");
11 $_gg_user_error = $str;
12 }
13
14 function gg_user_error()
15 {
16 global $_gg_user_error;
17 return $_gg_user_error;
18 }
19
20 /*
21 * Add a user
22 */
23 function user_add($db, $user, $pass, $email)
24 {
25 xlog("user_add: user=$user, pass=$pass, email=$email...");
26
27 $itime = time();
28 $e_salt = sha1(mt_rand() . microtime(TRUE));
29 $e_sha1pass = sha1($e_salt . "===" . $pass);
30
31 $e_user = sql_escape($db, $user);
32 $e_email = sql_escape($db, $email);
33
34 $sql = "INSERT INTO users (user, salt, pass, email, itime)"
35 . " VALUES ('$e_user', '$e_salt', '$e_sha1pass', '$e_email'"
36 . ", $time)";
37 $res = sql_query($db, $sql);
38 if ($res === FALSE) {
39 gg_user_set_error("Cannot insert user (" . sql_error() . ")!");
40 return FALSE;
41 }
42 sql_free_result($res);
43
44 return TRUE;
45 }
46
47 /*
48 * Delete a user
49 */
50 function user_remove($db, $uid)
51 {
52 $uid = sprintf("%u", $uid);
53
54 $sql = "DELETE FROM users WHERE uid = $uid";
55 $res = sql_query($db, $sql);
56 if ($res === FALSE) {
57 gg_user_set_error("Cannot remove user $uid (" . sql_error() . ")!");
58 return FALSE;
59 }
60 sql_free_result($res);
61
62 return TRUE;
63 }
64
65 /*
66 * Returns info about a user (by uid or user fields)
67 */
68 function user_info($db, $uid, $user)
69 {
70 xlog("user_info: uid=[$uid], user=[$user]...");
71
72 if ($uid > 0) {
73 $add = " AND uid = " . sprintf("%u", $uid);
74 } else {
75 $e_user = sql_escape($db, $user);
76 $add = " AND user = '$e_user'";
77 }
78
79 $sql = "SELECT * FROM users WHERE suspended = 0" . $add;
80 $res = sql_query($db, $sql);
81 if ($res === FALSE) {
82 gg_user_set_error("Cannot get info (" . sql_error() . ")!");
83 return FALSE;
84 }
85 $row = sql_fetch_array($res);
86 sql_free_result($res);
87 if (!isset($row['user'])) {
88 gg_user_set_error("User not found (" . sql_error() . ")!");
89 return FALSE;
90 }
91
92 return $row;
93 }
94
95 /*
96 * Test if login is OK
97 */
98 function user_login($db, $sid)
99 {
100 xlog("user_login: sid=$sid...");
101
102 if (($uid = sess_valid($db, $sid))) {
103 sess_update($db, $sid);
104 return $uid;
105 }
106
107 xlog("No sid! Try with user...");
108 $user = @$_REQUEST['user'];
109 $pass = @$_REQUEST['pass'];
110 if (empty($user) || empty($pass))
111 return FALSE;
112
113 $ui = user_info($db, 0, $user);
114 if ($ui === FALSE) {
115 gg_user_set_error("Invalid user or pass!");
116 return FALSE;
117 }
118 xlog("\tui: " . print_r($ui, TRUE));
119
120 $sha1pass = sha1($ui['salt'] . "===" . $pass);
121 if (strcmp($sha1pass, $ui['pass']) != 0) {
122 gg_user_set_error("Invalid user or pass!");
123 return FALSE;
124 }
125
126 $sid = sha1(mt_rand() . microtime(TRUE));
127 sess_add($db, $ui['uid'], $sid, $ui['session_time']);
128 setcookie("sid", $sid, 0);
129
130 return $ui['uid'];
131 }
132
133 /*
134 * List users
135 */
136 function user_list($db)
137 {
138 xlog("user_list...");
139
140 $sql = "SELECT * FROM users ORDER BY user";
141 $res = sql_query($db, $sql);
142 if ($res === FALSE) {
143 gg_user_set_error("Cannot get info (" . sql_error() . ")!");
144 return FALSE;
145 }
146
147 $ret = "<table>\n";
148 $ret .= "<tr>\n";
149 $ret .= " <th>Name</th>\n";
150 $ret .= " <th>E-mail</th>\n";
151 $ret .= " <th>Creation date</th>\n";
152 $ret .= " <th>Suspended?</th>\n";
153 $ret .= " <th>Session time</th>\n";
154 $ret .= " <th>Last seen</th>\n";
155 $ret .= "</tr>\n";
156 while (($row = sql_fetch_array($res))) {
157 $ret .= "<tr>\n";
158 $ret .= " <td>" . $row['user'] . "</td>\n";
159 $ret .= " <td>" . $row['email'] . "</td>\n";
160 $ret .= " <td>" . date("Y-m-d H:i:s", $row['itime']) . "</td>\n";
161 $ret .= " <td>" . ($row['suspended'] == 0 ? "No" : "Yes") . "</th>\n";
162 $ret .= " <td>" . $row['session_time'] . "s</td>\n";
163 $ret .= " <td>" . date("Y-m-d H:i:s", $row['last_seen']) . "</td>\n";
164 $ret .= "</tr>\n";
165 }
166 $ret .= "</table>\n";
167 sql_free_result($res);
168
169 return $ret;
170 }
171 ?>
File inc/xlog.inc.php changed (mode: 100644) (index a5eb6e3..b073370)
3 3 $_xlog_file = "/tmp/gg.log"; $_xlog_file = "/tmp/gg.log";
4 4 $_xlog_fd = FALSE; $_xlog_fd = FALSE;
5 5
6 function xlog_set_file($file)
7 {
8 global $_xlog_file;
9
10 $_xlog_file = $file;
11 }
12
6 13 function xlog($str) function xlog($str)
7 14 { {
8 15 global $_xlog_file; global $_xlog_file;
File root/index.php changed (mode: 100644) (index 18a639a..0363c36)
... ... $THEME = $ROOT . "/themes/default";
9 9 require_once("/etc/gg/config.php"); require_once("/etc/gg/config.php");
10 10 require_once($INC . "/xlog.inc.php"); require_once($INC . "/xlog.inc.php");
11 11 include_once($INC . "/db.inc.php"); include_once($INC . "/db.inc.php");
12 include_once($INC . "/user.inc.php");
12 13 include_once($INC . "/repo.inc.php"); include_once($INC . "/repo.inc.php");
13 14
15 xlog_set_file("/tmp/gg_web.log");
16
17 $sql_debug = $gg_db_debug;
14 18
15 19 $op = 0; $op = 0;
16 20 if (isset($_REQUEST['op'])) if (isset($_REQUEST['op']))
17 21 $op = intval($_REQUEST['op']); $op = intval($_REQUEST['op']);
22 $doit = @intval($_REQUEST['doit']);
23 $sid = @$_COOKIE['sid'];
24 if (empty($sid))
25 $sid = @$_REQUEST['sid'];
26
27 xlog("Start! op=$op, doit=$doit, sid=$sid...");
18 28
19 29
20 30 $head = ""; $head = "";
 
... ... $head .= " <style type=\"text/css\">" . $css . "</style>\n";
29 39 $head .= "</head>\n"; $head .= "</head>\n";
30 40 $head .= "<body>\n"; $head .= "<body>\n";
31 41
32 $head .= "<h1>GG</h1>\n";
33 $head .= "<hr />\n";
34 42
43 // database connection
44 $db = sql_open($gg_db);
45 if ($db === FALSE)
46 die("Cannot open database!");
47
48 // deal with login
49 $uid = user_login($db, $sid);
50 if (($op == 1) && ($doit == 1) && ($uid == 0))
51 $op = 0;
52
53 // deal with logout
54 if ($op == 9) {
55 sess_destroy($db, $sid);
56 $uid = "";
57 }
35 58
36 59 // menu // menu
37 60 $url = $_SERVER['PHP_SELF'] . "?a=1"; $url = $_SERVER['PHP_SELF'] . "?a=1";
38 61 $menu = ""; $menu = "";
62 $ui = user_info($db, $uid);
63 if ($ui === FALSE)
64 $u = "Not logged in";
65 else
66 $u = $ui['user'];
67 $menu .= "[$u]<br />\n";
39 68 $menu .= "[<a href=\"$url&amp;op=1\">Login</a>]"; $menu .= "[<a href=\"$url&amp;op=1\">Login</a>]";
40 69 $menu .= "&nbsp;[<a href=\"$url&amp;op=2\">Repositories</a>]"; $menu .= "&nbsp;[<a href=\"$url&amp;op=2\">Repositories</a>]";
41 70 $menu .= "&nbsp;[<a href=\"$url&amp;op=3\">Admin</a>]"; $menu .= "&nbsp;[<a href=\"$url&amp;op=3\">Admin</a>]";
42 $menu .= "<br />\n";
71 $menu .= "&nbsp;[<a href=\"$url&amp;op=9\">Logout</a>]";
43 72
44 73
45 74 $body = ""; $body = "";
46 75 switch ($op) { switch ($op) {
47 76 case 1: case 1:
48 77 include($INC . "/login/login.php"); include($INC . "/login/login.php");
78 $body .= $_login;
49 79 break; break;
50 80
51 81 case 2: case 2:
52 82 include($INC . "/repo/repo.php"); include($INC . "/repo/repo.php");
83 $body .= $_repo;
53 84 break; break;
54 85
55 86 case 3: case 3:
56 87 include($INC . "/admin/admin.php"); include($INC . "/admin/admin.php");
88 $body .= $_admin;
57 89 break; break;
58 90 } }
59 91
 
... ... $body .= "</body>";
61 93 $body .= "</html>\n"; $body .= "</html>\n";
62 94
63 95 echo $head . $menu . "<br />\n" . $body; echo $head . $menu . "<br />\n" . $body;
96
97 xlog("Done!");
64 98 ?> ?>
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master