Beispiel #1
0
 /**
  * function __construct
  * <pre>
  * Initialize the Class ...
  * </pre>
  * @param $module_id [INTEGER] value used to initialize the list.
  * @param $sortBy [STRING] the field name to sort list by
  * @return [void]
  */
 function __construct($module_id = -1, $sortBy = '')
 {
     $searchManager = new RowManager_PageManager();
     // NOTE: if you need to narrow the field of the search then uncommnet
     // the following and set the proper search criteria.
     $searchManager->setValueByFieldName("module_id", $module_id);
     //$searchManager->setValueByFieldName('module_isCommonLook', '1' );
     $searchManager->setSortOrder($sortBy);
     $this->resultSet = $searchManager->find();
 }
 /**
  * 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->page_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_PageManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'page_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_PageManager();
     $dataAccessManager->setSortOrder($this->sortBy);
     //        $this->dataList = new PageList( $this->sortBy );
     $this->dataList = $dataAccessManager->getListIterator();
     $this->template->setXML('dataList', $this->dataList->getXML());
     $pageManager = new RowManager_PageManager();
     $pageManager->setSortOrder('page_link');
     $pageList = $pageManager->getListIterator();
     $pageArray = $pageList->getDropListArray();
     // echo "<pre>".print_r(  $pageArray, true)."</pre>";
     $this->template->set("list_page_parentID", $pageArray);
     /*
      * Add any additional data required by the template here
      */
     $templateName = 'siteFormDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_EditPages.php';
     return $this->template->fetch($templateName);
 }
 /**
  * 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;
     $this->template = new Template($path);
     // store any additional values to template
     $this->template->set('formAction', $this->formAction);
     // store the page labels in XML format...
     // NOTE: use this location to update any label tags ...
     $name = $this->dataManager->getName();
     $this->labels->setLabelTag('[Title]', '[pageName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     // save the list of form fields
     $this->template->set('formFieldList', $this->formFields);
     // store the field types being displayed
     $fieldTypes = explode(',', FormProcessor_EditPage::FORM_FIELD_TYPES);
     $this->template->set('formFieldType', $fieldTypes);
     // 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
      */
     $pageTypeArray = RowManager_PageManager::getPageTypeArray();
     $this->template->set('list_page_type', $pageTypeArray);
     $daObjList = new DAObjList($this->module_id);
     $listArray = $daObjList->getDroplistArray();
     $this->template->set('list_page_rowMgrID', $listArray);
     $this->template->set('list_page_listMgrID', $listArray);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_EditPage.php';
     // otherwise use the generic admin box template
     $templateName = 'siteFormSingle.php';
     return $this->template->fetch($templateName);
 }
