<!-- faqdesk //-->
<?php
 // Check to ensure this file is included in Freeway!
defined('_FEXEC') or die(); 

?>
	<tr>
		<td>

<?php
/*
osCommerce, Open Source E-Commerce Solutions 
http://www.oscommerce.com 

Copyright (c) 2003 osCommerce 

osCommRes, Services Oline 
http://www.oscommres.com 
Copyright (c) 2005 osCommRes 

Freeway eCommerce 
http://www.zac-ware.com/freeway 
Copyright (c) 2007 ZacWare

Released under the GNU General Public License
*/
	$files_list_one=array(BOX_FAQDESK,FILENAME_FAQDESK,'',
					BOX_FAQDESK_REVIEWS,FILENAME_FAQDESK_REVIEWS,'');

	$files_list_two = array();
	$files_list_two_total = array();

	/*$sub_boxes = '';

	$dbquery = tep_db_query("select admin_files_name from " . TABLE_ADMIN_FILES . " where FIND_IN_SET( '" . $login_groups_id . "', admin_groups_id) and admin_files_is_boxes = '0' and admin_files_name = '" . $filename . "'");
	if (tep_db_num_rows($dbquery)) {
		$sub_boxes = '<a href="' . tep_href_link($filename) . '" class="menuBoxContentLink">' . $sub_box_name . '</a><br>';
	}*/

	$configuration_groups_sql = "select configuration_group_id as cgID, configuration_group_title as cgTitle from " . TABLE_FAQDESK_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)) {
		$files_list_two = array($configuration_groups['cgTitle'],FILENAME_FAQDESK_CONFIGURATION,'gID=' . $configuration_groups['cgID']);
		$files_list_two_total = array_merge($files_list_two_total,$files_list_two);
	}
	$files_list = array_merge($files_list_one,$files_list_two_total);
	$heading = array();
	$contents = array();

	$heading[] = array(
		'text'  => BOX_HEADING_FAQDESK,
		'link'  => tep_href_link(FILENAME_FAQDESK, 'selected_box=faqdesk')
	);

	$links_list='';
	reset($files_list);
	for($fcnt=0,$fn=count($files_list);$fcnt<$fn-1;$fcnt=$fcnt+3){
		if ($selected_box == 'faqdesk' || $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=faqdesk&' . $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>

<!-- faqdesk_eof //-->


<?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
*/
?>