コード例 #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";
 }