Location: PHPKode > projects > Buzzword > buzzword-0.8.12/links/index.php
<?php

/*
 * buzzword
 * Copyright (c) 2003 Jon Tai
 *
 * $Id: index.php 334 2004-04-18 01:35:29Z jon $
 *
 * This file is part of buzzword.
 *
 * buzzword is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * buzzword is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with buzzword; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

require_once './config.inc';
include_once '../includes/header.inc';

?>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td id="content">
<?php

$categories = get_links_categories();
foreach ($categories as $category) {

?>
<h1><?php echo $category->get_display_title(); ?><a name="category-<?php echo $category->category_key; ?>">&nbsp;</a></h1>
<div class="content-container">
<?php

    echo $category->get_display_description();

    if (defined('ADMIN_LOGGED_IN')) {
        echo "<p>\n";
        echo "<a href=\"editcategory.php?c={$category->category_key}\">edit category</a><br>\n";
        echo "<a href=\"delcategory.php?c={$category->category_key}\">delete category</a><br>\n";
        echo "</p>\n";
    }

    $links = get_links_links($category->category_key);
    foreach ($links as $link) {
        echo "<div class=\"links-title\"><span class=\"h2\"><a \n";
        echo " href=\"link.php?l=$link->link_key\">".$link->get_display_title()."</a></span></div>\n";
        echo "<div class=\"links-url\">".$link->get_display_url()."</div>\n";
    }

?>
</div>
<?php

}

?>
</td>
<td id="sidebar">
<h1>categories</h1>
<div class="sidebar-container">
<p>
<?php

echo get_sidebar_links_categories();

?>
</p>
</div>
<?php if (defined('ADMIN_LOGGED_IN')) { ?>
<h1>administration</h1>
<div class="sidebar-container">
<p>
<a href="newcategory.php">new category</a><br>
<?php if (count($categories)) { ?>
<a href="newlink.php">new link</a><br>
<?php } ?>
<a href="../admin/preferences.php">preferences</a><br>
<a href="../admin/index.php?admin-logout=1">log out</a><br>
</p>
</div>
<?php } ?>
</td>
</tr>
</table>
<?php

include_once '../includes/footer.inc';

?>
Return current item: Buzzword