function getModulePage($type) { if (!isValidModuleType($type)) { throw new Exception("Neplatný typ modulu: {$type}"); } return $GLOBALS['module_types'][$type][1] . '.php'; }
if (($m = (int) $_GET['m']) < 1) { throw new Exception("Neplatná hodnota parametru \"m\": {$m}"); } } if (isset($_GET['mi'])) { if (($mi = (int) $_GET['mi']) < 1) { throw new Exception("Neplatná hodnota parametru \"mi\": {$mi}"); } } if (isset($_GET['smi'])) { if (($smi = (int) $_GET['smi']) < 1) { throw new Exception("Neplatná hodnota parametru \"smi\": {$smi}"); } } if (isset($_GET['t'])) { if (!isValidModuleType($t = (int) $_GET['t'])) { throw new Exception("Neplatná hodnota parametru \"t\": {$t}"); } } if ($m == 0 && $t == 0) { throw new Exception("Nedostatek vstupních dat pro zpracování skriptu"); } if ($m != 0 && $t != 0) { throw new Exception("Nepřípustná kombinace vstupních parametrů"); } if ($m) { $result = mysql_query("SELECT Type FROM modules WHERE ID={$m}"); if ($row = mysql_fetch_row($result)) { $mtype = $row[0]; } else { throw new Exception("Neplatný identifikátor modulu");