/**
  * 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);
 }
 function right_block()
 {
     //$this->add(html_br());
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 1, 0);
     $table->add_row(html_td('', '', $this->_getFileContent($this->getViewVariable('url'))));
     return $table;
 }
 /**
  *
  */
 function main_block()
 {
     $main = html_div();
     $main->set_id('content');
     $title = html_h2('Se ha producido un error');
     $title->set_tag_attribute('class', 'warncolor');
     $main->add($title);
     //Puede no estar definido el contexto
     $width = Session::getContextValue('mainInterfaceWidth');
     if (!isset($width)) {
         $width = '100%';
     }
     $table = html_table($width, 0, 1, 0);
     //Puede no estar definido el error
     $error = $this->getViewVariable('str_error');
     if (!isset($error)) {
         $error = 'No error code was given';
     }
     $row = html_td('warncolor', '', $error);
     $row->set_tag_attribute('align', 'center');
     $table->add_row($row);
     //Puede no estar definido la url de retorno
     $url = $this->getViewVariable('str_url');
     if (isset($url)) {
         $row = html_td('', '', html_a($url, agt('Volver')));
         $row->set_tag_attribute('align', 'center');
         $table->add_row($row);
     }
     $main->add($table);
     return $main;
 }
 /**
  *
  */
 function main_block()
 {
     $main = html_div();
     $main->set_id("content");
     $title = html_h2("Se ha producido un error");
     $title->set_tag_attribute("class", "warncolor");
     $main->add($title);
     //Puede no estar definido el contexto
     $width = Session::getContextValue("mainInterfaceWidth");
     if (!isset($width)) {
         $width = "100%";
     }
     $table = html_table($width, 0, 8, 0);
     //Puede no estar definido el error
     $error = $this->getViewVariable('str_error');
     if (!isset($error)) {
         $error = "No error code was given";
     }
     $row = html_td("warncolor", "", $error);
     $row->set_tag_attribute("align", "center");
     $table->add_row($row);
     //Puede no estar definido la url de retorno
     $url = $this->getViewVariable('str_url');
     if (isset($url)) {
         $row = html_td("", "", html_a($url, _('Volver')));
         $row->set_tag_attribute("align", "center");
         $table->add_row($row);
     }
     $main->add($table);
     return $main;
 }
 function main_block()
 {
     $main = html_div();
     $table = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 1, 0);
     $table->add_row($this->_block());
     $main->add($table);
     return $main;
 }
 function add_info($arrActivities)
 {
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 5);
     $title = html_td('ptabla01', '', 'Activities del curso');
     $title->set_tag_attribute('colspan', 3);
     $table->add_row($title);
     for ($i = 0; $i < count($arrActivities); $i++) {
         $table->add($this->add_activity($arrActivities[$i]['title'], $arrActivities[$i]['body'], $arrActivities[$i]['id'], $i));
     }
     $table->add_row($title);
     return $table;
 }
 /**
  * We override this method to automatically
  * break up the main block into a
  * left block and a right block
  *
  * @param TABLEtag object.
  */
 function main_block()
 {
     $main = html_div();
     $main->set_id("content");
     $table = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 1, 0);
     $table->set_class("simple");
     //Centros
     $elem1 = html_td("color1-bg", "", $this->left_block());
     $table->add_row($elem1);
     $main->add($table);
     return $main;
 }
 /**
  * Inserta en el Log el mensaje.
  * @param string $message Mensaje a guardar en el Log
  * @param string $ident   Identificador de 'usuario'.
  * @param string $priority Nivel de log
  */
 function log($message, $ident, $priority = PEAR_LOG_WARNING)
 {
     if (MIGUELBASE_LOG_ACTIVE) {
         switch (MIGUELBASE_LOG_TYPE) {
             case 'file':
                 $conf = array('mode' => 0600, 'timeFormat' => '%Y/%m/%d %H:%M:%S');
                 $logger =& Log::singleton('file', MIGUELBASE_LOG_FILE, 'miguelOO_' . $ident, $conf);
                 break;
             case 'adodb':
                 $db_conf = array('ddbbSgbd' => Session::getContextValue('ddbbSgbd'), 'ddbbServer' => Session::getContextValue('ddbbServer'), 'ddbbUser' => Session::getContextValue('ddbbUser'), 'ddbbPassword' => Session::getContextValue('ddbbPassword'), 'ddbbMainDb' => Session::getContextValue('ddbbMainDb'));
                 $conf = array('dsn' => $db_conf);
                 $logger =& Log::singleton('adodb', MIGUELBASE_LOG_TABLE, 'miguelOO_' . $ident, $conf);
                 break;
             default:
                 $logger =& Log::singleton('error_log', 0, 'miguelOO_' . $ident);
         }
         switch (MIGUELBASE_LOG_LEVEL) {
             case 'ALL':
                 $mask = Log::UPTO(PEAR_LOG_DEBUG);
                 break;
             case 'EMERG':
                 $mask = Log::UPTO(PEAR_LOG_EMERG);
                 break;
             case 'ALERT':
                 $mask = Log::UPTO(PEAR_LOG_ALERT);
                 break;
             case 'CRITIC':
                 $mask = Log::UPTO(PEAR_LOG_CRIT);
                 break;
             case 'ERROR':
                 $mask = Log::UPTO(PEAR_LOG_ERR);
                 break;
             case 'WARNING':
                 $mask = Log::UPTO(PEAR_LOG_WARNING);
                 break;
             case 'NOTICE':
                 $mask = Log::UPTO(PEAR_LOG_NOTICE);
                 break;
             case 'INFO':
                 $mask = Log::UPTO(PEAR_LOG_INFO);
                 break;
             case 'DEBUG':
                 $mask = Log::UPTO(PEAR_LOG_DEBUG);
                 break;
             default:
                 $mask = PEAR_LOG_NONE;
         }
         $logger->setMask($mask);
         //Debug::oneVar($logger,__FILE__,__LINE__);
         $logger->log($message, $priority);
     }
 }
 function formatContent($filename)
 {
     $table = html_table(Session::getContextValue("mainInterfaceWidth"));
     $table->set_tag_attribute('align', 'center');
     $row2 = html_tr();
     $data = 'Fichero vacio o no existe';
     //Debug::oneVar($filename, __FILE__, __LINE__);
     if (file_exists($filename) && is_file($filename)) {
         ob_start();
         include_once $filename;
         $data = ob_get_contents();
         ob_end_clean();
     }
     $table->add_row($data);
     return $table;
 }
 function add_info($objectives, $description, $contents)
 {
     //        $row = html_tr();
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 5);
     $title = html_td('ptabla01', '', 'Ficha del curso');
     $title->set_tag_attribute('colspan', 2);
     $titleObj = html_td('ptabla02', '', 'Objetivos');
     $textObj = html_td('ptabla03', '', $objectives);
     $titleDes = html_td('ptabla02', '', 'Descripción');
     $textDes = html_td('ptabla03', '', $description);
     $titleCon = html_td('ptabla02', '', 'Contenidos');
     $textCon = html_td('ptabla03', '', $contents);
     $table->add_row($title);
     $table->add_row($titleObj, $textObj);
     $table->add_row($titleDes, $textDes);
     $table->add_row($titleCon, $textCon);
     $table->add_row($title);
     return $table;
 }
 function _contactDetail()
 {
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 2, 2);
     $contact = $this->getViewVariable('detail_contacts');
     if (is_array($contact) && $contact[0]['contact.contact_id'] != null) {
         $table->add_row($this->add_info('Nombre', $contact[0]['contact.contact_name']));
         $table->add_row($this->add_info('Apellido', $contact[0]['contact.contact_surname']));
         if ($contact[0]['contact.contact_nick'] != null) {
             $table->add_row($this->add_info('Usuario', $contact[0]['contact.contact_nick']));
         }
         $table->add_row($this->add_info('Correo electrónico', $contact[0]['contact.contact_mail']));
         $table->add_row($this->add_info('Comentarios', nl2br($contact[0]['contact.contact_comments'])));
     }
     $btDel = html_a(Util::format_URLPath("contact/index.php", "contact_id=" . $contact[0]['contact.contact_id'] . "&option=delete"), 'Eliminar', null, '_top');
     $btDel->set_tag_attribute('class', '');
     $btBack = html_a(Util::format_URLPath("contact/index.php", ''), 'Volver', null, '_top');
     $btBack->set_tag_attribute('class', '');
     $table->add_row($btBack, $btDel);
     return $table;
 }
 function formatContent($filename)
 {
     $table = html_table(Session::getContextValue("mainInterfaceWidth"));
     $table->set_tag_attribute('align', 'center');
     //Cuerpo
     $row1 = html_tr();
     $data = 'Fichero vacio o no existe';
     //Debug::oneVar($filename, __FILE__, __LINE__);
     if (file_exists($filename) && is_file($filename)) {
         ob_start();
         include_once $filename;
         $data = ob_get_contents();
         ob_end_clean();
     }
     $table->add_row($data);
     $form = html_td('ptexto01', '', $this->addForm('courseViewer', 'miguel_externalForm'));
     $form->set_tag_attribute('align', 'center');
     $table->add_row($form);
     return $table;
 }
 function right_block()
 {
     $main = html_div();
     $main->set_tag_attribute('width', Session::getContextValue('mainInterfaceWidth'));
     $hr = html_hr();
     $hr->set_tag_attribute('noshade');
     $hr->set_tag_attribute('size', 2);
     //Añade la linea horizontal al contenedor principal
     $main->add($hr);
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 1, 0);
     $table->set_tag_attribute('border');
     //Cabecera
     $elem1 = html_td('ptabla02', '', html_b('Perfil'));
     $elem1->set_tag_attribute('width', '50%');
     $elem2 = html_td('ptabla02', '', html_b('Conexiones'));
     $elem2->set_tag_attribute('align', 'right');
     $elem3 = html_td('ptabla02', '', html_b('%'));
     $elem3->set_tag_attribute('align', 'right');
     $table->add_row($elem1, $elem2, $elem3);
     $arrUsers = $this->getViewVariable('arrUsers');
     $iTotalCon = $this->getViewVariable('iTotalCon');
     for ($i = 0; $i < count($arrUsers); $i++) {
         $elem1 = html_td('ptabla03', '', $arrUsers[$i]['user.user_alias']);
         $elem2 = html_td('ptabla03', '', $arrUsers[$i]['countLogin']);
         $elem2->set_tag_attribute('align', 'right');
         $porc = sprintf('%.2f', $arrUsers[$i]['countLogin'] * 100 / $iTotalCon);
         $elem3 = html_td('ptabla03', '', $porc);
         $elem3->set_tag_attribute('align', 'right');
         $table->add_row($elem1, $elem2, $elem3);
     }
     $elem1 = html_td('ptabla03', '', html_b('TOTAL'));
     $elem2 = html_td('ptabla03', '', html_b($iTotalCon));
     $elem2->set_tag_attribute('align', 'right');
     $elem3 = html_td('ptabla03', '', html_b(100));
     $elem3->set_tag_attribute('align', 'right');
     $table->add_row($elem1, $elem2, $elem3);
     $main->add($table);
     return $main;
 }
 function crearLogin()
 {
     $typeLogin = strtoupper(Session::getContextValue('typeLogin'));
     $typeEncrypt = strtoupper(Session::getContextValue('typeEncrypt'));
     $typeEncryptMcrypt = Session::getContextValue('typeEncryptMcrypt');
     if ($typeLogin == 'BBDD') {
         if ($typeEncrypt == 'PLAIN') {
             return new base_loginPlano();
         } else {
             if ($typeEncrypt == 'MD5') {
                 return new base_loginMD5();
             } else {
                 if ($typeEncrypt == 'MCRYPT') {
                     return new base_loginMCRYPT($typeEncryptMcrypt);
                 }
             }
         }
     } else {
         if ($typeLogin == 'LDAP') {
         }
     }
 }
 function main_block()
 {
     $main = html_div();
     $main->set_id('content');
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 1, 0);
     $table->set_class('simple');
     //Barra Herramientas
     if ($this->str_type == 'toolbar') {
         $elem1 = html_td('', '', $this->left_block());
         //$elem1->set_id("anonymous");
         //$elem1->set_tag_attribute('width', 40);
         //$elem1->set_tag_attribute('valign', 'top');
     }
     //Principal
     $elem2 = html_td('toolmain', '', $this->right_block());
     //$elem2->set_tag_attribute('valign', 'top');
     //$elem2->set_id("identification");
     $row = html_tr();
     $row->add($elem1);
     $row->add($elem2);
     $table->add_row($row);
     $main->add($table);
     return $main;
 }
 function main_block()
 {
     $content = container();
     //$hr = html_hr();
     //$hr->set_tag_attribute("noshade");
     //$hr->set_tag_attribute("size", 2);
     //$ret_val->add($hr);
     $content->add(html_h4(agt('Preinscripción')));
     $content->add(html_br());
     if ($this->issetViewVariable('strError')) {
         $strError = $this->getViewVariable('strError');
         $ret_val->add(html_b(agt('Falta de informar los siguientes campos obligatorios: ') . $strError));
         $ret_val->add(html_br(2));
     }
     if ($this->issetViewVariable('newclient') && $this->getViewVariable('newclient') == 'ok') {
         $content->add(html_h2(agt('Preinscripción de usuario correcta.')));
         $content->add(html_a(Util::format_URLPath('main/index.php'), agt('Volver')));
     } else {
         $content->add($this->addForm('newInscription', 'miguel_inscriptionForm'));
     }
     $ret_val = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 1, 0);
     $ret_val->add_row(html_td('', '', _HTML_SPACE), html_td('', '', $content), html_td('', '', _HTML_SPACE));
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the right block.  It is already wrapped
  * in a TD
  * Solo se define right_block porque heredamos de VMenu y el left_block se encuentra ya definido por defecto con el menË™ del sistema.
  * Si heredara de miguel_VPage entonces habrÌa que definir de igual forma right_block y main_block. Esta ˙ltima es un contenedor de left_block y right_block
  * @return HTMLTag object
  */
 function right_block()
 {
     //Crea el contenedor del right_block
     $main = container();
     $hr = html_hr();
     $hr->set_tag_attribute('noshade');
     $hr->set_tag_attribute('size', 2);
     //Añade la linea horizontal al contenedor principal
     $main->add($hr);
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 1, 0);
     $table->set_class('simple');
     $elem1 = html_td('', '', $this->left_section());
     $elem1->set_tag_attribute('width', '20%');
     $elem1->set_tag_attribute('valign', 'top');
     $elem2 = html_td('', '', $this->right_section());
     $elem2->set_tag_attribute('valign', 'top');
     $row = html_tr();
     $row->add($elem1);
     $row->add($elem2);
     $table->add_row($row);
     $main->add($table);
     return $main;
 }
 function add_noticeDetails()
 {
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 2, 2);
     if ($this->issetViewVariable('author')) {
         $table->add(html_b('From: '));
         $table->add($this->getViewVariable('author'));
         $table->add(html_br(2));
         $table->add(html_b('Time: '));
         $table->add($this->getViewVariable('time'));
         $table->add(html_br(2));
         $table->add(html_b('Subject: '));
         $table->add($this->getViewVariable('subject'));
         $table->add(html_br(2));
         $table->add(html_b('Text: '));
         $table->add($this->getViewVariable('text'));
     } else {
         $table->add('No se ha encontrado el mensaje especificado.');
     }
     return $table;
 }
 function content_section()
 {
     //Registrar entidad
     if ($this->issetViewVariable('view') && $this->getViewVariable('view') == 'reg') {
         $table_fields = $this->add_registra_entity_form();
         $title = 'Registrar entidad';
     }
     //ficha entidad
     if ($this->issetViewVariable('view') && $this->getViewVariable('view') == 'fic') {
         $table_fields = $this->add_ficha_entity_form();
         $title = 'Ficha entidad';
     }
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $table->add_row(html_td('ptabla01', '', $title));
     $table->add_row(html_td('ptabla03', '', _HTML_SPACE));
     if ($this->issetViewVariable('strError')) {
         $strError = $this->getViewVariable('strError');
         $table->add_row(html_td('ptabla03', '', html_h2($strError)));
         $table->add_row(html_td('ptabla03', '', _HTML_SPACE));
     }
     $table->add_row(html_td('ptabla03', '', $table_fields));
     $table->add_row(html_td('ptabla03', '', _HTML_SPACE));
     $table->add_row(html_td('ptabla01pie', '', $title));
     return $table;
 }
 /**
  * Este metodo construye el formulario en sí.
  */
 function form()
 {
     $this->initialize();
     $table =& html_table($this->_width, 0, 0, 0);
     $table->set_class("mainInterfaceWidth");
     //$table->set_style("border: 1px solid");
     //$titulo = html_td('ptabla01','', agt('Ficha alumno'));
     //$titulo->set_tag_Attribute('colspan', '2');
     //$table->add_row($titulo);
     //Tabla de detalle
     $row = html_tr();
     $arr_data = $this->getViewVariable('arr_info');
     //Debug::oneVar($arr_data);
     if ($arr_data['image'] != '') {
         $img = Util::main_URLPath('var/secretary/user_image/user_' . $arr_data['person_id'] . '.' . $arr_data['image']);
     } else {
         $img = Theme::getThemeImagePath("anonimo.jpg");
     }
     $image = html_td('', '', html_img($img, 90, 118));
     $image->set_tag_attribute("width", "12%");
     $image->set_tag_attribute("align", "center");
     $detail_table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $this->add_class_row($detail_table, "Nombre");
     $detail_table->add_row(html_td('ptabla02', '', agt('Apellido')), html_td('ptabla03', '', container($this->element_form("Primer Apellido"), $this->element_form("Segundo Apellido"))));
     //Condicionar vvvvvvvvv
     $label1 = $this->element_label("Usuario");
     $label1->set_tag_attribute('class', 'ptabla02');
     $label2 = $this->element_label("Contraseña");
     $label2->set_tag_attribute('class', 'ptabla02');
     if ($this->getViewVariable('status') == 'show') {
         $detail_table->add_row(html_td('ptabla02', '', agt('Datos de acceso')), html_td('ptabla03', '', container($label1, $this->element_form("Usuario"), $label2, $this->element_form("Contraseña"))));
     }
     $this->add_class_row($detail_table, "DNI");
     $this->add_class_row($detail_table, "Dirección");
     $this->add_class_row($detail_table, "Población");
     $this->add_class_row($detail_table, "Provincia");
     $this->add_class_row($detail_table, "Pais");
     $this->add_class_row($detail_table, "Código Postal");
     $row->add($image);
     $row->add($detail_table);
     $table->add($row);
     /*
             //$this->add_class_row($table,"Tratamiento");
             $this->add_class_row($table,"Nombre");
             //$this->add_class_row($table,"Primer Apellido");
             //$this->add_class_row($table,"Segundo Apellido");
     $table->add_row(html_td('ptabla02','',agt('Apellido')), html_td('ptabla03', '', container($this->element_form("Primer Apellido"), $this->element_form("Segundo Apellido"))));
             $this->add_class_row($table,"DNI");
             //$this->add_class_row($table,"Fecha de nacimiento");
             $this->add_class_row($table,"Dirección");
             $this->add_class_row($table,"Población");
             $this->add_class_row($table,"Provincia");
             $this->add_class_row($table,"Pais");
             $this->add_class_row($table,"Código Postal");
     */
     //$this->add_class_row($table,"Teléfono");
     $table->add_row(html_td('ptabla02', '', agt('Teléfono')), html_td('ptabla03', '', container($this->element_form("Teléfono1"), $this->element_form("Teléfono2"))));
     $this->add_class_row($table, "Fax");
     //$this->add_class_row($table,"E-mail");
     $table->add_row(html_td('ptabla02', '', agt('e-mail')), html_td('ptabla03', '', container($this->element_form("E-mail1"), $this->element_form("E-mail2"), $this->element_form("E-mail3"))));
     $this->add_class_row($table, "Web");
     if ($this->getViewVariable('status') == 'new') {
         $table->add_row(html_td('ptabla02', '', agt('Fotografía')), html_td('ptabla03', '', $this->element_form("imagen")));
     }
     if ($this->getViewVariable('pid') == 3) {
         $table->add_row(html_td('ptabla02', '', agt('C.V.')), html_td('ptabla03', '', $this->element_form("cv_doc")));
     }
     if ($arr_data['cv'] != '') {
         $link = Util::main_URLPath('var/secretary/user_cv/user_' . $arr_data['person_id'] . '.' . $arr_data['cv']);
         $table->add_row(html_td('ptabla02', '', agt('CV')), html_td('ptabla03', '', html_a($link, agt('Abrir'), 'titulo03a')));
     }
     $this->add_class_row($table, "Observaciones");
     //$table->add_row($this->_tableRow("Nombre de usuario"));
     //$table->add_row($this->_tableRow("Clave de acceso"));
     //$table->add_row($this->_tableRow("Clave de acceso (confirmación)"));
     //$table->add_row($this->_tableRow("Correo electrónico"));
     //$table->add_row($this->_tableRow("Tema"));
     //$table->add_row($this->_tableRow("Perfil de usuario"));
     //$table->add_row($this->_tableRow("Politica de privacidad"));
     $row = html_tr();
     //$row->add("Politica de privacidad", "Los datos serán almacenados de forma segura y no se cederán a terceras partes.");
     $row->add("Politica de privacidad", "Los datos serán almacenados de forma segura y no se cederán a terceras partes.");
     //$table->add_row($row);
     $table->add_row(_HTML_SPACE, $this->element_form("Aceptar"));
     return $table;
 }
 function left_section()
 {
     $iId_forum = $this->getViewVariable('id_forum');
     $iId_topic = $this->getViewVariable('id_topic');
     //Creación
     $div = html_div();
     $div->add(html_br());
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 1, 0);
     //Opciones
     $table->add_row(html_td('ptabla01', '', _HTML_SPACE));
     $table->add_row(html_td('ptabla02', '', html_a(Util::format_URLPath('discuss/index.php', "status=list_post&id_forum={$iId_forum}&id_topic={$iId_topic}"), agt('Debate'), 'titulo02a')));
     $table->add_row(html_td('ptabla02', '', html_a(Util::format_URLPath('discuss/index.php', "status=topic&id_forum={$iId_forum}&id_topic={$iId_topic}"), agt('Descripción'), 'titulo02a')));
     $table->add_row(html_td('ptabla02', '', agt('Objetivos')));
     $table->add_row(html_td('ptabla02', '', agt('Participantes')));
     $table->add_row(html_td('ptabla02', '', agt('Recursos')));
     $table->add_row(html_td('ptabla01', '', _HTML_SPACE));
     $table->add_row(html_td('', '', _HTML_SPACE));
     //$table->add_row(html_td('ptabla02','',$this->addForm('discuss', 'miguel_forumMenuForm')));
     //$table->add_row(html_td('','',_HTML_SPACE));
     $table->add_row(html_td('ptabla02', '', html_a(Util::format_URLPath('discuss/index.php', "status=norm&id_forum={$iId_forum}&id_topic={$iId_topic}"), agt('Normas para el debate'), 'titulo02a')));
     $div->add($table);
     return $div;
 }
 function right_block()
 {
     $ret_val = container();
     $div = html_div();
     $div->add(html_br());
     $titulo = html_p('Tablón de anuncios');
     $titulo->set_class('ptabla01');
     $div->add($titulo);
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'menu':
         default:
             $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 2, 2);
             $table->add_row(html_td('ptabla02', '', $this->icon_link(Util::format_URLPath('notice/index.php', 'status=new'), Theme::getThemeImagePath('boton_siguiente.gif'), 'Nuevo Mensaje')));
             $table->add_row(html_td('ptabla02', '', $this->icon_link(Util::format_URLPath('notice/index.php', 'status=list'), Theme::getThemeImagePath('boton_siguiente.gif'), 'Ver Mensajes')));
             $div->add($table);
             $ret_val->add($div);
             break;
         case 'new':
             $ret_val->add($div);
             $ret_val->add($this->addForm('notice', 'miguel_noticeForm'));
             break;
         case 'list':
             $notice_array = $this->getViewVariable('notice_array');
             $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 2, 2);
             $table->add($this->add_noticeHead());
             for ($i = 0; $i < count($notice_array); $i++) {
                 $table->add($this->add_notice($notice_array[$i]['notice.author'], $notice_array[$i]['notice.subject'], $notice_array[$i]['notice.time'], $notice_array[$i]['notice.notice_id']));
             }
             $div->add($table);
             $ret_val->add($div);
             break;
         case 'show':
             $ret_val->add($this->add_noticeDetails());
             break;
     }
     return $ret_val;
 }
 function detail_section()
 {
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $title = 'Perfil';
     $table->add_row(html_td('ptabla03', '', _HTML_SPACE));
     $table->add_row(html_td('ptabla01', '', $title));
     /*       $table->add_row(html_td('ptabla03', '', $content));
             $table->add_row(html_td('ptabla03', '', _HTML_SPACE));
             $table->add_row(html_td('ptabla01pie', '', $title));
     */
     return $table;
 }
 /**
  * this function returns the contents
  * of the right block.  It is already wrapped
  * in a TD
  * Solo se define right_block porque heredamos de VMenu y el left_block se encuentra ya definido por defecto con el men˙ del sistema.
  * Si heredara de miguel_VPage entonces habrÌa que definir de igual forma right_block y main_block. Esta ˙ltima es un contenedor de left_block y right_block
  * @return HTMLTag object
  */
 function right_block()
 {
     //Crea el contenedor del right_block
     $ret_val = container();
     //Vamos a ir creando los distintos elementos (Estos a su vez son tambiÈn contenedores) del contenedor principal.
     //hr es una linea horizontal de HTML.
     $hr = html_hr();
     $hr->set_tag_attribute('noshade');
     $hr->set_tag_attribute('size', 2);
     //Añade la linea horizontal al contenedor principal
     $ret_val->add($hr);
     //Crea un bloque div y le asigna la clase ul-big del CSS
     $div = html_div('ul-big');
     //Añade una imagen del tema
     $div->add(Theme::getThemeImage("menu/idea.png"));
     //Incluimos texto en negrita
     $div->add(html_b('Sugerencias'));
     //Ahora dos retornos de carro
     $div->add(html_br(2));
     $ret_val->add($div);
     $div = html_div('medium-text');
     if ($this->getViewVariable('bol_cuestion')) {
         //Incluye en el Div un texto. Usa la funciÛn agt('etiqueta') para internacionalizar
         $div->add(agt('miguelTodoText'));
         $div->add(html_br(2));
         $ret_val->add($div);
         //Añadimos al contenedor principal el formulario de entrada de datos
         $ret_val->add($this->addForm('todo', 'miguel_todoForm'));
     } else {
         //Muestra en el Div el texto con los datos insertados
         $div->add(agt('miguelInsertTodo'));
         $div->add(html_br(2));
         $ret_val->add($div);
         //getContextValue obtiene un par·metro de config.xml
         $table =& html_table(Session::getContextValue("mainInterfaceWidth"), 0, 2, 2);
         //add_row aÒade una fila a la tabla, html_td crea un contenedor celda de la fila
         $table->add_row(html_td("", "", container(html_b(agt('miguelTodoNombre')), $this->getViewVariable('sug_nombre'))));
         $table->add_row(html_td("", "", container(html_b(agt('miguelTodoMail')), $this->getViewVariable('sug_email'))));
         $table->add_row(html_td("", "", container(html_b(agt('miguelTodoComment')), html_br(), $this->getViewVariable('sug_comentario'))));
         $ret_val->add($table);
         //AÒade al contenedor principal un formulario
         $ret_val->add($this->addForm('common', 'miguel_navForm'));
     }
     //EnvÌa el contenedor del bloque right para que sea renderizado por el sistema
     return $ret_val;
 }
 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");
     }
 }
 /**
  * Define el formato de la cabecera
  * @access private
  */
 function getNavBar()
 {
     $table = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 0, 0);
     $table->set_class('fecha');
     $row = html_tr();
     //$row->set_tag_attribute('valign', 'bottom');
     $msg = html_td('', "", $this->str_message);
     $msg->set_tag_attribute('align', 'left');
     $fecha = html_script();
     $fecha->add('damefecha();');
     $row->add($msg);
     $row->add(html_td('', '', $fecha));
     $table->add_row($row);
     return $table;
 }
 function add_reference()
 {
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $arr_data = $this->getViewVariable('arrReference');
     //Debug::oneVar($arr_data, __FILE__, __LINE__);
     if ($arr_data[0]['book_id'] != null) {
         //Titulo de tabla
         $row = html_tr();
         $row->set_class('ptabla02');
         $resum = html_td('ptabla02', "", html_p(agt('Resumen')));
         $resum->set_tag_attribute('align', 'center');
         $title = html_td('ptabla02', "", html_p(agt('Referencia')));
         $title->set_tag_attribute('align', 'center');
         $value = html_td('ptabla02', "", html_p(agt('Valoración')));
         $value->set_tag_attribute('align', 'center');
         $row->add($title);
         $row->add($resum);
         $row->add($value);
         $table->add($row);
         for ($i = 0; $i < count($arr_data); $i++) {
             //Debug::oneVar($arrMessages[$i], __FILE__, __LINE__);
             $table->add($this->add_referenceInfo($arr_data[$i]['book_id'], $arr_data[$i]['title'], $arr_data[$i]['valoracion']));
         }
     } else {
         $table->add(html_td('ptabla02', '', 'El catálogo está vacio'));
     }
     return $table;
 }
 function add_catalogo()
 {
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $arr_data = $this->getViewVariable('arrUsers');
     //Debug::oneVar($arr_data, __FILE__, __LINE__);
     if ($arr_data[0]['person_name'] != null) {
         //Titulo de tabla
         $row = html_tr();
         $row->set_class('ptabla02');
         $elem0 = html_td('ptabla02', "", _HTML_SPACE);
         $elem0->set_tag_attribute('align', 'center');
         $elem1 = html_td('ptabla02', "", html_p(agt('Nombre')));
         $elem1->set_tag_attribute('align', 'center');
         $elem2 = html_td('ptabla02', "", html_p(agt('Apellido')));
         $elem2->set_tag_attribute('align', 'center');
         $elem3 = html_td('ptabla02', "", _HTML_SPACE);
         $elem3->set_tag_attribute('align', 'center');
         $elem4 = html_td('ptabla02', "", html_p(agt('DNI')));
         $elem4->set_tag_attribute('align', 'center');
         $elem5 = html_td('ptabla02', "", html_p(agt('Usuario')));
         $elem5->set_tag_attribute('align', 'center');
         $elem6 = html_td('ptabla02', "", _HTML_SPACE);
         $elem6->set_tag_attribute('align', 'center');
         $elem7 = html_td('ptabla02', "", html_p(agt('Teléfono')));
         $elem7->set_tag_attribute('align', 'center');
         $elem8 = html_td('ptabla02', "", html_p(agt('E-mail')));
         $elem8->set_tag_attribute('align', 'center');
         $row->add($elem0);
         $row->add($elem1);
         $row->add($elem2);
         $row->add($elem3);
         $row->add($elem4);
         $row->add($elem5);
         $row->add($elem6);
         $row->add($elem7);
         $row->add($elem8);
         $table->add($row);
         for ($i = 0; $i < count($arr_data); $i++) {
             //Debug::oneVar($arrMessages[$i], __FILE__, __LINE__);
             $table->add($this->add_catalogInfo($arr_data[$i]['person_name'], $arr_data[$i]['person_surname'], $arr_data[$i]['person_surname2'], $arr_data[$i]['person_dni'], $arr_data[$i]['user_alias'], $arr_data[$i]['phone'], $arr_data[$i]['email'], $arr_data[$i]['is_logged']));
         }
     } else {
         $table->add(html_td('ptabla02', '', agt('No existen usuarios con este perfil')));
     }
     return $table;
 }
 /**
  * Devuelve el tema a utilizar
  *
  * @public
  */
 function getURLTheme()
 {
     $theme = Session::getValue('userinfo_theme');
     if (!Theme::existTheme($theme)) {
         $theme = Session::getContextValue('theme');
     }
     return Theme::_getURLTheme($theme);
 }
 function main_block()
 {
     $table = html_table(Session::getContextValue("mainInterfaceWidth"));
     $table->set_tag_attribute('align', 'center');
     //Cabecera
     $row0 = html_tr();
     $item1 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta00.gif"), 42, 106));
     $item1->set_tag_attribute('width', '1%');
     $item1->set_tag_attribute('valign', 'top');
     $row0->add($item1);
     $item2 = html_td('tituloalerta', '', $this->banner);
     $item2->set_tag_attribute('background', Theme::getThemeImagePath("fondo_alerta02.gif"));
     $item2->set_tag_attribute('width', '95%');
     $item2->set_tag_attribute('valign', 'middle');
     $row0->add($item2);
     $item3 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta03.gif"), 40, 106));
     $item3->set_tag_attribute('width', '4%');
     $item3->set_tag_attribute('valign', 'top');
     $row0->add($item3);
     //$table->add_row($row0);
     //Cuerpo
     $row1 = html_tr();
     $item11 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta04.gif"), 42, 106));
     $item11->set_tag_attribute('width', '1%');
     $item11->set_tag_attribute('valign', 'top');
     //$row1->add($item11);
     $row1->add(html_td('ptexto01', '', $this->text));
     $item13 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta05.gif"), 40, 106));
     $item13->set_tag_attribute('width', '4%');
     $item13->set_tag_attribute('valign', 'top');
     //$row1->add($item13);
     $table->add_row($row1);
     $row2 = html_tr();
     $item21 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta04.gif"), 42, 106));
     $item21->set_tag_attribute('width', '1%');
     $item21->set_tag_attribute('valign', 'top');
     //$row2->add($item21);
     //Dejar así, no usar  $this->addForm(), ya que el enlace se hace sin SID
     include_once Util::app_Path("common/view/classes/miguel_navform.class.php");
     $boton = html_td('', '', new FormProcessor(new miguel_navForm(), 'reload', Util::main_URLPath('index.php')));
     $row2->add($boton);
     $item23 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta05.gif"), 40, 106));
     $item23->set_tag_attribute('width', '4%');
     $item23->set_tag_attribute('valign', 'top');
     //$row2->add($item23);
     $table->add_row($row2);
     //Pie
     $row9 = html_tr();
     $item91 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta06.gif"), 42, 42));
     //$item91->set_tag_attribute('width','1%');
     $item91->set_tag_attribute('valign', 'top');
     $row9->add($item91);
     $item92 = html_td('', '', _HTML_SPACE);
     $item92->set_tag_attribute('background', Theme::getThemeImagePath("fondo_alerta07.gif"));
     //$item92->set_tag_attribute('width','95%');
     $item92->set_tag_attribute('valign', 'top');
     $row9->add($item92);
     $item93 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta08.gif"), 40, 42));
     //$item93->set_tag_attribute('width','4%');
     $item93->set_tag_attribute('valign', 'top');
     $row9->add($item93);
     //$table->add_row($row9);
     return $table;
 }