Show weaponlist.php syntax highlighted
<?php
define("VALID_PAGE", 1);
require(dirname(__FILE__) . "/includes/common.php");
$validfields = array('sort','order','start','limit','andor','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 = 'weaponlist';
if ($sort == '') $sort = 'kills';
if ($order == '') $order = 'desc';
if (!is_numeric($start) || $start < 0) $start = 0;
if (!is_numeric($limit) || $limit < 0) $limit = 50;
if (!in_array(strtolower($andor), array('and','or'))) $andor = 'or';
if ($search == '') $search = '';
foreach ($validfields as $var) {
$data[$var] = $$var;
}
$data['totalweapons'] = $ps->get_total_weapons(array(), $smarty);
$data['weapons'] = $ps->get_weapon_list(array(
'sort' => $sort,
'order' => $order,
'start' => $start,
'limit' => $limit,
), $smarty);
$data['pagerstr'] = pagination(array(
'baseurl' => "$PHP_SELF?limit=$limit&sort=$sort&order=$order",
'total' => $data['totalweapons'],
'start' => $start,
'perpage' => $limit,
'prefix' => $lang->trans("Goto:") . ' ',
'next' => $lang->trans("Next"),
'prev' => $lang->trans("Previous"),
));
$smarty->assign($data);
$smarty->parse($themefile);
$smarty->showpage();
include(DOCROOT . "includes/footer.php");
?>
See more files for this project here