$styles = style_list(); $admintpl->set('style_combo', get_combo($styles, $opts)); # timezone list $opts['name'] = 'timezone'; $opts['id'] = 'difference'; $opts['value'] = 'timezone'; $opts['default'] = $curu['time_offset']; $tzones = timezone_list(); $admintpl->set('tz_combo', get_combo($tzones, $opts)); # flag list $opts['complete'] = false; $opts['value'] = 'name'; $opts['id'] = 'id'; $opts['default'] = $curu['flag']; $flags = flag_list(); $admintpl->set('flag_combo', get_combo($flags, $opts)); # posts/topics per page if ($FORUMLINK == '' || $FORUMLINK == 'internal') { $admintpl->set('INTERNAL_FORUM', true, true); $profile['topicsperpage'] = $curu['topicsperpage']; $profile['postsperpage'] = $curu['postsperpage']; } else { $admintpl->set('INTERNAL_FORUM', false, true); $profile['topicsperpage'] = ''; $profile['postsperpage'] = ''; } # torrents per page $profile['torrentsperpage'] = $curu['torrentsperpage']; # avatar $profile['avatar'] = $curu['avatar'] != '' ? $curu['avatar'] : $STYLEURL . '/images/default_avatar.gif'; $profile['avatar_field'] = unesc($curu['avatar']);
// just in case you want to justify the deletion $id = max(0, $_GET["id"]); // update the deleted user's style to default one do_sqlquery("DELETE FROM {$TABLE_PREFIX}invitations WHERE id={$id}", true); redirect("index.php?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=invitations&action=read"); } break; case '': case 'read': default: $btit_settings = get_fresh_config("SELECT `key`,`value` FROM {$TABLE_PREFIX}settings") or sqlerr(__FILE__, __LINE__); $invit["ptracker_on"] = $btit_settings['invitation_only'] ? "checked=\"checked\"" : ""; $invit["ptracker_off"] = !$btit_settings['invitation_only'] ? "checked=\"checked\"" : ""; $invit["reqvalid_on"] = $btit_settings['invitation_reqvalid'] ? "checked=\"checked\"" : ""; $invit["reqvalid_off"] = !$btit_settings['invitation_reqvalid'] ? "checked=\"checked\"" : ""; $invit["recycle_after"] = $btit_settings['invitation_expires']; $admintpl->set("invit", $invit); $admintpl->set("receiver", $_POST["receiver"]); $opts['name'] = 'level'; $opts['complete'] = true; $opts['id'] = 'id'; $opts['value'] = 'level'; $opts['default'] = 0; $ranks = rank_list(); $ranks[] = array('id' => 0, 'level' => $language['ALL']); $admintpl->set("group_combo", get_combo($ranks, $opts)); $admintpl->set("searchuser", "<a href=\"javascript:popusers('searchusers.php');\">" . $language["FIND_USER"] . "</a>"); read_invitations(); $admintpl->set("frm_action", "index.php?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=invitations&action=send"); $admintpl->set("frm1_action", "index.php?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=invitations&action=activate"); }
$error = false; } # init options $opts['name'] = 'level'; $opts['complete'] = true; $opts['id'] = 'id'; $opts['value'] = 'level'; $opts['default'] = $flevel; # get from rank group $ranks = rank_list(); $ranks[] = array('id' => 0, 'level' => $language['ALL']); $masspm['combo_from_group'] = get_combo($ranks, $opts); # get to rank group $opts['name'] = 'levell'; $opts['default'] = $tlevel; $masspm['combo_to_group'] = get_combo($ranks, $opts); # get ratios $combo = "\n" . '<select name="ratio"><option value="0"' . ($ratio == 0 ? ' selected="selected" ' : '') . '>' . $language['ANY'] . '</option>'; for ($value = 0; $value <= $cutoff * 10; $value++) { $cur = $value / 10; $combo .= "\n" . '<option value="' . $cur . '"' . ($ratio == $cur ? ' selected="selected" ' : '') . '>' . $cur . '</option>'; } $combo .= "\n" . '</select>'; $masspm['combo_from_ratio'] = $combo; # get ratio type $combo = "\n" . '<select name="pick">'; $combo .= "\n" . '<option value="0"' . ($pick == 0 ? ' selected="selected" ' : '') . '>' . $language['RATIO_ONLY'] . '</option>'; $combo .= "\n" . '<option value="1"' . ($pick == 1 ? ' selected="selected" ' : '') . '>' . $language['RATIO_GREAT'] . '</option>'; $combo .= "\n" . '<option value="2"' . ($pick == 2 ? ' selected="selected" ' : '') . '>' . $language['RATIO_LOW'] . '</option>'; $combo .= "\n" . '</select>'; $masspm['combo_pick_ratio'] = $combo;
header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . filesize($path)); # ouput backup readfile($path); die; } else { $_MSG[] = array('Warning', $language['KOCS_NOTABLES']); } } case 'read': default: # send last backup notice if not trying to download if ($action != 'download') { if ($kocsfig['kocs_bak_by'] == 0) { $_MSG[] = array('Error', $language['KOCS_BN_NONE']); } else { if ($kocsfig['kocs_bak_last'] < getTime('-1', 'W')) { $_MSG[] = array('Warning', $language['KOCS_BN_OLD']); } $_MSG[] = array('Notice', sprintf($language['KOCS_BN_DONE'], date('Y/m/d H:i:s', $kocsfig['kocs_bak_last']), getNameX($kocsfig['kocs_bak_by'], $BASEURL))); } } # supported compression combo opts $sc = scList(); $opts['complete'] = true; $opts['name'] = 'compress'; $opts['default'] = 3; # KOCS backup $kocs['PREFIX'] = $prefix; $kocs['COMPRESS'] = get_combo($sc, $opts); }