All pastes #2049466 Raw Edit

digitosis

public php v1 · immutable
#2049466 ·published 2011-04-22 20:26 UTC
rendered paste body
torrents.phpstarting line 152the last 2 lines are unchanged. replace everything between.after insertion, delete lines 248-266 inclusivefunction drawleftmenutorrents(&$session)   {    if (!isset($session->m_error) || (!$session->m_error)) {        global $torrentvar;        if ($torrentvar->m_found) {            DrawTorrentInfoMenuBox(&$torrentvar);            DrawTorrentTagsMenuBox(&$torrentvar);            // BEGIN tubesite             ?>            <div class="menubox" id="tubesite">            <p class="title">Tubesite</p>            <ul>            <?            $outhtml = array();            if (is_allowed('tubesite_add') && TUBESITE_ACTIVE === true) {                if ($torrentvar->m_torrentfields['tube_status'] == 'none') {                    $outhtml[] = '<li><a href="' . buildUrl('tubesite', $torrentvar->m_torrentfields['torrentid']) . '">Add to tube</a></li>';                }                else if (($torrentvar->m_torrentfields['tube_status'] == 'done' || $torrentvar->m_torrentfields['tube_status'] == 'pending')) {                    $outhtml[] = '<li><a href="' . buildUrl('tubesite', $torrentvar->m_torrentfields['torrentid'], 'delete') . '">Remove from tube</a></li>';                    if ($torrentvar->m_torrentfields['tube_status'] == 'pending') {                        $outhtml[] = '<li><a href="' . buildUrl('tubesite', $torrentvar->m_torrentfields['torrentid'], 'status') . '">Grabber status</a></li>';                    }                }                $outhtml[] = '<li><a href="' . buildUrl('tubesite', $torrentvar->m_torrentfields['torrentid'], 'clear') . '">Clear tube status</a></li>';                $outhtml[] = '<li><a title="Search for torrents that have been pushed to the tube" href="/' . buildUrl('torrentlist') . '?tube=yes">Find tubed torrents</a></li>';            }            if (!empty($outhtml)) {                echo join("\n", $outhtml);            }            ?>            </ul>            </div>            <?            // END tubesite        }        else {            drawTagSearchBox(&$session);        }    }}function drawTorrentMenubox(&$session) {    global $torrentvar;    $torrent_id = $torrentvar->m_torrentfields['torrentid'];        // BEGIN DIRECT DOWNLOAD ADLINKS    $directbytitle = str_replace(' ', '+', htmlspecialchars($torrentvar->m_torrentfields['torrentname']));    $directbytag = str_replace(' ', '+', $torrentvar->m_tagString);    ?>    <div class="menubox" id="directdl">    <p class="title">Download Direct</p>    <ul>        <li><a href="http://gorillaserver.net/35901/<?=$directbytitle;?>" target=_blank>By Title</a></li>        <li><a href="http://gorillaserver.net/35901/<?=$directbytag;?>" target=_blank>By Tags</a></li>    </ul>    </div>    <?    // END DIRECT DOWNLOAD ADLINKS    ?>    <div class="menubox" id="torrentcontrols">    <p class="title">Torrent Menu</p>browsetorrents.phpreplace the entire <form> that begins on line 542        <form method="get" action="" name="searchfacilityform">            <ul>                <li><p class="title">Torrent Search<br /></li>                <li><input type="text" id="tag_search_string" name="tag_search_string" style="width: 400px;" value="" maxlength="100" /></li>                <li><input style="padding:3px;" type="submit" name="button" id='searchbutton' value="Search" /></li>                <li><a id="toggle" title="How Search Works"><img class="inline_icon_36" alt="How Search Works" src="/images/icons/symbol_faq_48.png"></a></li>            </ul>            <br />            <ul>                <li>Search in:                    <select name="searchparm">                        <option value="all" selected="selected">All&nbsp;</option>                         <option value="tags">Tags&nbsp;</option>                        <option value="title">Title&nbsp;</option>                        <option value="description">Description&nbsp;</option>                        <option value="who">Uploader Name&nbsp;</option>                        <option value="raw">Raw String (Expert Mode)&nbsp;</option>                    </select>                </li>                <?php if (is_allowed('tubesite_add')) { ?>                <li>With tube parameters:                    <select name="tube">                        <option value="ignore" selected="selected">Ignore tube status</option>                        <option value="done">Return tubed torrents only</option>                        <option value="pending">Return pending torrents only</option>                        <option value="any">Return tubed or pending torrents</option>                        <option value="none">Return only torrents not added to tube</option>                    </select>                </li                <?php } ?>            </ul>            <br />            <input type="checkbox" <?=(($append !== FALSE && isset($tcount) && $tcount >= 1) ? 'checked ' : '')?>name="append" />Add to search (uncheck for new search)            <input type="hidden" name="filter" id="filterappend" value="<?=!empty($_GET['filter']) ? unesc($_GET['filter']) : ''?>" />            <?=(!empty($_GET['cat'])) ? "\t\t\t".'<input type="hidden" name="cat" value="'.htmlspecialchars($_GET['cat']).'" />'."\n":''?>            <?=(!empty($_GET['sort'])) ? "\t\t\t".'<input type="hidden" name="sort" value="'.htmlspecialchars($_GET['sort']).'" />'."\n":''?>            <input type="hidden" name="action" value="tagsearch" />        </form>