/**
  * 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 right_block()
 {
     /*
      * As usual, we create a container and add to it the main elements
      * and set some of its properties
      */
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $ret_val->add(html_h4(agt("miguel_AuthorTool")));
     /*
      * Arrays of possible statuses. We'll use them to simplify the code
      */
     $statusArray = array(1 => "List", "Send_File", "Send_Document", "Send_Folder", "Delete");
     $statusArray2 = array(1 => "list", "send_file", "send_document", "send_folder", "delete");
     $status = $this->getViewVariable('status');
     /*
      * We check that satatus has a recognizable status for security.
      * Note that we obviate that status var exists nbecause it was set in
      * control class.
      */
     if ($id = array_search($status, $statusArray2)) {
         /*
          * If any change form operation was executed,
          * then show operation status.
          */
         if ($this->issetViewVariable('submit')) {
             /*
              * getViewVariable('opstat') is either
              * '(db|fs|zipdirdb)?error' or 'success'.
              */
             $opStat = html_div(agt("opstat-{$status}-" . $this->getViewVariable('opstat')));
             $opStat->set_id("opstat");
             $ret_val->add($opStat);
         }
         $ret_val->add($this->addForm('authortool', "miguel_VAuthorTool_" . $statusArray[$id]));
     } elseif ($status == "Show_File") {
         /*
          * Show document!!!
          */
     }
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute('noshade');
     $hr->set_tag_attribute('size', 2);
     $ret_val->add($hr);
     $div = html_div('ul-big');
     $div->add(html_img(Util::app_URLPath('../var/themes/Miguel/image/menu/addcourse.png'), 0, 0, 0, ''));
     $div->add(html_b('Nuevo Curso'));
     $div->add(html_br(2));
     $ret_val->add($div);
     $ret_val->add($this->addForm('newCourse', 'miguel_newCourseForm'));
     return $ret_val;
     //$div = html_div();
     //$div->add($this->addForm('newCourse', 'miguel_newCourseForm'));
     //return $div;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $ret_val->add(html_h4("Alta Título Bibliográfico de la Bibilioteca Virtual del Campus"));
     if ($this->issetViewVariable('newbook') && $this->getViewVariable('newbook') == 'ok') {
         $ret_val->add(html_h2(agt('Alta de título correcto.')));
         $ret_val->add(html_a(Util::format_URLPath("main/index.php", 'id=institution'), agt('Volver')));
         $ret_val->add(_HTML_SPACE);
         $ret_val->add(html_a(Util::format_URLPath('newBook/index.php'), agt('Nuevo Título Bibliográfico')));
     } else {
         $ret_val->add($this->addForm('newBook', 'miguel_bookForm'));
     }
     return $ret_val;
 }
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute('noshade');
     $hr->set_tag_attribute('size', 2);
     $ret_val->add($hr);
     $div = html_div('ul-big');
     $div->add(html_img(Util::app_URLPath('../var/themes/Miguel/image/menu/addcourse.png'), 0, 0, 0, ''));
     $div->add(html_b('Nuevo Curso Adicionado'));
     $div->add(html_br(2));
     $ret_val->add($div);
     $div1 = html_div();
     $div1->add(agt('El curso se ha adicionado correctamente en la base de datos.'));
     $div1->add(html_br(2));
     $div1->add(agt('NOMBRE DEL CUSRSO'), ' : ', $this->getViewVariable('courseName'));
     $div1->add(html_br(2), agt('DESCRIPCION'), ' : ', $this->getViewVariable('courseDescription'));
     $div1->add(new FormProcessor(new miguel_resultNewCourseForm(), 'resultNewCourse', Util::format_URLPath('main/index.php')));
     $ret_val->add($div1);
     return $ret_val;
 }
 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 _userListView()
 {
     $ret_val = html_div();
     if ($this->issetViewVariable('form_name_search')) {
         $ret_val->add(new FormProcessor(new miguel_searchresultForm($this->arr_commarea), 'search_form', Util::format_URLPath('admin/index.php', 'admin_screen=user_list')));
     }
     $ret_val->add(html_hr());
     $ret_val->add(new FormProcessor(new miguel_searchForm($this->arr_commarea), 'search_form', Util::format_URLPath('admin/index.php', 'admin_screen=user_list')));
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $div = html_div("ul-big");
     $div->add(Theme::getThemeImage("edcenters.png"));
     $div->add(agt('miguel_Courses'));
     $div->add(html_br(2));
     $course = $this->getViewVariable("arr_courses");
     $ul = html_ul();
     if ($course[0]['course_id'] != '') {
         $countCourse = count($course);
         for ($i = 0; $i < $countCourse; $i++) {
             $elem = container();
             $link = html_a(Util::format_URLPath("course/index.php", "course=" . $course[$i]["course_id"]), $course[$i]["course_name"], null, "_top");
             $link->set_tag_attribute('tabindex', $i + 7);
             $elem->add($link);
             $elem->add(html_br());
             $elem->add($course[$i]["course_description"]);
             $elem->add(html_br());
             $mailLink = Theme::getMailURL($course[$i]['course_email'], Session::getValue('migueloo_userinfo_user_id'));
             $elem->add(html_b(agt('miguel_responsable') . ' '), html_a($mailLink, $course[$i]["course_responsable"]));
             $elem->add(html_br());
             $elem->add(html_a(Util::format_URLPath("unsubscribe/index.php", "course_id=" . $course[$i]["course_id"]), agt('miguel_unsubscribe'), null, '_top'));
             $ul->add($elem);
         }
         $div->add($ul);
     }
     $ret_val->add($div);
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $ret_val->add(html_h4("Inscripción - Paso 2"));
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     if (!Session::getValue("inscript")) {
         $ret_val->add(html_a(Util::main_URLPath('index.php'), agt('Regresar a la página principal')));
         $ret_val->add(html_br(2));
         $ret_val->add(html_a(Util::app_URLPath('auth/index.php'), agt('Nuevo Usuario')));
     } else {
         //$ret_val->add(new FormProcessor(new miguel_inscriptionForm()));
     }
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $ret_val->add(html_h4("Insertar nuevo enlace"));
     if ($this->issetViewVariable('newlink') && $this->getViewVariable('newlink') == 'ok') {
         $ret_val->add(html_h2(agt('Inserción de enlace correcto.')));
         $ret_val->add(html_a(Util::main_URLPath('index.php'), agt('Regresar a la página principal')));
         $ret_val->add(html_br(2));
         $ret_val->add(html_a(Util::app_URLPath('links/index.php'), agt('Página de Enlaces')));
     } else {
         if ($this->issetViewVariable('msgError') && $this->getViewVariable('msgError') != '') {
             $ret_val->add(html_h2($this->getViewVariable('msgError')));
         }
         $ret_val->add($this->addForm('links', 'miguel_insertionform'));
     }
     return $ret_val;
 }
 function footer_block()
 {
     $this->registry->pushApp('common');
     $footer_div = html_div('pie');
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $footer_div->add($hr);
     include_once Util::app_Path('common/view/classes/miguel_footer.class.php');
     $table = new miguel_Footer();
     $footer_div->add($table->getContent());
     unset($table);
     $this->registry->popApp('common');
     return $footer_div;
 }
 function addPostList(&$div)
 {
     $arrPosts = $this->getViewVariable('arrPosts');
     for ($i = 0; $i < count($arrPosts); $i++) {
         if ($arrPosts[$i]['forum_post.forum_post_poster'] != NULL) {
             $div->add($this->addPost($arrPosts[$i]['forum_post.forum_post_poster'], $arrPosts[$i]['forum_post.forum_post_time'], $arrPosts[$i]['forum_post.forum_post_text'], $arrPosts[$i]['forum_post.forum_post_ip'], $arrPosts[$i]['forum_post.forum_post_id'], $arrPosts[$i]['forum_post.forum_post_parent'], $arrPosts[$i]['forum_post.forum_post_title'], $arrPosts[$i]['is_logged']));
             $div->add(html_hr());
         }
     }
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $div = html_div("ul-big");
     $div->add(Theme::getThemeImage("edcenters.png"));
     $div->add(agt('miguel_Center'));
     $div->add(html_br(2));
     $navinfo = $this->getSessionElement('navinfo', 'institution_id');
     if (isset($navinfo) && $navinfo != '') {
         $div->add($this->_courseList(false));
         $div->add(html_br(2));
         $div->add(html_a(Util::format_URLPath("newCourse/index.php"), Theme::getThemeImage('menu/addcourse.png', 'miguel_newCourse')));
         $div->add(html_a(Util::format_URLPath("newCourse/index.php"), agt('miguel_newCourse')));
     } else {
         $div->add($this->_courseList(true));
     }
     $ret_val->add($div);
     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
     $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();
     //Añade una imagen del tema
     //$div->add(Theme::getThemeImage('modules/agenda.png'));
     //Incluimos texto en negrita
     $titulo = html_p('Agenda del Curso');
     $titulo->set_class('ptabla01');
     $div->add($titulo);
     //Ahora dos retornos de carro
     //$ret_val->add($div);
     //$div = html_div('medium-text');
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'new':
             $pTitulo = html_p('Alta de evento');
             $pTitulo->set_class('ptabla01');
             $ret_val->add($pTitulo);
             $ret_val->add($this->addForm('calendar', 'miguel_calendarForm'));
             break;
         case 'show':
             $ret_val->add($this->show_Details($this->getViewVariable('calendar'), $this->getViewVariable('course'), $this->getViewVariable('event'), $this->getViewVariable('subject'), $this->getViewVariable('content'), $this->getViewVariable('dt_ini'), $this->getViewVariable('dt_fin'), false));
             break;
         case 'menu':
             //$div->add($this->icon_link(Util::format_URLPath('calendar/index.php', 'status=new'),
             //		Theme::getThemeImagePath('modules/agenda.png'), agt('miguel_Nuevo_Evento')));
             //$div->add(html_br(2));
             //$div->add($this->icon_link(Util::format_URLPath('calendar/index.php', 'status=list'),
             //		Theme::getThemeImagePath('modules/agenda.png'), agt('miguel_Ver_Eventos')));
             //$div->add(html_br(2));
             $pNew = html_p(html_a(Util::format_URLPath('calendar/index.php', 'status=new'), 'Nuevo Evento'));
             $pNew->set_class('ptabla03');
             $pShow = html_p(html_a(Util::format_URLPath('calendar/index.php', 'status=list'), 'Ver Eventos'));
             $pShow->set_class('ptabla03');
             $div->add($pNew);
             $div->add($pShow);
             $ret_val->add($div);
             break;
         case 'list':
         default:
             $calendar_array = $this->getViewVariable('calendar_array');
             for ($i = 0; $i < count($calendar_array); $i++) {
                 $div->add($this->show_Details($calendar_array[$i]['calendar'], $calendar_array[$i]['course'], $calendar_array[$i]['event_type'], $calendar_array[$i]['subject'], $calendar_array[$i]['content'], $calendar_array[$i]['dt_ini'], $calendar_array[$i]['dt_fin'], true));
                 $div->add(html_br(2));
             }
             $ret_val->add($div);
             break;
     }
     return $ret_val;
 }
 function left_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $div = html_div("ul-big");
     //Mensaje de bienvenida
     $div->add($this->_addFileContent(Theme::getTheme() . Session::getContextValue('texto_ini')));
     $ret_val->add($div);
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $div = html_div("ul-big");
     $div->add(Theme::getThemeImage("links.png"));
     $div->add(agt('miguel_Links'));
     $div->add(html_br(2));
     //      $div->add( $this->_categoryTable());
     $div->add($this->_LinksList());
     $ret_val->add($div);
     return $ret_val;
 }
 function footer_block()
 {
     $this->registry->pushApp('common');
     //include_once(Util::base_Path('include/classes/nls.class.php'));
     //NLS::setTextdomain('common', Util::formatPath(MIGUELGETTEXT_DIR), NLS::getCharset());
     $footer_div = html_div('pie');
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $footer_div->add($hr);
     include_once Util::app_Path('common/view/classes/miguel_footer.class.php');
     $footer = new miguel_Footer();
     $footer_div->add($footer->getContent());
     $this->registry->popApp('common');
     return $footer_div;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function _block()
 {
     $ret_val = container();
     $ret_val->add(html_h4("Inscripción - Paso 1"));
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $ret_val->add(new FormProcessor(new miguel_inscriptionForm()));
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $div = html_div("ul-big");
     //Muestra las instituciones
     $div->add(Theme::getThemeImage("edcenters.png"));
     $div->add(agt('miguel_Center'));
     $div->add(html_br(2));
     $div->add($this->_categoryTable());
     $ret_val->add($div);
     return $ret_val;
 }
Exemplo n.º 20
0
//  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 //
// ------------------------------------------------------------------------- //
// cuurent day
if ($view != VIEW_DAY) {
    echo link_module('./?view=day', $lvm_title_day, ICON_PUCE);
}
// current month
$period = sprintf('&year=%d&month=%02d', date('Y'), date('n'));
if ($view != VIEW_MONTH) {
    echo link_module('./?view=month' . $period, $lvm_title_current_month, ICON_PUCE);
}
// year (last months in fact)
if ($view != VIEW_YEAR) {
    echo link_module('./?view=year', $lvm_title_year, ICON_PUCE);
}
// user
if ($view != VIEW_USER) {
    echo html_hr();
    echo link_module('./?view=user', $lvm_title_user, ICON_PUCE);
}
 /**
  * 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();
     //Añade una imagen del tema
     //$div->add(Theme::getThemeImage('modules/agenda.png'));
     //Incluimos texto en negrita
     $titulo = html_p('Agenda del Curso');
     $titulo->set_class('ptabla01');
     $div->add($titulo);
     //Ahora dos retornos de carro
     //$ret_val->add($div);
     //$div = html_div('medium-text');
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'show':
             $tableTask = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 2, 2);
             $tableTask->add($this->add_head());
             $tableTask->add($this->show_Details($this->getViewVariable('event'), $this->getViewVariable('subject'), $this->getViewVariable('dt_ini'), false));
             $div->add($tableTask);
             $ret_val->add($div);
             break;
             /*		case 'menu':
             				//$div->add($this->icon_link(Util::format_URLPath('calendar/index.php', 'status=new'), 
             					//		Theme::getThemeImagePath('modules/agenda.png'), agt('miguel_Nuevo_Evento')));
             				//$div->add(html_br(2));
             				//$div->add($this->icon_link(Util::format_URLPath('calendar/index.php', 'status=list'), 
             					//		Theme::getThemeImagePath('modules/agenda.png'), agt('miguel_Ver_Eventos')));
             				//$div->add(html_br(2));
             				$pNew = html_p(html_a(Util::format_URLPath('calendar/index.php', 'status=new'),'Nuevo Evento'));
             				$pNew->set_class('ptabla03');
             				$pShow = html_p(html_a(Util::format_URLPath('calendar/index.php', 'status=list'),'Ver Eventos'));
             				$pShow->set_class('ptabla03');
             				$div->add($pNew);
             				$div->add($pShow);
             				$ret_val->add($div);
             				break;					
             		*/
         /*		case 'menu':
         				//$div->add($this->icon_link(Util::format_URLPath('calendar/index.php', 'status=new'), 
         					//		Theme::getThemeImagePath('modules/agenda.png'), agt('miguel_Nuevo_Evento')));
         				//$div->add(html_br(2));
         				//$div->add($this->icon_link(Util::format_URLPath('calendar/index.php', 'status=list'), 
         					//		Theme::getThemeImagePath('modules/agenda.png'), agt('miguel_Ver_Eventos')));
         				//$div->add(html_br(2));
         				$pNew = html_p(html_a(Util::format_URLPath('calendar/index.php', 'status=new'),'Nuevo Evento'));
         				$pNew->set_class('ptabla03');
         				$pShow = html_p(html_a(Util::format_URLPath('calendar/index.php', 'status=list'),'Ver Eventos'));
         				$pShow->set_class('ptabla03');
         				$div->add($pNew);
         				$div->add($pShow);
         				$ret_val->add($div);
         				break;					
         		*/
         case 'new':
         case 'list':
         case 'delete':
         default:
             $div->add($this->add_main_window());
             $ret_val->add($div);
             break;
     }
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $ret_val->add(html_h4("Inscripción al Campus Virtual"));
     if ($this->issetViewVariable('newclient') && $this->getViewVariable('newclient') == 'ok') {
         $ret_val->add(html_h2(agt('Alta de usuario correcta.')));
         $ret_val->add(html_a(Util::format_URLPath("main/index.php", 'id=institution'), agt('Volver')));
         $ret_val->add(_HTML_SPACE);
         $ret_val->add(html_a(Util::format_URLPath('auth/index.php'), agt('Nuevo Usuario')));
     } else {
         $ret_val->add($this->addForm('auth', 'miguel_inscriptionForm'));
     }
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $div = html_div("ul-big");
     $div->add(Theme::getThemeImage("edcenters.png"));
     $div->add(html_br(2));
     $course = $this->getViewVariable("arr_courses");
     $ul = html_ul();
     $countCourse = count($course);
     for ($i = 0; $i < $countCourse; $i++) {
         $elem = container();
         $elem->add(html_a(Util::format_URLPath("course/index.php", "course=" . $course[$i]["course_id"]), $course[$i]["course_name"], null, "_top"));
         $elem->add(html_br());
         $elem->add($course[$i]["course_description"]);
         $ul->add($elem);
     }
     $div->add($ul);
     $ret_val->add($div);
     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
     $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();
     //Añade una imagen del tema
     $div->add(Theme::getThemeImage('modules/announces.png'));
     //Incluimos texto en negrita
     $div->add(html_b('Tabl�n de anuncios'));
     //Ahora dos retornos de carro
     $div->add(html_br(2));
     //$ret_val->add($div);
     //$div = html_div('medium-text');
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'menu':
         default:
             $div->add($this->icon_link(Util::format_URLPath('notice/index.php', 'status=new'), Theme::getThemeImagePath('modules/announces.png'), 'Nuevo Mensaje'));
             $div->add(html_br(2));
             $div->add($this->icon_link(Util::format_URLPath('notice/index.php', 'status=list'), Theme::getThemeImagePath('modules/announces.png'), 'Ver Mensajes'));
             $div->add(html_br(2));
             $ret_val->add($div);
             break;
         case 'new':
             //Incluye en el Div un texto. Usa la funciÛn agt('etiqueta') para internacionalizar
             //$div->add(agt('miguelNoticeText'));
             //$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('notice', 'miguel_noticeForm'));
             break;
         case 'list':
             $notice_array = $this->getViewVariable('notice_array');
             for ($i = 0; $i < count($notice_array); $i++) {
                 $div->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(html_br(2));
             }
             $ret_val->add($div);
             break;
         case 'show':
             $ret_val->add($this->add_noticeDetails());
             break;
     }
     //EnvÌa el contenedor del bloque right para que sea renderizado por el sistema
     return $ret_val;
 }
 function right_section()
 {
     $ret_val = html_div();
     $ret_val->set_id('content');
     $div = html_div();
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'menu':
         default:
             $arrMessages = $this->getViewVariable('arrMessages');
             $unreaded = count($arrMessages);
             //Si es 1 hay que mirar si no es nulo
             if ($unreaded == 1 && $arrMessages[0]['message.id'] == null) {
                 $unreaded = 0;
             }
             $div->add($this->add_sectionHead('Mensajería ' . "({$unreaded})", 'modules/email.png'));
             $div->add($this->add_inbox());
             $div->add(html_br(2));
             $div->add(html_hr());
             $notice_array = $this->getViewVariable('notice_array');
             $unreaded = count($notice_array);
             //Si es 1 hay que mirar que no sea nulo
             if ($unreaded == 1 && $notice_array[0]['notice.author'] == null) {
                 $unreaded = 0;
             }
             $div->add($this->add_sectionHead('Tablón de anuncios ' . "({$unreaded})"));
             $div->add($this->add_notices());
             $div->add(html_br(2));
             $div->add(html_hr());
             $candidates_array = $this->getViewVariable('candidates_array');
             $unreaded = count($candidates_array);
             //Si es 1 hay que mirar que no sea nulo
             if ($unreaded == 1 && $candidates_array[0]['candidate.person_name'] == null) {
                 $unreaded = 0;
             }
             $div->add($this->add_sectionHead('Candidatos ' . "({$unreaded})", 'modules/inscription.png'));
             $div->add($this->add_candidates());
             break;
     }
     $ret_val->add($div);
     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;
 }
 /**
  * this function returns the contents
  * of the left block.  It is already wrapped
  * in a TD
  *
  * @return HTMLTag object
  */
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $div = html_div();
     $div->add(Theme::getThemeImage('edcenters.png'));
     $infoCourse = $this->getViewVariable('infoCourse');
     $path_arr = $infoCourse['path'];
     $strPath = $path_arr['institution'];
     if ($path_arr['faculty'] != '') {
         $strPath .= '&nbsp;>&nbsp;';
     }
     $strPath .= $path_arr['faculty'];
     if ($path_arr['department'] != '') {
         $strPath .= '&nbsp;>&nbsp;';
     }
     $strPath .= $path_arr['department'];
     if ($path_arr['area'] != '') {
         $strPath .= '&nbsp;>&nbsp;';
     }
     $strPath .= $path_arr['area'];
     $div->add($strPath);
     $div->add(html_br());
     $div->add(Theme::getThemeImage('info.png', $infoCourse['name']));
     $div->add(html_b(html_a(Util::format_URLPath("course/index.php", 'course=' . $infoCourse['course_id']), $infoCourse['name'])));
     $div->add(html_br());
     $mailLink = Theme::getMailURL($infoCourse['email'], Session::getValue('migueloo_userinfo_user_id'));
     $div->add(html_b(agt('miguel_responsable') . ' '), html_a($mailLink, $infoCourse['user_responsable']));
     $div->add(html_br(2));
     $table = html_table("100%", 0, 8, 0);
     $table->set_class("simple");
     $table->set_id("modules");
     $table->set_tag_attribute("valign", "top");
     /*$arr_elem = $this->_getModuleElements();
             $int_elem = count($arr_elem);
     
             for($i=0; $i<$int_elem; $i = $i+2){
                 $row = html_tr();
     			$col = html_td("","left"); 
                 $col->add( $this->imag_ref( Util::format_URLPath( $arr_elem[$i][0]), Theme::getThemeImagePath( $arr_elem[$i][1] ), agt('miguel_Module' . $arr_elem[$i][2]) ) );
                 $row->add($col);
     
                 $col = html_td("","left");
                 if ( $arr_elem[$i+1][0] != ''  ){
     			        $col->add( $this->imag_ref(Util::format_URLPath( $arr_elem[$i+1][0]), Theme::getThemeImagePath( $arr_elem[$i+1][1] ), agt( 'miguel_Module' . $arr_elem[$i+1][2]) ));
     			        $row->add($col);
             	}
            	    $table->add_row($row);      
         	}
     		*/
     $is_admin = $this->getViewVariable('isCourseAdmin');
     $arr_elem = $this->getViewVariable('visual_array');
     //Debug::oneVar($arr_elem, __FILE__,__LINE__);
     $int_elem = count($arr_elem);
     $bol_row = true;
     for ($i = 0; $i < $int_elem; $i++) {
         $item = $i + 1;
         if ($bol_row) {
             $row = html_tr();
             $bol_row_add = false;
         }
         $row->add($this->_formatRowElement($arr_elem[$i], $item, $is_admin));
         $bol_row = $bol_row ? false : true;
         if ($bol_row) {
             $table->add($row);
             $bol_row_add = true;
         }
     }
     if (!$bol_row_add) {
         $table->add($row);
     }
     $div->add($table);
     $ret_val->add($div);
     return $ret_val;
 }