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


PHP Util::app_Path方法代码示例

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


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

示例1: miguel_MenuBar

 function miguel_MenuBar($menu_file = '')
 {
     $file = Util::app_Path('common/include/menu.xml');
     if (!empty($menu_file)) {
         $file = Util::app_Path('common/include/' . $menu_file);
     }
     $this->_processXMLInitData($file);
     //Debug::oneVar($this, __FILE__, __LINE__);
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:9,代码来源:miguel_menubar.class.php

示例2: form_init_elements

 /**
  * Este metodo se llama cada vez que se instancia la clase.
  * Se utiliza para crear los objetos del formulario
  */
 function form_init_elements()
 {
     //Debug::oneVar(Util::app_Path('install/include/gpl.txt'), __FILE__, __LINE__);
     if (file_exists(Util::app_Path('install/include/gpl.txt'))) {
         $str_content = File::Read(Util::app_Path('install/include/gpl.txt'));
     }
     $textarea = new FETextArea("Licence", false, 15, 90);
     $textarea->set_value($str_content);
     $this->add_element($textarea);
     $this->add_element($this->_formatElem("base_SubmitButton", "Salir", "quit", agt("Salir")));
     $this->add_element($this->_formatElem("base_SubmitButton", "Acepto", "submit", agt("Acepto") . " >"));
     $this->add_element($this->_formatElem("base_SubmitButton", "Regresar", "back", "< " . agt("Regresar")));
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:17,代码来源:miguel_licenceform.class.php

示例3: _block

 function _block()
 {
     include_once Util::app_Path("common/view/classes/miguel_navform.class.php");
     $ret_val = container();
     $titulo = html_h4('Ha salido correctamente de la aplicación');
     $titulo->set_tag_attribute('class', 'ptexto01');
     $msg = html_p('Para continuar trabajando en este Campus debe regresar a la página de inicio y acceder de nuevo.');
     $msg->set_tag_attribute('class', 'ptexto01');
     $ret_val->add($titulo);
     $ret_val->add($msg);
     //Dejar así, no usar  $this->addForm(), ya que el enlace se hace sin SID
     $ret_val->add(new FormProcessor(new miguel_navForm(), 'reload', Util::main_URLPath('index.php')));
     return $ret_val;
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:14,代码来源:miguel_vexit.class.php

示例4: giveControl

 /**
  * Pasa el control a un controlador diferente
  * @param string $moduleName Nombre del módulo a instanciar
  * @param string $class Clase controlador
  *
  */
 function giveControl($moduleName, $class)
 {
     if (file_exists(Util::app_Path($moduleName . '/control/classes/' . strtolower($class) . '.class.php'))) {
         include Util::app_Path($moduleName . '/control/classes/' . strtolower($class) . '.class.php');
         $new_control = new $class();
     }
     if (isset($new_control)) {
         $new_control->Exec();
     }
     exit;
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:17,代码来源:base_controller.class.php

示例5: Copyright

      +----------------------------------------------------------------------+
      | miguel admin                                                         |
      +----------------------------------------------------------------------+
      | Copyright (c) 2004, miguel Development Team                          |
      +----------------------------------------------------------------------+
      |   This program is free software; you can redistribute it and/or      |
      |   modify it under the terms of the GNU General Public License        |
      |   as published by the Free Software Foundation; either version 2     |
      |   of the License, or (at your option) any later version.             |
      |                                                                      |
      |   This program is distributed in the hope that it will be useful,    |
      |   but WITHOUT ANY WARRANTY; without even the implied warranty of     |
      |   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      |
      |   GNU General Public License for more details.                       |
      |                                                                      |
      |   You should have received a copy of the GNU General Public License  |
      |   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: Manuel R. Freire Santos (Universidad Antonio de Nebrija)    |
      |                       <mfreires@alumnos.nebrija.es>                  |
      |          miguel development team                                     |
      |                       <e-learning-desarrollo@listas.hispalinux.es>   |
      +----------------------------------------------------------------------+
*/
include_once '../common/miguel_base.inc.php';
include_once Util::app_Path('admin/control/classes/miguel_cadmin.class.php');
$miguel = new miguel_CAdmin();
$miguel->Exec();
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:index.php

示例6: or

      +----------------------------------------------------------------------+
      |   This program is free software; you can redistribute it and/or      |
      |   modify it under the terms of the GNU General Public License        |
      |   as published by the Free Software Foundation; either version 2     |
      |   of the License, or (at your option) any later version.             |
      |                                                                      |
      |   This program is distributed in the hope that it will be useful,    |
      |   but WITHOUT ANY WARRANTY; without even the implied warranty of     |
      |   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      |
      |   GNU General Public License for more details.                       |
      |                                                                      |
      |   You should have received a copy of the GNU General Public License  |
      |   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: SHS Polar Sistemas Informáticos, S.L. <www.polar.es>        |
      |          Equipo de Desarrollo Software Libre <jmartinezc@polar.es>   | 
      |          miguel Development Team                                     |
      |                       <e-learning-desarrollo@listas.hispalinux.es>   |      
      +----------------------------------------------------------------------+
*/
//Carga el código de Andromeda
include_once "../common/miguel_base.inc.php";
//Carga el código del controlador
include_once Util::app_Path("courseCard/control/classes/miguel_ccoursecard.class.php");
//Instancia un Controlador en memoria. Esto al mismo tiempo inicializa el modelo y la vista
$miguel = new miguel_CCourseCard();
//Ejecuta el controlador
$miguel->Exec();
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:index.php

示例7: date

      +----------------------------------------------------------------------+
      | Authors: Jesus A. Martinez Cerezal <jamarcer@inicia.es>              |
      |          miguel Development Team                                     |
      |                       <e-learning-desarrollo@listas.hispalinux.es>   |
      +----------------------------------------------------------------------+
*/
/**
 * Esta clase se encarga de gestionar el formulario para accesos
 * de usuarios a la plataforma miguel
 *
 * @author  Jesus A. Martinez Cerezal <jamarcer@inicia.es>
 * @author miguel development team <e-learning-desarrollo@listas.hispalinux.es>
 * @package miguel main
 * @version 1.0.0
 */
include_once Util::app_Path("common/view/classes/miguel_formcontent.class.php");
class miguel_bookForm extends miguel_FormContent
{
    function form_init_elements()
    {
        $elemTitulo = $this->_formatElem("FEText", 'titulo', 'titulo', FALSE, "100");
        $elemTitulo->set_attribute('class', 'ptabla03');
        $this->add_element($elemTitulo);
        $elemAutor = $this->_formatElem("FEText", "autor", "autor", FALSE, "100");
        $elemAutor->set_attribute('class', 'ptabla03');
        $this->add_element($elemAutor);
        $elemDate = $this->_formatElem("FEYears", "año", "f_edicion", FALSE, null, null, '1900', date('Y'));
        $elemDate->set_attribute('class', 'ptabla03');
        $this->add_element($elemDate);
        $elemEditorial = $this->_formatElem("FEText", "editorial", "editorial", FALSE, "100");
        $elemEditorial->set_attribute('class', 'ptabla03');
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:miguel_bookform.class.php

示例8: processPetition

 function processPetition()
 {
     /* ----------------- COMPRUEBA EL ACCESO AL MODULO E INICIALIZA --------------- */
     //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');
     $course_id = $this->getSessionElement('courseinfo', 'course_id');
     //Para maqueta
     if (empty($course_id)) {
         $course_id = 7;
     }
     if (isset($user_id) && $user_id != '') {
         $bol_hasaccess = true;
         $user = $this->getSessionElement('userinfo', 'user_alias');
     }
     $this->clearNavBarr();
     if ($bol_hasaccess) {
         /* --------------- EXEC FILEMANAGER ACTIONS ----------------- */
         if ($this->issetViewVariable('submit')) {
             /* ----------- NEW FOLDER  -------------- */
             if ($this->issetViewVariable('foldername')) {
                 $this->setViewVariable('folder_id', $this->obj_data->insertFolder($this->getViewVariable('folder_id'), $course_id, $this->getViewVariable('foldername'), $user_id));
             }
             /* -----------  SUBMIT FILE  -------------- */
             if ($_FILES['filename']['tmp_name'] != null) {
                 include_once Util::app_Path("filemanager/include/classes/filemanager.class.php");
                 if (!$this->getViewVariable('filezip')) {
                     fileManager::uploadFile($_FILES['filename']);
                     $this->obj_data->insertFile($_FILES['filename']['name'], $_FILES['filename']['type'], $course_id, $this->getViewVariable('folder_id'), $user_id, $_FILES['filename']['size']);
                 } else {
                     $listUploadFiles = fileManager::uploadFileZip($_FILES['filename']);
                     $listCount = count($listUploadFiles);
                     for ($i = 0; $i < $listCount; $i++) {
                         if (!$listUploadFiles[$i]['folder']) {
                             //$parent_folder_id -> se busca dirname() en $listFolder[ruta_completa] y obtenemos el id y el nombre
                             $this->obj_data->insertFile(basename($listUploadFiles[$i]['stored_filename']), '', $course_id, $this->getViewVariable('folder_id'), $user_id);
                         } else {
                             $this->obj_data->insertFolder($this->getViewVariable('folder_id'), $course_id, $this->getViewVariable('foldername'), $user_id);
                             //Creamos una lista folder - (id - folder_name - folder_ruta_completa), necesaria para mantener la profundidad
                             //folder_name -> basename( ruta ), parent_folder_name -> basename( dirname(ruta) )
                             $listFolder[] = array(basename(dirname($listUploadFiles[$i]['stored_filename'])), $lastIdFolder);
                         }
                     }
                 }
             }
             /* ------------ OTRAS OPERACIONES ARCHIVOS Y DIRECTORIOS CON FORMULARIO INTERMEDIO-------------- */
             /* Eliminar, Renombrar, Comentar, Mover, Hacer visible, Bloquear, Compartir, ¿Actualizar y guardar un log de cambios o control de versiones? */
             if ($this->issetViewVariable('status')) {
                 $status = $this->getViewVariable('status');
                 switch ($status) {
                     case 'rename':
                         if ($this->getViewVariable('tp') == 'f') {
                             $this->obj_data->renameFolder($this->getViewVariable('id'), $this->getViewVariable('newname'));
                         } else {
                             $this->obj_data->renameFile($this->getViewVariable('id'), $this->getViewVariable('newname'));
                         }
                         break;
                     case 'move':
                         if ($this->getViewVariable('tp') == 'f') {
                             $folder_id = $this->getViewVariable('id');
                             $nuevo_destino = $this->getViewVariable('nuevo_destino');
                             if ($folder_id != $nuevo_destino) {
                                 $this->obj_data->moveFolder($folder_id, $nuevo_destino);
                             }
                             $folder_id = null;
                             unset($folder_id);
                             $nuevo_destino = null;
                             unset($nuevo_destino);
                         } else {
                             $this->obj_data->moveFile($course_id, $this->getViewVariable('id'), $this->getViewVariable('folder_id'), $this->getViewVariable('nuevo_destino'));
                         }
                         break;
                 }
                 $status = null;
                 unset($status);
             }
             /* Debería retornar un valor error o estado de la operación y notificarlo en la carga del módulo */
         }
         /* ------------------ OPERACIONES REALIZADAS DIRECTAMENTE ---------*/
         if ($this->issetViewVariable('status')) {
             $status = $this->getViewVariable('status');
             switch ($status) {
                 case 'del':
                     if ($this->getViewVariable('tp') == 'f') {
                         $this->obj_data->deleteFolder($course_id, $this->getViewVariable('id'));
                     } else {
                         $this->obj_data->deleteFile($this->getViewVariable('id'), $this->getViewVariable('folder_id'), $course_id);
                     }
                     break;
                 case 'visible':
                     if ($this->getViewVariable('tp') == 'f') {
                         $this->obj_data->visibleElement($this->getViewVariable('id'), 1, 'folder');
                     } else {
                         $this->obj_data->visibleElement($this->getViewVariable('id'), 1, 'document');
                     }
                     break;
                 case 'invisible':
                     if ($this->getViewVariable('tp') == 'f') {
                         $this->obj_data->visibleElement($this->getViewVariable('id'), 0, 'folder');
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:101,代码来源:miguel_cfilemanager.class.php

示例9: addForm

 /**
  * Permite añadir un formulario en la página
  * @param string $str_moduleName Nombre del módulo al que pertenece
  * @param string $str_className Nombre de la clase Formulario
  * @param string $str_param Parametros adicionales (opcional)
  * @return object FormProcessor
  */
 function addForm($str_moduleName, $str_className, $str_param = '')
 {
     $ret_val = container();
     $this->registry->pushApp('common');
     $file_name = Util::app_Path($str_moduleName . '/view/classes/' . strtolower($str_className) . '.class.php');
     /*
     if($this->issetViewVariable('wm')){
     	if($str_param == ''){
     		$str_param = 'wm';
     	} else {
     		$str_param = 'wm&'.$str_param;
     	}
     	$str_param = 'wm';
     }
     */
     if ($this->issetViewVariable('wm')) {
     }
     if (file_exists($file_name)) {
         include $file_name;
         if ($str_param == '') {
             $ret_val = new FormProcessor(new $str_className($this->arr_commarea), strtolower($str_className), Util::format_URLPath(trim(str_replace('/' . MIGUELBASE_MODULES_BASE, ' ', $_SERVER['PHP_SELF']))));
         } else {
             $ret_val = new FormProcessor(new $str_className($this->arr_commarea), strtolower($str_className), Util::format_URLPath(trim(str_replace('/' . MIGUELBASE_MODULES_BASE, ' ', $_SERVER['PHP_SELF'])), $str_param));
         }
         //$ret_val->set_form_target('parent');
         /*
         if($this->issetViewVariable('wm')){
         	$ret_val->set_onsubmit('self.close()');
         }
         */
     }
     $this->registry->popApp('common');
     return $ret_val;
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:41,代码来源:base_layoutpage.class.php

示例10: _exec_by_status

 function _exec_by_status($status, $folder_id, $user_id, $user_profile_id, $course_id)
 {
     /*
      * We have success by default ;-)
      */
     $this->SetViewVariable('opstat', 'success');
     /*
      * Select the action given by status
      */
     switch ($status) {
         case 'list':
             /*
              * First, we must check our permissions
              */
             if (!$this->obj_data->checkFolderPerms("r", $course_id, $user_profile_id, $folder_id)) {
                 $this->giveControl('main', 'miguel_CMain');
             }
             /*
              * Get/set order list:
              */
             /*
              * Relation among fileds of tables folder and document about order
              */
             $fdOrderRelations = array("id" => array("folder_id", "document.document_id"), "name" => array("folder_name", "document.document_name"), "date" => array("folder_date", "document.date_publish,\r\n\t\t\t\t\t\tdocument.document_name"), "comment" => array("folder_comment", "document.document_comment"), "user_alias" => array("folder_name", "user.user_alias,\r\n\t\t\t\t\t\tdocument.document_name"), "accepted" => array("folder_name", "document.document_accepted,\r\n\t\t\t\t\t\tdocument.document_name"), "mime" => array("folder_name", "document.document_mime,\r\n\t\t\t\t\t\tdocument.document_name"), "actions" => array("folder_perms, foldeer_name", "document.document_name"));
             /*
              * This is somewhat a "hack" but it works and doesn't overload the server.
              * The problem is that we cannot use in_array('orderby', $fdOrderRelations)
              * because..??.. in_array sucks! 
              */
             $fdOrderbyArray = array("id", "name", "date", "comment", "user_alias", "accepted", "mime", "actions");
             $this->setViewVariable('fdOrderbyArray', $fdOrderbyArray);
             if ($this->IsSetVar('orderby', 'orderhow') && in_array($this->getViewVariable('orderby'), $fdOrderbyArray) && ($this->getViewVariable('orderhow') == 0 || $this->getViewVariable('orderhow') == 1)) {
                 $orderby = $this->getViewVariable('orderby');
                 $orderhow = $this->getViewVariable('orderhow');
             } else {
                 $orderby = 'name';
                 $this->setViewVariable('orderby', $orderby);
                 $orderhow = 0;
                 $this->setViewVariable('orderhow', $orderhow);
             }
             /*
              * No real action to execute,
              * but we'll get some data that we'll need in View class
              */
             $this->setViewVariable('FolderList', $this->obj_data->getFolderList($course_id, $folder_id, $user_profile_id, $fdOrderRelations[$orderby][0], $orderhow));
             $this->setViewVariable('FileList', $this->obj_data->getFileList($course_id, $folder_id, $user_profile_id, $user_id, $fdOrderRelations[$orderby][1], $orderhow));
             $this->setViewVariable('FolderProperties', $this->obj_data->getFolderProperties($course_id, $folder_id, $user_profile_id, $user_id));
             $this->setViewVariable('FolderDeeps', $this->obj_data->getFolderDeeps($course_id, $folder_id));
             break;
         case 'send_file':
             /*
              * First, we must check our permissions
              */
             if (!$this->obj_data->checkFilePerms("w", $course_id, $user_id, $user_profile_id, $this->getViewVariable('document_id'))) {
                 $this->giveControl('main', 'miguel_CMain');
             }
             /*
              * We get the junk var of actual file from the BBDD if we're updating
              * instead of creating one
              */
             if ($this->IsSetVar('document_id')) {
                 $this->setViewVariable('document_junk', $this->obj_data->getFileJunk($course_id, $this->getViewVariable('document_id')));
             }
             /*
              * Send a file
              */
             if ($this->IsSetVar('submit') && $_FILES['filename']['tmp_name'] != NULL) {
                 include_once Util::app_Path("filemanager/include/classes/filemanager.class.php");
                 $md5 = md5_file($_FILES['filename']['tmp_name']);
                 if (!$this->getViewVariable('filezip')) {
                     if (!($file_properties = fileManager::uploadFile($_FILES['filename'], $this->getViewVariable('document_junk')))) {
                         $this->SetViewVariable('opstat', 'fserror');
                     }
                     if (!$this->obj_data->insertFile($file_properties['name'], $file_properties['type'], $file_properties['size'], $file_properties['junk'], $md5, $this->getViewVariable('document_comment'), $course_id, $user_id, $folder_id, NULL, $this->getViewVariable('document_id'), $this->getViewVariable('document_accepted'))) {
                         $this->SetViewVariable('opstat', 'dberror');
                     }
                 } else {
                     /*
                      * ZIP files: 
                      */
                     if (!($listUploadFiles = fileManager::uploadFileZip($_FILES['filename']))) {
                         $this->SetViewVariable('opstat', 'fserror');
                     }
                     $listCount = count($listUploadFiles);
                     if (!($folder_zip_id = $this->obj_data->insertFolder($_FILES['filename']['name'], $course_id, $folder_id, $ZipElement['comment'], $this->getViewVariable('shared'), $this->getViewVariable('folder_perms'), NULL))) {
                         $this->SetViewVariable('opstat', 'dberror');
                     }
                     foreach ($listUploadFiles as $ZipElement) {
                         if (!$ZipElement['folder']) {
                             /*
                              * Upload the zip files in the folders they belong to
                              *
                              * $folder_parent_id -> find dirname() in 
                              * $listFolder[ruta_completa] and obtain name and id
                              */
                             $search_folder_name = basename(dirname($ZipElement['stored_filename']));
                             $search_folder_dir = dirname(dirname($ZipElement['stored_filename']));
                             $j = 0;
                             $countList = count($listFolder);
                             $find = false;
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:101,代码来源:miguel_cauthortool.class.php

示例11: isAdmin

      |          miguel Development Team                                     |
      |                       <e-learning-desarrollo@listas.hispalinux.es>   |
      +----------------------------------------------------------------------+
*/
/**
 * Define la clase base de miguel.
 *
 * @author Jesus A. Martinez Cerezal <jamarcer@inicia.es>
 * @author Antonio F. Cano Damas <antoniofcano@telefonica.net>
 * @author miguel development team <e-learning-desarrollo@listas.hispalinux.es>
 * @package miguel common
 * @subpackage control
 * @version 1.0.0
 *
 */
include_once Util::app_Path('common/control/classes/base_login.php');
class miguel_UserInfo
{
    /**
     * Informa si el usuario es administrador a no.
     * @param base_model $obj_model Instancia de un modelo
     * @param string $str_user Identificador de usuario (nickname).
     * @return boolean Devuelve TRUE si el usuario es administrador, y FALSE si no lo es.
     */
    function isAdmin(&$obj_model, $str_user)
    {
        $ret_sql = $obj_model->Select('admin', 'idUser', "idUser = {$str_user}");
        if ($obj_model->hasError()) {
            $ret_val = null;
        } else {
            //dbg_var($ret_sql[0], __FILE__, __LINE__);
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:base_userinfo.class.php

示例12: Copyright

      | Copyright (c) 2003, miguel Development Team                          |
      +----------------------------------------------------------------------+
      |   This program is free software; you can redistribute it and/or      |
      |   modify it under the terms of the GNU General Public License        |
      |   as published by the Free Software Foundation; either version 2     |
      |   of the License, or (at your option) any later version.             |
      |                                                                      |
      |   This program is distributed in the hope that it will be useful,    |
      |   but WITHOUT ANY WARRANTY; without even the implied warranty of     |
      |   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      |
      |   GNU General Public License for more details.                       |
      |                                                                      |
      |   You should have received a copy of the GNU General Public License  |
      |   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>   |      
      +----------------------------------------------------------------------+
*/
//Carga el código de Andromeda
include_once "../common/miguel_base.inc.php";
//Carga el código del controlador
include_once Util::app_Path("alumnPage/control/classes/miguel_calumnpage.class.php");
//Instancia un Controlador en memoria. Esto al mismo tiempo inicializa el modelo y la vista
$miguel = new miguel_CAlumnPage();
//Ejecuta el controlador
$miguel->Exec();
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:index.php

示例13: processError

 function processError($num_err, $mens_err, $nombre_archivo, $num_linea, $vars)
 {
     // conjunto de errores de los cuales se almacenara un rastreo
     $errores_de_usuario = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);
     if (in_array($num_err, $errores_de_usuario)) {
         // marca de fecha/hora para el registro de error
         $dt = date('Y-m-d H:i:s (T)');
         // definir una matriz asociativa de cadenas de error
         // en realidad las unicas entradas que deberiamos
         // considerar son E_WARNING, E_NOTICE, E_USER_ERROR,
         // E_USER_WARNING y E_USER_NOTICE
         $tipo_error = array(E_ERROR => 'Error', E_WARNING => 'Advertencia', E_PARSE => 'Error de Intérprete', E_NOTICE => 'Anotación', E_CORE_ERROR => 'Error de Núcleo', E_CORE_WARNING => 'Advertencia de Núcleo', E_COMPILE_ERROR => 'Error de Compilación', E_COMPILE_WARNING => 'Advertencia de Compilacón', E_USER_ERROR => 'Error de Usuario', E_USER_WARNING => 'Advertencia de Usuario', E_USER_NOTICE => 'Anotación de Usuario');
         $err = "<errorentry>\n";
         $err .= "\t<datetime>" . $dt . "</datetime>\n";
         $err .= "\t<errornum>" . $num_err . "</errornum>\n";
         $err .= "\t<errortype>" . $tipo_error[$num_err] . "</errortype>\n";
         $err .= "\t<errormsg>" . $mens_err . "</errormsg>\n";
         if (!empty($nombre_archivo)) {
             $err .= "\t<scriptname>" . $nombre_archivo . "</scriptname>\n";
         }
         if (!empty($num_linea)) {
             $err .= "\t<scriptlinenum>" . $num_linea . "</scriptlinenum>\n";
         }
         //if (in_array($num_err, $errores_de_usuario)){
         //	$err .= "\t<vartrace>" . wddx_serialize_value($vars, "Variables") . "</vartrace>\n";
         //}
         $err .= "</errorentry>\n\n";
         // guardar en el registro de errores, y enviar un correo
         error_log($err, 3, MIGUELBASE_ERRORLOG_FILE);
         //)mail("jamarcer@inicia.es", "Error Critico de Usuario en miguel", $err);
         if ($num_err != E_USER_ERROR) {
             include_once Util::app_Path('error/control/classes/miguel_cerror.class.php');
             $obj_error = new miguel_CError($tipo_error[$num_err], $mens_err);
             $obj_error->Exec();
         } else {
             $err = "\n";
             $err .= "\tdatetime: " . $dt . "\n";
             $err .= "\terrornum: " . $num_err . "\n";
             $err .= "\terrortype: " . $tipo_error[$num_err] . "\n";
             $err .= "\terrormsg: " . $mens_err . "\n";
             if (!empty($nombre_archivo)) {
                 $err .= "\tscriptname: " . $nombre_archivo . "\n";
             }
             if (!empty($num_linea)) {
                 $err .= "\tscriptlinenum: " . $num_linea . "\n";
             }
             echo '<h1>Error Fatal</h1><br>';
             echo '<pre>' . $err . '</pre><br>';
             echo '<h3>Consulte con el administrador</h3><br>';
             Session::close();
             die;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:54,代码来源:errorhandler.class.php

示例14: processPetition

 function processPetition()
 {
     $arr_cvw = $this->getSessionData();
     //Debug::oneVar($arr_cvw, __FILE__,__LINE__);
     //Obtención del id de curso
     //Parametro temporal para demo
     $course_id = $this->getViewVariable('id');
     if (!isset($course_id)) {
         if (!isset($arr_cvw['course_id'])) {
             $course_id = 8;
         } else {
             $course_id = $arr_cvw['course_id'];
         }
     } else {
         $arr_cvw = array();
     }
     //En un futuro deberia ser lo siguiente
     //$course_id = Session::getValue('course_id');
     if ($course_id != $arr_cvw['course_id']) {
         unset($arr_cvw);
         $arr_cvw['course_id'] = $course_id;
     }
     //Si el curso se inicializa correctamente...
     if (isset($course_id) && $course_id != '') {
         include_once Util::app_Path('common/control/classes/miguel_courseinfo.class.php');
         $infoCourse = miguel_CourseInfo::getInfo($this->obj_data, $course_id);
         //Debug::oneVar($infoCourse, __FILE__,__LINE__);
         //$this->setViewVariable('infoCourse', $infoCourse);
         //$arr_cvw['module_path'] = $this->obj_data->CourseModules($course_id);
         //Se obtiene el orden de documentos
         $arr_cvw['sec_docs'] = $this->obj_data->CourseModulesOrder($course_id);
         //Hay que ver si se nos redirecciona desde el exterior
         //Si existe la variable mid (id de módulo) reorientamos el índice
         $module_id = $this->getViewVariable('mid');
         if (isset($module_id) && $module_id != '') {
             $this->moveIndex($module_id, $arr_cvw);
         } else {
             //Hay que navegar
             $option = $this->getViewVariable('opt');
             //$this->processNavigation($option, $arr_cvw);
             $index = $arr_cvw['index'];
             $document_id = $arr_cvw['sec_docs'][$index]['document'];
             //Procesar datos de formulario
             if ($arr_cvw['accion']) {
                 //Procesamos el formulario, si existe
                 $this->processForm($document_id, $arr_cvw);
                 //Sólo si no hay que mostrar un resultado se sigue
                 if (!isset($arr_cvw['result'])) {
                     //Procesamos la navegacion
                     $this->processNavigation($option, $arr_cvw);
                 }
             } else {
                 $this->processNavigation($option, $arr_cvw);
             }
         }
         $index = $arr_cvw['index'];
         $document_id = $arr_cvw['sec_docs'][$index]['document'];
         $module_id = $arr_cvw['sec_docs'][$index]['module'];
         $arr_path = $this->getFolderNavInfo($document_id);
         //Debug::oneVar($arrPath, __FILE__,__LINE__);
         if ($arr_path['fl_type']) {
             $this->setViewVariable('view_elem', $this->processNextForm($arr_cvw));
             $this->setViewClass('miguel_VCourseActioner');
             $arr_cvw['accion'] = true;
         } else {
             $this->setViewClass('miguel_VCourseViewer');
             $arr_cvw['accion'] = false;
         }
         $this->setViewVariable('ban_mid', $this->obj_data->getCourseModulesPosition($arr_cvw['course_id'], $module_id));
         $this->setViewVariable('esInicio', $index == 0);
         $this->setViewVariable('hayPrevio', $index != 0);
         $this->setViewVariable('haySiguiente', $index < count($arr_cvw['sec_docs']) - 1);
         $this->setViewVariable('actual', Util::formatPath(MIGUEL_APPDIR . 'var/courses/course_' . $course_id . '/pages/' . $arr_path['fl_actual']));
         //Util::formatPath(MIGUEL_APPDIR.'var/courses/'.$file);
         $this->setViewVariable('path', 'var/courses/course_' . $course_id . '/pages/');
         //Guardamos variables de navegacion
         $this->setSessionElement('cvw', $arr_cvw);
         $this->addNavElement(Util::format_URLPath("courseViewer/index.php", 'url=' . $this->getViewVariable('url') . '&name=' . $this->getViewVariable('name')), $infoCourse['description']);
         $this->setPageTitle("miguel Course Viewer Page ");
         $this->setMessage('');
         //$this->setCacheFile("miguel_vParser");
         $this->setCacheFlag(true);
         $this->setHelp("");
     }
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:85,代码来源:miguel_ccourseviewer.class.php

示例15: container

/**
 * Define la clase para la pantalla principal de administrador de usuarios
 *
 * Utiliza la libreria phphtmllib.
 *
 * @author Jesus A. Martinez Cerezal <jamarcer@inicia.es>
 * @author miguel development team <e-learning-desarrollo@listas.hispalinux.es>
 * @package miguel userManager
 * @subpackage view
 * @version 1.0.0
 *
 */
/**
 * Include classes library
 */
include_once Util::app_Path("common/view/classes/miguel_vmenu.class.php");
class miguel_VUserManager extends miguel_VMenu
{
    function miguel_VUserManager($title, $arr_commarea)
    {
        $this->miguel_VMenu($title, $arr_commarea);
    }
    function right_block()
    {
        //Crea el contenedor del right_block
        $main = container();
        // $main->add(html_hr());
        //$main->add($this->add_mainMenu());
        //Titulo
        //$titulo = html_p(agt('Biblioteca'));
        $titulo = html_br();
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:31,代码来源:miguel_vusermanager.class.php


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