<?php
rg_log("/inc/keys/keys");
$_keys = "";
if ($rg_ui['uid'] == 0) {
$_keys .= "You do not have access here!";
return;
}
$key = rg_var_str("key");
$key = preg_replace("|[^/A-Za-z0-9 @/+_\.\=,-]|", "", $key);
$key_id = rg_var_uint("key_id");
// menu
$_url = rg_re_url($op);
$second_menu = array(
"add_key" => array(
"text" => "Add key",
"url" => "&subop=1"
),
"list_keys" => array(
"text" => "List keys",
"url" => "&subop=2"
)
);
$_body = "";
$errmsg = array();
switch ($subop) {
case 1: // add
if ($doit == 1) {
$_r = rg_keys_add($db, $rg_ui, $key);
if ($_r === FALSE)
$_body .= rg_keys_error();
else
$_body = "OK!";
}
include($INC . "/keys/add.form.php");
$_body .= $_form;
break;
case 2: // list
if (rg_var_uint("delete") == 1) {
if (rg_keys_remove($db, $rg_ui, $key_id) === FALSE)
$_body .= "Bad: " . rg_keys_error() . "!<br />\n";
}
$_body .= rg_keys_list($db, $rg_ui, $_url . "&subop=2");
break;
}
$_keys .= $_body;
?>
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