コード例 #1
0
ファイル: menu.php プロジェクト: pawelzielak/opencaching-pl
function mnu_MainMenuIndexFromPageId($menustructure, $pageid)
{
    /* selmenuitem contains the selected (bold) menu item */
    global $mnu_selmenuitem;
    for ($i = 0, $ret = -1; $i < count($menustructure) && $ret == -1; $i++) {
        if ($menustructure[$i]['siteid'] === $pageid || is_array($menustructure[$i]['siteid']) && in_array($pageid, $menustructure[$i]['siteid'])) {
            $mnu_selmenuitem = $menustructure[$i];
            return $i;
        } else {
            if (isset($menustructure[$i]['submenu'])) {
                $ret = mnu_MainMenuIndexFromPageId($menustructure[$i]['submenu'], $pageid);
                if ($ret != -1) {
                    return $i;
                }
            }
        }
    }
    return $ret;
}
コード例 #2
0
ファイル: main.tpl.php プロジェクト: kirstenko/oc-server3
	   htmlheaders    additional HTML headers
	   loginbox       login status (login form or username)
	   functionsbox   available function on this site
	   template       template to display
	   runtime        computing time

 ****************************************************************************/
//Menü laden
global $mnu_bgcolor, $mnu_selmenuitem, $develwarning, $tpl_subtitle, $opt, $rootpath, $usr;
require_once $stylepath . '/lib/menu.php';
if (function_exists('post_config')) {
    post_config();
}
require_once $rootpath . 'lib2/smarty/ocplugins/function.season.php';
$sUserCountry = getUserCountry();
$pageidx = mnu_MainMenuIndexFromPageId($menu, $tplname);
if (isset($menu[$pageidx]['navicolor'])) {
    $mnu_bgcolor = $menu[$pageidx]['navicolor'];
} else {
    $mnu_bgcolor = '#D5D9FF';
}
if ($tplname != 'start') {
    $tpl_subtitle .= htmlspecialchars($mnu_selmenuitem['title'], ENT_COMPAT, 'UTF-8');
}
$tpl_subtitle .= ' - ' . htmlspecialchars($opt['locale'][$locale]['page']['subtitle1'], ENT_COMPAT, 'UTF-8');
$meta_keywords = htmlspecialchars($opt['page']['meta']['keywords'], ENT_COMPAT, 'UTF-8');
$meta_description = htmlspecialchars($opt['page']['meta']['description'], ENT_COMPAT, 'UTF-8');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
コード例 #3
0
        <span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
        {GeoKretyApi_windowContent}
    </p><hr>
    <p style="font-size: 8px">
        {{GKApi27}}
    </p>
</div>
<div class="content2-container line-box">
    <div class="">
        <div class="nav4">
            <?php 
if ($usr == false) {
    echo '<span class="notlogged-cacheview">' . tr('cache_logged_required') . '</span>';
}
// cachelisting
$clidx = mnu_MainMenuIndexFromPageId($menu, "cachelisting");
if ($menu[$clidx]['title'] != '') {
    echo '<ul id="cachemenu">';
    $menu[$clidx]['visible'] = false;
    echo '<li class="title" ';
    echo '>' . $menu[$clidx]["title"] . '</li>';
    mnu_EchoSubMenu($menu[$clidx]['submenu'], $tplname, 1, false);
    echo '</ul>';
}
//end cachelisting
?>
        </div>
        <div class="content2-container-2col-left" style="width:60px; clear: left;">
            <div><img src="{icon_cache}" class="icon32" id="viewcache-cacheicon" alt="{cachetype}" title="{cachetype}"/></div>
            <div>{difficulty_icon_diff}</div><div>{difficulty_icon_terr}</div>
            <div>{cache_stats}</div>
コード例 #4
0
<!--    CONTENT -->
<div class="content2-container">
    <div class="content2-pagetitle"><img src="tpl/stdstyle/images/blue/stat1.png" class="icon32" alt="{title_text}" title="{title_text}" />&nbsp;{{statistics_users}}: {username} </div>
    <div class="nav4">
        <?php 
// statlisting
$statidx = mnu_MainMenuIndexFromPageId($menu, "statlisting");
if ($menu[$statidx]['title'] != '') {
    echo '<ul id="statmenu">';
    $menu[$statidx]['visible'] = false;
    echo '<li class="title" ';
    echo '>' . $menu[$statidx]["title"] . '</li>';
    mnu_EchoSubMenu($menu[$statidx]['submenu'], $tplname, 1, false);
    echo '</ul>';
}
//end statlisting
?>
    </div>

    {content}
</div>

コード例 #5
0
ファイル: main.tpl.php プロジェクト: kojoty/opencaching-pl
    echo '<li class="title">' . $menu[$myhomeidx]["title"] . '</li>';
    mnu_EchoSubMenu($menu[$myhomeidx]['submenu'], $menu_item_siteid, 1, false);
    echo '</ul>';
}
?>
                    <?php 
if (isset($usr['admin']) && $usr['admin']) {
    echo '<ul>';
    $adminidx = mnu_MainMenuIndexFromPageId($menu, "viewreports");
    $menu[$adminidx]['visible'] = false;
    echo '<li class="title">' . $menu[$adminidx]["title"] . '</li>';
    $zgloszeniaidx = mnu_MainMenuIndexFromPageId($menu[$adminidx]["submenu"], "viewreports");
    if ($active_reports > 0) {
        $menu[$adminidx]["submenu"][$zgloszeniaidx]['menustring'] .= " (" . $new_reports . "/" . $active_reports . ")";
    }
    $zgloszeniaidx = mnu_MainMenuIndexFromPageId($menu[$adminidx]["submenu"], "viewpendings");
    if ($new_pendings > 0) {
        $menu[$adminidx]["submenu"][$zgloszeniaidx]['menustring'] .= " (" . $new_pendings . ")";
    }
    mnu_EchoSubMenu($menu[$adminidx]['submenu'], $menu_item_siteid, 1, false);
    echo '</ul>';
}
?>

                    <!-- Main title -->
                </div>



                <!--     CONTENT -->
                <div class="content2">