', $valtmp2); $values[$valtmp3[0]] = $valtmp3[1]; } } if (isset($_REQUEST['submit']) and isset($_REQUEST['cur_var'])) { $values[$_REQUEST['cur_var']] = $_REQUEST[$_REQUEST['cur_var']]; unset($_REQUEST[$_REQUEST['cur_var']]); if (isset($options['vars'][$i - 1]['exitif']) and $options['vars'][$i - 1]['exitif'] == $values[$_REQUEST['cur_var']]) $i = $maxsteps; } if ($i == $maxsteps) return($values); echo '
'.htmlentities($options['title']).'
Step '.$step.' of '.$maxsteps.'

'; if ($step != $maxsteps and !isset($options['vars'][$i])) die("Something went wrong :("); echo '
'; echo ''; if ($step == $maxsteps) { echo ''; } foreach($options['vars'] as $num => $var) { if ((!isset($values[$var['name']]) and $num != $i) or $num > $i) continue; echo ''; echo ''; } $valstr = ''; foreach($values as $key => $value) { if (empty($key)) continue; if (!empty($valstr)) $valstr .= ','; $valstr .= "$key=>$value"; } $_REQUEST['step'] = ''; $_REQUEST['values'] = ''; foreach($_REQUEST as $key => $value) { if (isset($_COOKIE[$key])) continue; switch($key){ case 'step': $value = $step; break; case 'values': $value = $valstr; break; case 'submit': case 'back': case 'cur_var': case 'playerfilter': case 'noop': continue 2; } echo ''; } echo ''; $caption = ($step == $maxsteps) ? 'Finish' : 'Next >>'; echo ''; echo '
Please Confirm!
'; if ($num == $i or !isset($var['caption'])) { echo htmlentities($var['prompt']); } else { echo htmlentities($var['caption']); } echo ''; if ($num != $i) { if (isset($var['extraoption']) and $values[$var['name']] == $var['extraoption']) { echo htmlentities($values[$var['name']]); } else { switch($var['type']) { case 'game': $r_game = small_query("SELECT gamename, name FROM uts_games WHERE id = '". $values[$var['name']] ."'"); echo htmlentities($r_game['name']) .' ('. htmlentities($r_game['gamename']) .')'; break; case 'server': $r_server = small_query("SELECT servername, serverip FROM uts_match WHERE id = '". $values[$var['name']] ."'"); echo htmlentities($r_server['servername']) .' ('. $r_server['serverip'] .')'; break; case 'player': $r_player = small_query("SELECT name FROM uts_pinfo WHERE id = '". $values[$var['name']] ."'"); echo htmlentities($r_player['name']); break; case 'match': $r_match = small_query("SELECT id, time, serverip, mapfile FROM uts_match WHERE id = '". $values[$var['name']] ."'"); echo htmlentities($r_match['id'].': '.mdate2($r_match['time']).' ('.un_ut($r_match['mapfile']).' on '.$r_match['serverip'].')'); break; case 'static': case 'text': echo htmlentities($values[$var['name']]); break; default: echo 'Show: Don\'tknow what to do with type '. $var['type']; } } } else { if (isset($var['initialvalue']) and isset($values[$var['initialvalue']])) $values[$var['name']] = $values[$var['initialvalue']]; echo ''; switch($var['type']) { case 'game': echo ''; break; case 'server': echo ''; break; case 'player': echo ''; echo '    '; echo 'Filter: '; echo ' '; break; case 'match': echo ''; break; case 'static': echo ''; break; case 'text': $pval = (isset($values[$var['name']])) ? $values[$var['name']] : ''; echo ''; break; default: echo 'Select: Don\'tknow what to do with type '. $var['type']; } } echo '
'; if ($step != 1) echo ''; echo '
'; echo '
'; require('includes/footer.php'); exit; } ?>