function show_joined_category_list($dropdown = false, $intro = true) { global $cats, $page, $connector; if ($dropdown) { // show dropdown if ($intro) { ?> <p class="show_joined_intro_dropdown"> Select the listing category you want to see below. The dropdown only shows categories with listings listed under them. </p> <?php } ?> <script type="text/javascript"> <!-- Begin function change(form) { var myindex = form.cat.selectedIndex if (form.cat.options[myindex].value != "0") { window.open( "<?php echo $page . $connector; ?> cat=" + form.cat.options[myindex].value, target="_self"); } } // end --> </script> <form method="get" action="<?php echo $page; ?> " class="show_joined_select_form"> <p> <?php // show other possible $_GET values if (isset($_GET)) { foreach ($_GET as $get => $value) { if ($get != 'cat') { echo '<input type="hidden" name="' . clean($get) . '" value="' . clean($value) . '" />' . "\r\n"; } } } ?> <select name="cat" onchange="change(this.form)" class="show_joined_select_form"> <option value="0"> Select sort option</option> <?php if ($intro) { echo '<option value="all"> All listings (' . count(get_joined('approved')) . ')</option>'; } // are there pending listings? if ($intro && count(get_joined('pending')) > 0) { echo '<option value="pending"> All pending approval</option>'; } foreach ($cats as $cat) { echo '<option value="' . $cat['catid'] . '">' . $cat['text'] . '</option>'; } ?> </select> </p> </form> <?php } else { // show bulletted list instead if ($intro) { ?> <p class="show_joined_intro_list">Select the listing category you want to see below. The list only shows categories with listings listed under them.</p> <?php } echo '<ul class="show_joined_list_items">'; if ($intro) { echo '<li> <a href="' . $page . $connector . 'cat=all">All ' . 'listings (' . count(get_joined('approved')) . ')</a> </li>'; } // are there pending listings? if ($intro && count(get_joined('pending')) > 0) { echo '<li> <a href="' . $page . $connector . 'cat=pending">All Pending approval</a> </li>'; } foreach ($cats as $cat) { echo '<li> <a href="' . $page . $connector . 'cat=' . $cat['catid'] . '">' . $cat['text'] . '</a> </li>'; } echo '</ul>'; } }
******************************************************************************/ require 'config.php'; require_once 'mod_errorlogs.php'; require_once 'mod_categories.php'; require_once 'mod_joined.php'; require_once 'mod_owned.php'; require_once 'mod_affiliates.php'; require_once 'mod_settings.php'; $all_owned = get_owned('current', 'none', 'bydate'); $all_joined = get_joined('approved', 'none', 'id'); // total number categories (regardless of if there are stuff inside) $total_cats = count(enth_get_categories()); // number of joined listings (pending) $joined_pending = count(get_joined('pending')); // number of joined listings (approved) $joined_approved = count(get_joined('approved')); // number of joined listings (pending+approved) $joined = $joined_pending + $joined_approved; // number of owned listings (pending) $owned_pending = count(get_owned('pending')); // number of owned listings (upcoming) $owned_upcoming = count(get_owned('upcoming')); // number of owned listings (current) $owned_current = count(get_owned('current')); // number of owned listings (pending+upcoming+current) $owned = $owned_pending + $owned_upcoming + $owned_current; // number of collective affiliates $affiliates_collective = count(get_affiliates()); // newest owned fanlisting (current) if (count($all_owned) > 0) { $owned_newest = get_listing_info($all_owned[0]);
if (isset($_GET['dosearch'])) { if ($_GET['search'] == '') { $ids = get_joined($_GET['status'], $start, 'id'); $total = count(get_joined($_GET['status'])); } else { // search! $status = ''; if (isset($_GET['status'])) { $status = $_GET['status']; } $ids = search_joined($_GET['search'], $status, $start); $total = count(search_joined($_GET['search'], $status)); } } else { $ids = get_joined('all', $start, 'id'); $total = count(get_joined()); } ?> <table> <tr><th></th><th> Subject/URL </th><th> Categories </th><th> Image </th><th> Action </th></tr> <?php $shade = false;