construct_hidden_code('addmore', $vbulletin->GPC['addmore']); foreach ($itemtype_obj->vars_use as $var => $info) { print_description_row($info['name'], 0, 2, "optiontitle"); $rowtitle = "<div class=\"smallfont\">{$info['desc']}</div>"; $rowname = "options[{$var}]"; $rowname2 = "options[{$var}_no2]"; $rowvar = isset($itemtype['options'][$var]) ? $itemtype['options'][$var] : $info['default']; switch ($info['type']) { case TYPE_BOOL: print_radio_row($rowtitle, $rowname, array(1 => $vbphrase['yes'], 0 => $vbphrase['no']), $rowvar); break; case 'textarea': print_textarea_row($rowtitle, $rowname, $rowvar); break; case 'input_select': print_input_select_row($rowtitle, $rowname, $rowvar, $rowname2, $info['selectarray'], $rowvar); break; default: print_input_row($rowtitle, $rowname, $rowvar); } } //Global options for USE_DURATION itemtypes if ($itemtype_obj->options['use_duration']) { print_description_row('Duration Step Price', 0, 2, "optiontitle"); print_input_row("<div class=\"smallfont\">Enter price for each duration step</div>", "options[duration_price]", $itemtype['options']['duration_price']); print_description_row('Forever Duration Price', 0, 2, "optiontitle"); print_input_row("<div class=\"smallfont\">Enter price for FOREVER items<dfn>Leave blank to disable FOREVER items</dfn></div>", "options[duration_price_forever]", $itemtype['options']['duration_price_forever']); } //Image option print_description_row('Image URL', 0, 2, "optiontitle"); if ($itemtype['options']['image']) {
print_submit_row('Purge Log'); print_table_footer(); exit; // This actually truncates the table. } elseif ($vbulletin->GPC['do'] == "purgenow") { print_cp_header('Clear Login Log'); $vbulletin->db->execute_query("TRUNCATE TABLE " . TABLE_PREFIX . "loginlog"); print_cp_message('The login log has been purged.', 'loginlog.php'); exit; } } // Filter table print_table_start(); print_table_header('Login Log Filter'); print_form_header('loginlog', '', false, true, 'cpform', '90%', '', true, 'get', 0, false, ''); print_input_select_row('Search', 'value', isset($vbulletin->GPC['value']) ? htmlentities($vbulletin->GPC['value'], ENT_QUOTES) : '', 'type', array(0 => 'Username', 1 => 'UserID', 2 => 'Loginstamp', 3 => 'IP', 4 => 'ISP', 5 => 'Country', 6 => 'User Agent'), isset($vbulletin->GPC['type']) ? $vbulletin->GPC['type'] : ''); print_submit_row('Filter'); print_table_footer(); // Pagination table print_table_start(); print_description_row('<a href="loginlog.php?page=' . (isset($vbulletin->GPC['page']) && $vbulletin->GPC['page'] > 0 ? $vbulletin->GPC['page'] - 1 : 0) . (isset($vbulletin->GPC['type']) && isset($vbulletin->GPC['value']) ? '&type=' . $vbulletin->GPC['type'] . '&value=' . $vbulletin->GPC['value'] : '') . '">Previous Page</a> - <a href="loginlog.php?page=' . (isset($vbulletin->GPC['page']) && $vbulletin->GPC['page'] != 0 ? $vbulletin->GPC['page'] + 1 : 1) . (isset($vbulletin->GPC['type']) && isset($vbulletin->GPC['value']) ? '&type=' . $vbulletin->GPC['type'] . '&value=' . $vbulletin->GPC['value'] : '') . '">Next Page</a> - Currently on page: ' . (isset($vbulletin->GPC['page']) ? htmlentities($vbulletin->GPC['page'], ENT_QUOTES) : 0)); print_table_footer(); // Output table print_table_start(); print_cells_row(array('Username', 'Date', 'IP', 'ISP', 'Country', 'User Agent'), 1); // Filter option $arr = array(0 => 'b.username', 1 => 'a.userid', 2 => 'a.loginstamp', 3 => 'a.ip', 4 => 'a.isp', 5 => 'a.country', 6 => 'a.browser'); if (isset($vbulletin->GPC['value']) && isset($vbulletin->GPC['type']) && array_key_exists($vbulletin->GPC['type'], $arr)) { if ($vbulletin->GPC['type'] == 1) { $where = ' WHERE ' . $arr[$vbulletin->GPC['type']] . ' = ' . $vbulletin->db->escape_string($vbulletin->GPC['value']) . ' '; } else {