Changeset 14 for trunk/class
- Timestamp:
- Jun 19, 2012, 12:09:30 PM (13 years ago)
- Location:
- trunk/class
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/class/Gui.php
r11 r14 49 49 50 50 //generate and shows active page 51 $this->Pages[$this->ActivePage]->Show();51 if (isset($this->Pages[$this->ActivePage])) $this->Pages[$this->ActivePage]->Show(); 52 52 53 53 $this->ShowFooter(); -
trunk/class/Message.php
r12 r14 33 33 if (isset($arraytest[$par3])) $this->par3 = $arraytest[$par3]; 34 34 35 $this->Activate();36 35 } 37 36 -
trunk/class/Messages.php
r12 r14 34 34 public function RegMess($User) { 35 35 $Login = new Message('post','LoginUser',$User,'Login','LoginUser','LoginPass'); 36 36 $Login->Activate(); 37 $Regin = new Message('post','RegUser',$User,'Register','Email','RegUser','RegPass','RegPass2'); 38 echo ($Regin->Activate()); 37 39 } 38 40 -
trunk/class/User.php
r11 r14 32 32 function Login($Name, $Password) 33 33 { 34 ECHO 'TES';35 34 $DbResult = $this->Database->query('SELECT `ID` FROM `User` WHERE LOWER(`Name`) = LOWER("'.$Name.'") AND `Pass` = '.$this->CryptPasswordSQL('"'.$Password.'"', '`Salt`')); 36 35 if($DbResult->num_rows > 0) … … 42 41 $this->UpdateState(); 43 42 } else $ŧhis->Role = LICENCE_ANONYMOUS; 43 } 44 45 function Register($Email,$RegUser,$RegPass,$RegPass2) 46 { 47 48 if ($RegPass != $RegPass2) return -1; 49 50 $Salt = $this->GetPasswordSalt(); 51 52 $DbResult = $this->Database->insert('User', array( 53 'Email' => '"'.$Email.'"', 54 'Name' => '"'.$RegUser.'"', 55 'Pass' => $this->CryptPasswordSQL('"'.$RegPass.'"', '"'.$Salt.'"'), 56 'LastIP' => '"'.$_SERVER['REMOTE_ADDR'].'"', 57 'Salt' => '"'.$Salt.'"', 58 ) 59 ); 60 61 62 return $DbResult; 63 44 64 } 45 65 … … 57 77 // Security: Password and Salt hash should not be loaded to variables 58 78 $this->Id = $User['ID']; 59 $this->Team = $User['Team'];60 79 $this->Name = $User['Name']; 61 $this->Role = $User['GM'];80 $this->Role = LICENCE_USER; 62 81 $this->Email = $User['Email']; 63 82 } … … 86 105 $this->Name = 'anonymous'; 87 106 $this->Role = LICENCE_ANONYMOUS; 88 $this->Language = 1;89 $this->Redirecting = 1;90 $this->Team = 0;91 107 $this->Email = ''; 92 108 }
Note:
See TracChangeset
for help on using the changeset viewer.