Exemplo n.º 1
0
         break;
     case "repou":
         $ord = 'repobrief';
         break;
     case "repod":
         $ord = 'repobrief desc';
         break;
     case "locu":
         $ord = 'pkgloc';
         break;
     case "locd":
         $ord = 'pkgloc desc';
         break;
 }
 $fl = new filelist();
 $nres = $fl->find($sfile, $sname, $sdesc, $repo, $ord);
 if (isset($_GET['debug'])) {
     var_dump($fl, $nres);
 }
 $to = $start + $maxresult;
 if ($to > $nres) {
     $to = $nres;
 }
 $duration = round($pkg->db->msec / 1000, 3);
 echo "Time: {$duration} msec<br />";
 echo "Results " . ($start + 1) . "-{$to} of {$nres}:                    ";
 if ($start > 0) {
     echo "<a href='index.php?start=0&maxresult={$maxresult}&repo={$repo}&name={$name}&desc={$desc}&file={$file}&order={$order}#results'>&lt;&lt;</a>  ";
     $from = $start - $maxresult;
     if ($from < 0) {
         $from = 0;
Exemplo n.º 2
0
         break;
     case "repou":
         $ord = 'repobrief';
         break;
     case "repod":
         $ord = 'repobrief desc';
         break;
     case "locu":
         $ord = 'pkgloc';
         break;
     case "locd":
         $ord = 'pkgloc desc';
         break;
 }
 $fl = new filelist();
 $nres = $fl->find($file, $name, $desc, $repo, $ord);
 if (isset($_GET['debug'])) {
     var_dump($fl, $nres);
 }
 $to = $start + $maxresult;
 if ($to > $nres) {
     $to = $nres;
 }
 if ($start > 0) {
     $from = $start - $maxresult;
     if ($from < 0) {
         $from = 0;
     }
 }
 if ($to < $nres) {
     $pg = round($nres / $maxresult - 0.5, 0);
Exemplo n.º 3
0
        $reqs = explode(",", $pk->required);
        foreach ($reqs as $key => $req) {
            $areq = explode("|", $req);
            foreach ($areq as $akey => $rr) {
                $rm = preg_replace("/ .*/", "", $rr);
                $areq[$akey] = "<a href='index.php?name={$rm}#results'>" . htmlentities($rr) . "</a>";
            }
            $reqs[$key] = implode("|", $areq);
        }
        $r = implode("<br>", $reqs);
        echo tables(array("<nobr>Package required</nobr>:", $r));
        echo tables(array("Package location:", "<a href={$repo->url}{$pk->location}>{$pk->location}</a>"));
        echo tables(array("Package filename:", "<a href={$repo->url}{$pk->location}/{$pk->filename}>{$pk->filename}</a>"));
        echo tables();
        if ($pk->description) {
            echo "Description:\n";
            echo str_replace("\n", "\n| ", "\n" . $pk->description);
        }
        if ($repo->manifest) {
            $list = new filelist();
            $nrow = $list->find('', $pkg);
            echo "\n\nThis package contain {$nrow} files:\n\n";
            while ($line = $list->get()) {
                echo $line['fullpath'] . $line['filename'] . "\n";
            }
        }
    }
}
echo "</pre>";
echo "To report a bug, send a mail to <a href='mailto:zerouno@slacky.it'>zerouno@slacky.it</a>. Thanks.";
echo "</body></html>";