当前位置: 首页>>代码示例>>PHP>>正文


PHP Util::base_Path方法代码示例

本文整理汇总了PHP中Util::base_Path方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::base_Path方法的具体用法?PHP Util::base_Path怎么用?PHP Util::base_Path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Util的用法示例。


在下文中一共展示了Util::base_Path方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setLang

 /**
  * Toma el valor para el idioma.
  * @param optional string $lang     The language abbriviation.
  *
  * @access public
  *
  */
 function setLang($lang = null)
 {
     include_once Util::base_Path('include/classes/nls.inc.php');
     //Debug::oneVar($lang, __FILE__, __LINE__);
     if (empty($lang) || !NLS::isValid($lang)) {
         if (Session::getValue('lang') != null) {
             $lang = Session::getValue('lang');
         } else {
             if (Session::getContextValue('gettext_lang') != null) {
                 $lang = Session::getContextValue('gettext_lang');
             } else {
                 $lang = 'es_ES';
             }
         }
     }
     Session::setValue('language', $lang);
     //Debug::oneVar($lang, __FILE__, __LINE__);
     /* First try language with the current charset. */
     $lang_charset = $lang . '.' . NLS::getCharset();
     if ($lang_charset != setlocale(LC_ALL, $lang_charset)) {
         /* Next try language with its default charset. */
         global $nls;
         $charset = !empty($nls['charsets'][$lang]) ? $nls['charsets'][$lang] : $nls['defaults']['charset'];
         $lang_charset = $lang . '.' . $charset;
         NLS::_cachedCharset(0, $charset);
         if ($lang_charset != setlocale(LC_ALL, $lang_charset)) {
             /* At last try language solely. */
             $lang_charset = $lang;
             setlocale(LC_ALL, $lang_charset);
         }
     }
     @putenv('LANG=' . $lang_charset);
     @putenv('LANGUAGE=' . $lang_charset);
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:41,代码来源:nls.class.php

示例2: getAllLang

 function getAllLang()
 {
     include_once Util::base_Path('include/classes/nls.class.php');
     $langlist = array();
     $dir = opendir(MIGUELGETTEXT_DIR);
     while ($item = readdir($dir)) {
         if ($item != '.' && $item != '..' && $item != 'CVS' && !is_file($item)) {
             $langlist[NLS::getLangLabel($item)] = $item;
         }
     }
     closedir($dir);
     return $langlist;
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:13,代码来源:miguel_minstall.class.php

示例3: processPetition

 function processPetition()
 {
     //Se controla que el usuario no tenga acceso.
     $bol_hasaccess = false;
     //Primero comprueba si estamos identificados y si no es asi entonces vamos a ver si es una peticion de autenticacion
     $user_id = $this->getSessionElement('userinfo', 'user_id');
     if (isset($user_id) && $user_id != '') {
         $bol_hasaccess = true;
         $user = $this->getSessionElement('userinfo', 'user_alias');
     } else {
     }
     if ($bol_hasaccess) {
         if ($user == 'guest') {
             //Error, el usuario no puede ser el invitado
         } else {
             //Realiza la inscripciÛn en el curso
             $course_id = $this->getViewVariable('course_id');
             $this->_unsubscribeCourse($user_id, $course_id);
             $this->addNavElement(Util::format_URLPath('main/index.php'), agt('miguel_Courses'));
             $course_name = $this->obj_data->getCourseName($course_id);
             $this->setViewVariable('course_name', $course_name);
             //Realiza la notificacion si esta permitido
             if ($this->getSessionElement('userinfo', 'notify_email')) {
                 include_once Util::base_Path("include/classes/mailer.class.php");
                 $mail = new miguel_mailer();
                 $mail->From = $this->getSessionElement('userinfo', 'email');
                 $mail->FromName = $this->getSessionElement('userinfo', 'name') . ' ' . $this->getSessionElement('userinfo', 'surname');
                 $mail->AddAddress($this->getSessionElement('userinfo', 'email'), $this->getSessionElement('userinfo', 'name'));
                 $mail->AddReplyTo($this->getSessionElement('userinfo', 'email'), $this->getSessionElement('userinfo', 'name'));
                 $mail->Subject = agt('miguel_newCourseUnsubscriptionSubject') . ' ' . $course_name;
                 $mail->Body = agt('miguel_newCourseUnsubscriptionBody');
                 if (!$mail->Send()) {
                     echo "Message could not be sent. <p>";
                     echo "Mailer Error: " . $mail->ErrorInfo;
                     exit;
                 }
             }
             $this->setCacheFile("miguel_VUnsubscribe_" . $this->getSessionElement("userinfo", "user_id"));
             $this->setMessage(agt("miguel_userUnsubscribe"));
             $this->setPageTitle("miguel_userUnsubscribe");
         }
     } else {
         //Bienvenida
     }
     $this->setCacheFlag(true);
     $this->setHelp("EducContent");
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:47,代码来源:miguel_cunsubscribe.class.php

示例4: Session

 /**
  * Constructor.
  *
  */
 function Session()
 {
     //Parametros de tratamiento de errores
     ini_set('display_errors', 'On');
     //ini_set('display_startup_errors', 'Off');
     ini_set('log_errors', 'Off');
     include_once Util::base_Path('include/classes/errorhandler.class.php');
     $error_handler = new errorHandler();
     $str_name = session_name();
     if ($str_name != 'MIGUEL_BASE') {
         session_name('MIGUEL_BASE');
     }
     //Parametros de sesion
     ini_set('session.save_handler', 'files');
     ini_set('session.use_cookies', 0);
     if (MIGUELBASE_SESSION_DIR != '') {
         ini_set('session.save_path', MIGUELBASE_SESSION_DIR);
     }
     if (MIGUELBASE_PHP_INT_VERSION >= 40200) {
         session_cache_expire(MIGUELBASE_SESSION_TIME);
     }
     ini_set('session.use_trans_sid', 0);
     ini_set('session.gc_probability', 100);
     //Parametros para transferencia de ficheros
     ini_set('file_uploads', 'On');
     ini_set('upload_tmp_dir', MIGUELBASE_CACHE_DIR);
     ini_set('upload_max_filesize', '2M');
     if (!session_id()) {
         session_start();
     }
     //Cargamos los valores de contexto
     if ($this->_isContextSet()) {
         $this->bol_okConfFile = true;
     } else {
         $this->_initContext();
         $this->setValue('session', true);
     }
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:42,代码来源:session.class.php

示例5: processPetition

 function processPetition()
 {
     //Declaraciones comunes
     $virtual_user = array('username' => 'installer', 'name' => 'instalación', 'surname' => '');
     $message = '';
     $this->setSessionArray("userinfo", $virtual_user);
     //Paso en la instalación
     $install_step = intval($this->getSessionElement('install_step'));
     //Control de salida por peticion de usuario
     if ($this->issetViewVariable('quit')) {
         $install_step = -1;
     }
     switch ($install_step) {
         case -1:
             $this->currentStep = 0;
             break;
         case 1:
             include_once Util::base_Path('include/classes/nls.class.php');
             NLS::setLang($this->getViewVariable('miguel_lang'));
             //NLS::setTextdomain('install', Util::formatPath(MIGUELGETTEXT_DIR), NLS::getCharset());
             if ($this->issetViewVariable('submit')) {
                 $this->currentStep = 2;
             }
             break;
         case 2:
             if ($this->issetViewVariable('submit')) {
                 $this->currentStep = 3;
             }
             if ($this->issetViewVariable('back')) {
                 $this->currentStep = 1;
             }
             break;
         case 3:
             if ($this->issetViewVariable('submit')) {
                 $this->currentStep = 4;
             }
             if ($this->issetViewVariable('back')) {
                 $this->currentStep = 2;
             }
             break;
         case 4:
             if ($this->issetViewVariable('submit')) {
                 $all_Ok = false;
                 //Control sobre variables de vista definidas
                 if ($this->issetViewVariable('miguel_ddbb_sgbd') && $this->getViewVariable('miguel_ddbb_sgbd') != '') {
                     $this->setViewVariable('inst_ddbb_sgbd', $this->getViewVariable('miguel_ddbb_sgbd'));
                     $all_Ok = true;
                 } else {
                     $all_Ok = false;
                 }
                 if ($this->issetViewVariable('miguel_ddbb_host') && $this->getViewVariable('miguel_ddbb_host') != '') {
                     $this->setViewVariable('inst_ddbb_host', $this->getViewVariable('miguel_ddbb_host'));
                     $all_Ok = true;
                 } else {
                     $all_Ok = false;
                 }
                 if ($this->issetViewVariable('miguel_ddbb_name') && $this->getViewVariable('miguel_ddbb_name') != '') {
                     $this->setViewVariable('inst_ddbb_name', $this->getViewVariable('miguel_ddbb_name'));
                     $all_Ok = true;
                 } else {
                     $all_Ok = false;
                 }
                 if ($this->issetViewVariable('miguel_ddbb_user') && $this->getViewVariable('miguel_ddbb_user') != '') {
                     $this->setViewVariable('inst_ddbb_user', $this->getViewVariable('miguel_ddbb_user'));
                     $all_Ok = true;
                 } else {
                     $all_Ok = false;
                 }
                 if ($this->issetViewVariable('miguel_ddbb_passwd') && $this->getViewVariable('miguel_ddbb_passwd') != '') {
                     $this->setViewVariable('inst_ddbb_passwd', $this->getViewVariable('miguel_ddbb_passwd'));
                     $all_Ok = true;
                 } else {
                     $all_Ok = false;
                 }
                 if ($this->issetViewVariable('miguel_ddbb_passwd2') && $this->getViewVariable('miguel_ddbb_passwd2') != '') {
                     $this->setViewVariable('inst_ddbb_passwd2', $this->getViewVariable('miguel_ddbb_passwd2'));
                     $all_Ok = true;
                 } else {
                     $all_Ok = false;
                 }
                 if ($all_Ok) {
                     if ($this->getViewVariable('miguel_ddbb_passwd') == $this->getViewVariable('miguel_ddbb_passwd2')) {
                         $this->setSessionElement('host_sgbd', $this->getViewVariable('miguel_ddbb_sgbd'));
                         $this->setSessionElement('host_name', $this->getViewVariable('miguel_ddbb_host'));
                         $this->setSessionElement('ddbb_name', $this->getViewVariable('miguel_ddbb_name'));
                         $this->setSessionElement('ddbb_user', $this->getViewVariable('miguel_ddbb_user'));
                         $this->setSessionElement('ddbb_passwd', $this->getViewVariable('miguel_ddbb_passwd'));
                         $this->currentStep = 5;
                     } else {
                         $this->currentStep = 4;
                         $message = 'Error: Las claves no coinciden.';
                     }
                 } else {
                     $this->currentStep = 4;
                     $message = 'Error: Todos los campos son obligatorios.';
                 }
             }
             if ($this->issetViewVariable('back')) {
                 $this->currentStep = 3;
             }
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:101,代码来源:miguel_cinstall.class.php

示例6: log

 /**
  * Escribe un mensaje en el log
  * @param string $message Mensaje a guardar en el Log
  * @param string $priority Nivel de log
  */
 function log($message, $priority)
 {
     include_once Util::base_Path('include/classes/loghandler.class.php');
     LogHandler::log($message, $this->str_moduleName . '_controller', $priority);
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:10,代码来源:base_model.class.php

示例7: SendNotification

 function SendNotification()
 {
     //Realiza la notificacion si esta permitido
     if ($this->getSessionElement('userinfo', 'notify_email')) {
         include_once Util::base_Path("include/classes/mailer.class.php");
         $mail = new miguel_mailer();
         $mail->From = $this->getSessionElement('userinfo', 'email');
         $mail->FromName = $this->getSessionElement('userinfo', 'name') . ' ' . $this->getSessionElement('userinfo', 'surname');
         $mail->AddAddress($this->getSessionElement('userinfo', 'email'), $this->getSessionElement('userinfo', 'name'));
         $mail->AddReplyTo($this->getSessionElement('userinfo', 'email'), $this->getSessionElement('userinfo', 'name'));
         $mail->Subject = agt('miguel_newCourseSubject') . ' ' . $courseData['name'];
         $mail->Body = $course_name . ',\\n ' . agt('miguel_newCourseSubscriptionBody') . '\\n' . agt('miguel_disclaimer');
         if (!$mail->Send()) {
             echo "Message could not be sent. <p>";
             echo "Mailer Error: " . $mail->ErrorInfo;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:18,代码来源:miguel_cnewcourse.class.php

示例8: prepareTheme

 function prepareTheme($theme)
 {
     include_once Util::base_Path('include/classes/theme.class.php');
     //Comprobamos si el tema existe
     if (!Theme::existTheme($theme)) {
         $theme = Session::getContextValue('theme');
     }
     //Configuración theme
     $file = MIGUELBASE_THEME_DIR . $theme . '/theme.xml';
     if (file_exists($file)) {
         miguel_UserInfo::_processXMLInitData($file);
     } else {
         $this->_setError("miguel_UserInfo:: el tema visual no está configurado");
     }
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:15,代码来源:miguel_userinfo.class.php

示例9:

      |   the world-wide-web at http://www.gnu.org/copyleft/gpl.html         |
      +----------------------------------------------------------------------+
      | Authors: Jesus A. Martinez Cerezal <jamarcer@inicia.es>              |
      |          miguel Development Team                                     |
      |                       <e-learning-desarrollo@listas.hispalinux.es>   |
      +----------------------------------------------------------------------+
*/
/**
 * Todo el patrón MVC se define es este paquete llamado framework
 * @package framework
 * @subpackage view
 */
/**
 *
 */
include_once Util::base_Path('view/includes.inc.php');
/**
 * Define la clase base para las pantallas de miguel.
 *
 * Se define una plantilla común para todas las pantallas de miguel:
 *  + Bloque de cabecera en la parte superior.
 *  + Bloque central, donde se presentará la información
 *  + Bloque de pie en la parte inferior
 * <pre>
 * --------------------------------
 * |         header block         |
 * --------------------------------
 * |                              |
 * |         data block           |
 * |                              |
 * --------------------------------
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:base_layoutpage.class.php

示例10: initialize

      +----------------------------------------------------------------------+
*/
/**
 * Define la clase base para las pantallas especiales de miguel.
 *
 * Utiliza la libreria phphtmllib.
 *
 * @author Jesus A. Martinez Cerezal <jamarcer@inicia.es>
 * @author miguel development team <e-learning-desarrollo@listas.hispalinux.es>
 * @copyright GPL - Ver LICENCE
 * @package framework
 * @subpackage view
 * @version 1.0.0
 *
 */
include_once Util::base_Path("view/classes/base_layoutpage.class.php");
class miguel_VBase extends base_LayoutPage
{
    var $str_title = '';
    function miguel_VBase($str_title, $arr_commarea)
    {
        $this->str_title = $str_title;
        $this->base_LayoutPage($this->str_title, $arr_commarea);
    }
    function initialize()
    {
        //Preparamos valores para los header de la página
        // <META HTTP-EQUIV="refresh" content="5; URL=http://">
        //  html_meta  (string $content, [string $http_equiv = ""], [string $name = ""])
        //$this->add_head_content("<meta http-equiv=\"refresh\" content=\"5\" url=\"".Util::main_URLPath('index.php')."\">");
        $this->add_head_content("<meta name=\"keywords\" content=\"miguel,hispalinux,indetec,campus,ecampus,e-campus,classroom,elearning,learning,pedagogy,platform,teach,teaching,teacher,prof,professor,student,study,open,source,gpl,mysql,php,e-learning, apprentissage,ecole,universite,university,contenu,classe, universidad, enseñanza, virtual, distribuida, sl, gpl, software, libre, clases, aprendizaje, proceso\">");
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:miguel_vbase.class.php

示例11: msg

      |   along with this program; if not, write to the Free Software        |
      |   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA          |
      |   02111-1307, USA. The GNU GPL license is also available through     |
      |   the world-wide-web at http://www.gnu.org/copyleft/gpl.html         |
      +----------------------------------------------------------------------+
      | Authors: Jesus A. Martinez Cerezal <jamarcer@inicia.es>              |
      |          miguel Development Team                                     |
      |                       <e-learning-desarrollo@listas.hispalinux.es>   |      
      +----------------------------------------------------------------------+
*/
/*
     Modo de uso
     
     Debug::msg('Hola', __FILE__, __LINE__);
*/
include_once Util::base_Path('include/classes/lensdebug.class.php');
class Debug
{
    function msg($a, $file, $line)
    {
        if (MIGUELBASE_DEBUG) {
            $D = new LensDebug();
            $D->msg($a, $file, $line);
        }
    }
    function oneVar($a, $file, $line)
    {
        if (MIGUELBASE_DEBUG) {
            $D = new LensDebug();
            $D->v($a, $file, $line);
        }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:debug.class.php

示例12: listThemes

 /**
  * Informa de los temas instalados.
  *
  * @return array  Lista de temas.
  *
  * @access public
  *
  */
 function listThemes()
 {
     include_once Util::base_Path('include/classes/theme.class.php');
     return Theme::getActiveThemes();
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:13,代码来源:registry.class.php


注:本文中的Util::base_Path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。