private function login($value) { $query = "SELECT * FROM `login` WHERE `username` = ?"; $result = $this->query_db($query, $value['userName']); $row = mysqli_fetch_array($result); $q2 = "SELECT `level` FROM `DCCN` WHERE `id` = ?"; $r2 = $this->query_db($q2, $row['id']); $ro2 = mysqli_fetch_array($r2); if (sizeof($row) > 0 && $ro2['level'] != '') { if ($value['pass'] === $row['password']) { $oScon = new sessionConn(); $oka = $oScon->session_IDLU_setter($row['id'], $value['userName'], $ro2['level']); if ($oka == true) { return "true"; } else { return "false"; } } else { return "false"; } } else { return "false"; } }
private function logOut() { $sCon = new sessionConn(); $sCon->sessionDest(); return $sCon->session_check(); }