コード例 #1
0
}
if (empty($_GET['rT'])) {
    $retType = 'HTML_UL';
} else {
    $retType = $_GET['rT'];
}
if (empty($_GET['d'])) {
    $depth = 9999;
} else {
    $depth = $_GET['d'];
}
?>
<HTML>
<BODY>
<?php 
$resInfo = queryResultsCategories($catIDs, $kwds, $onlyWithImgs, $retType);
if (!$resInfo || count($resInfo) == 0) {
    echo "<h2>Query Failed</h2>";
} else {
    echo "<h3>Categories for query on Categories:" . $cats . " and Keywords:" . $kwds . "</h3>\r\n\t";
    foreach ($resInfo as $facet) {
        echo "<h3>" . $facet['facet'] . " (" . $facet['id'] . ")</h3>";
        if ($retType == 'HTML_UL') {
            echo $facet['items'];
        } else {
            // Get as PHP and output completely
            echo "<ul>\r\n\t\t\t";
            outputPHPToDepth($facet['items'], 0, $depth);
            echo "\r\n\t\t\t</ul>\r\n\t\t\t";
        }
    }
コード例 #2
0
    $t->assign('results_start', 0);
    $t->assign('results_end', 0);
    //if( $images )
    $t->assign('toggleImages', $images);
} else {
    foreach ($objResults['objects'] as $obj) {
        $obj['img_path'] ? $img_path = $obj['img_path'] : ($obj['img_path'] = "noObjectImage");
        $imageOptions = array('img_path' => $obj['img_path'], 'size' => 90, 'img_ar' => $obj['aspectRatio'], 'linkURL' => $CFG->shortbase . "/object/" . $obj['id'], 'vAlign' => "center", 'hAlign' => "center");
        $obj['thumb'] = outputSimpleImage($imageOptions);
        $objects[] = $obj;
    }
    $t->assign('pager', themePager($page, $objResults['nPages'], "cats=10004"));
    $t->assign('results_total', $objResults['nObjs']);
    $t->assign('results_start', $page * $objResults['pageSize'] - $objResults['pageSize'] + 1);
    $t->assign('results_end', $page * $objResults['pageSize'] <= $objResults['nObjs'] ? $page * $objResults['pageSize'] : $objResults['nObjs']);
    $t->assign('facets', queryResultsCategories($catIDs, $kwds, $tag, $user, $images, "HTML_UL_ATAG", "id_"));
    $t->assign('toggleImages', $images);
}
// print_r($objects);
$t->assign('objects', $objects);
$rawfilters = getFilters($kwds, $catIDs);
$tagname = $tag ? getTagNameByID($tag) : false;
$t->assign('filters', themeFilters($rawfilters, $tagname, $user));
$t->assign('page_title', filtersToNameList($rawfilters, $tagname) . ' - PAHMA Delphi Search Results');
// Display template
$t->display('results.tpl');
function getFilters($kwds, $catIDs)
{
    $filters = array();
    if (count($catIDs)) {
        foreach ($catIDs as $catID) {