<?php

  if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

  global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
  
  require_once('modules/EcmPriceBooks/EcmPriceBook.php');
  require_once('modules/EcmPriceBooks/Forms.php');
  require_once ('include/time.php');
  require_once('include/json_config.php');
  
  $json_config = new json_config();
   
  $focus = new EcmPriceBook();   
  
  if(isset($_REQUEST['record'])) {
    $focus->retrieve($_REQUEST['record']);
  } 
  else {}
  
  require_once('include/MVC/View/SugarView.php');  
 
  if(file_exists('modules/EcmPriceBooks/views/view.list.php')) {
  	require_once('modules/EcmPriceBooks/views/view.list.php');
	$list = new EcmPriceBooksViewList();
  }
  else {
  	require_once('include/MVC/View/views/view.list.php');
	$list = new ViewList();  
  }
  
  $list->bean = $focus;

//  if(!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true") require_once('modules/EcmGroupSales/HeaderMenu.php');


  //$_REQUEST['query']="true";
  //$_REQUEST['clear_query']="true";
  if(!$_REQUEST['query'] && !$_REQUEST['clear_query']){
  	$_REQUEST['archived_basic']="0";
  	$_REQUEST['archived']="0";
  }
  elseif($_REQUEST['query'] && $_REQUEST['clear_query']){
  	$_REQUEST['archived_basic']="0";
  	$_REQUEST['archived']="0";
  }
//print_r($_REQUEST);
  $list->preDisplay();        
  $list->display();

?>