コード例 #1
0
ファイル: userpanel_gserver.php プロジェクト: Eun/developer
                     $name = trim($line, '[]');
                     $ex = preg_split("/\\=/", $name, -1, PREG_SPLIT_NO_EMPTY);
                     $mods[] = trim($ex[0]);
                 }
             }
             $workshopCollection = false;
             if ($row['workShopAllowed'] == 'Y') {
                 $workshopCollection = $row['workshopCollection'];
             }
             $mapGroupsAvailable = array();
             if (!in_array($row['defaultMapGroup'], array('', null))) {
                 if ($ftp->loggedIn) {
                     $serverTemplate = ($row['servertemplate'] == 1 or $protected == 'Y') ? $row['shorten'] : $row['shorten'] . '-' . $row['servertemplate'];
                     $ftp->downloadToTemp($pserverFolder . $gsIP . '_' . $gsPort . '/' . $serverTemplate . '/' . $row['modfolder'] . '/', 0, array('gamemodes.txt', 'gamemodes_server.txt'));
                     $mapGroupsAvailable = $ftp->getMapGroups();
                     $ftp->removeTempFiles();
                 }
             }
             $map = !in_array($row['defaultmap'], array('', null)) ? $row['map'] : null;
             $table[] = array('id' => $row['id'], 'cmd' => $row['cmd'], 'fps' => $row['fps'], 'tic' => $row['tic'], 'map' => $map, 'workShop' => $row['workShop'], 'workshopCollection' => $workshopCollection, 'webapiAuthkey' => $row['dwebapiAuthkey'], 'mapGroup' => $row['mapGroup'], 'defaultMapGroup' => $row['defaultMapGroup'], 'mapGroupsAvailable' => $mapGroupsAvailable, 'servertemplate' => $row['servertemplate'], 'userfps' => $row['userfps'], 'usertick' => $row['usertick'], 'usermap' => $row['usermap'], 'description' => $row['description'], 'option' => $option, 'gamebinary' => $row['gamebinary'], 'upload' => $upload, 'uploaddir' => $uploaddir, 'anticheat' => $anticheat, 'anticheatsoft' => $anticheatsoft, 'eac' => $eac, 'shorten' => $gshorten, 'mod' => $mod, 'mods' => $mods, 'displayNone' => $displayNone, 'displayNoneBoot' => $displayNoneBoot);
             $i++;
         }
         $ftp = null;
     }
     $template_file = $i > 0 ? 'userpanel_gserver_md.tpl' : 'userpanel_404.tpl';
 } else {
     if ($ui->smallletters('action', 2, 'post') == 'md' and $ui->id('shorten', 19, 'post')) {
         $switchID = $ui->id('shorten', 19, 'post');
         $rootID = 0;
         $query = $sql->prepare("SELECT `active`,`normal_3`,`normal_4`,`hlds_3`,`hlds_4`,`hlds_5`,`hlds_6` FROM `eac` WHERE `resellerid`=? LIMIT 1");
         $query->execute(array($resellerLockupID));