public function unblock($username) { db_set("Registered_User", "blocked_date=NULL", "username", $username); $this->blocked_date = null; }
<?php // misc preparation session_start(); define('BASEPAGE', basename($_SERVER['SCRIPT_NAME'])); define('SESSION_NAME', 'GAME_142_MPP'); define('TABLE_PLAYERS', '142_users'); define('TABLE_GAMES', '142_tables'); define('TABLE_ROUNDS', '142_rounds'); define('TABLE_CARDS', '142_cards'); define('TABLE_PLAYERS_IN_GAMES', '142_players'); define('TABLE_CARDS_IN_GAMES', '142_cards_in_games'); define('MAX_PLAYERS_EVER', 10); require_once 'inc.db_mysql.php'; db_set(db_connect('localhost', 'usager', 'usager', 'games')); // CLEAN UP // #db_delete(TABLE_PLAYERS_IN_GAMES, 'last_online+16 < '.time()); // Two stages for every user: logged in, not logged in // not logged in if (!logincheck()) { if (isset($_POST['username'], $_POST['password'])) { $szMessage = 'FOUT'; $arrUser = db_select(TABLE_PLAYERS, "username = '******'username']) . "' AND password = MD5(CONCAT(id,':" . addslashes($_POST['password']) . "'))"); if (1 == count($arrUser)) { $arrSession = array('hash' => randString(20), 'ip' => ifsetor($_SERVER['REMOTE_ADDR'], ""), 'uid' => $arrUser[0]['id']); db_update(TABLE_PLAYERS, array('hash' => $arrSession['hash']), "id = '" . $arrSession['uid'] . "'"); $_SESSION[SESSION_NAME] = $arrSession; $szMessage = 'INGELOGD'; } header("Location: " . BASEPAGE . "?msg=" . $szMessage); exit;
public function unblock() { db_set("Forum_Post", "blocked=false", "post_id", $this->post_id); $this->blocked = false; }
public function unblock() { db_set("Document", "blocked=false", "doc_id", $this->doc_id); $this->blocked = false; }
public function unblock($topic_id) { db_set("Forum_Topic", "blocked=0", "topic_id", $topic_id); $this->blocked = false; }
public function unblock() { db_set("Comment", "blocked=false", "comment_id", $this->comment_id); $this->blocked = false; }
<?php require_once 'inc.db_mysql.php'; define('MYSQL_HOST', 'localhost'); define('MYSQL_USER', 'usager'); define('MYSQL_PASS', 'usager'); define('MYSQL_DATABASE', 'pornstars'); db_set(db_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DATABASE));