예제 #1
0
         $smarty->assign_by_ref('filter_data', $filter_data);
         $smarty->assign_by_ref('columns', $filter_columns);
         $smarty->assign_by_ref('rows', $rows);
         $smarty->display('report/TimesheetSummaryReport.tpl');
     }
     break;
 case 'delete':
 case 'save':
     Debug::Text('Action: ' . $action, __FILE__, __LINE__, __METHOD__, 10);
     $generic_data['id'] = UserGenericDataFactory::reportFormDataHandler($action, $filter_data, $generic_data, URLBuilder::getURL(NULL, $_SERVER['SCRIPT_NAME']));
     unset($generic_data['name']);
 default:
     BreadCrumb::setCrumb($title);
     if ($action == 'load') {
         Debug::Text('Loading Report!', __FILE__, __LINE__, __METHOD__, 10);
         extract(UserGenericDataFactory::getReportFormData($generic_data['id']));
     } elseif ($action == '') {
         //Check for default saved report first.
         $ugdlf->getByUserIdAndScriptAndDefault($current_user->getId(), $_SERVER['SCRIPT_NAME']);
         if ($ugdlf->getRecordCount() > 0) {
             Debug::Text('Found Default Report!', __FILE__, __LINE__, __METHOD__, 10);
             $ugd_obj = $ugdlf->getCurrent();
             $filter_data = $ugd_obj->getData();
             $generic_data['id'] = $ugd_obj->getId();
         } else {
             Debug::Text('Default Settings!', __FILE__, __LINE__, __METHOD__, 10);
             //Default selections
             $filter_data['user_status_ids'] = array(10);
             $filter_data['branch_ids'] = array(-1);
             $filter_data['department_ids'] = array(-1);
             $filter_data['user_title_ids'] = array(-1);