function _block() { include_once Util::app_Path("common/view/classes/miguel_navform.class.php"); $ret_val = container(); $titulo = html_h4('Ha salido correctamente de la aplicación'); $titulo->set_tag_attribute('class', 'ptexto01'); $msg = html_p('Para continuar trabajando en este Campus debe regresar a la página de inicio y acceder de nuevo.'); $msg->set_tag_attribute('class', 'ptexto01'); $ret_val->add($titulo); $ret_val->add($msg); //Dejar así, no usar $this->addForm(), ya que el enlace se hace sin SID $ret_val->add(new FormProcessor(new miguel_navForm(), 'reload', Util::main_URLPath('index.php'))); return $ret_val; }
function processPetition() { if ($this->issetViewVariable('desc')) { $this->setViewVariable('str_error', $this->getViewVariable('desc')); } else { $this->setViewVariable('str_error', $this->error . ': ' . $this->error_message); } if ($this->issetViewVariable('url')) { $this->setViewVariable('str_url', $this->getViewVariable('url')); } else { $this->setViewVariable('str_url', Util::main_URLPath('index.php')); } $this->setPageTitle('Error en miguel'); $this->clearNavBarr(); $this->setMessage(agt('miguel_ErrorLit')); $this->setHelp(''); $this->setCacheFlag(true); }
function _coursePath($file) { return Util::main_URLPath($this->file_path . $file); }
/** * 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; }
/** * 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 add_detail($arr_data) { $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0); //Debug::oneVar($arr_data, __FILE__, __LINE__); if ($arr_data['book_id'] != null) { //Tabla de detalle $row = html_tr(); $img = Util::main_URLPath('var/bibliography/image/bookref_' . $arr_data['book_id'] . '.' . $arr_data['imagen']); $image = html_td('', '', html_img($img, 74, 100)); $image->set_tag_attribute("width", "12%"); $image->set_tag_attribute("align", "center"); $detail_table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0); $detail_table->add($this->add_Row('autor', $arr_data['autor'])); $detail_table->add($this->add_Row('título', $arr_data['ptabla01'])); $detail_table->add($this->add_Row('año', $arr_data['año'])); $detail_table->add($this->add_Row('editorial', $arr_data['editorial'])); $detail_table->add($this->add_Row('lugar de publicación', $arr_data['place'])); $detail_table->add($this->add_Row('ISBN', $arr_data['isbn'])); $row->add($image); $row->add($detail_table); $table->add($row); $table->add($this->add_Row('descripción', nl2br($arr_data['descripcion']))); $table->add($this->add_Row('tabla de contenidos', nl2br($arr_data['indice']))); //Valoracion $table->add($this->add_Row('valoración', $this->add_valoracion($arr_data['book_id']))); //Comentarios $table->add($this->add_Row('comentarios', $this->add_comment($arr_data['book_id']))); } else { $table->add(html_td('ptabla02', '', 'La ficha no existe')); } return $table; }
/** * 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; }
function _installStep7() { $ret_val = container(); $div = html_div("ul-big"); //Add install image $div->add($this->_addImage()); $div->add(html_h2(agt("Instalación de miguel - Paso 7"))); $div->add(html_h3(agt("Personalización del Campus Virtual"))); $div->add(html_br(2)); $div->add(agt("Ahora ya puede empezar a disfrutar de miguel, su plataforma e-Learning GPL.")); $div->add(html_br(2)); $div->add(html_a(Util::main_URLPath('index.php'), 'Acceder a miguel')); $div->add(html_br(2)); $ret_val->add($div); return $ret_val; }
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; }
function getContent() { $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 1); $table->set_class("header"); $table->set_id("header"); //Icono y bienvenida $elem1 = html_td('campuslogo', '', $this->getCabecera()); //Campus virtual if (Session::getContextValue("siteName") != '') { $link = html_a(Util::main_URLPath("index.php"), agt("Campus") . ": " . Session::getContextValue("siteName")); $link->set_tag_attribute('accesskey', 'c'); $link->set_tag_attribute('tabindex', '1'); $elem2 = html_td("", "", $link); } else { $elem2 = html_td("colorMedium-bg", "", agt("Campus")); } $elem2->set_id("cell-sitename"); $elem2->set_tag_attribute("target", "_top"); //miguel $link = html_a("https://developer.berlios.de/projects/migueloo/", "miguel"); $link->set_tag_attribute('accesskey', 'm'); $link->set_tag_attribute('tabindex', '2'); $elem3 = html_td("colorLight-bg", "", $link); $elem3->set_id("cell-indetec"); $elem3->set_tag_attribute("target", "_blank"); //Nombre del sitio web $link = html_a(Session::getContextValue("InstitutionUrl"), Session::getContextValue("Institution")); $link->set_tag_attribute('accesskey', 'i'); $link->set_tag_attribute('tabindex', '4'); $elem4 = html_td("colorDark-bg", "", $link); $elem4->set_id("cell-institution"); $elem4->set_tag_attribute("target", "_blank"); $row = html_tr(); $row->add($elem1); $row->add($elem2); $row->add($elem3); $row->add($elem4); $table->add_row($row); $elemM = html_td('', '', ' '); //$elemM->set_tag_attribute('bgcolor', Session::getContextValue('menucolor')); $table->add_row($elemM); //Sistema de mensajes de la aplicaciÛn $row = html_tr(); if ($this->str_message) { $msg = html_td("infocontainer", "", html_b($this->str_message)); } else { $msg = html_td("", "", ''); } //$msg->set_tag_attribute("colspan","4"); $msg->set_tag_attribute("colspan", "3"); $row->add($msg); if ($this->str_help) { $help = html_td("helpbox", "", $this->help_img(Util::format_URLPath("help/miguel_help.php", "help=" . $this->str_help), Theme::getThemeImagePath("help_mini.png"), "")); } else { $help = html_td("", "", ''); } $row->add($help); $table->add_row($row); //Sistema de menues $barra = $this->_menuBar(); if (!empty($barra)) { $container = container(html_img(Theme::getThemeImagePath("logo.png"), 0, 0, 0, "miguel Home"), html_br(), " "); $row = html_tr(); $menu = html_td('navigator', '', $barra); $menu->set_tag_attribute("colspan", "3"); $row->add($menu); } $table->add_row($row); return $table; }
function addDocumentInfo($_id, $_name, $_date, $_owner, $_owner_id, $_downs, $_size, $_visible = 1, $_lock = 1, $_share = 1, $_folder = false) { $user_id = $this->getViewVariable('user_id'); $profile_id = $this->getViewVariable('profile_id'); //If not Admin, teacher or tutor if ($profile_id >= 4) { //Test ownership and visibility if ($user_id != $_owner_id && $_visible == 0) { return; } } //Necesito dos clases: una para visible y otra para invisible. La de invisible es para diferenciar en la vista del propietario o administrador $row = html_tr(); $elem1 = html_td('ptabla03', '', _HTML_SPACE); if ($_folder) { $link = $this->imag_alone(Util::format_URLPath('filemanager/index.php', "folder_id={$_id}"), Theme::getThemeImagePath('filemanager/folder.png'), agt('Entrar')); } else { include_once Util::app_Path("filemanager/include/classes/filedisplay.class.php"); $image = Theme::getThemeImagePath("filemanager/" . fileDisplay::choose_image($_name)); $link = html_a("#", ""); $link->add(html_img($image, 16, 16, null, agt('Ver'))); $path_action = Util::main_URLPath('var/data/' . $_name); $link->set_tag_attribute("onClick", "javascript:newWin('" . $path_action . "',750,400,25,100)"); } $elem2 = html_td('ptabla03', '', $link); $elem2->set_tag_attribute('align', 'center'); $elem3 = html_td('ptabla03', '', $_name); $elem4 = html_td('ptabla03', '', $_date); $elem5 = html_td('ptabla03', '', $_owner); $elem6 = html_td('ptabla03', '', $_downs); $elem7 = html_td('ptabla03', '', $_size); if (!$_folder) { $link = html_a("#", ""); $link->add(html_img(Theme::getThemeImagePath('disquette.jpg'), null, null, null, agt('Descargar'))); $path_action = Util::main_URLPath('var/data/' . $_name); $link->set_tag_attribute("onClick", "javascript:newWin('" . $path_action . "',750,400,25,100)"); } else { $link = _HTML_SPACE; } $elem8 = html_td('ptabla03', '', $link); $elem8->set_tag_attribute('align', 'center'); //---------------- TEST LOCK --------------------------------------- if ($_lock == 0 && $profile_id >= 4) { $elem9 = html_td('ptabla03', '', _HTML_SPACE); $elem9->set_tag_attribute('align', 'center'); $elem10 = html_td('ptabla03', '', _HTML_SPACE); $elem10->set_tag_attribute('align', 'center'); $elem11 = html_td('ptabla03', '', _HTML_SPACE); $elem11->set_tag_attribute('align', 'center'); $elem12 = html_td('ptabla03', '', _HTML_SPACE); $elem12->set_tag_attribute('align', 'center'); $elem13 = html_td('ptabla03', '', _HTML_SPACE); $elem13->set_tag_attribute('align', 'center'); $elem14 = html_td('ptabla03', '', _HTML_SPACE); $elem14->set_tag_attribute('align', 'center'); $row->add($elem1); $row->add($elem2); $row->add($elem3); $row->add($elem4); $row->add($elem5); $row->add($elem6); $row->add($elem7); $row->add($elem8); $row->add($elem9); $row->add($elem10); $row->add($elem11); $row->add($elem12); $row->add($elem13); $row->add($elem14); return $row; } //----------------- COMMON OPERATIONS ------------------------------ $_fid = $this->getViewVariable('folder_id'); if ($_folder) { $status = 'folder_id=' . $_fid . '&status=del&tp=f&id='; } else { $status = 'folder_id=' . $_fid . '&status=del&tp=d&id='; } $img = $this->imag_alone(Util::format_URLPath('filemanager/index.php', $status . $_id), Theme::getThemeImagePath('filemanager/delete.png'), agt('Borrar')); $elem9 = html_td('ptabla03', '', $img); $elem9->set_tag_attribute('align', 'center'); $_fid = $this->getViewVariable('folder_id'); if ($_folder) { $status = 'oldName=' . $_name . '&operation_id=rename&tp=f&id='; } else { $status = 'oldName=' . $_name . '&operation_id=rename&tp=d&id='; } $img = $this->imag_alone(Util::format_URLPath('filemanager/index.php', $status . $_id), Theme::getThemeImagePath('filemanager/rename.png'), agt('Renombrar')); $elem10 = html_td('ptabla03', '', $img); $elem10->set_tag_attribute('align', 'center'); if ($_folder) { $status = 'operation_id=move&tp=f&id='; } else { $status = 'folder_id=' . $_fid . '&operation_id=move&tp=d&id='; } $img = $this->imag_alone(Util::format_URLPath('filemanager/index.php', $status . $_id), Theme::getThemeImagePath('filemanager/move.png'), agt('Mover')); $elem11 = html_td('ptabla03', '', $img); $elem11->set_tag_attribute('align', 'center'); if ($_visible == 0) { $status = 'visible'; $icon = 'invisible.png'; $tooltip = 'Visible'; } else { $status = 'invisible'; $icon = 'visible.png'; $tooltip = 'Invisible'; } if ($_folder) { $status = 'status=' . $status . '&tp=f&id='; } else { $status = 'status=' . $status . '&tp=d&id='; } $img = $this->imag_alone(Util::format_URLPath('filemanager/index.php', $status . $_id), Theme::getThemeImagePath('filemanager/' . $icon), agt($tooltip)); $elem12 = html_td('ptabla03', '', $img); $elem12->set_tag_attribute('align', 'center'); if (!$_folder) { //--------- ONLY TEACHER, TUTOR OR ADMIN CAN LOCK FILES ---------------- if ($profile_id < 4) { if ($_lock == 0) { $status = 'lock'; $icon = 'lock.png'; $tooltip = 'Bloquear'; } else { $status = 'unlock'; $icon = 'unlock.png'; $tooltip = 'Desbloqear'; } $status = 'status=' . $status . '&id='; $img = $this->imag_alone(Util::format_URLPath('filemanager/index.php', $status . $_id), Theme::getThemeImagePath('filemanager/' . $icon), agt($tooltip)); } else { $img = _HTML_SPACE; } $elem13 = html_td('ptabla03', '', $img); $elem13->set_tag_attribute('align', 'center'); if ($_share == 0) { $status = 'share'; $icon = 'invisible.png'; $tooltip = 'Compartir'; } else { $status = 'unshare'; $icon = 'visible.png'; $tooltip = 'No compartir'; } $status = 'status=' . $status . '&id='; $img = $this->imag_alone(Util::format_URLPath('filemanager/index.php', $status . $_id), Theme::getThemeImagePath('filemanager/' . $icon), agt($tooltip)); $elem14 = html_td('ptabla03', '', $img); $elem14->set_tag_attribute('align', 'center'); } else { $link = _HTML_SPACE; $elem13 = html_td('ptabla03', '', $link); $elem13->set_tag_attribute('align', 'center'); $elem14 = html_td('ptabla03', '', $link); $elem14->set_tag_attribute('align', 'center'); } //--------------------- ADD OPERATIONS INTO TR CONTAINET ----------------- $row->add($elem1); $row->add($elem2); $row->add($elem3); $row->add($elem4); $row->add($elem5); $row->add($elem6); $row->add($elem7); $row->add($elem8); $row->add($elem9); $row->add($elem10); $row->add($elem11); $row->add($elem12); $row->add($elem13); $row->add($elem14); return $row; }
function _coursePath($file) { //return Util::main_URLPath('var/carton/'.$this->file_path.'/'.$file); return Util::main_URLPath('var/carton/' . $file); }