Advertisement
Guest User

Untitled

a guest
May 4th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. SITE ERROR [when logging in or registering]
  2. ------------------------------------------
  3.  
  4. Critical Error
  5.  
  6. File: C:\wamp\www\home\includes\mysql.php
  7. Line: 70
  8.  
  9. Message: Error in query with Resource id #13: Unknown column 'vpoints' in 'field list'
  10. Suggestion: Check the query
  11.  
  12. Date: Sunday 07th February 2010 11:43:56 PM
  13.  
  14.  
  15. [SCRIPT]--------- (it says mysql.php but it uses the usp.php for this part (directory/includes/ucp.php)
  16.  
  17.  
  18.  
  19. <?php
  20. if( !defined( "IPC_LOADED" ) ) die ( "File Protected" );
  21.  
  22. class ucp {
  23. var $active, $remember, $info = array();
  24. function __construct() {
  25. if(isset($_SESSION['ulogged_in'])) {
  26. if($_SESSION['ulogged_in'] === true) {
  27. foreach($_SESSION as $key=>$val) {
  28. $this->info[$key] = $val;
  29. }
  30. }
  31. }
  32. }
  33. function login($username, $password) {
  34. global $host, $user, $pass, $db;
  35. $encrypted_pass = $this->get_pass($username, $password);
  36. $account = new mysql;
  37. $account->connect($host['accounts'], $user['accounts'], $pass['accounts'], true, $db['accounts']);
  38. $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");
  39. if($account->num_rows(1, 1)) {
  40. $info = $account->fetch_array($query);
  41. if($info['banned'] != '0') return false;
  42. $_SESSION['ulogged_in'] = true;
  43. $this->active = true;
  44. $this->info['acct'] = $info['acct'];
  45. $this->info['login'] = $info['login'];
  46. $this->info['password'] = $info['password'];
  47. $this->info['SessionKey'] = $info['SessionKey'];
  48. $this->info['gm'] = $info['gm'];
  49. $this->info['flags'] = $info['flags'];
  50. $this->info['banned'] = $info['banned'];
  51. $this->info['banreason'] = $info['banreason'];
  52. $this->info['lastlogin'] = $info['lastlogin'];
  53. $this->info['lastip'] = $info['lastip'];
  54. $this->info['forcelanguage'] = $info['forcelanguage'];
  55. $this->info['email'] = $info['email'];
  56. $this->info['vpoints'] = (!empty($info['vpoints']) ? $info['vpoints'] : ' 0 ');
  57. $this->update();
  58. return true;
  59. }
  60. return false;
  61. }
  62. function update() {
  63. global $tmp;
  64. if(!$this->active) return false;
  65. foreach($this->info as $key=>$val) {
  66. $_SESSION[$key] = $val;
  67. }
  68. }
  69. function get_pass($username, $password) {
  70. $username = strtoupper($username);
  71. $password = strtoupper($password);
  72. return sha1($username.':'.$password);
  73. }
  74. }
  75. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement