예제 #1
0
function showIndex($min)
{
    DisplayHead(_UPLOADHISTORY);
    // Display Activity
    displayActivity($min);
    DisplayFoot();
}
                echo "</select> ";
                echo "<input type=submit value='Show Latest'>";
                echo "</form>\n";
            } else {
                echo "</td></tr></table></div>";
                // Set the Sub to equal the main for groups that don't have subs.
                $_REQUEST["subGenre"] = $mainGenre;
                echo $sEngine->getLatest();
            }
        } else {
            echo "</td></tr></table></div>";
            if (array_key_exists("LATEST", $_REQUEST) && $_REQUEST["LATEST"] == "1") {
                echo $sEngine->getLatest();
            } else {
                echo $sEngine->performSearch($searchterm);
            }
        }
    } else {
        // there was an error connecting
        echo "</td></tr>";
        echo "<tr><td><br><br><div align=center><strong>" . $sEngine->msg . "</strong></div><br><br></td></tr>";
        echo "</table></div>";
    }
} else {
    // there was an error connecting
    echo "</td></tr>";
    echo "<tr><td><br><br><div align=center><strong>Search Engine not installed.</strong></div><br><br></td></tr>";
    echo "</table></div>";
}
DisplayFoot();
예제 #3
0
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.

 To read the license please visit http://www.gnu.org/copyleft/gpl.html

