} if ($CHDB) { $query = $CHDB->select("SELECT * FROM `characters` {$filter} ORDER BY `name` LIMIT {$limit_start},{$items_per_pages}"); } AddMangosFields($realm_info['Version']); foreach ($query as $result) { $my_char = new character($result, $mangos_field); $cc++; $item_res[$cc]["name"] = $my_char->name; $item_res[$cc]["race"] = $my_char->race; $item_res[$cc]["class"] = $my_char->class; $item_res[$cc]["gender"] = $my_char->gender; $item_res[$cc]["level"] = $my_char->level; $item_res[$cc]["pos"] = get_zone_name($my_char->map, $my_char->position_x, $my_char->position_y); $item_res[$cc]["current_xp"] = $my_char->current_xp; $item_res[$cc]["next_level_xp"] = $my_char->next_level_xp; $item_res[$cc]["xp_perc"] = $my_char->xp_perc; } if ($CHDB) { $query = $CHDB->selectcell("SELECT COUNT(*) as cnt FROM `characters` {$filter} ORDER BY `name`"); } $pnum = ceil($query / $items_per_pages); $pages_str = default_paginate($pnum, $p, "index.php?n=server&sub=chars&realm=" . $_GET['realm'] . "&char=" . $_GET['char']); unset($CHDB, $query, $result, $my_char); } ?>
<?php if (INCLUDED !== true) { exit; } $screensize = (string) $MW->getConfig->components->left_section->Screenshotsize; $pathway_info[] = array('title' => $lang['GallWalp'], 'link' => ''); //===== Calc pages1 =====// $items_per_pages = (int) $MW->getConfig->generic->images_per_page; $limit_start = ($p - 1) * $items_per_pages; $cc = $DB->selectCell("SELECT count(*) FROM `gallery` WHERE cat='wallpaper'"); //===== Calc pages2 =====// $pnum = ceil($cc / $items_per_pages); $pages_str = default_paginate($pnum, $p, "index.php?n=media&sub=wallp");
$txt['daylist'] = "\n"; for ($i = 1; $i <= 31; $i++) { $txt['daylist'] .= "<option value='{$i}'" . ($i == $profile['bd_day'] ? ' selected' : '') . "> {$i} </option>\n"; } for ($i = 1; $i <= 12; $i++) { $txt['monthlist'] .= "<option value='{$i}'" . ($i == $profile['bd_month'] ? ' selected' : '') . "> {$i} </option>\n"; } for ($i = 1950; $i <= date('Y'); $i++) { $txt['yearlist'] .= "<option value='{$i}'" . ($i == $profile['bd_year'] ? ' selected' : '') . "> {$i} </option>\n"; } $profile['signature'] = str_replace('<br />', '', $profile['signature']); } } else { $pathway_info[] = array('title' => $lang['userlist'], 'link' => ''); //===== Filter ==========// if ($_GET['char'] && preg_match("/[a-z]/", $_GET['char'])) { $filter = "WHERE `username` LIKE '" . escape_string($_GET['char']) . "%'"; } elseif ($_GET['char'] == 1) { $filter = "WHERE `username` REGEXP '^[^A-Za-z]'"; } else { $filter = ''; } //===== Calc pages =====// $items_per_pages = (int) $MW->getConfig->generic->users_per_page; $itemnum = $DB->selectCell("SELECT count(*) FROM account {$filter}"); $pnum = ceil($itemnum / $items_per_pages); $pages_str = default_paginate($pnum, $p, "index.php?n=account&sub=userlist&char=" . $_GET['char']); $limit_start = ($p - 1) * $items_per_pages; $items = $DB->select("\r\n SELECT * FROM account\r\n LEFT JOIN account_extend ON account.id=account_extend.account_id\r\n {$filter}\r\n ORDER BY username\r\n LIMIT {$limit_start},{$items_per_pages}"); } ## output_message('alert',$itemnum);
$DB->query("DELETE FROM account WHERE id=?d LIMIT 1", $_GET['id']); $DB->query("DELETE FROM account_extend WHERE account_id=?d LIMIT 1", $_GET['id']); $DB->query("DELETE FROM pms WHERE owner_id=?d LIMIT 1", $_GET['id']); redirect('index.php?n=admin&sub=members', 1); } } else { if ($_GET['action'] == 'deleteinactive') { $cur_timestamp = date('YmdHis', time() - $oldInactiveTime); $accids = $DB->selectCol("\n SELECT account_id FROM account_extend \n JOIN account ON account.id=account_extend.account_id \n WHERE activation_code IS NOT NULL AND joindate < ?\n ", $cur_timestamp); // print_r($accids); $DB->query("DELETE FROM account WHERE id IN(?a)", $accids); $DB->query("DELETE FROM account_extend WHERE account_id IN(?a)", $accids); redirect('index.php?n=admin&sub=members', 1); } $pathway_info[] = array('title' => $lang['users_manage'], 'link' => ''); //===== Filter ==========// if ($_GET['char'] && preg_match("/[a-z]/", $_GET['char'])) { $filter = "WHERE `username` LIKE '" . $_GET['char'] . "%'"; } elseif ($_GET['char'] == 1) { $filter = "WHERE `username` REGEXP '^[^A-Za-z]'"; } else { $filter = ''; } //===== Calc pages =====// $items_per_pages = $config['users_per_page']; $itemnum = $DB->selectCell("SELECT count(*) FROM account {$filter}"); $pnum = ceil($itemnum / $items_per_pages); $pages_str = default_paginate($pnum, $p, "index.php?n=admin&sub=members&char=" . $_GET['char']); $limit_start = ($p - 1) * $items_per_pages; $items = $DB->select("\n SELECT `account`.`id`,`username`,`email`,`homepage`,`icq`,`joindate`,`locked`,COALESCE(`active`,0) as `active` FROM account \n LEFT JOIN account_extend ON account.id=account_extend.account_id \n\t\t LEFT JOIN account_banned ON (account_banned.id=account.id AND account_banned.active=1)\n {$filter} \n ORDER BY username \n LIMIT {$limit_start},{$items_per_pages}"); }
<?php if (INCLUDED !== true) { exit; } $screensize = (string) $MW->getConfig->components->left_section->Screenshotsize; $pathway_info[] = array('title' => $lang['GallScreen'], 'link' => ''); //===== Calc pages1 =====// $items_per_pages = (int) $MW->getConfig->generic->images_per_page; $limit_start = ($p - 1) * $items_per_pages; $cc = $DB->selectCell("SELECT count(*) FROM `gallery` WHERE cat='screenshot'"); //===== Calc pages2 =====// $pnum = ceil($cc / $items_per_pages); $pages_str = default_paginate($pnum, $p, "index.php?n=media&sub=screen");