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

<?php
	$files_list_one=array(BOX_NEWSDESK,FILENAME_NEWSDESK,'',
					BOX_NEWSDESK_REVIEWS,FILENAME_NEWSDESK_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_query = tep_db_query("select configuration_group_id as cgID, configuration_group_title as cgTitle from " . TABLE_NEWSDESK_CONFIGURATION_GROUP . " where visible = '1' order by sort_order");
	while ($configuration_groups = tep_db_fetch_array($configuration_groups_query)) {
		$files_list_two = array($configuration_groups['cgTitle'],FILENAME_NEWSDESK_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_NEWSDESK,
	'link'  => tep_href_link(FILENAME_NEWSDESK, 'selected_box=newsdesk')
);

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

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