Ejemplo n.º 1
0
            $where .= "{$cidw},";
        }
        $where = substr($where, 0, -1);
        $where = "(cid IN({$where}) or cid1 IN({$where}) or cid2 IN({$where}) or cid3 IN({$where}) or cid4 IN({$where}) )";
    } else {
        $where = "( cid={$cid} or cid1={$cid} or cid2={$cid} or cid3={$cid} or cid4={$cid} )";
    }
    $prs = $xoopsDB->query("SELECT COUNT(lid) FROM {$table_photos} WHERE {$where} AND status>0");
    list($photo_small_sum) = $xoopsDB->fetchRow($prs);
    $xoopsTpl->assign('photo_small_sum', $photo_small_sum);
    //breadcrumbs
    $xoops_breadcrumbs[] = array('url' => XOOPS_URL . '/modules/' . $mydirname . '/index.php', 'name' => $xoopsModule->getVar('name'));
    if ($gnavi_indexpage == 'map') {
        $xoops_breadcrumbs[] = array('url' => XOOPS_URL . '/modules/' . $mydirname . '/index.php?page=category', 'name' => _MD_GNAV_CAT_ITEMLIST);
    }
    $xoops_breadcrumbs = gnavi_add_breadcrumbs($pid, "index.php" . ($page_cat ? '?' . $page_cat : ''), $xoops_breadcrumbs);
    $xoops_breadcrumbs[] = array('name' => $myts->makeTboxData4show($cat_title));
    $xoopsTpl->assign('imgurl', $imgurl);
    $xoopsTpl->assign('description', $description);
    $get_append = "cid={$cid}";
} else {
    if ($uid != 0) {
        if ($uid < 0) {
            // This means 'my photo'
            $where = "submitter={$my_uid}";
            $get_append = "uid=-1";
            $xoopsTpl->assign('uid', -1);
            $pagetitle = _MD_GNAV_CAT_MYPOST;
        } else {
            // uid Specified
            $where = "submitter={$uid}";
Ejemplo n.º 2
0
if ($cid > 0) {
    $rs = $xoopsDB->query("SELECT title,imgurl,kmlurl,description FROM {$table_cat} WHERE cid='{$cid}'");
    list($cat_title, $imgurl, $kmlurl, $description) = $xoopsDB->fetchRow($rs);
    $xoopsTpl->assign('cattitle', $cat_title);
    $xoopsTpl->assign('catimgurl', $imgurl);
    $xoopsTpl->assign('catdescription', $description);
}
$get_append = 'cid=' . $cid . '&lid=' . $lid;
$xoopsTpl->assign('link_option', $get_append ? "?" . $get_append : '');
$mapget_append = $get_append ? $get_append . '&page=map' : 'page=map';
$xoopsTpl->assign('maplink_option', $mapget_append ? "?" . $mapget_append : '');
$xoopsTpl->assign('category_id', $cid);
$cids = $cattree->getAllChildId($cid);
//breadcrumbs
$xoops_breadcrumbs[] = array('url' => XOOPS_URL . '/modules/' . $mydirname . '/index.php', 'name' => $xoopsModule->getVar('name'));
$xoops_breadcrumbs = gnavi_add_breadcrumbs($cid, "index.php?", $xoops_breadcrumbs);
$xoops_breadcrumbs[] = array('name' => $photo['title']);
$xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs);
//get icon
$icon = $photo['icd'] > 0 ? $photo['icd'] : gnavi_get_icon($cattree, $photo['cid'], $photo['cid1'], $photo['cid2'], $photo['cid3'], $photo['cid4'], $cid);
$arricon = gnavi_get_gicon($icon);
//kml settings
$mykmls = "";
if ($photo['mykmls']) {
    $kmlurl = $kmlurl ? $photo['mykmls'] . ",'" . $kmlurl . "'" : $photo['mykmls'];
} else {
    $kmlurl = $kmlurl ? "'" . $kmlurl . "'" : "";
}
if ($kmlurl) {
    $mykmls = "gn_mykmls = new Array(" . $kmlurl . ");";
}