Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SITE ERROR [when logging in or registering]
- ------------------------------------------
- Critical Error
- File: C:\wamp\www\home\includes\mysql.php
- Line: 70
- Message: Error in query with Resource id #13: Unknown column 'vpoints' in 'field list'
- Suggestion: Check the query
- Date: Sunday 07th February 2010 11:43:56 PM
- [SCRIPT]--------- (it says mysql.php but it uses the usp.php for this part (directory/includes/ucp.php)
- <?php
- if( !defined( "IPC_LOADED" ) ) die ( "File Protected" );
- class ucp {
- var $active, $remember, $info = array();
- function __construct() {
- if(isset($_SESSION['ulogged_in'])) {
- if($_SESSION['ulogged_in'] === true) {
- foreach($_SESSION as $key=>$val) {
- $this->info[$key] = $val;
- }
- }
- }
- }
- function login($username, $password) {
- global $host, $user, $pass, $db;
- $encrypted_pass = $this->get_pass($username, $password);
- $account = new mysql;
- $account->connect($host['accounts'], $user['accounts'], $pass['accounts'], true, $db['accounts']);
- $query = $account->query("SELECT acct, login, password, SessionKey, gm, flags, banned, banreason, lastlogin, lastip, forcelanguage, email, vpoints FROM accounts WHERE login = '{$username}' AND encrypted_password = '{$encrypted_pass}' LIMIT 1");
- if($account->num_rows(1, 1)) {
- $info = $account->fetch_array($query);
- if($info['banned'] != '0') return false;
- $_SESSION['ulogged_in'] = true;
- $this->active = true;
- $this->info['acct'] = $info['acct'];
- $this->info['login'] = $info['login'];
- $this->info['password'] = $info['password'];
- $this->info['SessionKey'] = $info['SessionKey'];
- $this->info['gm'] = $info['gm'];
- $this->info['flags'] = $info['flags'];
- $this->info['banned'] = $info['banned'];
- $this->info['banreason'] = $info['banreason'];
- $this->info['lastlogin'] = $info['lastlogin'];
- $this->info['lastip'] = $info['lastip'];
- $this->info['forcelanguage'] = $info['forcelanguage'];
- $this->info['email'] = $info['email'];
- $this->info['vpoints'] = (!empty($info['vpoints']) ? $info['vpoints'] : ' 0 ');
- $this->update();
- return true;
- }
- return false;
- }
- function update() {
- global $tmp;
- if(!$this->active) return false;
- foreach($this->info as $key=>$val) {
- $_SESSION[$key] = $val;
- }
- }
- function get_pass($username, $password) {
- $username = strtoupper($username);
- $password = strtoupper($password);
- return sha1($username.':'.$password);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement