/**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     /*
      * store the link values
      */
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     /*
      * store any additional link Columns
      */
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->assignment_id);
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     /*
      * Insert the date start/end values for the following date fields:
      */
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * List related Template variables :
      */
     // Store the XML Node name for the Data Access Field List
     $xmlNodeName = RowManager_EditCampusAssignmentManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'assignment_id');
     // store data list to the template
     // NOTE: we initialize it here to make sure we capture any new data
     // from a recent processData() call.
     $dataAccessManager = new RowManager_EditCampusAssignmentManager();
     $dataAccessManager->setPersonID($this->person_id);
     $dataAccessManager->setSortOrder($this->sortBy);
     //        $this->dataList = new EditCampusAssignmentList( $this->sortBy );
     $this->dataList = $dataAccessManager->getListIterator();
     $this->template->setXML('dataList', $this->dataList->getXML());
     /*
      * Add any additional data required by the template here
      */
     $campusManager = new RowManager_CampusManager();
     $campusManager->setSortOrder('campus_desc');
     $campusList = $campusManager->getListIterator();
     $campusArray = $campusList->getDropListArray();
     $this->template->set('list_campus_id', $campusArray);
     // TODO - we probably should restrict this list of options, since people
     // could assign themselves as staff and that could (implementation dependent)
     // allow them access to other systems
     $statusManager = new RowManager_CampusAssignmentStatusManager();
     $statusList = $statusManager->getListIterator();
     $statusArray = $statusList->getDropListArray();
     $this->template->set('list_assignmentstatus_id', $statusArray);
     $templateName = 'siteAdminBox.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_EditMyCampusAssignment.php';
     return $this->template->fetch($templateName);
 }
