コード例 #1
0
ファイル: My_Page.php プロジェクト: HaldunA/phpwebsite
 public function userOption($module_title)
 {
     $module = new PHPWS_Module($module_title);
     $directory = $module->getDirectory();
     $final_file = $directory . 'inc/my_page.php';
     if (!is_file($final_file)) {
         PHPWS_Error::log(PHPWS_FILE_NOT_FOUND, 'users', 'userOption', $final_file);
         return dgettext('users', 'There was a problem with this module\'s My Page file.');
     }
     include $final_file;
     if (!function_exists('my_page')) {
         return PHPWS_Error::get(USER_MISSING_MY_PAGE, 'users', 'My_Page::userOption', $module_title);
     }
     $content = my_page();
     return $content;
 }
コード例 #2
0
ファイル: Boost.php プロジェクト: HaldunA/phpwebsite
 public function aboutView($module)
 {
     PHPWS_Core::initCoreClass('Module.php');
     $mod = new PHPWS_Module($module);
     $file = $mod->getDirectory() . 'boost/about.html';
     if (is_file($file)) {
         include $file;
     } else {
         echo dgettext('boost', 'The About file is missing for this module.');
     }
     exit;
 }