Exemplo n.º 1
0
Arquivo: 40.php Projeto: thekabal/tki
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
//
// File: create_universe/40.php
// Determine current step, next step, and number of steps
$create_universe_info = Tki\BigBang::findStep(__FILE__);
// Set variables
$variables['templateset'] = $tkireg->default_template;
$variables['body_class'] = 'create_universe';
$variables['title'] = $langvars['l_cu_title'];
$variables['steps'] = $create_universe_info['steps'];
$variables['current_step'] = $create_universe_info['current_step'];
$variables['next_step'] = $create_universe_info['next_step'];
$variables['max_sectors'] = filter_input(INPUT_POST, 'max_sectors', FILTER_SANITIZE_NUMBER_INT);
// Sanitize the input
$variables['spp'] = filter_input(INPUT_POST, 'spp', FILTER_SANITIZE_NUMBER_INT);
$variables['oep'] = filter_input(INPUT_POST, 'oep', FILTER_SANITIZE_NUMBER_INT);
$variables['ogp'] = filter_input(INPUT_POST, 'ogp', FILTER_SANITIZE_NUMBER_INT);
$variables['gop'] = filter_input(INPUT_POST, 'gop', FILTER_SANITIZE_NUMBER_INT);
$variables['enp'] = filter_input(INPUT_POST, 'enp', FILTER_SANITIZE_NUMBER_INT);
$variables['nump'] = filter_input(INPUT_POST, 'nump', FILTER_SANITIZE_NUMBER_INT);
Exemplo n.º 2
0
set_time_limit(0);
// Detect if this variable exists, and filter it. Returns false if anything wasn't right.
$swordfish = null;
$swordfish = filter_input(INPUT_POST, 'swordfish', FILTER_SANITIZE_URL);
if (mb_strlen(trim($swordfish)) === 0) {
    $swordfish = false;
}
// Detect if this variable exists, and filter it. Returns false if anything wasn't right.
$step = null;
$step = (int) filter_input(INPUT_POST, 'step', FILTER_SANITIZE_NUMBER_INT);
if (mb_strlen(trim($step)) === 0) {
    $step = false;
}
if ($swordfish === null || $swordfish === false) {
    $step = "1";
}
if ($swordfish !== false && \Tki\SecureConfig::ADMIN_PASS != $swordfish) {
    $variables['goodpass'] = false;
    include_once 'create_universe/0.php';
} else {
    $variables['goodpass'] = true;
    if ($step !== null && $step !== 1) {
        $create_universe_info = Tki\BigBang::findStep('');
        natsort($create_universe_info['files']);
        $loader_file = $create_universe_info['files'][$step];
        $filename = 'create_universe/' . $loader_file;
        if (file_exists($filename)) {
            include_once $filename;
        }
    }
}