示例#1
0
            }
        }
    } else {
        if ($_POST['random_id'] != '') {
            $random = new LoomRandom();
            $id = $random->random_id();
            $idhash = '';
            $passphrase = '';
        } elseif ($_POST['id_hash'] != '') {
            $idhash = $client->sha256($client->hex2bin($id));
        } elseif ($_POST['random_passphrase'] != '') {
            require_once "Diceware.php";
            if (!isset($diceware)) {
                $diceware = new Diceware();
            }
            $passphrase = $diceware->random_words(5);
            $id = '';
            $idhash = '';
        } elseif ($_POST['hash_passphrase'] != '') {
            $hash = $client->sha256($passphrase);
            $id = $client->hash2location($hash);
            $idhash = '';
        }
    }
}
if ($page == 'grid') {
    print_grid();
} else {
    if ($page == 'archive') {
        print_archive();
    } else {