/** * Load a template * * @author Fernando Ontiveros Lira <*****@*****.**> * @access public * @param string $strTemplateName * @return void */ public function LoadTemplate($strTemplateName) { if ($strTemplateName == '') { return; } $temp = $strTemplateName . ".php"; $file = Bootstrap::ExpandPath('templates') . $temp; // Check if its a user template if (file_exists($file)) { //require_once( $file ); include $file; } else { // Try to get the global system template $file = PATH_TEMPLATE . PATH_SEP . $temp; //require_once( $file ); if (file_exists($file)) { include $file; } } }
if ($oPluginRegistry->isRegisteredFolder( SYS_COLLECTION )) { $phpFile = PATH_PLUGINS . SYS_COLLECTION . PATH_SEP . SYS_TARGET . '.php'; $targetPlugin = explode( '/', SYS_TARGET ); $collectionPlugin = $targetPlugin[0]; $avoidChangedWorkspaceValidation = true; } else { $phpFile = Bootstrap::ExpandPath( 'methods' ) . SYS_COLLECTION . PATH_SEP . SYS_TARGET . '.php'; } // services is a special folder, if (SYS_COLLECTION == 'services') { $avoidChangedWorkspaceValidation = true; $targetPlugin = explode( '/', SYS_TARGET ); if ($targetPlugin[0] == 'webdav') { $phpFile = Bootstrap::ExpandPath( 'methods' ) . SYS_COLLECTION . PATH_SEP . 'webdav.php'; } } if (SYS_COLLECTION == 'login' && SYS_TARGET == 'login') { $avoidChangedWorkspaceValidation = true; } $bWE = false; $isControllerCall = false; $isPluginController = false; if (substr( SYS_COLLECTION, 0, 8 ) === 'gulliver') { $phpFile = PATH_GULLIVER_HOME . 'methods/' . substr( SYS_COLLECTION, 8 ) . SYS_TARGET . '.php'; } else { //when the file is part of the public directory of any PROCESS, this a ProcessMaker feature