Show usersearch.php syntax highlighted
<?php
define("VALID_PAGE", 1);
require(dirname(__FILE__) . "/includes/common.php");
$validfields = array('s','f','v','submit','cancel','search','themefile');
globalize($validfields);
if (get_magic_quotes_gpc()) { // remove slashes from all valid variables
foreach ($validfields as $field) {
$$field = stripslashes($$field);
}
}
if (empty($themefile) or !$conf['allowthemechange']) $themefile = 'usersearch';
if ($cancel) previouspage($URLROOT);
if (empty($s)) $s = ''; // search
if (empty($v)) $v = 'plrname'; // variable
if (empty($f)) $f = 'editform'; // form
$search = $s;
$andor = 'and';
foreach ($validfields as $var) {
$data[$var] = $$var;
}
if (!empty($search)) {
$data['players'] = $ps->get_player_list(array(
'sort' => 'plr.name',
'order' => 'asc',
'search' => "$andor:$search",
'joinclaninfo' => 0,
'fields' => 'plr.plrid,plr.name'
), $smarty);
}
$smarty->assign($data);
$smarty->parse($themefile);
$smarty->showpage();
include(DOCROOT . "includes/footer.php");
?>
See more files for this project here