Example #1
0
 function loadHrdbHome($isCreated = false)
 {
     $reg_sys_controller = new modulecim_reg($this->db, $this->viewer, $this->labels);
     $reg_sys_controller->setBaseCallBack(Page::getBaseURL() . '?' . 'p_Mod=cim_reg');
     // 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)
     $parameters = array('PERSON_ID' => $this->PERSON_ID, 'PROVINCE_ID' => $this->PROVINCE_ID, 'GENDER_ID' => $this->GENDER_ID, 'STAFF_ID' => $this->STAFF_ID);
     //[RAD_CALLBACK_PARAMS]
     $pageCallBack = $this->getCallBack(modulecim_hrdb::PAGE_HRDBHOME, $this->sortBy, $parameters);
     $this->setPageCallBack($pageCallBack);
     /** ADDED TO CREATE FORM-DATALIST PAGE **/
     // compile a formAction for the adminBox
     $parameters = array('PERSON_ID' => $this->PERSON_ID, 'PROVINCE_ID' => $this->PROVINCE_ID, 'GENDER_ID' => $this->GENDER_ID, 'STAFF_ID' => $this->STAFF_ID);
     //[RAD_CALLBACK_PARAMS]
     $formAction = $this->getCallBack(modulecim_hrdb::PAGE_HRDBHOME, $this->sortBy, $parameters);
     // set the pageCallBack value.  This is used by the Language switching
     // code
     $this->setPageCallBack($formAction);
     // if this pageDisplay object isn't already created then
     if (!$isCreated) {
         if ($this->PERSON_ID == '') {
             $this->PERSON_ID = $this->getPersonIDfromViewerID();
             // default person is the viewer
         }
         // create a new pageDisplay object
         $this->pageDisplay = new page_HrdbHome($this->moduleRootPath, $this->viewer, $formAction, $this->sortBy, $this->PERSON_ID);
         //[RAD_FORMINIT_FOREIGNKEY_INIT]
     } else {
         // otherwise just update the formAction value
         $this->pageDisplay->setFormAction($formAction);
     }
     $links = array();
     //         $parameters = array('REG_ID'=>$this->REG_ID, 'PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID);//[RAD_CALLBACK_PARAMS]
     //         $continueLink = $this->getCallBack( modulecim_hrdb::PAGE_HRDBHOME, "", $parameters );
     //         $links["cont"] = $continueLink;
     $parameters = array('REG_ID' => $this->REG_ID, 'PERSON_ID' => $this->PERSON_ID);
     //, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID);//[RAD_CALLBACK_PARAMS]
     $editLink = $reg_sys_controller->getCallBack(modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $parameters);
     $editLink .= "&" . modulecim_hrdb::REG_ID . "=";
     $links["edit"] = $editLink;
     $delLink = $reg_sys_controller->getCallBack(modulecim_reg::PAGE_CONFIRMDELETEREGISTRATION, $this->sortBy, $parameters);
     $delLink .= "&" . modulecim_hrdb::REG_ID . "=";
     $links["del"] = $delLink;
     /*[RAD_LINK_INSERT]*/
     $parameters = array('REG_ID' => $this->REG_ID, 'PERSON_ID' => $this->PERSON_ID, 'PROVINCE_ID' => $this->PROVINCE_ID, 'GENDER_ID' => $this->GENDER_ID, 'STAFF_ID' => $this->STAFF_ID);
     //[RAD_CALLBACK_PARAMS]
     $sortByLink = $this->getCallBack(modulecim_hrdb::PAGE_HRDBHOME, '', $parameters);
     $sortByLink .= "&" . modulecim_hrdb::SORTBY . "=";
     $links["sortBy"] = $sortByLink;
     $this->pageDisplay->setLinks($links);
     /*** END FORM-DATALIST ADD **/
     //         $this->pageDisplay = new page_HrdbHome( $this->moduleRootPath, $this->viewer );
     //         $links = array();
     // /*[RAD_LINK_INSERT]*/
     //         $this->pageDisplay->setLinks( $links );
 }
          <td valign="top" width="5"><img src="<?php 
echo $pathToRoot;
?>
/images/space.gif" width="5" height="1"></td>
          <td valign="top" width="170" align="right"> <table width="130" height="100%" border="0" align="left" cellpadding="5" cellspacing="0">
              <tr align="right" valign="top"> 
                <td width="129"> <div align="right" class="strong"> 
                    <?php 
/*
 * Display sidebar content...
 */
$sideBarKey = XMLObject_PageContent::NODE_SIDEBAR;
$sideBarContent = (string) $page->{$sideBarKey};
echo $sideBarContent;
if (strpos($sideBarContent, "Admin Options") == true) {
    echo "<a href='" . Page::getBaseURL() . "'><span class=\"text\">Home</span></a><br>";
}
?>
                    
                  </div></td>
                <td width="1" height="100%" rowspan="2" class="level1"><img src="<?php 
echo $pathToRoot;
?>
/images/gray.gif" width="1" height="100%"></td>
              </tr>
              <tr align="right" valign="top"> 
                <td width="129" class="text">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
Example #3
0
 /**
  * function getLogoutURL
  * <pre>
  * This function returns the link to the Login Page.
  * </pre>
  * @return [STRING]
  */
 function getLogoutURL()
 {
     // NOTE: This routine is designed to be called directly without the
     // need for this to be made an object.  So instead of using
     // $this->getBaseURL() we references the getBaseURL() method using the
     // object reference.
     $baseURL = Page::getBaseURL() . '?' . Page::QS_MODULE . '=' . PAGE_MODULE_LOGOUT;
     return $baseURL;
 }
Example #4
0
 * end 3)
 */
/*
 * 4) Perl Upload Javascript file (Data/scripts/JScript/perlUpload.jsp)
 *
 */
// if file exists, then delete it.
// Note: following statements assumes setup script is 1 directory below
//       the root directory.
$locationJava = $extension . PerlFileUpload::DEF_LOCATION_JAVASCRIPT;
if (file_exists($locationJava)) {
    unlink($locationJava);
}
// compile contents into variable
$pathParts = pathinfo($_SERVER[SITE_KEY_SERVER_URL]);
$pathWebRoot = Page::getBaseURL();
//$pathProgressBar =  SITE_SERVER_HTTP.$_SERVER['HTTP_HOST']. $pathParts[ 'dirname' ].'/'.$locationProgressBar ;
$pathWebRoot = str_replace('Install/site_setup.php', '', $pathWebRoot);
$pathWebRoot = str_replace('install/site_setup.php', '', $pathWebRoot);
$pathProgressBar = $pathWebRoot . PerlFileUpload::DEF_LOCATION_PROGRESSBAR;
$template = new Template();
$template->set('pathProgressBar', $pathProgressBar);
$contentJava = $template->fetch('ContentJavaScriptTemplate.php');
// open file and write contents.
// close.
file_put_contents($locationJava, $contentJava);
/*
 * end 4)
 */
/*
 * 5) DB Backup ()