<?php
/*

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce
  
  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(); 

?>
<!-- reports //-->
          <tr>
            <td>
<?php
  $heading = array();
  $contents = array();
    /* if ($login_groups_type==TEXT_CALLMANAGER_ENTRY)
     {
         $heading[] = array('text'  => BOX_HEADING_REPORTS,
         'link'  => tep_href_link(FILENAME_CALL_CENTRE_ORDERS, 'selected_box=reports'));
 
	 }else if ($login_groups_type==TEXT_PRODUCTMANAGER_ENTRY)
	 {
	      $heading[] = array('text'  => BOX_HEADING_REPORTS,
         'link'  => tep_href_link(FILENAME_PRODUCTS_SALES, 'selected_box=reports'));
	 }
	 else if ($login_groups_type==TEXT_RESERVATIONMANAGER_ENTRY)
	 {
	      $heading[] = array('text'  => BOX_HEADING_REPORTS,
         'link'  => tep_href_link(FILENAME_EVENTS_SALES, 'selected_box=reports'));
	 }else  { */  
		 $heading[] = array('text'  => BOX_HEADING_REPORTS,
                     'link'  => tep_href_link(FILENAME_PRODUCTS_SALES, 'selected_box=reports'));
 
		//}
		

  	$boxes[BOX_GENERAL_TITLE]=array(FILENAME_STATS_REFERRAL_SOURCES,BOX_REPORTS_REFERRAL_SOURCES,
  											FILENAME_PRODUCTS_SALES,BOX_REPORTS_PRODUCTS_SALES,
											FILENAME_REPORTS_DIRECT_DEPOSIT, BOX_REPORTS_DIRECT_DEPOSIT
											);
											
	if(HIDE_FROM_BACKEND_MENU_PRODUCTS=='false'){
	 $boxes[BOX_PRODUCTS_TITLE]=array(FILENAME_STATS_PRODUCTS_VIEWED, BOX_REPORTS_PRODUCTS_VIEWED,
											FILENAME_INVENTORY,BOX_REPORTS_INVENTORY,
											FILENAME_REPORTS_PRODUCTS_RECONCILIATION,BOX_REPORTS_PRODUCTS_RECONCILIATION,
											FILENAME_CART_DROP_REPORT,BOX_REPORTS_CART_DROP,
											FILENAME_REPORTS_FULFILLER,BOX_REPORTS_FULFILMENT
											);
	}
	if(HIDE_FROM_BACKEND_MENU_EVENTS=='false'){
	$boxes[BOX_EVENTS_TITLE]=array(FILENAME_EVENTS_REPORTS_SURVEYS_SUMMARY, BOX_EVENTS_REPORTS_SURVEYS,
											FILENAME_STATS_EVENTS_VIEWED, BOX_REPORTS_EVENTS_VIEWED,
											FILENAME_EVENTS_REPORTS_WAITLIST,BOX_REPORTS_WAITLIST,
											FILENAME_EVENTS_PROGRESS,BOX_REPORTS_EVENTS_PROGRESS,
											FILENAME_BIRTHDAY_LIST,BOX_REPORTS_BIRTHDAY_LIST,
											FILENAME_DAILY_RESERVATIONS,BOX_REPORTS_DAILY_RESERVATIONS,
											FILENAME_CALL_CENTRE_ORDERS,BOX_REPORTS_CALL_CENTRE_ORDERS,
											FILENAME_UNPAID_PAYMENTS,BOX_REPORTS_UNPAID_PAYMENTS,
											//FILENAME_CALL_CENTRE_ORDERS,BOX_REPORTS_CALL_CENTRE_ORDERS,
											FILENAME_CUSTOMER_DETAILS,BOX_REPORTS_CUSTOMER_DETAILS,
											//FILENAME_EVENTS_NON_RETURNS,BOX_REPORTS_EVENTS_NON_RETURNS,
											FILENAME_EVENTS_ATTENDEES,BOX_REPORTS_EVENTS_ATTENDEES,
											FILENAME_ATTENDANCE_ANALYSIS,BOX_REPORTS_ATTENDANCE_ANALYSIS,
											FILENAME_MAILING_LABELS,BOX_REPORTS_MAILING_LABELS,		
											FILENAME_INSTRUCTOR_PAYMENTS,BOX_REPORTS_INSTRUCTOR_PAYMENTS,
											FILENAME_PENDING_PAYMENTS,BOX_REPORTS_PENDING_PAYMENTS,
											FILENAME_EVENT_TICKET,BOX_EVENTS_TICKETS,
											FILENAME_EVENTS_REPORT_IDCARDS,BOX_ID_CARDS
											);
	}
	if(HIDE_FROM_BACKEND_MENU_SUBSCRIPTIONS=='false'){					
	$boxes[BOX_SUBSCRIPTION_TITLE]=array(FILENAME_SUBSCRIPTION_DETAILS,BOX_REPORTS_SUBSCRIPTION_DETAILS,
											FILENAME_SUBSCRIPTION_RENEWALS,BOX_REPORTS_SUBSCRIPTION_RENEWALS,
											FILENAME_SUBSCRIPTION_NON_RENEWALS,BOX_REPORTS_SUBSCRIPTION_NON_RENEWALS,
											FILENAME_STATS_SUBSCRIPTION_VIEWED,BOX_REPORTS_SUBSCRIPTION_VIEWED,
											FILENAME_UNPAID_SUBSCRIPTIONS,BOX_HEADING_SUBS_UNPAID,
											FILENAME_PACKING_SLIP,BOX_REPORTS_PACKING_SLIP
											//FILENAME_CITY_COUSIN_DELIVERY,BOX_CITY_COUSIN_DELIVERY
											);
	}
	// service
	if(HIDE_FROM_BACKEND_MENU_SERVICES=='false'){
		$boxes[BOX_SERVICES_TITLE]=array(FILENAME_REPORTS_SERVICES_SURVEYS_SUMMARY,BOX_SERVICES_SURVEYS,
										  FILENAME_SERVICES_VIWED,BOX_HEADING_SERVICES_VIEWED,
										  //FILENAME_SERVICES_FORSALE,BOX_HEADING_SERVICES_FORSALE,
										  FILENAME_SERVICES_UTIL,BOX_HEADING_SERVICES_UTIL,
										  //FILENAME_SERVICES_PENDING_ORDERS,BOX_HEADING_SERVICES_PENDING_ORDERS,
										  FILENAME_SERVICES_CALL_CENTRE_ORDERS, BOX_SERVICES_CALL_CENTER,
										  FILANEME_SERVICES_CUSTOMER_DETAILS,BOX_HEADING_SERVICES_CUSTOMER_DETAILS,
										  FILENAME_SERVICES_NON_RETURNS,BOX_REPORTS_SERVICES_NON_RETURNS,
										  FILENAME_SERVICES_ATTENDEES,BOX_HEADING_SERVICES_ATTENDEES,
										  FILENAME_SERVICES_RESOURCES_VIEW,BOX_HEADING_SERVICES_RESOURCES_,
										  FILENAME_SERVICES_IDCARTS,BOX_HEADING_SERVICES_IDCARTS,
										  FILENAME_SERVICES_TICKETS,BOX_HEADING_SERVICES_TICKETS,
										  FILENAME_SERVICES_BOOKINGS,BOX_HEADING_SERVICES_BOOKINGS
				);
	 }				
	//service
	
	if(tep_payment_installed('wallet.php')){
    $boxes[BOX_WALLET_TITLE]=array(FILENAME_REPORTS_WALLET,BOX_REPORTS_WALLET_DETAILS);
    }					
	$text="";
	reset($boxes);
	foreach ($boxes as $box=>$box_content){
		$text_content="";
		for ($icnt=0;$icnt<count($box_content);$icnt=$icnt+2){
			if ($selected_box == 'reports' || $menu_dhtml == true) {
				$content=tep_admin_files_boxes($box_content[$icnt],$box_content[$icnt+1]);
			}
			if (isset($HTTP_POST_VARS["search_link"]) && $HTTP_POST_VARS["search_link"]!='' && strpos(strtolower($box_content[$icnt+1]),strtolower($HTTP_POST_VARS["search_link"]))!==false){
				$search_links_list[]=array('text'=>$box_content[$icnt+1],'link'=>$box_content[$icnt] . '?selected_box=reports');
			}
			if ($content!=""){
				$text_content.='&nbsp;' . $content;
			}
		}
		if ($text_content!=""){
			$text.=$box . '<br>' . $text_content;
		}
	}
	if($text!=""){
		$contents[]=array('text'=>$text);
	}
  $box = new box;
  echo $box->menuBox($heading, $contents);
  unset($boxes);
?>
            </td>
          </tr>
<!-- reports_eof //-->