
20.10.2007, 14:56
|
|
Участник форума
Регистрация: 28.07.2007
Сообщений: 177
Провел на форуме: 274360
Репутация:
5
|
|
((( navigationbar.class.php )))
((( navigationbar.class.php )))
PHP код:
<?php
if (!defined("IN_REVISION")) { header("Location: ../../../index.php"); exit; }
/*--------------------------------------------+
| PHP-Fusion v6 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: nick@php-fusion.co.uk |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/*--------------------------------------------+
| Revision Theme for PHP-Fusion v6 |
|---------------------------------------------|
| author: UworldIRC - Riadi © 2006 |
| web: http://www.uworldirc.com/ |
| email: riadi@gcinet.org |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
class RevisionNBAR {
var $mopen = false;
var $sopen = false;
var $constucted = false;
var $locked = false;
var $content = '';
var $temp = '';
function construct() {
if ($this->constucted)
return;
$this->content = "<div id='navBar'><div id='navBarOverlay'><ul id='menu'>";
$this->constucted = true;
}
function newlink() {
if ($this->locked)
return;
$numargs = func_num_args();
if ($numargs < 2)
return;
$name = func_get_arg(0);
$title = ($numargs > 2 ? func_get_arg(1) : false);
$url = ($numargs > 2 ? func_get_arg(2) : func_get_arg(1));
if (preg_match('#(http://|ftp://|https://|ftps://|irc://)#si', $url))
$url = " href='".$url."' target='_blank'";
else
$url = " href='".BASEDIR.$url."'";
if (($this->mopen) && ($this->sopen)) {
$this->content .= $this->temp."</ul></li>";
}
$this->mopen = false;
$this->sopen = false;
if (!$this->constucted)
$this->construct();
$this->content .= "<li class='link'><a onmousedown='return false;' ".$url.($title ? " title='".$title."'" : "").">".$name."</a></li>";
}
function newmenu() {
if ($this->locked)
return;
$numargs = func_num_args();
if ($numargs < 1)
return;
$name = func_get_arg(0);
$title = ($numargs > 1 ? func_get_arg(1) : false);
if (!$this->constucted)
$this->construct();
if (($this->mopen) && ($this->sopen)) {
$this->content .= $this->temp."</ul></li>";
$this->mopen = false;
$this->sopen = false;
}
$this->mopen = true;
$this->temp = "<li class='menu'><p".($title ? " title='".$title."'" : "").">".$name."</p><ul class='submenu'>";
}
function submenu() {
if (($this->locked) || (!$this->mopen))
return;
$numargs = func_num_args();
if ($numargs < 3)
return;
$name = func_get_arg(0);
$title = ($numargs > 3 ? func_get_arg(1) : false);
$url = ($numargs > 3 ? func_get_arg(2) : func_get_arg(1));
$divider = ($numargs > 3 ? func_get_arg(3) : func_get_arg(2));
if (preg_match('#(http://|ftp://|https://|ftps://|irc://)#si', $url))
$url = " href='".$url."' target='_blank'";
else
$url = " href='".BASEDIR.$url."'";
if (($divider != 1) && ($divider != 0))
$divider = 0;
$this->sopen = true;
$this->temp .= "<li><a onmousedown='return false;'".($divider == 1 ? " class='divider'" : "")."".$url."".($title ? " title='".$title."'" : "").">".$name."</a></li>";
}
function generate() {
if (($this->locked) || (!$this->constucted))
return;
if (($this->mopen) && ($this->sopen)) {
$this->content .= $this->temp."</ul></li>";
}
echo $this->content."</ul><div id='clearmenu'></div></div></div>\n";
$this->locked = true;
}
}
$rtNavbar = new RevisionNBAR();
?>
|
|
|