base_title = 'HelloBoutique.com ADMINISTRATION'; $this->page_title = $page_title; } function tophtml($onload='', $js='', $show_base_title=TRUE) { $title = ($show_base_title) ? $this->base_title.' :: '.$this->page_title : $this->page_title; $html = ' '.$title.' '.$js.' '; if($show_base_title) { $html .= '
'.$this->base_title.'
'; } return($html); } function bottomhtml() { return(''); } function menuhtml() { global $section, $filename, $location; $menu = array( array( 'Orders' => '/admin/orders/', 'Enter Store Order' => '/admin/orders/pos/enter.hello', 'View Orders' => '/admin/orders/view.hello', 'View Web Orders' => '/admin/orders/view.hello?type=web', 'View Store Orders' => '/admin/orders/view.hello?type=store', 'View Open Items' => '/admin/orders/open_items.hello' ), array( 'Contacts' => '/admin/contacts/search.hello', 'Add Contact' => '/admin/contacts/add.hello', ), array( 'Items' => '/admin/items/', 'View Shipments' => '/admin/items/shipments/', 'View Sale Items' => '/admin/items/?sale=y', 'Print Inventory' => '/admin/items_inventory_select_designer.hello', ) ); if($_SESSION['level'] != 'store') { if($_SESSION['level'] != 'user') { $menu[1]['Send Email'] = '/admin/contacts/emails/'; $menu[1]['Email Images'] = '/admin/contacts/emails/images/'; $menu[1]['Search for Dupes'] = '/admin/contacts/dupecheck.hello'; $menu[1]['Remove Dupes'] = '/admin/contacts/dedupe.hello'; $menu[] = array( 'Uploads' => '/admin/upload/' ); } $menu[2]['Enter Shipment'] = '/admin/items/shipments/add.hello'; $menu[2]['Add Item'] = '/admin/items/add.hello'; $menu[] = array( 'Reports' => '/admin/reports/', 'Sales' =>'/admin/reports/sales.hello', 'Sales by Designer' =>'/admin/reports/sales_by_designer.hello', 'Item Sales by Designer' =>'/admin/reports/sales_designer_items.hello', 'Best Customers' =>'/admin/reports/bestCust.hello', 'Anue Colors' =>'/admin/reports/anueColors.hello' ); $menu[] = array( 'Categories' => '/admin/categories/', 'Add Category' => '/admin/categories/add.hello' ); $menu[] = array( 'Designers' => '/admin/designers/', 'Add Designer' => '/admin/designers/add.hello', 'Featured Designers' => '/admin/designers/featured/index.hello' ); $menu[] = array( 'Testimonials' => '/admin/testimonials/', 'Add Testimonial' => '/admin/testimonials/add.hello' ); } if($_SESSION['level'] == 'owner') { $menu[] = array( 'Finance' => '/admin/finance/', 'Checking Account' => '/admin/finance/checking.hello', 'IA Checking Account' => '/admin/finance/checking_ia.hello', 'Enter Checking Transaction' => '/admin/finance/checking_xaction.hello?acct=hb', 'Enter IA Checking Transaction' => '/admin/finance/checking_xaction.hello?acct=ia', 'Enter Invoice' => '/admin/finance/enter_invoice.hello', ); $menu[] = array( 'Payroll' => '/admin/payroll/', 'Tax Reports' => '/admin/payroll/reports.hello', 'Commission Reports' => '/admin/payroll/commission_report.hello' ); } if($_SESSION['level'] != 'store' && $_SESSION['level'] != 'user') { $menu[] = array( 'Uploads' => '/admin/upload/' ); } $menu[] = array('Logout' => '/admin/items/?logout=t'); $menuhtml = ''; foreach($menu as $option) { $subcount = 0; $showsub = TRUE; foreach($option as $text=>$link) { if(!$showsub){break;} if($subcount == 0) { // MAIN MENU OPTION // DETERMINE IF IT IS ACTIVE // IT IS ACTIVE IF WE ARE ON ITS LINK OR ANY OF ITS SUBMENUS LINKS $main_active = FALSE; //echo '
link: '.$link.' :: script: '.$_SERVER['SCRIPT_NAME']; if($link == Utilities::strip_index_file($_SERVER['SCRIPT_NAME'], 'index.hello'))// { $main_active = TRUE; } else { // LOOP THROUGH THIS ARRAY AGAIN $subcount_inner = 0; foreach($option as $text_inner=>$link_inner) { // IF IT HAS BEEN DETERMINED STOP LOOP if($main_active){break;} // SKIP THE MAIN ONE if($subcount_inner > 0) { if($link_inner == $_SERVER['SCRIPT_NAME']) { $main_active = TRUE; } } ++$subcount_inner; } } if($main_active) { // MAIN OPTIONS ALWAYS LINK $cell_class = "adminmenuoptionsmainactive"; $menu_cell = '>'.$text.''; } else { $cell_class = "menuoptionsmain"; $menu_cell = '::'.$text.''; // DO NOT DISPLAY SUBMENU OPTIONS $showsub = FALSE; } } else { // SUB MENU OPTION // DETERMINE IF IT IS ACTIVE $sub_active = FALSE; //echo 'link: '.$link.' filename: '.$filename.'
'; if($link == $_SERVER['SCRIPT_NAME']) { $sub_active = TRUE; } if($sub_active) { // ALWAYS LINK TOO $cell_class = "menuoptionssubactive"; $menu_cell = '    >'.$text.''; } else { $cell_class = "menuoptionssub"; $menu_cell = '    ..'.$text.''; } } $menuhtml .= ''; ++$subcount; } } $menuhtml .= '
'.$menu_cell.'
'; return ($menuhtml); } } // class menu ?>