$v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][stripslashes($k)] = $v; $process[] = &$process[$key][stripslashes($k)]; } else { $process[$key][stripslashes($k)] = stripslashes($v); } } } unset($process); } if(stripos($_SERVER['REQUEST_URI'], '@') !== FALSE || stripos(urldecode($_SERVER['REQUEST_URI']), '@') !== FALSE) { header("Location: ."); die('Please wait...'); } session_start(); header('Content-Type: text/html; charset=utf-8'); ini_set('display_errors', false); $missing_configs = array(); $session_prefix = crc32(__FILE__); $disable_curl = false; $verify_peer = true; $local_cafile = false; require_once("config.php"); if(!isset($disable_admin_panel)) { $disable_admin_panel = false; $missing_configs[] = array( "name" => "disable_admin_panel", "default" => "false", "desc" => "Allows to disable Admin Panel for increased security" ); } if(!isset($connection_options)) { $connection_options = array( 'disable_curl' => $disable_curl, 'local_cafile' => $local_cafile, 'verify_peer' => $verify_peer, 'force_ipv4' => false ); } if(!isset($connection_options['verify_peer'])) { $connection_options['verify_peer'] = $verify_peer; } if (!isset($display_errors)) $display_errors = false; ini_set('display_errors', $display_errors); if($display_errors) error_reporting(-1); if(array_key_exists('HTTP_REFERER', $_SERVER)) { $referer = $_SERVER['HTTP_REFERER']; } else { $referer = ""; } $host = parse_url($referer, PHP_URL_HOST); if($_SERVER['HTTP_HOST'] != $host) { if ( array_key_exists("address_input_name", $_SESSION) && array_key_exists($_SESSION["address_input_name"], $_POST) ) { $_POST[$_SESSION['address_input_name']] = ""; if ($display_errors) trigger_error("REFERER CHECK FAILED, ASSUMING CSRF!"); } } require_once('libs/faucetbox.php'); try { $sql = new PDO($dbdsn, $dbuser, $dbpass, array(PDO::ATTR_PERSISTENT => true, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); } catch(PDOException $e) { die("Can't connect to database. Check your config.php."); } $template_updates = array( array( "test" => "/address_input_name/", "message" => "Name of the address field has to be updated. Please follow these instructions" ), array( "test" => "/libs\/mmc\.js/", "message" => "Add ".htmlspecialchars('')." after jQuery in <head> section." ), array( "test" => "/honeypot/", "message" => "Add
".htmlspecialchars('')."
".htmlspecialchars('')."
near the input with name ".htmlspecialchars('')."." ) ); $db_updates = array( 15 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('version', '15');"), 17 => array("ALTER TABLE `Faucetinabox_Settings` CHANGE `value` `value` TEXT NOT NULL;", "INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('balance', 'N/A');"), 33 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('ayah_publisher_key', ''), ('ayah_scoring_key', '');"), 34 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('custom_admin_link_default', 'true')"), 38 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('reverse_proxy', 'none')", "INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('default_captcha', 'recaptcha')"), 41 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('captchme_public_key', ''), ('captchme_private_key', ''), ('captchme_authentication_key', ''), ('reklamper_enabled', '')"), 46 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('last_balance_check', '0')"), 54 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('funcaptcha_public_key', ''), ('funcaptcha_private_key', '')"), 55 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('block_adblock', ''), ('button_timer', '0')"), 56 => array("INSERT IGNORE INTO `Faucetinabox_Settings` (`name`, `value`) VALUES ('ip_check_server', ''),('ip_ban_list', ''),('hostname_ban_list', ''),('address_ban_list', '')"), 58 => ["DELETE FROM `Faucetinabox_Settings` WHERE `name` IN ('captchme_public_key', 'captchme_private_key', 'captchme_authentication_key', 'reklamper_enabled')"], ); $default_data_query = << Faucet in a Box

Welcome to your Faucet in a Box Admin Page!


<:: content ::>
TEMPLATE; $admin_template = <<