Beispiel #4
0
$skipTables = true;
// if NOT then reset the tables...
if (!$skipTables) {
    /*
     * Page Table
     *
     * Manages interactions with the page table
     *
     * page_id [INTEGER]  unique identifier
     * page_parentID [INTEGER]  the id of the parent page
     * page_breadcrumbTitle [STRING]  the title to display in the breadcrumb feature
     * page_templateName [STRING]  the name of the template used to display this page
     * page_link [STRING]  the link for the page, it's the path from the root
     * page_order [INTEGER]  what order the pages should be put in
     */
    $Page = new RowManager_PageManager();
    $Page->dropTable();
    $Page->createTable();
    /*[RAD_DAOBJ_TABLE]*/
} else {
    echo 'Skipping Tables ... <br>';
}
// end if !skipTables
// check to see if parameter 'skipLabel' was provided
$skipLabel = isset($_REQUEST['skipLabel']);
// if not, then add labels to DB ...
if (!$skipLabel) {
    /*
     *  Insert Labels in DB
     */
    // Create Application Upload Series
 /**
  * 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;
     $this->template = new Template($path);
     // store the form action information
     $this->template->set('formAction', $this->formAction);
     // store the link values
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     $this->template->set('linkValues', $this->linkValues);
     // 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';
     $this->template->set('linkLabels', $this->linkLabels);
     // 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);
     $this->template->set('linkColumns', $this->linkColumns);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->pagelabel_id);
     // store the current op type
     $this->template->set('opType', $this->opType);
     // store the page labels in XML format...
     // NOTE: use this location to update any label tags ...
     // example:
     $page = new RowManager_PageManager($this->page_id);
     $name = $page->getName();
     $this->labels->setLabelTag('[Title]', '[pageName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     // save the list of form fields
     $this->template->set('formFieldList', $this->formFields);
     // store the field types being displayed
     $fieldTypes = explode(',', FormProcessor_AddPageLabels::FORM_FIELD_TYPES);
     $this->template->set('formFieldType', $fieldTypes);
     // 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_PageLabelsManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'pagelabel_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.
     $this->dataList = new PageLabelsList($this->page_id, $this->sortBy);
     $this->template->setXML('dataList', $this->dataList->getXML());
     // store the field names being displayed
     $fieldNames = explode(',', FormProcessor_AddPageLabels::DISPLAY_FIELDS);
     $this->template->set('dataFieldList', $fieldNames);
     /*
      * Add any additional data required by the template here
      */
     $listData['1'] = $this->labels->getLabel('[English]');
     $listData['2'] = $this->labels->getLabel('[Chinese]');
     $listData['3'] = $this->labels->getLabel('[Korean]');
     $this->template->set('list_language_id', $listData);
     $templateName = 'siteAdminBox.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_AddPageLabels.php';
     return $this->template->fetch($templateName);
 }
 /**
  * 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/';
     $this->template = new Template($path);
     // store the form action data
     $this->template->set('formAction', $this->formCallBack);
     // store the page labels used by this template...
     // NOTE: use this location to update any label tags ...
     $name = $this->itemManager->getName();
     $this->labels->setLabelTag('[Title]', '[pageName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store the field names being displayed
     $fieldNames = explode(',', page_DeletePage::DISPLAY_FIELDS);
     $this->template->set('dataFieldList', $fieldNames);
     // store XML Data of item
     $this->template->setXML('dataItem', $this->itemManager->getXML());
     $pageTypeArray = RowManager_PageManager::getPageTypeArray();
     $this->template->set('list_page_type', $pageTypeArray);
     $moduleID = $this->itemManager->getModuleID();
     $daObjList = new DAObjList($moduleID);
     $listArray = $daObjList->getDroplistArray();
     $this->template->set('list_page_rowMgrID', $listArray);
     $this->template->set('list_page_listMgrID', $listArray);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_DeletePage.php';
     // otherwise use the generic admin box template
     $templateName = 'siteDeleteConf.php';
     return $this->template->fetch($templateName);
 }
 /**
  * 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/';
     $this->template = new Template($path);
     // store the Row Manager's XML Node Name
     $this->template->set('rowManagerXMLNodeName', RowManager_PageManager::XML_NODE_NAME);
     // store the field names being displayed
     $fieldNames = explode(',', page_ViewPages::DISPLAY_FIELDS);
     $this->template->set('dataFieldList', $fieldNames);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'page_id');
     // store the link values
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     $this->template->set('linkValues', $this->linkValues);
     // 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';
     $this->template->set('linkLabels', $this->linkLabels);
     // 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);
     $this->template->set('linkColumns', $this->linkColumns);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     $moduleManager = new RowManager_ModuleManager($this->module_id);
     $name = $moduleManager->getModuleName();
     $this->labels->setLabelTag('[Title]', '[moduleName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store XML List of Applicants ...
     $this->template->setXML('dataList', $this->listManager->getXML());
     /*
      *  Set up any additional data transfer to the Template here...
      */
     $pageTypeArray = RowManager_PageManager::getPageTypeArray();
     $this->template->set('list_page_type', $pageTypeArray);
     $daObjList = new DAObjList($this->module_id);
     $listArray = $daObjList->getDroplistArray();
     $this->template->set('list_page_rowMgrID', $listArray);
     $this->template->set('list_page_listMgrID', $listArray);
     $templateName = 'siteDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_ViewPages.php';
     return $this->template->fetch($templateName);
 }