bind("user_id",$_SESSION["user_id"]); $db->bind("password",$password); $profile = $db->query("SELECT * FROM users WHERE user_id=:user_id AND password = :password"); if(count($profile)>0){ return true; }else{ return false; } } function getActiveGroup($user_id,$data){ global $db; $db->bind("user_id",$user_id); $user = $db->query("SELECT * FROM users WHERE user_id=:user_id"); // GET GROUPS NAME $db->bind("group_id",$user[0]["group_id"]); $groups = $db->query("SELECT * FROM groups WHERE group_id = :group_id"); return $groups[0][$data]; } function deleteDir($dirPath) { if (! is_dir($dirPath)) { throw new InvalidArgumentException("$dirPath must be a directory"); } if (substr($dirPath, strlen($dirPath) - 1, 1) != '/') { $dirPath .= '/'; } $files = glob($dirPath . '*', GLOB_MARK); foreach ($files as $file) { if (is_dir($file)) { $this->deleteDir($file); } else { unlink($file); } } rmdir($dirPath); return ''; } function lastLoginAttempt($max){ global $db; $db->bind("user_id",$_SESSION["user_id"]); $db->bind("limit",$max); $log = $db->query("SELECT * FROM login_log WHERE user_id = :user_id ORDER BY id DESC LIMIT :limit");?>
| IP Address | Status | Date & Time | Action |
|---|---|---|---|
| SUCCESS" : "FAILED"); ?> | &map_source=1&overview_map=1&lang=1&map_type=1&zoom_level=7" target="_blank">TRACK LOCATION |