_nick = $name; $this->_pass = $pass; } public function Login() { if(empty($this->_nick or empty ($this->_pass)) { header("Locantion: ".Conectar::ruta()."?acc=index&v=1"); exit; }else{ $pass_end = sha1($this->_pass, true); $pass_encript = base64_encode($pass_end); parent::Conect_LS(); $sql_qry = sprintf ( "SELECT name,password FROM account_data WHERE name=%s AND password=%s", parent::Anti_Sql($this->_nick), parent::Anti_Sql($pass_encript) ); $res = mysql_query($sql_qry); if(mysql_num_rows($res == 0) { header("Locantion: ".Conectar::ruta()."?acc=index&v=2"); exit; }else{ if($reg = mysql_fetch_array($res)) { $_SESSION["ses_nick"] = $reg[$this->_nick]; $_SESSION["ses_pass"] = $reg[$pass_encript]; header("Location: ".Conectar::ruta()."?acc=profile"); exit; } } } } } ?>