* fieldgroup_id [INTEGER]  the id of the field group being matched
  * fields_id [INTEGER]  the id of the field being matched to a fieldgroup
  */
 $FieldGroup_Matches = new RowManager_FieldGroup_MatchesManager();
 $FieldGroup_Matches->dropTable();
 $FieldGroup_Matches->createTable();
 /*
  * StaffScheduleInstr Table
  *
  * The form instructions directly associated with a particular HRDB form
  *
  * staffscheduleinstr_toptext [STRING]  The instructions for the main (top) form.
  * staffscheduleinstr_bottomtext [STRING]  The instructions for the scheduled activities form (if it is used for this HR form).
  * staffscheduletype_id [INTEGER]  The primary id of the object - same primary ID as the schedule form type object.
  */
 $StaffScheduleInstr = new RowManager_StaffScheduleInstrManager();
 $StaffScheduleInstr->dropTable();
 $StaffScheduleInstr->createTable();
 /*
  * StaffDirector Table
  *
  * Stores staff-to-director associations. That is, it indicates which staff have which other staff as their director(s).
  *
  * staffdirector_id [INTEGER]  The unique ID of the staff-to-director association
  * staff_id [INTEGER]  The ID of the staff to be associated with a director.
  * director_id [INTEGER]  The staff ID of the staff director supervising the staff member indicated in the "staff_id" field.
  */
 $StaffDirector = new RowManager_StaffDirectorManager();
 $StaffDirector->dropTable();
 $StaffDirector->createTable();
 /*
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Make a new Template object
     //$this->pathModuleRoot.'templates/';
     // Replace $path with the following line if you want to create a
     // template tailored for this page:
     $path = $this->pathModuleRoot . 'templates/';
     // store the link values
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['add'] = $this->labels->getLabel('[Add]');
     //        $this->linkLabels[ 'edit' ] = $this->labels->getLabel( '[Edit]' );
     //        $this->linkLabels[ 'del'  ] = $this->labels->getLabel( '[Delete]' );
     if (!isset($this->linkLabels['cont'])) {
         $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     }
     // $this->linkLabels[ 'view' ] = 'new link label here';
     $this->prepareTemplate($path);
     $top_instructions = '';
     $bottom_instructions = '';
     $form_instructions = new RowManager_StaffScheduleInstrManager();
     $form_instructions->setFormTypeID($this->form_id);
     $instr_list = $form_instructions->getListIterator();
     $instr_array = $instr_list->getDataList();
     foreach (array_keys($instr_array) as $key) {
         $record = current($instr_array);
         $top_instructions = $record['staffscheduleinstr_toptext'];
         $bottom_instructions = $record['staffscheduleinstr_bottomtext'];
     }
     if ($top_instructions != '') {
         $this->template->set('top_instructions', $top_instructions);
     }
     if ($bottom_instructions != '') {
         $this->template->set('bottom_instructions', $bottom_instructions);
     }
     // Set form approval status message
     $form_approved = "Approval Pending";
     if ($this->is_form_approved == true) {
         $form_approved = "Form Approved";
     }
     $this->template->set('form_approval_status', $form_approved);
     $this->template->set('form_approval_notes', $this->approval_notes);
     // Display message if form has just been submitted
     if ($this->form_submitted == true) {
         $statusMessage = 'Form information successfully submitted.';
         $this->template->set('form_status_msg', $statusMessage);
         $this->form_submitted = false;
     }
     // Set the sub-page objects
     $this->template->set('basicStaffForm', $this->generateTopForm());
     if ($this->has_activity_form == true) {
         $this->template->set('scheduledActivityForm', $this->generateBottomForm());
     }
     // 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);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // store the Row Manager's XML Node Name
     //        $this->template->set( 'rowManagerXMLNodeName', RowManager_RegistrationManager::XML_NODE_NAME );
     $this->template->set('rowManagerXMLNodeName', MultiTableManager::XML_NODE_NAME);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'person_id');
     // TODO: somehow merge the primary join with the balance owing join.... for efficiency
     /*
      *  Set up any additional data transfer to the Template here...
      */
     //       $this->template->set( 'dataList', $this->dataList);
     $form_notice = 'Please note that the "Update" button only updates the top form.<br>The bottom form is updated via its own buttons/links.';
     $this->template->set('subheading', $this->hrdbFormTitle);
     $this->template->set('formsNotice', $form_notice);
     $templateName = 'page_EditStaffScheduleForm.tpl.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_EditCampusRegistrations.php';
     return $this->template->fetch($templateName);
 }