Exemple #1
0
 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     if ($this->user_is_logged_in()) {
         $form = new FlipTurnAdminLogoutForm("Admin Flip Turn Logout", null, 350);
     } else {
         $form = new FlipTurnAdminLoginForm("Admin Flip Turn Login", null, 350);
     }
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some a welcome message.
     if ($fp->is_action_successful()) {
         //  Redirect to Member page on successful login
         //die($_SERVER['PHP_SELF']) ;
         $url = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php';
         header("Location: {$url}");
         exit;
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
Exemple #2
0
 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     $form = new FlipTurnEditHomePageForm("Home Edit", null, '100%');
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //$container->add($form->get_action_message()) ;
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
Exemple #3
0
 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     $form = new ResultsQueuePurgeForm("Purge Results Queue", $_SERVER['PHP_SELF'], 600);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //$container->add($form->get_action_message()) ;
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
 function add_mainMenu()
 {
     $div = html_div('');
     $div->add(html_br());
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $row = html_tr();
     $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10));
     //$blank->set_tag_attribute('colspan','4');
     $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14));
     $image->set_tag_attribute('align', 'right');
     $image->set_tag_attribute('width', '40%');
     $link = html_a(Util::format_URLPath("entityManager/index.php", 'submit=new'), agt('Registrar entidad'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item1 = html_td('', '', $link);
     $item1->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("entityManager/index.php", 'submit=ficha entidad'), agt('Ficha entidad'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item2 = html_td('', '', $link);
     $item2->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("entityManager/index.php", 'submit=del&entity=' . $this->getViewVariable('id')), agt('Baja entidad'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item3 = html_td('', '', $link);
     $item3->set_tag_attribute('width', '20%');
     $row->add($blank);
     $row->add($image);
     $row->add($item1);
     $row->add($item2);
     $row->add($item3);
     $table->add_row($row);
     $div->add($table);
     return $div;
 }
Exemple #5
0
 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     $sdifqueue = new SDIFResultsQueue();
     if (!$sdifqueue->ValidateQueue()) {
         $msgs = $sdifqueue->get_status_message();
         foreach ($msgs as $msg) {
             $container->add($this->status_message($msg['msg'], $msg['severity']));
         }
         return $container;
     }
     //  Create the form
     $form = new SDIFQueueProcessForm("Process SDIF Queue", $_SERVER['PHP_SELF'], 600);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //$container->add($form->get_action_message()) ;
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
Exemple #6
0
 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     $form = new SwimmerAddForm("Add Swimmer", null, 600);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //  Add the InfoTableCSS so the tables look right
         $this->add_head_css(new DefaultGUIDataListCSS());
         $swimmers = new SwimmersDataList("Swimmers", '100%', "swimmerid");
         $div = html_div();
         $div->set_id("swimmersgdl");
         $div->add($swimmers);
         $container->add($div);
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
          messages.id="' . $id . '" and
          messages_to.person="' . $_SESSION['userid'] . '"
         ';
     $db->select($query);
     if ($db->num_rows == 1) {
         $this->data = $db->data[0];
     }
 }
 function load_to()
 {
     global $db;
     $query = 'person.id, 
          person.first_name, 
          person.last_name
         from messages_to
         left join person on
          messages_to.person=person.id
         where messages_to.message="' . $this->data['id'] . '"';
     $db->select($query);
     $this->to = $db->data;
 }
 function format()
 {
     $fdata = $this->data;
     $fdata['text_html'] = html_br($fdata['text']);
     $fdata['created_html'] = local_date($fdata['created'], 'ymdHi');
     $fdata['author_first_name_html'] = mask_html($fdata['author_first_name']);
     $fdata['author_last_name_html'] = mask_html($fdata['author_last_name']);
     $to_list = array();
     $seperator = array();
     foreach ($this->to as $i => $to) {
         $to['first_name'] = mask_html($to['first_name']);
         $to['last_name'] = mask_html($to['last_name']);
         $to['seperator'] = $seperator;
         $seperator = array(array());
 function add_mainMenu()
 {
     $div = html_div('');
     $div->add(html_br());
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $row = html_tr();
     $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10));
     //$blank->set_tag_attribute('colspan','4');
     $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14));
     $image->set_tag_attribute('align', 'right');
     $image->set_tag_attribute('width', '40%');
     $link = html_a(Util::format_URLPath("profileManager/index.php", 'submit=new'), agt('Nuevo perfil'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item1 = html_td('', '', $link);
     $item1->set_tag_attribute('width', '20%');
     /*$link = html_a(Util::format_URLPath("profileManager/index.php",'submit=del'), agt('Baja perfil'), null, "_top");
                $link->set_tag_attribute('class', '');
                $item2 = html_td('', '', $link);
                $item2->set_tag_attribute('width', '20%');
     		*/
     $row->add($blank);
     $row->add($image);
     $row->add($item1);
     //$row->add($item2);
     $table->add_row($row);
     $div->add($table);
     return $div;
 }
 /**
  * Este metodo construye el formulario en sí.
  */
 function form()
 {
     $ret_val = container();
     $table =& html_table($this->_width, 0, 3);
     $table->set_class("mainInterfaceWidth");
     //$table->set_style("border: 1px solid");
     $row = html_tr("");
     $col1 = html_td("");
     $col1->set_tag_attribute("align", "right");
     $col1->add(html_b(agt("Idioma")));
     $col2 = html_td("");
     $col2->set_tag_attribute("align", "left");
     $col2->add($this->element_form("miguel_lang"));
     $row->add($col1, $col2);
     $table->add($row);
     $ret_val->add($table);
     $ret_val->add(html_br(2));
     $table =& html_table($this->_width, 0, 0);
     $table->set_class("table100 main-info-cell");
     $row = html_tr("");
     $col1 = html_td("");
     $col1->set_tag_attribute("align", "left");
     $col1->add($this->element_form("Salir"));
     $col2 = html_td("");
     $col2->set_tag_attribute("align", "right");
     $col2->add($this->element_form("Siguiente"));
     $row->add($col1, $col2);
     $table->add($row);
     $ret_val->add($table);
     return $ret_val;
 }
 /**
  * Este metodo construye el formulario en sí.
  */
 function form()
 {
     $table =& html_table($this->_width, 0, 2, 2);
     //$table->set_style("border: 1px solid");
     $elem = html_td("colorLogin-bg", "", container("Nombre de usuario", html_br(), $this->element_form("Nombre de usuario")));
     $elem->set_id("identification");
     $table->add_row($elem);
     $elem = html_td("colorLogin-bg", "", container("Clave de acceso", html_br(), $this->element_form("Clave de acceso")));
     $elem->set_id("identification");
     $table->add_row($elem);
     $table->add_row($this->add_action("Entrar"), _HTML_SPACE);
     return $table;
 }
 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  This allows passing arguments eithers as a GET or a POST
     $scriptargs = array_merge($_GET, $_POST);
     //  The swimteamid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("swimteamid", $scriptargs)) {
         $swimteamid = $scriptargs["swimteamid"];
     } else {
         if (array_key_exists("_swimteamid", $scriptargs)) {
             $swimteamid = $scriptargs["_swimteamid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $swimteamid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $swimteamid = null;
             }
         }
     }
     //  Create the form
     //$form = new SwimTeamUpdateForm("Update Swim Team", $_SERVER['PHP_SELF'], 600) ;
     $form = new SwimTeamUpdateForm("Update Swim Team", null, 600);
     $form->setSwimTeamId($swimteamid);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Update the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //  Add the InfoTableCSS so the tables look right
         $this->add_head_css(new DefaultGUIDataListCSS());
         $swimteams = new SwimTeamsDataList("Swim Teams", '100%', "swimteamid");
         $div = html_div();
         $div->set_id("swimteamsgdl");
         $div->add($swimteams);
         $container->add($div);
         //  Update the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
 /**
  * Este metodo construye el formulario que se va a mostrar en la Vista.
  * Formatea la forma en que se va a mostrar al usuario los distintos elementos del formulario.
  */
 function form()
 {
     $table =& html_table($this->_width, 0, 2, 2, 'center');
     $label = html_label("comentario");
     $label->add(container(agt('Añadir comentario'), html_br(), $this->element_form("Comentario")));
     $elem = html_td('ptabla03', '', $label);
     $table->add_row($elem);
     $item1 = html_td('', '', $this->element_form("valoracion"));
     $item1->set_tag_attribute('align', 'center');
     $item2 = html_td('', '', $this->element_form("aceptar"));
     $item2->set_tag_attribute('align', 'center');
     $table->add_row($item1);
     $table->add_row($item2);
     return $table;
 }
 function form()
 {
     $table = html_table('25%', 0, 1, 3);
     $elem = html_td('color1-bg', 'center', container(html_b('Nombre del nuevo usuario'), html_br(), $this->element_form('name')));
     $elem->set_id('identification');
     $table->add_row($elem);
     $elem = html_td('color1-bg', 'center', container(html_b('Clave de acceso'), html_br(), $this->element_form('pass')));
     $elem->set_id('identification');
     $table->add_row($elem);
     $elem = html_td('color1-bg', 'center', container(html_b('Confirmar clave de acceso'), html_br(), $this->element_form('pass_confirm')));
     $elem->set_id('identification');
     $table->add_row($elem);
     $table->add_row(html_td('', 'center', $this->add_hidden_action('Procesar', 'add_user')));
     return $table;
 }
 function get_element()
 {
     $container = html_table('100%', 0, 0, 0);
     $row = html_tr();
     $count = count($this->_data_list);
     for ($x = 0; $x <= $count - 1; $x++) {
         list($name, $value) = each($this->_data_list[$x]);
         $elem = container();
         $elem->add($this->_get_index_element($x), html_br(), html_img($this->_img_list[$x]));
         $col = html_td('', '', $elem);
         $col->set_tag_attribute('align', 'center');
         $row->add($col);
     }
     $container->add_row($row);
     return $container;
 }
 function format($show_menu = false)
 {
     $data = $this->data;
     $data['start_html'] = local_datetime_title($data['start']);
     $data['end_html'] = local_datetime_title($data['end']);
     $data['text_html'] = html_br($data['text']);
     $data['menu'] = array();
     if ($show_menu && is_admin()) {
         if ($data['active']) {
             $activate = 'Deactivate';
         } else {
             $activate = 'Activate';
         }
         $menu['activate'] = $activate;
         $data['menu'][] = $menu;
     }
     $data['input_start'] = datetime_input('news_data[start]', $data['start']);
     $data['input_end'] = datetime_input('news_data[end]', $data['end']);
     $this->data = $data;
 }
 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 content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new DefaultGUIDataListCSS());
     //  This allows passing arguments eithers as a GET or a POST
     $scriptargs = array_merge($_GET, $_POST);
     //  The swimmeetid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("swimmeetid", $scriptargs)) {
         $swimmeetid = $scriptargs["swimmeetid"];
     } else {
         if (array_key_exists("_swimmeetid", $scriptargs)) {
             $swimmeetid = $scriptargs["_swimmeetid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $swimmeetid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $swimmeetid = null;
             }
         }
     }
     $container = container();
     $it = new SwimMeetInfoTable('Swim Meet Details', '500');
     $it->setSwimMeetId($swimmeetid);
     $it->BuildInfoTable(false);
     $container->add($it, html_br(2));
     //  Complex order by clause to make sure DQ and NS are shown
     //  after valid times.
     $swimresults = new SwimResultsDataList('Results', '100%', 'event_number,
         case when finals_time_ft = 0.0 then 1 else 0 end,
         finals_time_ft');
     $swimresults->set_save_vars(array('swimmeetid' => $swimmeetid));
     $div = html_div();
     $div->set_id("swimresultsgdl");
     $div->add($swimresults);
     $container->add($div);
     $container->add(FlipTurnGUIButtons::getBackHomeButtons());
     return $container;
 }
 function right_block()
 {
     //Crea el contenedor del right_block
     $main = container();
     $main->add(html_br());
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'showForm':
             $main->add($this->addForm('courseCard', 'miguel_coursecardform'));
             break;
         case 'update':
         case 'show':
         default:
             $arrCourseCard = $this->getViewVariable('arrCourseCard');
             $tableInfo = $this->add_info($arrCourseCard['objectives'], $arrCourseCard['description'], $arrCourseCard['contents']);
             $main->add($tableInfo);
             $tableForm = $this->addForm('courseCard', 'miguel_coursesubmitform');
             $main->add($tableForm);
             break;
     }
     return $main;
 }
 function right_block()
 {
     //Crea el contenedor del right_block
     $main = container();
     $main->add(html_br());
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'showForm':
             $main->add($this->addForm('courseActivities', 'miguel_courseactivitiesform'));
             break;
         case 'update':
         case 'new':
         default:
             $arrCourseActivities = $this->getViewVariable('arrCourseActivities');
             $tableInfo = $this->add_info($arrCourseActivities);
             $main->add($tableInfo);
             $tableForm = $this->addForm('courseActivities', 'miguel_coursesubmitform');
             $main->add($tableForm);
             break;
     }
     return $main;
 }
 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 add_mainMenu()
 {
     $div = html_div('');
     $div->add(html_br());
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $row = html_tr();
     $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10));
     //$blank->set_tag_attribute('colspan','4');
     $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14));
     $image->set_tag_attribute('align', 'right');
     $image->set_tag_attribute('width', '40%');
     $link = html_a(Util::format_URLPath("bibliography/index.php"), agt('Catálogo'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item1 = html_td('', '', $link);
     $item1->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("bibliography/index.php", 'status=ref'), agt('Referencias bibliográficas'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item2 = html_td('', '', $link);
     $item2->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("bibliography/index.php", 'status=link'), agt('Enlaces de interés'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item3 = html_td('', '', $link);
     $item3->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("pageViewer/index.php", 'url=glosario.htm'), agt('Glosario'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item4 = html_td('', '', $link);
     $item4->set_tag_attribute('width', '20%');
     $row->add($blank);
     $row->add($image);
     $row->add($item1);
     $row->add($item2);
     $row->add($item3);
     $row->add($item4);
     $table->add_row($row);
     $div->add($table);
     return $div;
 }
 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;
 }
 function addData()
 {
     $ret_val = container();
     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') {
         $ret_val->add(html_h2(agt('Preinscripción 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('userManager/index.php'), agt('Nueva Inscripción')));
     } else {
         $ret_val->add($this->addForm('userManager', 'miguel_inscriptionForm'));
     }
     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:
             $div->add($this->add_head());
             $div->add(html_br(2));
             $div->add(html_hr());
             $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})", 'modules/announces.png'));
             $div->add($this->add_notices());
             break;
     }
     $ret_val->add($div);
     //EnvÃŒa el contenedor del bloque right para que sea renderizado por el sistema
     return $ret_val;
 }
 function content_section()
 {
     $content = container();
     if ($this->issetViewVariable('strError')) {
         $strError = $this->getViewVariable('strError');
         $content->add(html_b(agt('Falta de informar los siguientes campos obligatorios: ') . $strError));
         $content->add(html_br(2));
     }
     if ($this->issetViewVariable('userProfileSave') && $this->getViewVariable('userProfileSave') == 'noid') {
         $content->add(html_h2(agt('Usuario no existe.')));
         //$content->add(html_a(Util::format_URLPath('main/index.php'), agt('Volver')));
     } else {
         if ($this->issetViewVariable('userProfileSave') && $this->getViewVariable('userProfileSave') == 'ok') {
             $content->add(html_h2(agt('Perfil usuario actualizado.')));
             $content->add($this->addForm('userProfile', 'miguel_userprofileForm'));
             //$content->add(html_a(Util::format_URLPath('userProfile/index.php'), agt('Volver')));
         } else {
             $content->add($this->addForm('userProfile', 'miguel_userprofileForm'));
         }
     }
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $title = 'Perfil';
     $table->add_row(html_td('ptabla01', '', $title));
     $table->add_row(html_td('ptabla03', '', _HTML_SPACE));
     $table->add_row(html_td('ptabla03', '', $content));
     $table->add_row(html_td('ptabla03', '', _HTML_SPACE));
     $table->add_row(html_td('ptabla01pie', '', $title));
     return $table;
 }
 function _courseList($isGuest)
 {
     $ret_val = new container();
     $div = html_div("medium-text");
     $course = $this->getViewVariable('arr_courses');
     if (is_array($course) && $course[0]['course_id']) {
         $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"]);
             $elem->add(html_br());
             if (!$isGuest) {
                 if (!$course[$i]["course_isRegister"]) {
                     $elem->add(html_a(Util::format_URLPath("subscribe/index.php", "course_id=" . $course[$i]["course_id"]), agt('miguel_subscribe'), null, '_top'));
                 } else {
                     $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 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 form()
 {
     $table = html_table($this->_width, 0, 1, 3);
     //Comprueba que el formulario ha recibido todos los datos necesarios
     if (!$this->isFormComplete()) {
         return null;
     }
     $table->add('(Entradas ' . $this->getViewVariable('min_index') . ' a ' . $this->getViewVariable('max_index') . ' de ' . $this->getViewVariable('total_elements') . ')');
     $table->add(html_br(2));
     $fila = html_tr();
     for ($i = 1; $this->getViewVariable('col_' . $i . '_description'); $i++) {
         $fila->add(html_b($this->getViewVariable('col_' . $i . '_description')));
     }
     $table->add_row($fila);
     //Construimos el formulario a partir de las variables de la vista
     for ($j = 1; $this->getViewVariable('col_1_value_' . $j); $j++) {
         $fila = html_tr();
         for ($i = 1; $this->getViewVariable('col_' . $i . '_value_1'); $i++) {
             $fila->add($this->getViewVariable('col_' . $i . '_value_' . $j));
         }
         //Dibujamos la acción que se puede realizar en esta fila según la pantalla en la que estemos
         switch ($this->getViewVariable('admin_screen')) {
             case 'del_user':
                 $username = $this->getViewVariable('col_1_value_' . $j);
                 $fila->add(html_td('color1-bg', '', $this->add_hidden_action('Dar de baja', $username)));
                 break;
             case 'edit_user_profile':
                 $username = $this->getViewVariable('col_1_value_' . $j);
                 $fila->add(html_td('color1-bg', '', $this->add_hidden_action('Editar perfil', $username)));
                 break;
             default:
                 break;
         }
         $table->add_row($fila);
         unset($fila);
     }
     //Dibujamos los botones para avanzar/retroceder en la lista de peticiones
     $fila = html_tr();
     if ($this->getViewVariable('min_index') > 1) {
         $elem1 = container($this->add_hidden_action('Anterior', 'prev'));
     } else {
         $elem1 = container($this->add_action('Anterior', 1));
     }
     if ($this->getViewVariable('max_index') < $this->getViewVariable('total_elements')) {
         $elem2 = container($this->add_hidden_action('Siguiente', 'next'));
     } else {
         $elem2 = container($this->add_action('Siguiente', 1));
     }
     $fila->add(html_td('', 'left', $elem1, $elem2));
     $table->add_row($fila);
     return $table;
 }
 function _courseList()
 {
     $ret_val = new container();
     $div = html_div("medium-text");
     $div->add(html_br(2));
     $course = $this->getViewVariable('arr_courses');
     if (is_array($course) && $course[0]['course_id']) {
         $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;
 }
 function _LinksList()
 {
     $ret_val = new container();
     $div = html_div("medium-text");
     $div->add(html_br(2));
     $link = $this->getViewVariable('arr_links');
     if (is_array($link) && $link[0]['link.link_id']) {
         $ul = html_ul();
         $countLink = count($link);
         for ($i = 0; $i < $countLink; $i++) {
             $elem = container();
             Debug::oneVar($link);
             $elem->add(html_a($link[$i]["link.link_url"], $link[$i]["link.link_name"], null, "_blank"));
             $elem->add(html_a(Util::format_URLPath("links/index.php", "link_id=" . $link[$i]["link.link_id"] . "&amp;action=invalid"), "[" . agt("Enlace_roto") . "]", null, _top));
             $elem->add(html_a(Util::format_URLPath("links/index.php", "link_id=" . $link[$i]["link.link_id"] . "&amp;action=delete"), "[" . agt("Eliminar") . "]", null, _top));
             $elem->add(html_br());
             $elem->add($link[$i]["link.link_description"]);
             $ul->add($elem);
         }
         $div->add($ul);
         $div->add(html_a(Util::format_URLPath("links/index.php", "action=insert"), "[" . agt("insertar") . "]", null, _top));
         $ret_val->add($div);
     }
     return $ret_val;
 }