Ejemplo n.º 1
0
  * admin_id [INTEGER]  The id.
  * viewer_id [INTEGER]  The user(viewer) id.
  * priv_id [INTEGER]  The privilege ID assigned to the user(viewer).
  */
 $Admin = new RowManager_AdminManager();
 $Admin->dropTable();
 $Admin->createTable();
 /*
  * Priv Table
  *
  * Manager for the Privileges table.
  *
  * priv_id [INTEGER]  The id for the privilege
  * priv_accesslevel [STRING]  The access level associated with the ID.
  */
 $Priv = new RowManager_PrivManager();
 $Priv->dropTable();
 $Priv->createTable();
 /*
  * CampusAdmin Table
  *
  * Manage for the CampusAdmin table.
  *
  * campusadmin_id [INTEGER]  ID for the assignment
  * admin_id [INTEGER]  The id from the admin table.
  * campus_id [INTEGER]  The id for the campus being assigned to the viewer.
  */
 $CampusAdmin = new RowManager_CampusAdminManager();
 $CampusAdmin->dropTable();
 $CampusAdmin->createTable();
 /*
Ejemplo n.º 2
0
 /**
  * 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->admin_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_PrivManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'priv_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_AdminManager();
     $dataAccessManager->setSortOrder($this->sortBy);
     //        $this->dataList = new PrivList( $this->sortBy );
     $this->dataList = $dataAccessManager->getListIterator();
     $this->template->setXML('dataList', $this->dataList->getXML());
     /*
      * Add any additional data required by the template here
      */
     //priv list.
     $privManager = new RowManager_PrivManager();
     $privManager->setSortOrder('priv_accesslevel');
     $privList = $privManager->getListIterator();
     $privArray = $privList->getDropListArray();
     $this->template->set('list_priv_id', $privArray);
     $templateName = 'siteAdminBox.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_AdminPrivs.php';
     return $this->template->fetch($templateName);
 }
Ejemplo n.º 3
0
 /**
  * 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
     $path = SITE_PATH_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]');
     $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);
     $title = $this->labels->getLabel('[view_campuses]');
     $columnLabel = $this->labels->getLabel('[view]');
     $link = $this->linkValues['view'];
     $fieldName = 'admin_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);
     $this->prepareTemplate($path);
     // store the Row Manager's XML Node Name
     $this->template->set('rowManagerXMLNodeName', RowManager_AdminManager::XML_NODE_NAME);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'admin_id');
     /*
      *  Set up any additional data transfer to the Template here...
      */
     // This changes the person ids to the person's first name and last name.
     $personManager = new RowManager_PersonManager();
     $personManager->setSortOrder('person_lname');
     $personManager->setLabelTemplateLastNameFirstName();
     $personList = $personManager->getListIterator();
     $personArray = $personList->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     // priv list.
     $privManager = new RowManager_PrivManager();
     $privManager->setSortOrder('priv_accesslevel');
     $privList = $privManager->getListIterator();
     $privArray = $privList->getDropListArray();
     $this->template->set('list_priv_id', $privArray);
     $templateName = 'siteDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_Admins.php';
     return $this->template->fetch($templateName);
 }
Ejemplo n.º 4
0
 /**
  * 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 page labels in XML format...
     // NOTE: use this location to update any label tags ...
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common Form data.
     $this->prepareTemplate($path);
     /*
      * Form related Template variables:
      */
     // store the button label
     $this->template->set('buttonText', $this->labels->getLabel('[Update]'));
     // Insert the date start/end values for the following date fields:
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * Add any additional data required by the template here
      */
     //priv list.
     $privManager = new RowManager_PrivManager();
     $privManager->setSortOrder('priv_accesslevel');
     $privList = $privManager->getListIterator();
     $privArray = $privList->getDropListArray();
     $this->template->set('list_priv_id', $privArray);
     //Person list.
     $personManager = new RowManager_PersonManager();
     $personManager->setSortOrder('person_lname');
     $personManager->setLabelTemplateLastNameFirstName();
     $personList = $personManager->getListIterator();
     $personArray = $personList->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_AddAdmin.php';
     // otherwise use the generic admin box template
     $templateName = 'siteFormSingle.php';
     return $this->template->fetch($templateName);
 }