All pastes #611122 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-09 19:47 UTC
rendered paste body
****Custom CyberDoc Edition****




  <td><input type="submit" value="<?php echo SEARCH; ?>"></td>
<td width=10 align=center><nobr></td>
   </tr>
   <div id="kbrowse" style="display: none;"><table width=100% border="0" class=statusbar >
 <tr>
 <br>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c21 type="checkbox" value=1>
                  <a href="?search=&category=11"><b>DVD-R</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c27 type="checkbox" value=1>
                  <a href="?search=&category=12"><b>Mvcd</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c72 type="checkbox" value=1>
                  <a href="?search=&category=2"><b>Music</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c73 type="checkbox" value=1>
                  <a href="?search=&category=3"><b>Games</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c75 type="checkbox" value=1>
                  <a href="?search=&category=4"><b>Other</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c45 type="checkbox" value=1>
                  <a href="?search=&category=5"><b>Anime</b></a></td>
</tr><tr><div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c47 type="checkbox" value=1>
                  <a href="?search=&category=6"><b>Books</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c67 type="checkbox" value=1>
                  <a href="?search=&category=7"><b>Apps Win</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c70 type="checkbox" value=1>
                  <a href="?search=&category=8"><b>Apps Linux</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c48 type="checkbox" value=1>
                  <a href="?search=&category=9"><b>Apps Mac</b></a></td>
<div align=center><td align=left class="bottom" style="padding-bottom: 2px;padding-left: 7px">
                  <input name=c59 type="checkbox" value=1>
                  <a href="?search=&category=0"><b>All</b></a></td>
</tr>
<td></td>
<td></td>
</div>
  </tr>
  </table>
  </tr>
  </table>
</form>
</p>
<TABLE width="100%" >
<TR>
<?php

/* Rewrite, part 1: encode "WHERE" statement only. */

// echo "Totale torrents trovati: $count";
// selezione categoria
if ($category[0]>0) {
   $where .= " AND category IN (".implode(",",$category).")"; // . $_GET["category"];
   $addparam.="&amp;category=".implode(";",$category); // . $_GET["category"];
}
global $pagertop, $pagerbottom, $query_select;
// Search
if (isset($_GET["search"])) {
   $testocercato = trim($_GET["search"]);
   $testocercato = explode(" ",$testocercato);
   if ($_GET["search"]!="")
      $search = "search=" . implode("+",$testocercato);
    for ($k=0; $k < count($testocercato); $k++) {
        $query_select .= " namemap.filename LIKE '%" . mysql_escape_string($testocercato[$k]) . "%'";
        if ($k<count($testocercato)-1)
           $query_select .= " AND ";
    }
    $where .= " AND " . $query_select;
}

// FINE RICERCA