<?php

require_login();
require __DIR__ . "/../layout/templates.php";
// for crypto_address() etc
$user = get_user(user_id());
require_user($user);
$messages = array();
$errors = array();
$currency = require_post("currency");
$account_data = get_blockchain_wizard_config($currency);
if (!isset($account_data['titles'])) {
    $account_data['titles'] = $account_data['title'] . "s";
}
// process edit
if (require_post("title", false) !== false && require_post("id", false)) {
    $id = require_post("id");
    $title = require_post("title");
    if (!is_valid_title($title)) {
        $errors[] = "'" . htmlspecialchars($title) . "' is not a valid " . htmlspecialchars($account_data['title']) . " title.";
    } else {
        $q = db()->prepare("UPDATE " . $account_data['table'] . " SET title=? WHERE user_id=? AND id=?");
        $q->execute(array($title, user_id(), $id));
        $messages[] = t("Updated :title title.", array(':title' => htmlspecialchars($account_data['title'])));
        // redirect to GET
        set_temporary_messages($messages);
        redirect(url_for("wizard_accounts_addresses#wizard_" . $currency));
    }
}
// process add
if (require_post("add", false) && require_post("address", false)) {
Exemple #2
0
 *
 * Distributed under the GPL - see LICENSE
 *
 */
fof_repair_drain_bamage();
if (!file_exists(dirname(__FILE__) . '/fof-config.php')) {
    echo "You will first need to create a fof-config.php file.  Please copy fof-config-sample.php to fof-config.php and then update the values to match your database settings.";
    die;
}
require_once "fof-config.php";
require_once "fof-db.php";
require_once "classes/fof-prefs.php";
fof_db_connect();
if (!$fof_installer) {
    if (!$fof_no_login) {
        require_user();
        $fof_prefs_obj =& FoF_Prefs::instance();
    } else {
        $fof_user_id = 1;
        $fof_prefs_obj =& FoF_Prefs::instance();
    }
    ob_start();
    fof_init_plugins();
    ob_end_clean();
}
require_once 'simplepie/simplepie.inc';
function fof_set_content_type()
{
    static $set;
    if (!$set) {
        header("Content-Type: text/html; charset=utf-8");