Example #1
0
<?php

$header = new xhtml_header();
echo $header->render();
?>
<div id="menu_holder">
    <div id="leftmenu">
<?php 
$menu = array('index.php' => 'Home');
echo xhtmlMenu($menu);
if ($session->isAdmin) {
    $menu = array('admin_addlang.php' => 'Add language', $config['core']['web_root'] . 'admin/admin.php' . getProjectPath(0) => 'Admin');
    echo xhtmlMenu($menu);
}
if ($session->id) {
    $menu = array('add_word.php' => 'Add word', 'add_text.php' => 'Add longer text', 'show_words.php' => 'Show words', 'guess_language.php' => 'Guess language', 'acronym.php' => 'Make acronyms', '?logout' => 'Log out');
    echo xhtmlMenu($menu);
}
?>
    </div>

    <div id="middle">
<!-- head end -->
Example #2
0
        <a href="<?php 
echo $config['app']['web_root'];
?>
wiki.php?Wiki:About">About</a>
        <a href="<?php 
echo $config['app']['web_root'];
?>
wiki.php?Wiki:Help">Help</a>
    </div>
</div>
<div id="leftmenu">
<?php 
$menu = array('index.php' => 'Home', 'news.php' => 'News', 'faq.php' => 'FAQ', 'feedback.php' => 'Feedback', 'forum.php' => 'Forum', 'scribble.php' => 'Scribble', 'blogs.php' => 'Blogs', 'polls.php' => 'Polls', 'users.php' => 'Users');
echo xhtmlMenu($menu);
if ($session->isAdmin) {
    $menu = array($config['core']['web_root'] . 'admin/admin.php' . getProjectPath(0) => 'Admin');
    echo xhtmlMenu($menu);
}
if ($session->id) {
    $menu = array('user.php' => 'My profile', '?logout' => 'Logout');
} else {
    $menu = array('login.php' => 'Log in');
}
echo xhtmlMenu($menu);
?>
<br/>
Quick search:<br/>
<form method="post" action="">
<input type="text" name="qu" size="12"> <a href="?rand">[R]</a><br/>
</form>
</div>
function getProject($themeName)
{
    ProviderLog::start('getProject');
    $projectPath = getProjectPath($themeName);
    $result = getJsonContent($projectPath);
    ProviderLog::end('getProject');
    return $result;
}
 public static function buildThemesData($currentIndex = '', $adminDir = '')
 {
     $token = Designer::getToken();
     $baseUrl = Designer::getBaseUrlWithLastSlash();
     $themesUrl = $baseUrl . 'themes';
     $adminUrl = $baseUrl . $adminDir . '/' . ($currentIndex ? $currentIndex : 'index.php?controller=AdminAjax') . '&token=' . $token;
     $shop = Designer::getShop();
     $themes = array();
     foreach (Theme::getAvailable(false) as $themeName) {
         if (strpos($themeName, _PREVIEW_SUFFIX_) !== FALSE || !file_exists(getProjectPath($themeName))) {
             continue;
         }
         $id = Designer::getThemeId($themeName);
         $themeUrl = $themesUrl . '/' . $themeName;
         $url = $adminUrl . '&theme_name=' . $themeName;
         $themes['themes'][$themeName] = array('themeName' => $themeName, 'thumbnailUrl' => $themeUrl . '/preview.jpg', 'openUrl' => $url . '&ajax=1&ver=' . theme_get_manifest_version($themeName) . getDesktopParams(), 'settingsUrl' => $url . '&edit=1', 'isActive' => $id && $shop->id_theme == $id);
     }
     return $themes;
 }