<?php

/*

  osCommRes, Services Online
  http://www.oscommres.com

  Copyright (c) 2005 osCommRes

  Released under the GNU General Public License
  
  Freeway eCommerce from ZacWare
http://www.zac-ware.com/freeway

Copyright 2007 ZacWare Pty. Ltd
*/
 // Check to ensure this file is included in Freeway!
defined('_FEXEC') or die(); 
 if(HIDE_FROM_BACKEND_MENU_EVENTS=='false'){
?>
<!-- catalog //-->
          <tr>
            <td>
<?php
	$files_list=array(BOX_EVENT_INSTRUCTORS,FILENAME_INSTRUCTORS,
					BOX_EVENT_INSTRUCTORS_OPTIONS,FILENAME_INSTRUCTORS_OPTIONS,
					BOX_EVENT_VIEW_EVENT,FILENAME_VIEW_RESERVATIONS,
					BOX_EVENT_MESSAGES,FILENAME_EVENTS_ADMIN_MESSAGES,
					BOX_EVENT_PAYMENTS,FILENAME_EVENTS_ADMIN_PAYMENTS,
					BOX_EVENT_PAYMENTS,FILENAME_EVENTS_PAYMENTS);
	$heading = array();
	$contents = array();
  if($login_groups_type== TEXT_INSTRUCTOR_ENTRY ) {
  $heading[] = array('text'  => BOX_HEADING_INSTRUCTOR,
		  'link'  => tep_href_link(FILENAME_EVENTS_ADMIN_MESSAGES, 'selected_box=instructor'));
		
	} else {
	$heading[] = array('text'  => BOX_HEADING_INSTRUCTOR,
		 'link'  => tep_href_link(FILENAME_INSTRUCTORS, 'selected_box=instructor'));
	 	  
	}
	
	$links_list='';
	reset($files_list);
	for($fcnt=0,$fn=count($files_list);$fcnt<$fn-1;$fcnt=$fcnt+2){
		if ($selected_box == 'instructor' || $menu_dhtml == true) {
			if($files_list[$fcnt+1]==FILENAME_EVENTS_ADMIN_PAYMENTS && $login_groups_type==TEXT_RESERVATIONMANAGER_ENTRY){
				$links_list.=tep_admin_files_boxes($files_list[$fcnt+1],$files_list[$fcnt]);
			}else if($files_list[$fcnt+1]==FILENAME_EVENTS_PAYMENTS && $login_groups_type==TEXT_INSTRUCTOR_ENTRY){
				$links_list.=tep_admin_files_boxes($files_list[$fcnt+1],$files_list[$fcnt]);
			}else{
				if($files_list[$fcnt+1]==FILENAME_EVENTS_ADMIN_PAYMENTS){}
				else if ($files_list[$fcnt+1]==FILENAME_EVENTS_PAYMENTS){}
				else
					$links_list.=tep_admin_files_boxes($files_list[$fcnt+1],$files_list[$fcnt]);
			}
		}
		if (isset($HTTP_POST_VARS["search_link"]) && $HTTP_POST_VARS["search_link"]!='' && strpos(strtolower($files_list[$fcnt]),strtolower($HTTP_POST_VARS["search_link"]))!==false){
			if($files_list[$fcnt+1]==FILENAME_EVENTS_ADMIN_PAYMENTS && $login_groups_type==TEXT_RESERVATIONMANAGER_ENTRY){
				$search_links_list[]=array('text'=>$files_list[$fcnt],'link'=>$files_list[$fcnt+1] . '?selected_box=instructor');
			}else if($files_list[$fcnt+1]==FILENAME_EVENTS_PAYMENTS && $login_groups_type==TEXT_INSTRUCTOR_ENTRY){
				$search_links_list[]=array('text'=>$files_list[$fcnt],'link'=>$files_list[$fcnt+1] . '?selected_box=instructor');
			}else{
				if($files_list[$fcnt+1]==FILENAME_EVENTS_ADMIN_PAYMENTS){}
				else if ($files_list[$fcnt+1]==FILENAME_EVENTS_PAYMENTS){}
				else
					$search_links_list[]=array('text'=>$files_list[$fcnt],'link'=>$files_list[$fcnt+1] . '?selected_box=instructor');
			}
		}
	}
	if ($links_list!=''){
		$contents[] = array('text'  => $links_list);
	}
	
	$box = new box;
	echo $box->menuBox($heading, $contents);
  unset($files_list);
?>
            </td>
          </tr>
<?php } ?>
<!-- catalog_eof //-->