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;
 }
 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;
 }
 function _categoryTable()
 {
     $ret_val = container();
     $category = $this->getViewVariable('arr_categories');
     if (is_array($category) && $category[0]['name']) {
         $div = html_div('medium-text');
         $ul = html_ul();
         $countCategory = count($category);
         for ($i = 0; $i < $countCategory; $i++) {
             $elem = container();
             $elem->add(html_a(Util::format_URLPath('area/index.php', 'institution_id=' . $this->getViewVariable('institution_id') . '&faculty_id=' . $this->getViewVariable('faculty_id') . '&department_id=' . $category[$i]['id']), $category[$i]['name'], null, '_top'));
             $elem->add(html_small('(' . $category[$i]['num'] . ')'));
             $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();
     $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;
 }
 function _processRequireArray($a)
 {
     $retval = '';
     if (is_array($a) && $a != array()) {
         $retval = html_ul();
         foreach ($a as $key => $value) {
             if ($value == 1) {
                 $elem = $key . " - " . agt("Instalado");
             } else {
                 $elem = container();
                 $elem->add(html_strong($key));
                 $elem->add(" - ");
                 $elem->add(agt("No instalado. Para obtenerlo, ir a "));
                 $elem->add(html_a("http://www.php.net/{$key}", $key));
             }
             $retval->add(html_li($elem));
         }
     }
     return $retval;
 }
 function _categoryTable()
 {
     $ret_val = container();
     $category = $this->getViewVariable('arr_categories');
     if (is_array($category)) {
         if ($category[0]['name']) {
             $div = html_div('medium-text');
             $ul = html_ul();
             $countCategory = count($category);
             for ($i = 0; $i < $countCategory; $i++) {
                 $elem = container();
                 $link = html_a(Util::format_URLPath('faculty/index.php', 'institution_id=' . $category[$i]['id']), $category[$i]['name'], null, '_top');
                 $link->set_tag_attribute('tabindex', $i + 7);
                 $elem->add($link);
                 $elem->add(html_small('(' . $category[$i]['num'] . ')'));
                 $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();
     $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;
 }