<?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(); 
?>
<!-- configuration //-->
          <tr>
            <td>
<?php	
	$files_list_one=array();
	$files_list_one_total=array();
	$configuration_groups_sql = "select configuration_group_id as cgID, configuration_group_title as cgTitle from " . TABLE_CONFIGURATION_GROUP . " where visible = '1' order by sort_order";
	$configuration_groups_query = tep_db_query($configuration_groups_sql);
    while ($configuration_groups = tep_db_fetch_array($configuration_groups_query)) {
      if ($configuration_groups['cgTitle']!='Events' && $configuration_groups['cgID']!=6 && $configuration_groups['cgTitle']!='Product Listing' && $configuration_groups['cgID']!=8 && $configuration_groups['cgTitle']!='Download' && $configuration_groups['cgID']!=13){
	      $files_list_one= array($configuration_groups['cgTitle'],FILENAME_CONFIGURATION,'gID=' . $configuration_groups['cgID']);
		  $files_list_one_total = array_merge($files_list_one_total,$files_list_one);
	  }
    }
	$files_list_two=array(BOX_CUSTOMERS_REFERRALS,FILENAME_REFERRALS,'',
					BOX_HEADING_CUSTOMER_OCCUPATION,FILENAME_CUSTOMER_OPTIONS,'type=O',
					BOX_HEADING_CUSTOMER_INTEREST,FILENAME_CUSTOMER_OPTIONS,'type=I',
					BOX_HEADING_DEFINEMAINPAGE,FILENAME_DEFINE_MAINPAGE,'',
					BOX_HEADING_INFORMATION_PAGES,FILENAME_INFORMATION_PAGES,'',
					BOX_CATALOG_XSELL,FILENAME_XSELL_PRODUCTS,'',
					BOX_META_TAGS,FILENAME_META_TAGS,'',
					BOX_WALLET_EMARKETING,FILENAME_WALLET_EMARKETING,'');
	
	$files_list = array_merge($files_list_one_total,$files_list_two);
  $heading = array();
  $contents = array();
      
  $heading[] = array('text'  => BOX_HEADING_CONFIGURATION,
                     'link'  => tep_href_link(FILENAME_CONFIGURATION, 'gID=1&selected_box=configuration'));

	$links_list='';
	reset($files_list);
	for($fcnt=0,$fn=count($files_list);$fcnt<$fn-1;$fcnt=$fcnt+3){
		if ($selected_box == 'configuration' || $menu_dhtml == true) {
		    $links_list.='<a href="' . tep_href_link($files_list[$fcnt+1],$files_list[$fcnt+2],'NONSSL') . '" class="menuBoxContentLink">' . $files_list[$fcnt] . '</a>' . '<br>';
		}
		if (isset($HTTP_POST_VARS["search_link"]) && $HTTP_POST_VARS["search_link"]!='' && strpos(strtolower($files_list[$fcnt]),strtolower($HTTP_POST_VARS["search_link"]))!==false){
			$search_links_list[]=array('text'=>$files_list[$fcnt],'link'=>$files_list[$fcnt+1] . '?selected_box=configuration&' . $files_list[$fcnt+2]);
		}
	}
	if ($links_list!=''){
		$contents[] = array('text'  => $links_list);
	}

  $box = new box;
  echo $box->menuBox($heading, $contents);
  unset($files_list);
?>
            </td>
          </tr>
<!-- configuration_eof //-->
