예제 #1
0
파일: user.php 프로젝트: NoxNode/gamesite
 public static function setrank($username, $password, $guildname, $username2, $rank)
 {
     if (User::isValidUser($username, $password)) {
         if (User::isValidGuildname($guildname)) {
             if (User::isGuildMaster($username, $guildname)) {
                 if (User::isInGuild($username2, $guildname)) {
                     if (Queries::setValueWithTwoConditions(Database::$table_members, "username", $username2, "guildname", $guildname, "rank", $rank)) {
                         return "success";
                     }
                     return "failed to access database";
                 }
                 return "username2 isn't in guildname";
             }
             return "only guildmaster can do this";
         }
         return "invalid guildname";
     }
     return "invalid user";
 }