public function transferto() { if ($this->_accessLevel < ACCESS_LEVEL_EDIT) { CommonErrors::fatal(COMMONERROR_PERMISSION, $this); return; //$this->fatal(ERROR_NO_PERMISSION); } if($this->_moduleName=="candidates") { $module = new Candidates($this->_siteID); } else if($this->_moduleName=="companies") { $module = new Companies($this->_siteID); } else if($this->_moduleName=="joborders") { $module = new JobOrders($this->_siteID); } /* Bail out if we don't have a valid candidate ID. */ if (!isset($module)) { CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, "Invalid Module: {$this->_moduleName}."); return; } /* Bail out if we don't have a valid candidate ID. */ if (!$this->isRequiredIDValid('dataItemID', $_GET)) { CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, "Invalid {$this->_moduleName} ID."); return; } /* Update the module record. */ $updateSuccess = $module->updateSite( $_GET['dataItemID'], $_GET["siteID"] ); if (!$updateSuccess) { CommonErrors::fatal(COMMONERROR_RECORDERROR, $this, "Failed to update {$this->_moduleName}."); } $this->_template->assign('active', $this); $this->_template->display('./modules/Settings/transferstatus.php'); }