public function page() { if (count(\H::getJSONData("keyrings")) != 0) { $this->set = true; } return "auto"; }
public function addPage($site, $name, $page) { $data = \H::getJSONData("{$site}Pages"); var_dump($data); $name = strtolower($name); $pages[$name] = $page; saveData("{$site}Pages", json_encode($pages)); return true; }
<div class='contents'> <h1>KeyRing</h1> <p>Store your sensitive informations securely.</p> <?php if ($this->set) { echo "<div style='margin-left: 20px;'>"; foreach (\H::getJSONData("keyrings") as $master => $null) { $name = getData("master_{$master}" . "_name"); echo $this->l("/view?id={$master}", $name, "class='button red'") . "<cl/>"; } echo "</div>"; } else { sme("No KeyRings", "You haven't created any keyrings"); } ?> <a href='<?php echo APP_URL; ?> /new-master' class='button green'>Create A New KeyRing</a> </div>
public function load() { $dbinfo = \H::getJSONData("credentials"); $this->table = $dbinfo['db_table']; require_once APP_DIR . "/src/Inc/logsys.config.php"; }
<div class='contents'> <h1>KeyRing</h1> <?php $id = trim($_GET['id']); $keyrings = \H::getJSONData("keyrings"); if (isset($keyrings[])) { } ?> </div>
<?php if (isset($_POST['network']) && isset($_POST['id']) && isset($this->available_networks[$_POST['network']])) { H::saveJSONData("accounts", array($_POST['network'] => array($_POST['id'] => array(false)))); var_dump(H::getJSONData("accounts")); }