if ($prp->settings['hide_cats']) { fallback("error.php?type=access"); } show_info('<img src="icons/lock.png" alt="' . $locale['prp_locked'] . '" /> ' . str_replace('%s', getgroupname($access_group), $locale['PRP215'])); } } /*************************************************************************** * DOWNLOADS * ***************************************************************************/ if (is_null($access_group) && !$review->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 = prpCore::get_reviews($get, $prp_sorting, $rowstart, $prp->settings['per_page'], false, $downs); $link = FUSION_SELF . "?" . (isset($catid) ? "catid={$catid}&" : ""); prp_render_downs($downs, $rowstart, $prp->settings['per_page'], $count, $link); unset($downs); } if (is_null($access_group) && $review->id) { include 'did.php'; } else { closetable(); } require_once 'include/die.php';
<p> ' . $locale['PRP300'] . ' </p> <ul>'; //<table width='100%' cellspacing='0' cellpadding='0'>\n"; foreach ($downs as $data) { echo ' <li><a href="' . INFUSIONS . 'reviews_panel/review.php' . '?did=' . $data['id'] . '" title="' . $data['name'] . '">' . trimlink($data['name'], 18) . '</a></li>'; } echo ' </ul>'; $downs = array(); prpCore::get_reviews($get, 'dl_count DESC', 0, $prp->settings['side_top'], true, $downs, false); echo ' <p> ' . str_replace('%s', $prp->settings['side_top'], $locale['PRP301']) . ' </p> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody>'; foreach ($downs as $data) { echo ' <tr> <td><a href="' . INFUSIONS . 'reviews_panel/review.php?did=' . $data['id'] . '" title="' . $data['name'] . '">' . trimlink($data['name'], 18) . '</a></td> <td align="right">' . prpCore::format_number($data['reviews']) . '</td> </tr>'; } echo ' </tbody> </table>'; closeside();
function prp_render_review($id, $data, $links, $files, $images, $old_data) { global $locale, $prp; $down_link = ''; if (!$data['can_review']) { } elseif (!empty($old_data['down']) || !empty($old_data['link_extern'])) { $down_link = "file.php?did=" . $id . "&file_id=0"; } elseif (count($files)) { $latest_review = array_shift($files); $down_link = "file.php?did=" . $id . "&file_id=" . $latest_review['id']; $old_ver = $latest_review['ver']; $old_size = $latest_review['size']; array_unshift($files, $latest_review); } if (!empty($data['pic'])) { $pic = $data['pic']; $pic_id = 0; } elseif (count($images)) { $first_pic = $images[0]; $pic = $first_pic['url']; $pic_id = $first_pic['id']; } else { $pic = ""; } echo "<p><font size='+1'><b>" . $data['name'] . "</b></font>\n"; echo "<hr>\n"; echo "\n<table border='0' cellspacing='2' width='100%' cellpadding='0'>\n<tr>\n\t<td valign='top' colspan='2'>" . $data['desc'] . "</td>\n\t<td width='150' valign='top' rowspan='2'>\n\t<table class='tbl-border' cellspacing='1' width='100%'>"; // version if (!empty($old_data['version'])) { echo "<tr><td class='tbl2' align='center'>" . $locale['PRP018'] . ":<br />" . $old_data['version'] . "</td>"; } // homepage if (!empty($data['homepage'])) { echo "<tr><td class='tbl2' align='center'><a href='" . $data['homepage'] . "'" . " target='_blank'>" . $locale['PRP020'] . "</a></td>"; } // screenshot if (!empty($pic)) { echo "<tr>\n\t<td align='center' class='tbl2'>" . "<a href='image.php?did=" . $id . "&pic_id={$pic_id}'>" . $locale['PRP028'] . "</a></td>\n</tr>"; } // review count echo "<tr>\n\t<td align='center' class='tbl2'>" . $locale['prp_reviews'] . ":<br />" . prpCore::format_number($data['count']) . "</td>\n</tr>"; // FIXME TODO if (!empty($old_data['size'])) { echo "<tr><td align='center' class='tbl2'>" . $locale['PRP029'] . ":<br />" . $old_data['size'] . "</td></tr>"; } if (!empty($data['license'])) { echo "<tr>\n\t<td align='center' class='tbl2'>" . $data['license'] . "</td>\n</tr>"; } // who posted and when. echo "<tr><td align='center' class='tbl2'>" . ($data['user_id'] ? "<a href='profile.php?id=" . $data['user_id'] . "'>" . $data['user_name'] . "</a><br />" : "") . showdate("shortdate", $data['mtime']) . "</td>\n</tr>\n"; if (!empty($data['copyright'])) { echo "<tr>\n\t<td class='tbl2' align='center'>" . $data['copyright'] . "</td>\n</tr>\n"; } if ($data['allow_notify']) { if ($data['can_subscribe']) { echo "<tr>\n\t<td class='tbl2' align='center'>" . ($data['is_subscribing'] ? "<a href='include/do_did.php?did=" . $id . "&subscibe=0'>" . $locale['PRP060'] . "</a>" : "<a href='include/do_did.php?did=" . $id . "&subscibe=1'>" . $locale['PRP059'] . "</a>") . "</td>\n</tr>\n"; } } echo "</table></td>\n</tr>\n<tr>\n\t<td align='center' valign='bottom'>" . (empty($down_link) ? $prp->settings['review_restricted'] : '<strong><a href="' . $down_link . '" target="_blank">' . $locale['PRP201'] . '</a></strong>') . "</td>\n</tr>\n</table>\n<hr>\n"; // report broken reviews echo "<div align='right'>"; if (iPRP_BROKEN) { echo "[ <a href='broken.php?did=" . $id . "'>" . $locale['PRP024'] . "</a> ]<br />"; } // edit link if (count($links)) { echo "<b>" . $locale['prp_edit'] . ":</b> [ " . implode(" | ", $links) . " ]"; } echo "</div>\n"; // files if (count($files)) { echo '<strong>' . $locale['PRP200'] . ":</strong><ul>\n"; } foreach ($files as $data) { echo "<li>" . showdate("shortdate", $data['timestamp']) . " - <b>" . $data['ver'] . " - </b>" . " <a href='file.php?did=" . $id . "&file_id=" . $data['id'] . "'" . " title='" . $data['url'] . "'>" . trimlink($data['url'], 40) . "</a>" . " (<span class='small2'>" . $data['size'] . " - " . $data['desc'] . ")</span>" . "</li>\n"; } if (count($files)) { echo "</ul>\n"; } }
*/ opentable($prp->settings['title']); prp_menu(); echo '<hr />'; //$highlight = "<span class='poll'>\\1</span>"; echo ' <form action="search.php" method="get"> <input type="text" size="24" maxlength="24" name="stext" class="textbox" value="' . $stext . '" /> <input type="submit" value="' . $locale['PRP040'] . '" class="button" /><br /> ' . $locale['prp_search'] . ': ' . $search_type . ' </form>'; // if (strlen($stext) >= 3) { $downs = array(); $get = array('type' => $stype, 'data' => $stext); $count = prpCore::get_reviews($get, 'dl_name ASC', $rowstart, $prp->settings['per_page'], false, $downs); echo ' <p> <strong>' . $locale['PRP182'] . ': </strong>' . $stext . ' </p> <p> ' . sprintf($locale['prp_reviews_found'], $count) . ' </p>'; if ($count) { $link = FUSION_SELF . '?stext=' . $stext . '&stype=' . $stype . '&'; prp_render_downs($downs, $rowstart, $prp->settings['per_page'], $count, $link); } } else { echo '<p>' . $locale['PRP180'] . '</p>'; } closetable();