示例#2
0
 function loadEditRegistrationDetails($isCreated = false)
 {
     // if event-id is missing, use reg-id to find it
     if ((!isset($this->EVENT_ID) || $this->EVENT_ID == '') && $this->REG_ID != '') {
         $eventFinder = new RowManager_RegistrationManager($this->REG_ID);
         $this->EVENT_ID = $eventFinder->getEventID();
     }
     // if campus-id is missing, use person-id to find it
     if ((!isset($this->CAMPUS_ID) || $this->CAMPUS_ID == '') && $this->PERSON_ID != '') {
         $campusFinder = new RowManager_EditCampusAssignmentManager();
         $campusFinder->setPersonID($this->PERSON_ID);
         $campusList = $campusFinder->getListIterator();
         $campusArray = $campusList->getDataList();
         // 		    echo 'campus array = <pre>'.print_r($campusArray,true).'</pre>';
         // pick the first campus found
         $record = current($campusArray);
         $this->CAMPUS_ID = $record['campus_id'];
     }
     // get privileges for the current viewer
     $privManager = new PrivilegeManager($this->viewer->getID());
     if ($privManager->isCampusAdmin($this->EVENT_ID, $this->CAMPUS_ID) == true) {
         //template-specific sections for jumping to
         $SCHOLARSHIPS = '#Scholarships';
         $CASHTRANS = '#CashTransactions';
         $CCTRANS = '#ccTransactions';
         $EVENTINFO = '#EventInfo';
         // set the pageCallBack to be without any additional parameters
         // (an AdminBox needs this so Language Switching on a page doesn't
         // pass a previous operations)
         //       echo "SCHOLARSHIP_ID, CASHTRANS_ID, CCTRANS_ID = ".$this->SCHOLARSHIP_ID." ".$this->CASHTRANS_ID." ".$this->CCTRANS_ID."<BR>";
         $parameters = array('EVENT_ID' => $this->EVENT_ID, 'FIELDTYPE_ID' => $this->FIELDTYPE_ID, 'PRICERULETYPE_ID' => $this->PRICERULETYPE_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'FIELD_ID' => $this->FIELD_ID, 'DATATYPE_ID' => $this->DATATYPE_ID, 'PRICERULE_ID' => $this->PRICERULE_ID, 'CAMPUSACCESS_ID' => $this->CAMPUSACCESS_ID, 'CASHTRANS_ID' => $this->CASHTRANS_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID, 'SCHOLARSHIP_ID' => $this->SCHOLARSHIP_ID, 'STATUS_ID' => $this->STATUS_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $scholarship_parameters = array('EVENT_ID' => $this->EVENT_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'REG_ID' => $this->REG_ID, 'SCHOLARSHIP_ID' => $this->SCHOLARSHIP_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $cashtrans_parameters = array('EVENT_ID' => $this->EVENT_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'CASHTRANS_ID' => $this->CASHTRANS_ID, 'REG_ID' => $this->REG_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $cctrans_parameters = array('EVENT_ID' => $this->EVENT_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $fieldvals_parameters = array('EVENT_ID' => $this->EVENT_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'CAMPUS_ID' => $this->CAMPUS_ID, 'PERSON_ID' => $this->PERSON_ID, 'FIELD_ID' => $this->FIELD_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID);
         //[RAD_CALLBACK_PARAMS]
         $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $parameters);
         $this->setPageCallBack($pageCallBack);
         $formAction = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $parameters);
         $scholarship_formAction = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $scholarship_parameters);
         $cashTrans_formAction = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $cashtrans_parameters);
         $ccTrans_formAction = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $cctrans_parameters);
         $fieldvals_formAction = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $fieldvals_parameters);
         // if this pageDisplay object isn't already created then
         if (!$isCreated) {
             // create a new pageDisplay object
             $this->pageDisplay = new page_EditRegistrationDetails($this->moduleRootPath, $this->viewer, $this->sortBy, $this->REG_ID, $this->EVENT_ID, $this->CAMPUS_ID, $this->SCHOLARSHIP_ID, $this->CASHTRANS_ID, $this->CCTRANS_ID, $formAction, $scholarship_formAction, $cashTrans_formAction, $ccTrans_formAction, $fieldvals_formAction, $this->PERSON_ID, $this->FIELDVALUE_ID, $this->FIELD_ID);
         } else {
             // otherwise just update the formAction value
             $this->pageDisplay->setFormAction($formAction, $scholarship_formAction, $cashTrans_formAction, $ccTrans_formAction, $fieldvals_formAction);
         }
         $links = array();
         $this->IS_IN_REG_PROCESS = modulecim_reg::IS_FALSE;
         $parameters = array('IS_IN_REG_PROCESS' => $this->IS_IN_REG_PROCESS, 'EVENT_ID' => $this->EVENT_ID, 'FIELDTYPE_ID' => $this->FIELDTYPE_ID, 'PRICERULETYPE_ID' => $this->PRICERULETYPE_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'FIELD_ID' => $this->FIELD_ID, 'DATATYPE_ID' => $this->DATATYPE_ID, 'PRICERULE_ID' => $this->PRICERULE_ID, 'CAMPUSACCESS_ID' => $this->CAMPUSACCESS_ID, 'CASHTRANS_ID' => $this->CASHTRANS_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID, 'SCHOLARSHIP_ID' => $this->SCHOLARSHIP_ID, 'STATUS_ID' => $this->STATUS_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $continueLink = $this->getCallBack(modulecim_reg::PAGE_EDITCAMPUSREGISTRATIONS, "", $parameters);
         $links["cont"] = $continueLink;
         // set edit personal info link
         $editLink = $this->getCallBack(modulecim_reg::PAGE_EDITPERSONALINFO, $this->sortBy, $parameters);
         $editLink .= "&" . modulecim_reg::PERSON_ID . "=";
         $links["EditPersonInfo"] = $editLink;
         /**** SCHOLARSHIP SUB-PAGE LINKS INIT ***/
         $scholarshipLinks = array();
         $parameters = array('EVENT_ID' => $this->EVENT_ID, 'FIELDTYPE_ID' => $this->FIELDTYPE_ID, 'PRICERULETYPE_ID' => $this->PRICERULETYPE_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'FIELD_ID' => $this->FIELD_ID, 'DATATYPE_ID' => $this->DATATYPE_ID, 'PRICERULE_ID' => $this->PRICERULE_ID, 'CAMPUSACCESS_ID' => $this->CAMPUSACCESS_ID, 'CASHTRANS_ID' => $this->CASHTRANS_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID, 'SCHOLARSHIP_ID' => $this->SCHOLARSHIP_ID, 'STATUS_ID' => $this->STATUS_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         //        $parameters = array( 'REG_ID'=>$this->REG_ID );//[RAD_CALLBACK_PARAMS_EDIT]
         $editLink = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $parameters);
         $editLink .= "&" . modulecim_reg::SCHOLARSHIP_ID . "=";
         $scholarshipLinks["edit"] = $editLink;
         // NOTE: delete link is same as edit link for an AdminBox
         $scholarshipLinks["del"] = $editLink;
         $parameters = array('EVENT_ID' => $this->EVENT_ID, 'FIELDTYPE_ID' => $this->FIELDTYPE_ID, 'PRICERULETYPE_ID' => $this->PRICERULETYPE_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'FIELD_ID' => $this->FIELD_ID, 'DATATYPE_ID' => $this->DATATYPE_ID, 'PRICERULE_ID' => $this->PRICERULE_ID, 'CAMPUSACCESS_ID' => $this->CAMPUSACCESS_ID, 'CASHTRANS_ID' => $this->CASHTRANS_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID, 'STATUS_ID' => $this->STATUS_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $sortByLink = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, '', $parameters);
         $sortByLink .= "&" . modulecim_reg::SORTBY . "=";
         $scholarshipLinks["sortBy"] = $sortByLink;
         /**** CASH TRANSACTIONS SUB-PAGE LINKS INIT ***/
         $cashTransLinks = array();
         $parameters = array('EVENT_ID' => $this->EVENT_ID, 'FIELDTYPE_ID' => $this->FIELDTYPE_ID, 'PRICERULETYPE_ID' => $this->PRICERULETYPE_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'FIELD_ID' => $this->FIELD_ID, 'DATATYPE_ID' => $this->DATATYPE_ID, 'PRICERULE_ID' => $this->PRICERULE_ID, 'CAMPUSACCESS_ID' => $this->CAMPUSACCESS_ID, 'CASHTRANS_ID' => $this->CASHTRANS_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID, 'SCHOLARSHIP_ID' => $this->SCHOLARSHIP_ID, 'STATUS_ID' => $this->STATUS_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $editLink = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $parameters);
         $editLink .= "&" . modulecim_reg::CASHTRANS_ID . "=";
         $cashTransLinks["edit"] = $editLink;
         // NOTE: delete link is same as edit link for an AdminBox
         $cashTransLinks["del"] = $editLink;
         $parameters = array('EVENT_ID' => $this->EVENT_ID, 'FIELDTYPE_ID' => $this->FIELDTYPE_ID, 'PRICERULETYPE_ID' => $this->PRICERULETYPE_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'FIELD_ID' => $this->FIELD_ID, 'DATATYPE_ID' => $this->DATATYPE_ID, 'PRICERULE_ID' => $this->PRICERULE_ID, 'CAMPUSACCESS_ID' => $this->CAMPUSACCESS_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID, 'SCHOLARSHIP_ID' => $this->SCHOLARSHIP_ID, 'STATUS_ID' => $this->STATUS_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $sortByLink = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, '', $parameters);
         $sortByLink .= "&" . modulecim_reg::SORTBY . "=";
         $cashTransLinks["sortBy"] = $sortByLink;
         /**** CC TRANSACTIONS SUB-PAGE LINKS INIT ***/
         $ccTransLinks = array();
         $parameters = array('EVENT_ID' => $this->EVENT_ID, 'FIELDTYPE_ID' => $this->FIELDTYPE_ID, 'PRICERULETYPE_ID' => $this->PRICERULETYPE_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'FIELD_ID' => $this->FIELD_ID, 'DATATYPE_ID' => $this->DATATYPE_ID, 'PRICERULE_ID' => $this->PRICERULE_ID, 'CAMPUSACCESS_ID' => $this->CAMPUSACCESS_ID, 'CASHTRANS_ID' => $this->CASHTRANS_ID, 'CCTRANS_ID' => $this->CCTRANS_ID, 'REG_ID' => $this->REG_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID, 'SCHOLARSHIP_ID' => $this->SCHOLARSHIP_ID, 'STATUS_ID' => $this->STATUS_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $editLink = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $parameters);
         $editLink .= "&" . modulecim_reg::CCTRANS_ID . "=";
         //        $ccTransLinks[ "edit" ] = $editLink;
         // NOTE: delete link is same as edit link for an AdminBox
         //        $ccTransLinks[ "del" ] = $editLink;
         $parameters = array('EVENT_ID' => $this->EVENT_ID, 'FIELDTYPE_ID' => $this->FIELDTYPE_ID, 'PRICERULETYPE_ID' => $this->PRICERULETYPE_ID, 'CCTYPE_ID' => $this->CCTYPE_ID, 'PRIV_ID' => $this->PRIV_ID, 'VIEWER_ID' => $this->VIEWER_ID, 'SUPERADMIN_ID' => $this->SUPERADMIN_ID, 'EVENTADMIN_ID' => $this->EVENTADMIN_ID, 'FIELD_ID' => $this->FIELD_ID, 'DATATYPE_ID' => $this->DATATYPE_ID, 'PRICERULE_ID' => $this->PRICERULE_ID, 'CAMPUSACCESS_ID' => $this->CAMPUSACCESS_ID, 'CASHTRANS_ID' => $this->CASHTRANS_ID, 'REG_ID' => $this->REG_ID, 'FIELDVALUE_ID' => $this->FIELDVALUE_ID, 'SCHOLARSHIP_ID' => $this->SCHOLARSHIP_ID, 'STATUS_ID' => $this->STATUS_ID, 'CAMPUS_ID' => $this->CAMPUS_ID);
         //[RAD_CALLBACK_PARAMS]
         $sortByLink = $this->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, '', $parameters);
         $sortByLink .= "&" . modulecim_reg::SORTBY . "=";
         $ccTransLinks["sortBy"] = $sortByLink;
         $this->pageDisplay->setLinks($links, $scholarshipLinks, $cashTransLinks, $ccTransLinks);
         //$this->previous_page = modulecim_reg::PAGE_EDITREGISTRATIONDETAILS;
     } else {
         $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer);
     }
 }
 /**
  * function setLinks
  * <pre>
  * Sets the value of the linkValues array.
  * </pre>
  * @param $links [ARRAY] Array of Link Values
  * @return [void]
  */
 function setLinks($links, $cashTransLinks, $ccTransLinks, $disabledLink)
 {
     $this->cashTrans_form->setLinks($cashTransLinks);
     $this->ccTrans_form->setLinks($ccTransLinks);
     $dataAccessManager = new RowManager_EditCampusAssignmentManager();
     $dataAccessManager->setPersonID($this->person_id);
     $dataAccessManager->setCampusID($this->campus_id);
     $dataAccessManager->setSortOrder($this->sortBy);
     $dataList = $dataAccessManager->getListIterator();
     $displayedValues = $dataList->getDataList();
     // calculate total paid already
     $scholarshipTotal = $this->getScholarshipsTotal();
     $cashTotal = $this->getCashPaidTotal();
     $ccTotal = $this->getCCtransTotal();
     $cashOwed = $this->getCashOwedTotal();
     $totalPaid = $scholarshipTotal + $cashTotal + $ccTotal;
     //          echo "<br>scholarships = ".$scholarshipTotal;
     //          echo "<br>cash total = ".$cashTotal;
     //          echo "<br>cc total = ".$ccTotal;
     // disallow the 'continue' link if total paid (+ recorded as owed) is less than event deposit for this person
     $deposit = $this->getEventDeposit();
     if ($deposit == "NOT YET DETERMINED" || $totalPaid + $cashOwed < $deposit) {
         $baseLink = $disabledLink;
         //cashTransLinks['sortBy'];
         // 			   $baseLink = str_replace( modulecim_reg::CASHTRANS_ID.'=', '', $baseLink);
         $links['cont'] = $baseLink;
         $this->linkLabels['cont'] = $this->labels->getLabel('[Disabled]');
     }
     //   		          echo print_r($this->linkValues,true);
     parent::setLinks($links);
 }
 /**
  * function setLinks
  * <pre>
  * Sets the value of the linkValues array.
  * </pre>
  * @param $links [ARRAY] Array of Link Values
  * @return [void]
  */
 function setLinks($links)
 {
     $dataAccessManager = new RowManager_EditCampusAssignmentManager();
     $dataAccessManager->setPersonID($this->person_id);
     $dataAccessManager->setCampusID($this->campus_id);
     $dataAccessManager->setSortOrder($this->sortBy);
     $dataList = $dataAccessManager->getListIterator();
     $displayedValues = $dataList->getDataList();
     // disallow the 'continue' link if there is no campus assignment data recorded for this person
     if (count($displayedValues) == 0) {
         $baseLink = $links['edit'];
         $baseLink = str_replace(modulecim_reg::ASSIGNMENT_ID . '=', '', $baseLink);
         $links['cont'] = $baseLink;
     }
     parent::setLinks($links);
 }
 /**
  * function processData
  * <pre>
  * Processes the data for this form.
  * </pre>
  * @return [void]
  */
 function processData()
 {
     // if this is a delete operation then
     if ($this->opType == 'D') {
         if ($this->shouldDelete) {
             $this->dataManager->deleteEntry();
         }
     } else {
         // else
         // save the value of the Foriegn Key(s)
         //            $this->formValues[ 'person_id' ] = $this->person_id;
         //            $this->formValues[ 'campus_id' ] = $this->campus_id;
         //            $this->formValues[ 'assignmentstatus_id' ] = $this->assignmentstatus_id;
         //			echo "person_id = ".$this->formValues[ 'person_id' ] ;
         //			echo "campus_id = ".$this->formValues[ 'campus_id' ] ;
         //			echo "assignmentstatus_id = ".$this->formValues[ 'assignmentstatus_id' ] ;
         /*[RAD_ADMINBOX_FOREIGNKEY]*/
         // Store values in dataManager object
         $this->dataManager->loadFromArray($this->formValues);
         // Save the values into the Table.
         if (!$this->dataManager->isLoaded()) {
             $assignmentsChecker = new RowManager_EditCampusAssignmentManager();
             // check to ensure that duplicate/conflicting data is not stored
             // i.e. ensure that each student-campus combo only has 1 status
             $assignmentsChecker->setPersonID($this->formValues['person_id']);
             $assignmentsChecker->setCampusID($this->formValues['campus_id']);
             $resultSet = $assignmentsChecker->find();
             $found = false;
             $resultSet->setFirst();
             while ($resultSet->moveNext()) {
                 // load the searchManager from the current row of data
                 //		                echo "pre-insert results: <pre>".print_r($resultSet->getCurrentRow(),true)."</pre><br>";
                 $found = true;
             }
             // only add new entry if the person-campus combination doesn't exist yet
             if ($found == false) {
                 $this->dataManager->createNewEntry();
             } else {
                 $this->error_message = 'Only *1* status allowed per campus-person combination!<br>' . 'Insert operation aborted.';
             }
         } else {
             $assignmentsChecker = new RowManager_EditCampusAssignmentManager();
             $assignmentsChecker->setAssignmentID($this->assignment_id);
             $resultSet = $assignmentsChecker->find();
             // NOTE: should only find one record, because assignment_id was set
             $abort = false;
             //						$add = false;
             $resultSet->setFirst();
             while ($resultSet->moveNext()) {
                 // load the searchManager from the current row of data
                 //		                echo "pre-insert results: <pre>".print_r($resultSet->getCurrentRow(),true)."</pre><br>";
                 $results = array();
                 $results = $resultSet->getCurrentRow();
                 /** STEP 1: ensure that person name/ID is not updated since this can easily create redundancies **/
                 if ($this->formValues['person_id'] != $results['person_id']) {
                     $abort = true;
                     $this->error_message = 'Please do NOT update person in person-campus assignment,' . 'use "ADD" instead.<br>Update operation aborted.';
                 }
                 /** STEP 2: ensure that historical data about campus assignments is not over-written **/
                 if ($this->formValues['campus_id'] != $results['campus_id']) {
                     $abort = true;
                     if (isset($this->error_message)) {
                         $this->error_message .= '<br><br>';
                     } else {
                         $this->error_message = '';
                     }
                     $this->error_message .= 'Please do NOT update campus in person-campus assignment,' . 'use "ADD" instead.<br>Update operation aborted.';
                 }
             }
             // only add new entry if the person-campus combination doesn't exist yet
             if ($abort == false) {
                 //			          if ($add == false)
                 //			          {
                 $this->dataManager->updateDBTable();
                 /*				    	 }
                 				    	 else		// if ADD was triggered, add entry to DB instead of updating 
                 				    	 {
                 					    	 $this->dataManager->setAssignmentID('');	//ensure that primary key is not set
                 					    	 $this->dataManager->createNewEntry();
                 				    	 }
                 */
             }
         }
     }
     // end if
     // now Clear out dataManager & FormValues
     $this->dataManager->clearValues();
     $this->formValues = $this->dataManager->getArrayOfValues();
     // on a successful update return assignment_id to ''
     $this->assignment_id = '';
 }