// if not set the get latest flag. if (strlen($searchterm) == 0) { if (!array_key_exists("LATEST", $_REQUEST)) { $_REQUEST["LATEST"] = "1"; } } DisplayHead("TorrentSearch " . _SEARCH); echo "<style>.tinyRow {font-size:2px;height:2px;}</style>"; // Display the search box echo "<a name=\"top\"></a><div align=\"center\">"; echo "<table border=1 cellspacing=0 width=\"760\" cellpadding=5><tr>"; echo "<td bgcolor=\"" . $cfg["table_header_bg"] . "\">"; echo "<form id=\"searchForm\" name=\"searchForm\" action=\"torrentSearch.php\" method=\"get\">"; echo _SEARCH . " Torrents:<br>"; echo "<input type=\"text\" name=\"searchterm\" value=\"" . str_replace("+", " ", $searchterm) . "\" size=30 maxlength=50> "; echo buildSearchEngineDDL($searchEngine); echo " <input type=\"Submit\" value=\"" . _SEARCH . "\"> "; echo "\n<script language=\"JavaScript\">\n"; echo " function getLatest()\n"; echo " {\n"; echo " var selectedItem = document.searchForm.searchEngine.selectedIndex;\n"; echo " document.searchForm.searchterm.value = '';\n"; echo " document.location.href = 'torrentSearch.php?searchEngine='+document.searchForm.searchEngine.options[selectedItem].value+'&LATEST=1';\n"; echo " return true;\n"; echo " }\n"; echo "</script>\n"; echo " <a href=\"#\" onclick=\"javascript:getLatest()\");\"><img src=\"images/properties.png\" width=18 height=13 title=\"Show Latest Torrents\" align=\"absmiddle\" border=0>Show Latest Torrents</a>"; echo "</form>"; echo "* Click on Torrent Links to add them to the Torrent Download List"; echo "</td>"; echo "</td><td bgcolor=\"" . $cfg["table_header_bg"] . "\" align=right valign=top>Visit: " . buildSearchEngineLinks($searchEngine) . "</td></tr>";
</form> </tr> <?php if ($cfg["enable_search"]) { ?> <tr> <form name="form_search" action="torrentSearch.php" method="get"> <td> <hr> Torrent <?php echo _SEARCH; ?> :<br> <input type="text" name="searchterm" size="30" maxlength="50"> <?php echo buildSearchEngineDDL($cfg["searchEngine"]); ?> <input type="Submit" value="<?php echo _SEARCH; ?> "> </td> </form> </tr> <?php } ?> </table> </td> <td bgcolor="<?php
function searchSettings() { global $cfg; include_once "AliasFile.php"; include_once "RunningTorrent.php"; include_once "searchEngines/SearchEngineBase.php"; DisplayHead("Administration - Search Settings"); // Admin Menu displayMenu(); // Main Settings Section echo "<div align=\"center\">"; echo "<table width=\"100%\" border=1 bordercolor=\"" . $cfg["table_admin_border"] . "\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"" . $cfg["table_data_bg"] . "\">"; echo "<tr><td bgcolor=\"" . $cfg["table_header_bg"] . "\" background=\"themes/" . $cfg["theme"] . "/images/bar.gif\">"; echo "<img src=\"images/properties.png\" width=18 height=13 border=0> <font class=\"title\">Search Settings</font>"; echo "</td></tr><tr><td align=\"center\">"; ?> <div align="center"> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <form name="theForm" action="admin.php?op=searchSettings" method="post"> <tr> <td align="right" width="350" valign="top"><strong>Select Search Engine</strong><br> </td> <td valign="top"> <?php $searchEngine = getRequestVar('searchEngine'); if (empty($searchEngine)) { $searchEngine = $cfg["searchEngine"]; } echo buildSearchEngineDDL($searchEngine, true); ?> </td> </tr> </form> </table> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr><td> <?php if (is_file('searchEngines/' . $searchEngine . 'Engine.php')) { include_once 'searchEngines/' . $searchEngine . 'Engine.php'; $sEngine = new SearchEngine(serialize($cfg)); if ($sEngine->initialized) { echo "<table width=\"100%\" border=1 bordercolor=\"" . $cfg["table_admin_border"] . "\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"" . $cfg["table_data_bg"] . "\"><tr>"; echo "<td bgcolor=\"" . $cfg["table_header_bg"] . "\" background=\"themes/" . $cfg["theme"] . "/images/bar.gif\"><img src=\"images/properties.png\" width=18 height=13 border=0> <font class=\"title\">" . $sEngine->mainTitle . " Search Settings</font></td>"; echo "</tr></table></td>"; echo "<form name=\"theSearchEngineSettings\" action=\"admin.php?op=updateSearchSettings\" method=\"post\">\n"; echo "<input type=\"hidden\" name=\"searchEngine\" value=\"" . $searchEngine . "\">"; ?> </td> </tr> <tr> <td> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td align="left" width="350" valign="top"><strong>Search Engine URL:</strong></td> <td valign="top"> <?php echo "<a href=\"http://" . $sEngine->mainURL . "\" target=\"_blank\">" . $sEngine->mainTitle . "</a>"; ?> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Search Module Author:</strong></td> <td valign="top"> <?php echo $sEngine->author; ?> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Version:</strong></td> <td valign="top"> <?php echo $sEngine->version; ?> </td> </tr> <?php if (strlen($sEngine->updateURL) > 0) { ?> <tr> <td align="left" width="350" valign="top"><strong>Update Location:</strong></td> <td valign="top"> <?php echo "<a href=\"" . $sEngine->updateURL . "\" target=\"_blank\">Check for Update</a>"; ?> </td> </tr> <?php } if (!$sEngine->catFilterName == '') { ?> <tr> <td align="left" width="350" valign="top"><strong>Search Filter:</strong><br> Select the items that you DO NOT want to show in the torrent search: </td> <td valign="top"> <?php echo "<select multiple name=\"" . $sEngine->catFilterName . "[]\" size=\"8\" STYLE=\"width: 125px\">"; echo "<option value=\"\">[NO FILTER]</option>"; foreach ($sEngine->getMainCategories(false) as $mainId => $mainName) { echo "<option value=\"" . $mainId . "\" "; if (@in_array($mainId, $sEngine->catFilter)) { echo " selected"; } echo ">" . $mainName . "</option>"; } echo "</select>"; echo "\t\t\t </td>\n"; echo "\t\t </tr>\n"; } } } ?> </table> </td></tr></table> <br <input type="Submit" value="Update Settings"> </form> </div> <br> </td></tr> </table></div> <?php DisplayFoot(true, true); }
function showIndex() { global $cfg, $db; $hideChecked = ""; if ($cfg["hide_offline"] == 1) { $hideChecked = "checked"; } DisplayHead($cfg["user"] . "'s " . _PROFILE); echo "<div align=\"center\">"; echo "<table border=1 bordercolor=\"" . $cfg["table_admin_border"] . "\" cellpadding=\"2\" cellspacing=\"0\" width=\"760\">"; echo "<tr><td colspan=6 bgcolor=\"" . $cfg["table_data_bg"] . "\" background=\"themes/" . $cfg["theme"] . "/images/bar.gif\">"; echo "<img src=\"images/properties.png\" width=18 height=13 border=0> <font class=\"title\">" . $cfg["user"] . "'s " . _PROFILE . "</font>"; echo "</td></tr><tr><td align=\"center\">"; $total_activity = GetActivityCount(); $sql = "SELECT user_id, hits, last_visit, time_created, user_level FROM tf_users WHERE user_id=" . $db->qstr($cfg["user"]); list($user_id, $hits, $last_visit, $time_created, $user_level) = $db->GetRow($sql); $user_type = _NORMALUSER; if (IsAdmin()) { $user_type = _ADMINISTRATOR; } if (IsSuperAdmin()) { $user_type = _SUPERADMIN; } $user_activity = GetActivityCount($cfg["user"]); if ($user_activity == 0) { $user_percent = 0; } else { $user_percent = number_format($user_activity / $total_activity * 100); } ?> <table width="100%" border="0" cellpadding="3" cellspacing="0"> <tr> <!-- left column --> <td width="50%" bgcolor="<?php echo $cfg["table_data_bg"]; ?> " valign="top"> <div align="center"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="right"><?php echo _JOINED; ?> : </td> <td><strong><?php echo date(_DATETIMEFORMAT, $time_created); ?> </strong></td> </tr> <tr> <td colspan="2" align="center"> </td> </tr> <tr> <td align="right"><?php echo _UPLOADPARTICIPATION; ?> : </td> <td> <table width="200" border="0" cellpadding="0" cellspacing="0"> <tr> <td background="themes/<?php echo $cfg["theme"]; ?> /images/proglass.gif" width="<?php echo $user_percent * 2; ?> "><img src="images/blank.gif" width="1" height="12" border="0"></td> <td background="themes/<?php echo $cfg["theme"]; ?> /images/noglass.gif" width="<?php echo 200 - $user_percent * 2; ?> "><img src="images/blank.gif" width="1" height="12" border="0"></td> </tr> </table> </td> </tr> <tr> <td align="right"><?php echo _UPLOADS; ?> : </td> <td><strong><?php echo $user_activity; ?> </strong></td> </tr> <tr> <td align="right"><?php echo _PERCENTPARTICIPATION; ?> : </td> <td><strong><?php echo $user_percent; ?> %</strong></td> </tr> <tr> <td colspan="2" align="center"><div align="center" class="tiny">(<?php echo _PARTICIPATIONSTATEMENT . " " . $cfg['days_to_keep'] . " " . _DAYS; ?> )</div><br></td> </tr> <tr> <td align="right"><?php echo _TOTALPAGEVIEWS; ?> : </td> <td><strong><?php echo $hits; ?> </strong></td> </tr> <tr> <td align="right"><?php echo _USERTYPE; ?> : </td> <td><strong><?php echo $user_type; ?> </strong></td> </tr> <tr> <td colspan="2" align="center"> <table> <tr> <td align="center"> <BR />[ <a href="?op=showCookies">Cookie Management</a> ] </td> </tr> </table> </td> </tr> </table> </div> </td> <!-- right column --> <td valign="top"> <div align="center"> <table cellpadding="5" cellspacing="0" border="0"> <form name="theForm" action="profile.php?op=updateProfile" method="post" onsubmit="return validateProfile()"> <tr> <td align="right"><?php echo _USER; ?> :</td> <td> <input readonly="true" type="Text" value="<?php echo $cfg["user"]; ?> " size="15"> </td> </tr> <tr> <td align="right"><?php echo _NEWPASSWORD; ?> :</td> <td> <input name="pass1" type="Password" value="" size="15"> </td> </tr> <tr> <td align="right"><?php echo _CONFIRMPASSWORD; ?> :</td> <td> <input name="pass2" type="Password" value="" size="15"> </td> </tr> <tr> <td align="right"><?php echo _THEME; ?> :</td> <td> <select name="theme"> <?php $arThemes = GetThemes(); for ($inx = 0; $inx < sizeof($arThemes); $inx++) { $selected = ""; if ($cfg["theme"] == $arThemes[$inx]) { $selected = "selected"; } echo "<option value=\"" . $arThemes[$inx] . "\" " . $selected . ">" . $arThemes[$inx] . "</option>"; } ?> </select> </td> </tr> <tr> <td align="right"><?php echo _LANGUAGE; ?> :</td> <td> <select name="language"> <?php $arLanguage = GetLanguages(); for ($inx = 0; $inx < sizeof($arLanguage); $inx++) { $selected = ""; if ($cfg["language_file"] == $arLanguage[$inx]) { $selected = "selected"; } echo "<option value=\"" . $arLanguage[$inx] . "\" " . $selected . ">" . GetLanguageFromFile($arLanguage[$inx]) . "</option>"; } ?> </select> </td> </tr> <tr> <td colspan="2"> <input name="hideOffline" type="Checkbox" value="1" <?php echo $hideChecked; ?> > <?php echo _HIDEOFFLINEUSERS; ?> <br> </td> </tr> <tr> <td align="center" colspan="2"> <input type="Submit" value="<?php echo _UPDATE; ?> "> </td> </tr> </form> </table> </div> </td> </tr> <!-- user-settings --> <tr><td colspan="2" align="center" bgcolor="<?php echo $cfg["table_border_dk"]; ?> "><strong><?php echo $cfg["user"]; ?> 's Settings</strong></td></tr> <tr><td colspan="2"><br></td></tr> <tr><td colspan="2"> <form name="settingsForm" action="profile.php?op=updateSettingsUser" method="post"> <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr><td colspan="2" align="center" bgcolor="<?php echo $cfg["table_header_bg"]; ?> "><strong>Index-Page</strong></td></tr> <tr> <td align="left" width="350" valign="top"><strong>Select index-page</strong><br> Select the index-Page. </td> <td valign="top"> <?php printIndexPageSelectForm(); ?> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>index-page settings</strong><br> Select the columns in transfer-list on index-Page.<br>(only for b4rt-index-page) </td> <td valign="top"> <?php printIndexPageSettingsForm(); ?> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Width</strong><br> Specify the width of the index-page. (780): </td> <td valign="bottom"> <input name="ui_dim_main_w" type="Text" maxlength="5" value="<?php echo $cfg["ui_dim_main_w"]; ?> " size="5"> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Display Links</strong><br> Display Links on the index-page. (true): </td> <td valign="bottom"> <select name="ui_displaylinks"> <option value="1">true</option> <option value="0" <?php if (!$cfg["ui_displaylinks"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Display Users</strong><br> Display Users on the index-page. (true): </td> <td valign="bottom"> <select name="ui_displayusers"> <option value="1">true</option> <option value="0" <?php if (!$cfg["ui_displayusers"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Select Drivespace-Bar</strong><br> Select Style of Drivespace-Bar on index-Page. </td> <td valign="top"> <?php printDrivespacebarSelectForm(); ?> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Show Server Stats</strong><br> Enable showing the server stats at the bottom: </td> <td valign="top"> <select name="index_page_stats"> <option value="1">true</option> <option value="0" <?php if (!$cfg["index_page_stats"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Show Server Load</strong><br> Enable showing the average server load over the last 15 minutes: </td> <td valign="top"> <select name="show_server_load"> <option value="1">true</option> <option value="0" <?php if (!$cfg["show_server_load"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Show Connections</strong><br> Enable showing the Sum of TCP-Connections: </td> <td valign="top"> <select name="index_page_connections"> <option value="1">true</option> <option value="0" <?php if (!$cfg["index_page_connections"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Use Refresh</strong><br> Use meta-refresh on index-page. (true): </td> <td valign="bottom"> <select name="ui_indexrefresh"> <option value="1">true</option> <option value="0" <?php if (!$cfg["ui_indexrefresh"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Page Refresh (in seconds)</strong><br> Number of seconds before the torrent list page refreshes: </td> <td valign="top"> <input name="page_refresh" type="Text" maxlength="3" value="<?php echo $cfg["page_refresh"]; ?> " size="3"> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Select Sort-Order</strong><br> Select default Sort-Order of transfers on index-Page. </td> <td valign="top"> <?php printSortOrderSettingsForm(); ?> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Enable sorttable</strong><br> Enable Client-Side sorting of Transfer-Table: </td> <td valign="top"> <select name="enable_sorttable"> <option value="1">true</option> <option value="0" <?php if (!$cfg["enable_sorttable"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Enable Good looking statistics</strong><br> Enable/Disable "Good looking statistics" : </td> <td valign="top"> <select name="enable_goodlookstats"> <option value="1">true</option> <option value="0" <?php if (!$cfg["enable_goodlookstats"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Good looking statistics settings</strong><br> Configure Settings of "Good looking statistics" : </td> <td valign="top"> <?php printGoodLookingStatsForm(); ?> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Enable Big bold drivespace warning</strong><br> Enable/Disable "Big bold drivespace warning" : </td> <td valign="top"> <select name="enable_bigboldwarning"> <option value="1">true</option> <option value="0" <?php if (!$cfg["enable_bigboldwarning"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr><td colspan="2" align="center" bgcolor="<?php echo $cfg["table_header_bg"]; ?> "><strong>Download-Details</strong></td></tr> <tr> <td align="left" width="350" valign="top"><strong>Width</strong><br> Specify the width of the details-popup. (450): </td> <td valign="bottom"> <input name="ui_dim_details_w" type="Text" maxlength="5" value="<?php echo $cfg["ui_dim_details_w"]; ?> " size="5"> </td> </tr> <tr> <td align="left" width="350" valign="top"><strong>Height</strong><br> Specify the height of the details-popup. (290): </td> <td valign="bottom"> <input name="ui_dim_details_h" type="Text" maxlength="5" value="<?php echo $cfg["ui_dim_details_h"]; ?> " size="5"> </td> </tr> <tr><td colspan="2" align="center" bgcolor="<?php echo $cfg["table_header_bg"]; ?> "><strong>Misc</strong></td></tr> <tr> <td align="left" width="350" valign="top"><strong>Default Torrent Search Engine</strong><br> Select the default search engine for torrent searches: </td> <td valign="top"> <?php echo buildSearchEngineDDL($cfg["searchEngine"]); ?> </td> </tr> <!-- move hack settings --> <?php if ($cfg["enable_move"] != 0) { ?> <script src="move_extensionSettings.js" type="text/javascript"></script> <tr> <td align="left" width="350" valign="top"><strong>Move Settings</strong><br> <u>Note :</u> You must specify absolute paths here. relative paths are not valid.<br> <u>Note :</u> The created dirs will not be deleted after removing a entry from the List. </td> <td valign="top"> <?php printMoveSettingsForm(); ?> </td> </tr> <?php } ?> <tr> <td align="left" width="350" valign="top"><strong>Display TorrentFlux Link</strong><br> Display TorrentFlux Link at bottom of pages. (true): </td> <td valign="bottom"> <select name="ui_displayfluxlink"> <option value="1">true</option> <option value="0" <?php if (!$cfg["ui_displayfluxlink"]) { echo "selected"; } ?> >false</option> </select> </td> </tr> <tr><td colspan="2"><hr noshade></td></tr> <tr> <td align="center" colspan="2"> <input type="Submit" value="Update Settings"> </td> </tr> </table> </form> </td></tr> <!-- user-settings --> </table> <script language="JavaScript"> function validateProfile() { var msg = "" if (theForm.pass1.value != "" || theForm.pass2.value != "") { if (theForm.pass1.value.length <= 5 || theForm.pass2.value.length <= 5) { msg = msg + "* <?php echo _PASSWORDLENGTH; ?> \n"; theForm.pass1.focus(); } if (theForm.pass1.value != theForm.pass2.value) { msg = msg + "* <?php echo _PASSWORDNOTMATCH; ?> \n"; theForm.pass1.value = ""; theForm.pass2.value = ""; theForm.pass1.focus(); } } if (msg != "") { alert("<?php echo _PLEASECHECKFOLLOWING; ?> :\n\n" + msg); return false; } else { return true; } } </script> <?php echo "</td></tr>"; echo "</table></div><br><br>"; DisplayFoot(); }