function Card() { $this->CheckAdminPrivs('rechargecard'); $used = $_GET['used']; is_numeric($used) || $used = -1; page_moyo_max_io(50); $list = logic('recharge')->card()->GetList($used); include handler('template')->file('@admin/recharge_card'); }
function page_moyo_max_selector($max = null) { if (is_null($max)) { $smax = page_moyo_max_io(); if (is_numeric($smax)) { return $smax; } $int = handler('cookie')->GetVar('moyo_pm_int'); $max = $int ? (int)$int : 12; $max = $max ? $max : 12; return $max; } return $max; $html = ''; $html = '<select onchange="alert(this.value)">'; $pfrom = $max/2 + 2; $pend = $max + $max/2 - 1; for ($pi = $pfrom; $pi < $pend; $pi++) { if ($pi <= 0) break; if ($pi != $max) $html .= '<option value="'.$pi.'">'.$pi.'</option>'; else $html .= '<option value="'.$pi.'" selected="selected">'.$pi.'</option>'; } $html .= '</select>'; return $html; }