Esempio n. 1
0
$tpl->assign('nUserLon', $nUserLon);
$tpl->assign('nUserLat', $nUserLat);
$tpl->assign('nGMInitLon', $nGMInitLon);
$tpl->assign('nGMInitLat', $nGMInitLat);
$tpl->assign('nGMInitZoom', $nGMInitZoom);
$tpl->assign('bGMInitCookiePos', $bGMInitCookiePos ? 1 : 0);
$tpl->assign('sGMInitWaypoint', $sGMInitWaypoint);
$tpl->assign('bFullscreen', $fullscreen ? 1 : 0);
$rsCacheType = sql("SELECT `cache_type`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_type`.`short2`) AS `text` FROM `cache_type` LEFT JOIN `sys_trans_text` ON `cache_type`.`short2_trans_id`=`sys_trans_text`.`trans_id` AND `sys_trans_text`.`lang`='&1' ORDER BY `cache_type`.`ordinal` ASC", $opt['template']['locale']);
$tpl->assign_rs('aCacheType', $rsCacheType);
sql_free_result($rsCacheType);
$rsCacheSize = sql("SELECT `cache_size`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_size`.`name`) AS `text` FROM `cache_size` LEFT JOIN `sys_trans_text` ON `cache_size`.`trans_id`=`sys_trans_text`.`trans_id` AND `sys_trans_text`.`lang`='&1' ORDER BY `cache_size`.`ordinal` ASC", $opt['template']['locale']);
$tpl->assign_rs('aCacheSize', $rsCacheSize);
sql_free_result($rsCacheSize);
/* assign attributes */
$tpl->assign('aAttributes', attribute::getSelectableAttrbutesListArray());
$aAttributesDisabled = array();
$maxaid = 0;
$rs = sql("SELECT `id` FROM `cache_attrib`");
while ($r = sql_fetch_assoc($rs)) {
    $aAttributesDisabled[] = $r['id'];
    if ($r['id'] > $maxaid) {
        $maxaid = $r['id'];
    }
}
sql_free_result($rs);
$tpl->assign('aAttributesDisabled', $aAttributesDisabled);
$tpl->assign('maxAttributeId', $maxaid);
// options
$useroptions = new useroptions($login->userid);
$tpl->assign('opt_menumap', $useroptions->getOptValue(USR_OPT_MAP_MENU));
Esempio n. 2
0
                    }
                }
                closedir($hDir);
            }
            //article doesn't exists
            if ($language === false) {
                $tpl->redirect('index.php');
            }
        }
    }
}
$tpl->name = 'articles';
$tpl->caching = true;
$tpl->cache_id = 'articles|' . $language . '|' . $article;
$tpl->cache_lifetime = 43200;
$tpl->menuitem = sql_value("SELECT `id` FROM `sys_menu` WHERE `href`='&1' LIMIT 1", 0, 'articles.php?page=' . urlencode($article));
if ($tpl->menuitem == 0) {
    $tpl->redirect('index.php');
}
if (!$tpl->is_cached()) {
    $tpl->assign('article', $article);
    $tpl->assign('language', $language);
    /* prepare smarty vars for special pages ...
     */
    if ($article == 'cacheinfo') {
        require_once $opt['rootpath'] . 'lib2/logic/attribute.class.php';
        $attributes = attribute::getSelectableAttrbutesListArray(true);
        $tpl->assign('attributes', $attributes);
    }
}
$tpl->display();