pdp_menu();
echo '<hr />';
//$highlight = "<span class='poll'>\\1</span>";
echo '
<form action="' . FUSION_SELF . '" method="get">
<p style="text-align:center;">
<input type="text" size="20" maxlength="30" name="stext" class="textbox" value="' . $stext . '" />
<input type="submit" value="' . $locale['PDP040'] . '" class="button" /><br />
' . $locale['pdp_search'] . ': ' . $search_type . '
</p>
</form>';
//
if (strlen($stext) >= 3) {
    $downs = array();
    $get = array('type' => $stype, 'data' => $stext);
    $count = pdpCore::get_downloads($get, 'dl_name ASC', $rowstart, $pdp->settings['per_page'], false, $downs);
    echo '
<p>
<strong>' . $locale['PDP182'] . ': </strong>' . $stext . '
</p>
<p>
' . sprintf($locale['pdp_downloads_found'], $count) . '
</p>';
    if ($count) {
        $link = FUSION_SELF . '?stext=' . $stext . '&amp;stype=' . $stype . '&amp;';
        pdp_render_downs($downs, $rowstart, $pdp->settings['per_page'], $count, $link);
    }
} else {
    echo '<p>' . $locale['PDP180'] . '</p>';
}
closetable();
    }
} else {
    $pdp_title .= ' - ' . $locale['PDP037'];
}
/***************************************************************************
 *  DOWNLOADS                                                              *
 */
if (is_null($access_group) && !$download->id && (!isset($catid) || $catid != 0)) {
    $rowstart = 0;
    if (isset($_GET['rowstart']) && isNum($_GET['rowstart'])) {
        $rowstart = $_GET['rowstart'];
    }
    $downs = array();
    if (isset($catid)) {
        $get = array('type' => 'cat', 'data' => $catid);
    } else {
        $get = array('type' => 'none');
    }
    $count = pdpCore::get_downloads($get, $pdp_sorting, $rowstart, $pdp->settings['per_page'], false, $downs);
    $link = FUSION_SELF . "?" . (isset($catid) ? 'catid=' . $catid . '&' : '');
    pdp_render_downs($downs, $rowstart, $pdp->settings['per_page'], $count, $link);
    unset($downs);
}
if (is_null($access_group) && $download->id) {
    $pdp_title .= ' - ' . $download->data['dl_name'];
    include 'did.php';
} else {
    closetable();
}
pdp_add_to_title($pdp_title);
require_once 'include/die.php';
$downs = array();
pdpCore::get_downloads($get, 'dl_mtime DESC', 0, $pdp->settings['side_latest'], true, $downs, false);
echo '
<p>
	' . $locale['PDP300'] . '
</p>
<ul>';
//<table width='100%' cellspacing='0' cellpadding='0'>\n";
foreach ($downs as $data) {
    echo '
	<li><a href="' . INFUSIONS . 'pro_download_panel/download.php' . '?did=' . $data['id'] . '" title="' . $data['name'] . '">' . trimlink($data['name'], 18) . '</a></li>';
}
echo '
</ul>';
$downs = array();
pdpCore::get_downloads($get, 'dl_count DESC', 0, $pdp->settings['side_top'], true, $downs, false);
echo '
<p>
' . str_replace('%s', $pdp->settings['side_top'], $locale['PDP301']) . '
</p>

<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>';
foreach ($downs as $data) {
    echo '
<tr>
	<td><a href="' . INFUSIONS . 'pro_download_panel/download.php?did=' . $data['id'] . '" title="' . $data['name'] . '">' . trimlink($data['name'], 18) . '</a></td>
	<td align="right">' . pdpCore::format_number($data['downloads']) . '</td>
</tr>';
}
echo '
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
require_once 'include/common.php';
require_once 'include/theme_funcs.php';
if (defined('THEME_BULLET')) {
    $bullet = THEME_BULLET;
} else {
    $bullet = '<img src="' . THEME . 'images/bullet.gif" alt="&gt;" />';
}
opentable($locale['PDP300']);
pdp_menu();
$downs = array();
if (iMEMBER) {
    $get = array('type' => 'new');
    pdpCore::get_downloads($get, 'dl_mtime DESC', 0, 0, true, $downs, false);
}
echo '
<p></p>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>';
//<table width='100%' cellspacing='0' cellpadding='0'>\n";
foreach ($downs as $data) {
    echo '
<tr>
	<td>' . $bullet . ' <a href="' . INFUSIONS . 'pro_download_panel/download.php' . '?did=' . $data['id'] . '" title="' . $data['name'] . '">' . trimlink($data['name'], 18) . '</a></td>
</tr>';
}
echo '
</tbody>
</table>';