function perform()
 {
     // set display requirements
     $result = array('renderer' => 'template_renderer.inc', 'pageTitle' => SITE_NAME . ' : Add Date Criteria', 'content' => 'content/reportFormDate.php');
     // don't lose the db!
     $db = $_REQUEST['db'];
     // where are we?
     $userFinder = new UserFinder($db);
     $user = $userFinder->findById($_SESSION['userId']);
     $library = $user['library_short_name'];
     $libraryID = $user['library_id'];
     $result['library_id'] = $libraryID;
     $result['library'] = $library;
     $result['user'] = $user;
     $report_id = grwd('report_id');
     $result['report_id'] = $report_id;
     // get all the info on the reports
     $reportFinder = new ReportFinder($db);
     $reportCount = $reportFinder->getReportCount();
     $result['reportCount'] = $reportCount;
     // get the information for the chosen report by requiring Reports.php and all the reports
     $report_class_handle = new Report();
     $report_class_get = $report_class_handle->get();
     // declare the report class by using it's ID
     $report_info = new $report_id();
     $result['reportList'] = $report_info->info();
     $libraryFinder = new LibraryFinder($db);
     $result['libraryList'] = $libraryFinder->getAllLibraries();
     $locationFinder = new LocationFinder($db);
     $result['locationList'] = $locationFinder->getAllLocations();
     return $result;
 }
 function perform()
 {
     // set display requirements
     $result = array('renderer' => 'template_renderer.inc', 'pageTitle' => SITE_NAME . ' : Advanced Search', 'content' => 'content/advancedSearchForm.php');
     // don't lose the db!
     $db = $_REQUEST['db'];
     //var_dump($_REQUEST);
     // where are we?
     $userFinder = new UserFinder($db);
     $user = $userFinder->findById($_SESSION['userId']);
     $library = $user['library_short_name'];
     $libraryId = $user['library_id'];
     $result['library_id'] = $libraryId;
     $result['library'] = $library;
     $result['user'] = $user;
     // The library that got searched for last time, probably...
     $selLibId = grwd('search_library_id', $libraryId);
     $result['search_library_id'] = $selLibId;
     $libraryFinder = new LibraryFinder($db);
     $libraryList = $libraryFinder->getAllLibraries();
     array_unshift($libraryList, array('library_id' => $libraryId, 'short_name' => $user['library_short_name'], 'full_name' => $user['library_full_name']), array('library_id' => '0', 'short_name' => 'All Libraries', 'full_name' => 'All Libraries'), array('library_id' => '', 'short_name' => '----------------------------', 'full_name' => '----------------------------'));
     $result['libraryList'] = $libraryList;
     $locationFinder = new LocationFinder($db);
     $result['locationList'] = $locationFinder->getAllLocations();
     return $result;
 }