Example #1
0
                <li class="dropdown">
                    <a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown"> Ava's Book <span class="caret"></span></a>
                    <ul role="menu" class="dropdown-menu">
                        <li><a href="<?php 
echo $path;
?>
index_gallery.php">Gallery</a></li>
                <?php 
echo $Nav->menu_item('', 'Home', 'index.php', 'public');
?>
                    </ul>
                </li>

                    <?php 
//                    echo  $Nav->public_menu("public_gallery");
if (User::is_bralia()) {
    //                        echo $Nav->menu_item('','Chat','chat.php','public');
    if (User::is_admin()) {
    }
}
?>



            </ul>
            <ul class="nav navbar-top-links navbar-right">

                <?php 
echo "<li>Welcome to {$logo}</li>";
if (isset($_SESSION["user_id"])) {
    echo Chat::get_chat();
Example #2
0
<?php

require_once '../includes/initialize.php';
require_once LIB_PATH . DS . 'ChatFriend.php';
$session->confirmation_protected_page();
if (!User::is_bralia()) {
    redirect_to($Nav->path_admin . 'index.php');
}
?>


<?php 
include HEADER_PUBLIC;
include_once NAV_PUBLIC;
?>

<?php 
checking(false);
?>

<?php 
if (isset($_GET['delid'])) {
    $del_chat = ChatFriend::find_by_id($_GET['delid']);
    $del_chat->delete();
    if ($del_chat->delete()) {
        $session->message($del_chat->username . " comment successfully deleted");
        $session->ok(true);
        redirect_to("chat.php");
    } else {
        $session->message($del_chat->username . " deletion failed ");
        redirect_to("chat.php");
Example #3
0
function gallery_menu_list($no = 1)
{
    global $active_menu_clean;
    global $session;
    global $path_public;
    $p = $active_menu_clean;
    $pages = get_gallery_array($no);
    $output = "";
    foreach ($pages as $page => $pa) {
        if ($page === $p) {
            $class = "active";
        } else {
            $class = "";
        }
        if ($page == 'index_gallery6' && User::is_bralia()) {
            $output .= "<li class='{$class}'><a  href=\"{$path_public} {$page}.php\">{$pa}</a></li>";
        } elseif ($page == 'index_gallery6') {
            $output .= "";
        } else {
            $output .= "<li class='{$class}'><a  href=\"{$path_public} {$page}.php\">{$pa}</a></li>";
        }
    }
    return $output;
}
Example #4
0
 public function public_menu($name = "public_gallery", $env = 'public')
 {
     global $session;
     //    $p=$active_menu_clean;
     $array_class = array();
     foreach (static::$menus[$name]['link'] as $page => $page_title) {
         //    echo $page.'<br>';
         $len_query_str = strlen(static::$menus[$name]['query_string']);
         $len_page = strlen($page);
         if ($len_query_str > 0) {
             $pos = strpos($page, $query_str = static::$menus[$name]['query_string'] . "=");
             array_push($array_class, substr($page, $pos + $len_query_str + 1, $len_page - $pos));
         }
     }
     $class = "";
     $query_string = static::$menus[$name]['query_string'];
     //    echo $query_string;
     if (in_array($this->current_page, array_keys(static::$menus[$name]['link']))) {
         $class = "active";
     } else {
         $class = "";
     }
     if (isset($_GET[$query_string])) {
         $qu_string = $_GET[$query_string];
         if (in_array($qu_string, $array_class)) {
             $class = "active";
         }
     } elseif (in_array($this->current_page, array_keys(static::$menus[$name]['link']))) {
         $class = "active";
     }
     $output = "";
     if ($env == "public") {
         $output .= $this->format_menu_public(static::$menus[$name]['menu'], $class);
     } else {
         $output .= $this->format_menu_admin(static::$menus[$name]['menu'], $class);
     }
     foreach (static::$menus[$name]['link'] as $page => $page_title) {
         if (static::$menus[$name]['environment'] == "admin") {
             $path = $this->path_admin;
         } else {
             $path = $this->path_public;
         }
         $pos = strpos($page, "?");
         $len = strlen($page) - 1;
         if ($pos) {
             $query_string = substr($page, $pos, $len);
             $the_page = substr($page, 0, $pos) . '.php' . $query_string;
         } else {
             $the_page = $page;
         }
         if ($page === $this->current_page) {
             $class = "active";
         } else {
             $class = "";
         }
         if ($page == 'index_gallery6' && User::is_bralia()) {
             $output .= "<li class='{$class}'><a  href=\"{$path}{$the_page}\">{$page_title}</a></li>";
         } elseif ($page == 'index_gallery8' && $session->is_logged_in()) {
             $output .= "<li class='{$class}'><a  href=\"{$path}{$the_page}\">{$page_title}</a></li>";
         } elseif ($page == 'index_gallery6' || $page == 'index_gallery8') {
             $output .= "";
         } else {
             $output .= "<li class='{$class}'><a  href=\"{$path}{$the_page}\">{$page_title}</a></li>";
         }
     }
     $output .= "</ul>";
     $output .= "</li>";
     return $output;
 }