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
<?php

require_once 'config.php';
require 'design_head.php';
echo xhtmlMenu($profile_menu, 'blog_menu');
showUserBlogs('id');
//id is the GET parameter name to pass the userId
require 'design_foot.php';
Example #3
0
<?php

require_once 'config.php';
require 'design_head.php';
echo xhtmlMenu($user_menu, 'blog_menu');
require 'design_foot.php';
Example #4
0
<?php

require_once 'config.php';
$session->requireAdmin();
if (empty($_GET['id']) || !is_numeric($_GET['id'])) {
    die;
}
//invalid request
$itemId = $_GET['id'];
require 'design_head.php';
echo xhtmlMenu($forum_menu, 'blog_menu');
echo getForumDepthHTML(FORUM_FOLDER, $itemId);
$item = getForumItem($itemId);
if ($item) {
    echo showForumPost($item, '', false);
}
if (confirmed('Are you sure you want to delete this forum post?', 'id', $itemId)) {
    deleteForumItemRecursive($itemId);
    echo 'The forum and all subforums has been deleted';
}
require 'design_foot.php';
Example #5
0
<?php

require_once 'config.php';
require 'design_head.php';
$menu = array($_SERVER['PHP_SELF'] => 'Blogs');
if ($session->id) {
    $menu = array_merge($menu, array('blog_new.php' => 'New blog'));
}
if ($session->isAdmin) {
    $menu = array_merge($menu, array('blog_archive.php?y=2006&amp;m=7' => 'Blog archive'));
    $menu = array_merge($menu, array('blog_categories.php' => 'Blog categories'));
}
echo xhtmlMenu($menu, 'blog_menu');
echo 'Newest blogs:<br/>';
$list = getLatestBlogs(5);
for ($i = 0; $i < count($list); $i++) {
    echo '<a href="blog.php?Blog:' . $list[$i]['blogId'] . '">' . $list[$i]['subject'] . '</a> - ' . $list[$i]['timeCreated'];
    echo ' by ' . Users::link($list[$i]['userId'], $list[$i]['userName']) . '<br/>';
}
require 'design_foot.php';