*******************************************************************************/
// includes
include_once "config.php";
include_once "functions.php";
if (isset($_REQUEST["u"])) {
    DisplayHead("dereferrer", false, '0;URL=' . $_REQUEST["u"]);
    ?>
    <br>
    <div align="left" id="BodyLayer" name="BodyLayer" style="border: thin solid <?php 
    echo $cfg["main_bgcolor"];
    ?>
; position:relative; width:740; height:500; padding-left: 5px; padding-right: 5px; z-index:1; overflow: scroll; visibility: visible">
<?php 
    echo '<br><br><strong>';
    echo 'forwarding to <a href="' . $_REQUEST["u"] . '">' . $_REQUEST["u"] . '</a> ...';
    echo '</strong><br><br>';
    DisplayFoot(false, false);
} else {
    header("location: index.php");
    exit;
}
예제 #4
0
function uiSettings()
{
    global $cfg;
    // load global settings + overwrite per-user settings
    loadSettings();
    // display
    DisplayHead("Administration - UI Settings");
    // Admin Menu
    displayMenu();
    // Main Settings Section
    ?>
	<div align="center">
	<table width="100%" border="1" bordercolor="<?php 
    echo $cfg["table_admin_border"];
    ?>
" cellpadding="2" cellspacing="0" bgcolor="<?php 
    echo $cfg["table_data_bg"];
    ?>
">
	<tr><td bgcolor="<?php 
    echo $cfg["table_header_bg"];
    ?>
" background="themes/<?php 
    echo $cfg["theme"];
    ?>
/images/bar.gif">
	<img src="images/properties.png" width="18" height="13" border="0">&nbsp;&nbsp;<font class="title">UI Settings</font>
	</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=updateUiSettings" method="post">



		<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>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>
			</form>
		</table>
	</div>
</td></tr>
</table></div>
<?php 
    DisplayFoot(true, true);
}
예제 #5
0
function ShowCookies()
{
    global $cfg, $db;
    DisplayHead($cfg["user"] . "'s " . _PROFILE);
    $cid = @$_GET["cid"];
    // Cookie ID
    // Used for when editing a cookie
    $hostvalue = $datavalue = "";
    if (!empty($cid)) {
        // Get cookie information from database
        $cookie = getCookie($cid);
        $hostvalue = " value=\"" . $cookie['host'] . "\"";
        $datavalue = " value=\"" . $cookie['data'] . "\"";
    }
    ?>
<SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function popUp(name_file)
    {
        window.open (name_file,'help','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=600')
    }
    // End -->
</script>
<div align="center">[<a href="?">Return to Profile</a>]</div>
<br />
<div align="center">
    <form action="?op=<?php 
    echo !empty($cid) ? "modCookie" : "addCookie";
    ?>
"" method="post">
    <input type="hidden" name="cid" value="<?php 
    echo $cid;
    ?>
" />
    <table border="1" bordercolor="<?php 
    echo $cfg["table_admin_border"];
    ?>
" cellpadding="2" cellspacing="0" bgcolor="<?php 
    echo $cfg["table_data_bg"];
    ?>
">
        <tr>
            <td colspan="3" bgcolor="<?php 
    echo $cfg["table_header_bg"];
    ?>
" background="themes/<?php 
    echo $cfg["theme"];
    ?>
/images/bar.gif">
                <img src="images/properties.png" width=18 height=13 border=0 align="absbottom">&nbsp;<font class="title">Cookie Management</font>
            </td>
        </tr>
        <tr>
            <td width="80" align="right">&nbsp;Host:</td>
            <td>
                <input type="Text" size="50" maxlength="255" name="host"<?php 
    echo $hostvalue;
    ?>
><BR />
            </td>
            <td>
                www.host.com
            </td>
        </tr>
        <tr>
            <td width="80" align="right">&nbsp;Data:</td>
            <td>
                <input type="Text" size="50" maxlength="255" name="data"<?php 
    echo $datavalue;
    ?>
><BR />
            </td>
            <td>
                uid=123456;pass=a1b2c3d4e5f6g7h8i9j1
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td colspan="2">
                <input type="Submit" value="<?php 
    echo !empty($cid) ? _UPDATE : "Add";
    ?>
">
            </td>
        </tr>
<?php 
    // We are editing a cookie, so have a link back to cookie list
    if (!empty($cid)) {
        ?>
        <tr>
            <td colspan="3">
                <center>[ <a href="?op=editCookies">back</a> ]</center>
            </td>
        </tr>
<?php 
    } else {
        ?>
        <tr>
            <td colspan="3">
                <table border="1" bordercolor="<?php 
        echo $cfg["table_admin_border"];
        ?>
" cellpadding="2" cellspacing="0" bgcolor="<?php 
        echo $cfg["table_data_bg"];
        ?>
" width="100%">
                    <tr>
                        <td style="font-weight: bold; padding-left: 3px;" width="50">Action</td>
                        <td style="font-weight: bold; padding-left: 3px;">Host</td>
                        <td style="font-weight: bold; padding-left: 3px;">Data</td>
                    </tr>
<?php 
        // Output the list of cookies in the database
        $sql = "SELECT c.cid, c.host, c.data FROM tf_cookies AS c, tf_users AS u WHERE u.uid=c.uid AND u.user_id='" . $cfg["user"] . "'";
        $dat = $db->GetAll($sql);
        if (empty($dat)) {
            ?>
                <tr>
                    <td colspan="3">No cookie entries exist.</td>
                </tr>
<?php 
        } else {
            foreach ($dat as $cookie) {
                ?>
                    <tr>
                        <td>
                            <a href="?op=deleteCookie&cid=<?php 
                echo $cookie["cid"];
                ?>
"><img src="images/delete_on.gif" width=16 height=16 border=0 title="<?php 
                echo _DELETE . " " . $cookie["host"];
                ?>
" align="absmiddle"></a>
                            <a href="?op=editCookies&cid=<?php 
                echo $cookie["cid"];
                ?>
"><img src="images/properties.png" width=18 height=13 border=0 title="<?php 
                echo _EDIT . " " . $cookie["host"];
                ?>
" align="absmiddle"></a>
                        </td>
                        <td><?php 
                echo $cookie["host"];
                ?>
</td>
                        <td><?php 
                echo $cookie["data"];
                ?>
</td>
                    </tr>
<?php 
            }
        }
        ?>
                </table>
            </td>
        </tr>
<?php 
    }
    ?>
        <tr>
            <td colspan="3">
                <br>
                <div align="center">
                <A HREF="javascript:popUp('cookiehelp.php')">How to get cookie information....</A>
                </div>
            </td>
        </tr>
        </table>
        </form>
    </div>
    <br />
    <br />
    <br />
<?php 
    DisplayFoot();
}
예제 #6
0
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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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=\"-1\">[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 "            </td>\n";
                echo "        </tr>\n";
            }
        }
    }
    echo "        </table>\n";
    echo "         </td></tr></table>";
    echo "        <br>\n";
    echo "        <input type=\"Submit\" value=\"Update Settings\">";
    echo "        </form>\n";
    echo "    </div>\n";
    echo "    <br>\n";
    echo "</td></tr>";
    echo "</table></div>";
    DisplayFoot();
}