Esempio n. 1
0
 public static function getPageActivity($page)
 {
     $rows = Queries::getRowsWithValue(Database::$table_track, "page", $page);
     foreach ($rows as $row) {
         $ips[] = $row['ip'];
         $dates[] = $row['date'];
     }
     return array($ips, $dates);
 }
Esempio n. 2
0
 public static function removeinvite($username, $password, $guildname, $username2)
 {
     if (User::isValidUser($username, $password)) {
         if (User::isGuildMaster($username, $guildname)) {
             $rows = Queries::getRowsWithValue(Database::$table_invites, "guildname", $guildname);
             for ($i = 0; $i < sizeof($rows); $i++) {
                 if ($rows[$i]['username'] == $username2) {
                     if (Queries::deleteWithTwoVals(Database::$table_invites, "username", $username2, "guildname", $guildname)) {
                         return "success";
                     }
                     return "failed to access database";
                 }
             }
             return "request not found";
         }
         return "only guildmaster can do this";
     }
     return "invalid user";
 }