function getPass($username) { global $nukepre, $nuke, $DATABASE, $SERVER, $_COOKIE; mysql_close(); mysql_connect($nuke['DBHOST'], $nuke['UNAME'], $nuke['PWORD']); mysql_select_db($nuke['DBNAME']); $q = DoQuery("SELECT user_password FROM {$nukepre}users WHERE username='******'"); echo mysql_error(); $pass = Do_Fetch_Row($q); mysql_close(); DoConnect($DATABASE['HOST'], $DATABASE['USER'], $DATABASE['PASS']); DoSelectDb($DATABASE['DATABASE']); $q = DoQuery("SELECT * FROM {$SERVER['TBL_PREFIX']}users WHERE username='******'"); $row = Do_Fetch_Row($q); if ($row[0] == "" && $_COOKIE['X2CHATP'] == $pass[0]) { DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}users VALUES('0','{$username}','','','1','','','','','','','','','14000,1000,1,1,0,3,1,0,0,1')"); } return $pass[0]; }
function getPass($username) { global $INFO, $DATABASE, $_COOKIE, $SERVER; mysql_close(); mysql_connect($INFO['sql_host'], $INFO['sql_user'], $INFO['sql_pass']); mysql_select_db($INFO['sql_database']); $q = DoQuery("SELECT password FROM {$INFO[sql_tbl_prefix]}members WHERE name='{$username}'"); echo mysql_error(); $pass = Do_Fetch_Row($q); mysql_close(); DoConnect($DATABASE['HOST'], $DATABASE['USER'], $DATABASE['PASS']); DoSelectDb($DATABASE['DATABASE']); $q = DoQuery("SELECT * FROM {$SERVER['TBL_PREFIX']}users WHERE username='******'"); $row = Do_Fetch_Row($q); if ($row[0] == "" && $_COOKIE['X2CHATP'] == $pass[0]) { DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}users VALUES('0','{$username}','','','1','','','','','','','','','14000,1000,1,1,0,3,1,0,0,1')"); } return $pass[0]; }
function getPass($username) { global $DATABASE, $_COOKIE, $SERVER, $xmb_host, $xmb_user, $xmb_password, $xmb_db, $xmb_prefix; mysql_close(); @DoConnect("{$xmb_host}", "{$xmb_user}", "{$xmb_password}"); @DoSelectDb("{$xmb_db}"); $q = DoQuery("SELECT password FROM {$xmb_prefix}members WHERE username='******'"); echo mysql_error(); $pass = Do_Fetch_Row($q); mysql_close(); DoConnect($DATABASE['HOST'], $DATABASE['USER'], $DATABASE['PASS']); DoSelectDb($DATABASE['DATABASE']); $q = DoQuery("SELECT * FROM {$SERVER['TBL_PREFIX']}users WHERE username='******'"); $row = Do_Fetch_Row($q); if ($row[0] == "" && $_COOKIE['X2CHATP'] == $pass[0]) { DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}users VALUES('0','{$username}','','','1','','','','','','','','','14000,1000,1,1,0,3,1,0,0,1')"); echo mysql_error(); } return $pass[0]; }
$pass1 = doXEncrypt($pass1); if (!isset($error)) { DoConnect($DATABASE['HOST'], $DATABASE['USER'], $DATABASE['PASS']); DoSelectDb($DATABASE['DATABASE']); $settings = "14000,1000,1,1,0,3,1,0,0,1"; DoQuery("DELETE FROM {$SERVER['TBL_PREFIX']}users WHERE username='******' AND level='1'"); $err = DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}users \nVALUES('0','{$username}','{$pass1}','{$email}','5','{$avatar}','{$realname}','{$location}',\n'{$hobbies}','{$bio}','','1','0','{$settings}')"); if ($err == 1) { $body = "{$txt['246']}<Br>"; } else { $body = "{$txt['247']}<Br>{$err}<Br><Br>"; $error = 1; } if (@$error != 1) { $body .= "<Br>{$txt['250']}"; DoConnect($DATABASE['HOST'], $DATABASE['USER'], $DATABASE['PASS']); DoSelectDb($DATABASE['DATABASE']); DoQuery("DELETE FROM {$SERVER['TBL_PREFIX']}settings"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','ed_sounds','0')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','ed_chat','0')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','ed_registration','0')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','ed_newroom','0')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','ed_newroomprivate','0')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','ed_avatars','0')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','exp_room','600')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','exp_user','600')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','exp_msg','600')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','max_inrooms','100')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','max_rooms','100')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','max_total','500')"); DoQuery("INSERT INTO {$SERVER['TBL_PREFIX']}settings VALUES('0','max_idletime','240')");
function getPass($username) { global $table_prefix, $DATABASE; @DoConnect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); @DoSelectDb(XOOPS_DB_NAME); $q = DoQuery("SELECT pass FROM {$table_prefix}users WHERE uname='{$username}'"); $pass = Do_Fetch_Row($q); DoConnect($DATABASE['HOST'], $DATABASE['USER'], $DATABASE['PASS']); DoSelectDb($DATABASE['DATABASE']); if ($pass[0] == "") { $q = DoQuery("SELECT email,password FROM {$SERVER['TBL_PREFIX']}users WHERE username='******'"); $row = Do_Fetch_Row($q); if ($row[0] == "Guest") { $pass[0] = $row[1]; } } return $pass[0]; }
<?php /********************************************************************** * * load.php - the load all the kernel files * **********************************************************************/ /* time is money */ $query_time = explode(' ',microtime()); $start_time = $query_time[1].substr($query_time[0],1); /* use theend(); to end it :) */ /* Load all other files */ include "config.php"; include "functions.php"; // Let`s DO it... the connection of course DoConnect(); header('Content-type: text/html; charset=utf-8');
// // // Removing this copyright and/or any other // // X7 Group or X7 chat copyright from any // // of the files included in this distribution // // is forbidden and doing so will terminate // // your right to use this software. // // // /////////////////////////////////////////////////////////////// $donotincluebase = 1; if ($isbase == "notset") { require "../../config.php"; } else { require "../config.php"; } // Handle PHPBB login data @DoConnect($dbhost, $dbuser, $dbpasswd); @DoSelectDb($dbname); $q = DoQuery("SELECT config_value FROM {$table_prefix}config WHERE config_name='cookie_name'"); $cname = Do_Fetch_Row($q); if (isset($_COOKIE["{$cname['0']}_sid"])) { $cvalue = $_COOKIE["{$cname['0']}_sid"]; $q = DoQuery("SELECT session_user_id,session_logged_in FROM {$table_prefix}sessions WHERE session_id='{$cvalue}'"); $cinfo = Do_Fetch_Row($q); if ($cinfo[0] != "") { $suid = $cinfo[0]; if ($cinfo[1] == 1) { $q = DoQuery("SELECT username,user_password FROM {$table_prefix}users WHERE user_id='{$suid}'"); $phpbbname = Do_Fetch_Row($q); unset($doxlogin); @setcookie("X2CHATU", $phpbbname[0], time() + 14000, "{$SERVER['PATH']}"); @setcookie("X2CHATP", $phpbbname[1], time() + 14000, "{$SERVER['PATH']}");