本文整理汇总了PHP中Util::format_URLPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::format_URLPath方法的具体用法?PHP Util::format_URLPath怎么用?PHP Util::format_URLPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util::format_URLPath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processPetition
function processPetition()
{
$this->setHelp("EducContent");
//Primero comprueba si estamos identificados y si no es asi
//entonces vamos a ver si es una peticion de autenticacion
if ($this->HasAccess()) {
if ($this->issetViewVariable('submit')) {
$courseData = $this->GetForm();
if ($this->CheckForm($courseData)) {
$this->obj_data->createNewCourse($courseData, $user_id);
$this->setViewClass('miguel_VResultNewCourse');
$this->setViewVariable('courseName', $courseData['c_name']);
$this->setViewVariable('courseDescription', $courseData['cd_descripcion']);
//$this->SendNotification();
$this->setCacheFile("miguel_VResultNewCourse_" . $this->getSessionElement("userinfo", "user_id"));
$this->setCacheFlag(true);
$this->setPageTitle('miguel_ResultNewCourse');
return;
}
$this->setViewVariable('courseDataForm', $courseData);
} else {
$this->setMessage(agt('Rellene el formulario para insertar un nuevo curso.'));
}
$this->setPageTitle('miguel_NewCourse');
$this->setViewVariable('courseDataForm', $this->GetDefaultForm());
//$this->addNavElement(Util::format_URLPath("newCourse/index.php", "course=".$course_id), $infoCourse['name']);
$this->setCacheFile("miguel_VNewCourse_" . $this->getSessionElement("userinfo", "user_id"));
$this->setCacheFlag(true);
} else {
header('Location:' . Util::format_URLPath('main/index.php'));
}
}
示例2: processPetition
function processPetition()
{
//Se controla que el usuario no tenga acceso. Por defecto, se tiene acceso.
$institution_id = -1;
//Primero comprueba si estamos identificados y si no es asi entonces vamos a ver si es una peticion de autenticacion
$user_id = $this->getSessionElement('userinfo', 'user_id');
if (isset($user_id) && $user_id != '') {
$institution_id = 0;
} else {
header('Location:' . Util::format_URLPath('main/index.php'));
}
if ($institution_id >= 0) {
//Navega por la jerarquía
$this->setViewClass("miguel_VMain");
$this->setMessage(agt('miguel_institutionList'));
$this->setPageTitle("miguel_institutionList");
//$this->clearNavBarr();
$this->addNavElement(Util::format_URLPath('institution/index.php', 'id=institution'), agt("miguel_Institution"));
$this->setViewVariable('arr_categories', $this->obj_data->getInstitutionResume());
$this->setCacheFile("miguel_VInstitution_" . $this->getSessionElement("userinfo", "user_id"));
$this->setCacheFlag(true);
$this->setHelp("EducContent");
} else {
header('Location:' . Util::format_URLPath('main/index.php'));
}
}
示例3: processPetition
function processPetition()
{
if ($this->issetViewVariable('status')) {
$status = $this->getViewVariable('status');
} else {
$status = 'main';
$status = $this->setViewVariable('status', 'main');
}
switch ($status) {
case 'main':
default:
//Presentación de mensajería
$arrMessages = $this->obj_data->getNewUserMessages(Session::getValue('USERINFO_USER_ID'));
$this->setViewVariable('arrMessages', $arrMessages);
//Presentación de tablón de anuncios
$NoticeArray = $this->obj_data->getNotices();
$this->setViewVariable('notice_array', $NoticeArray);
break;
}
$this->clearNavBarr();
$this->addNavElement(Util::format_URLPath('alumnPage/index.php'), agt('Inicio'));
$this->setPageTitle('miguel Alumn Page');
$this->setMessage('');
$this->setHelp('');
}
示例4: add_mainMenu
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%');
$row->add($blank);
$row->add($image);
$row->add($item1);
$row->add($item2);
$row->add($item3);
$table->add_row($row);
$div->add($table);
return $div;
}
示例5: processPetition
function processPetition()
{
if ($this->issetViewVariable('status')) {
$status = $this->getViewVariable('status');
} else {
$status = 'main';
$status = $this->setViewVariable('status', 'main');
}
$this->addNavElement(Util::format_URLPath('statistics/index.php'), 'Página de Estadísticas');
switch ($status) {
case 'main':
default:
//Presentación de tablón de anuncios
$arrUsers = $this->obj_data->getUsers();
$iTotalCon = 0;
for ($i = 0; $i < count($arrUsers); $i++) {
$userId = $arrUsers[$i]['user.user_id'];
$count = $this->obj_data->countLogin($userId);
$arrUsers[$i]['countLogin'] = $count;
$iTotalCon += $count;
}
$this->setViewVariable('arrUsers', $arrUsers);
$this->setViewVariable('iTotalCon', $iTotalCon);
break;
}
$this->setPageTitle("miguel statistics");
$this->setMessage("Estadísticas de miguel");
$this->setHelp("");
}
示例6: add_mainMenu
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;
}
示例7: processPetition
function processPetition()
{
//Se controla que el usuario no tenga acceso.
$bol_hasaccess = false;
//Primero comprueba si estamos identificados y si no es asi entonces vamos a ver si es una peticion de autenticacion
$user_id = $this->getSessionElement('userinfo', 'user_id');
if (isset($user_id) && $user_id != '') {
$bol_hasaccess = true;
$user = $this->getSessionElement('userinfo', 'user_alias');
} else {
}
if ($bol_hasaccess) {
if ($user == 'guest') {
//Error, el usuario no puede ser el invitado
} else {
//Miramos si se puede hacer la inscripción directa
$course_id = $this->getViewVariable('course_id');
$courseAccess = miguel_CourseInfo::getAccess($this->obj_data, $course_id);
if (!$courseAccess) {
//Realiza la inscripciÛn directa en el curso
$this->_subscribeCourse($user_id, $course_id);
$this->addNavElement(Util::format_URLPath('main/index.php'), agt('miguel_Courses'));
$course_name = $this->obj_data->getCourseName($course_id);
$this->setViewVariable('course_name', $course_name);
$subject = agt('miguel_newCourseSubscriptionSubject') . ' ' . $course_name;
$body = $course_name . ',\\n ' . agt('miguel_newCourseSubscriptionBody') . '\\n' . agt('miguel_disclaimer');
} else {
//La inscripción ha de ser validada por el responsable
$subject = agt('miguel_newCourseSubscriptionPending') . ' ' . $course_name;
$body = $course_name . ',\\n ' . agt('miguel_newCourseSubscriptionBody') . '\\n' . agt('miguel_disclaimer');
}
//Realiza la notificacion si esta permitido
if ($this->getSessionElement('userinfo', 'notify_email')) {
include_once Util::base_Path("include/classes/mailer.class.php");
$mail = new miguel_mailer();
$mail->From = $this->getSessionElement('userinfo', 'email');
$mail->FromName = $this->getSessionElement('userinfo', 'name') . ' ' . $this->getSessionElement('userinfo', 'surname');
$mail->AddAddress($this->getSessionElement('userinfo', 'email'), $this->getSessionElement('userinfo', 'name'));
$mail->AddReplyTo($this->getSessionElement('userinfo', 'email'), $this->getSessionElement('userinfo', 'name'));
$mail->Subject = $subject;
$mail->Body = $body;
if (!$mail->Send()) {
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
//exit;
}
}
$this->setCacheFile("miguel_VSubscribe_" . $this->getSessionElement("userinfo", "user_id"));
$this->setMessage(agt("miguel_userSubscribe"));
$this->setPageTitle("miguel_userSubscribe");
}
} else {
//Bienvenida
}
$this->setCacheFlag(true);
$this->setHelp("EducContent");
}
示例8: processPetition
function processPetition()
{
/*
* Set various "burocratic" things
*/
$this->addNavElement(Util::format_URLPath('authortool/index.php'), agt("nav_authortool"));
$this->setMessage(agt('miguel_AuthorTool'));
$this->setPageTitle(agt('miguel_AuthorTool'));
$this->setHelp("EducAuthorTool");
/*
* Get action status, if none -> set to list
*/
if ($this->IsSetVar('status')) {
$status = $this->getViewVariable('status');
} else {
$status = 'list';
$this->setViewVariable('status', $status);
}
/*
* Get current folder id, if none -> set to 0,
* which is the root one of actual course
*/
if ($this->issetViewVariable('current_folder_id')) {
$folder_id = $this->getViewVariable('current_folder_id');
} else {
$folder_id = 0;
$this->setViewVariable('current_folder_id', $folder_id);
}
/*
* Sets read access to this course files and folder
*/
$bol_hasaccess = false;
$user_id = $this->getSessionElement('userinfo', 'user_id');
$course_id = $this->getSessionElement('courseinfo', 'course_id');
$course_id = 7;
if (isset($user_id) && $user_id != '' && isset($course_id) && $course_id != '') {
$bol_hasaccess = true;
$user_alias = $this->getSessionElement('userinfo', 'user_alias');
$ret_sql = $this->obj_data->Select('user', 'id_profile', 'user_id = ' . $user_id);
$user_profile_id = $ret_sql[0]['user.id_profile'];
$this->setCacheFile('miguel_VAuthorTool_' . $course_id . '_' . $user_id);
$this->setCacheFlag(true);
/*
* Execute the required action depdending on status once checked
* access permission.
*/
$this->_exec_by_status($status, $folder_id, $user_id, $user_profile_id, $course_id);
} else {
/*
* Otherwise, give control to main module
*/
$this->giveControl('main', 'miguel_CMain');
}
}
示例9: add_activity
function add_activity($title, $body, $id, $index)
{
$row = html_tr();
$lDelete = html_a(Util::format_URLPath('courseActivities/index.php', "status=delete&idi={$id}"), 'Eliminar');
$lUpdate = html_a(Util::format_URLPath('courseActivities/index.php', "status=showForm&index={$index}"), 'Modificar');
$tdLinks = html_td('ptabla03', '', $lDelete, $lUpdate);
$title = html_td('ptabla02', '', $title);
$body = html_td('ptabla03', '', $body);
$row->add($title);
$row->add($body);
$row->add($tdLinks);
return $row;
}
示例10: form
function form()
{
//El formateo va a ser realizado sobre una tabla en la que cada fila es un campo del formulario
$table =& html_table('40%', 0, 0, 0, 'center');
$table->set_class('ptabla03');
$param = '&id_forum=' . $this->getViewVariable('id_forum') . '&id_topic=' . $this->getViewVariable('id_topic');
$link = html_td('p', '', html_a(Util::format_URLPath('forum/index.php', 'status=new_post' . $param), agt('Añadir nuevo hilo'), 'boton02a'));
$this->set_form_tabindex('orden', '14');
$sort = html_td('ptabla03', '', $this->element_form('orden'));
$this->set_form_tabindex('Aceptar', '15');
$boton = html_td('ptabla03', '', $this->element_form('Aceptar'));
//$boton->set_tag_attribute('valign', 'center');
$table->add_row($link, $sort, $boton);
return $table;
}
示例11: processPetition
function processPetition()
{
//Consultar la variable status. Si no existe se establece a 'menú'
if ($this->issetViewVariable('status')) {
$status = $this->getViewVariable('status');
} else {
$status = 'menu';
$status = $this->setViewVariable('status', 'menu');
}
//$this->addNavElement(Util::format_URLPath('notice/index.php', 'status=list'), 'Tablón de anuncios');
//Según el valor de status abrir una u otra vista
switch ($status) {
case 'new':
//Nuevo comentario
$this->processPetitionNew();
$this->addNavElement(Util::format_URLPath('notice/index.php', 'status=new'), 'Nuevo comentario');
break;
case 'list':
//Listar comentarios
$NoticeArray = $this->obj_data->getNotices();
$this->setViewVariable('notice_array', $NoticeArray);
$this->addNavElement(Util::format_URLPath('notice/index.php', 'status=list'), 'Tablón de anuncios');
break;
case 'show':
if ($this->issetViewVariable('id')) {
$id = $this->getViewVariable('id');
$NoticeArray = $this->obj_data->getNotice($id);
$this->setViewVariable('author', $NoticeArray[0]['notice.author']);
$this->setViewVariable('subject', $NoticeArray[0]['notice.subject']);
$this->setViewVariable('time', $NoticeArray[0]['notice.time']);
$this->setViewVariable('text', $NoticeArray[0]['notice.text']);
}
break;
case 'menu':
//Ver menú de opciones
//Ver menú de opciones
default:
break;
}
//Establecer el título de la página
$this->setPageTitle("miguel Notice Page");
$this->setMessage('');
//Establecer cual va a ser el archivo de la ayuda on-line, este se obtiene del directorio help/
$this->setHelp("");
}
示例12: right_block
/**
* 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;
}
示例13: _contactDetail
function _contactDetail()
{
$table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 2, 2);
$contact = $this->getViewVariable('detail_contacts');
if (is_array($contact) && $contact[0]['contact.contact_id'] != null) {
$table->add_row($this->add_info('Nombre', $contact[0]['contact.contact_name']));
$table->add_row($this->add_info('Apellido', $contact[0]['contact.contact_surname']));
if ($contact[0]['contact.contact_nick'] != null) {
$table->add_row($this->add_info('Usuario', $contact[0]['contact.contact_nick']));
}
$table->add_row($this->add_info('Correo electrónico', $contact[0]['contact.contact_mail']));
$table->add_row($this->add_info('Comentarios', nl2br($contact[0]['contact.contact_comments'])));
}
$btDel = html_a(Util::format_URLPath("contact/index.php", "contact_id=" . $contact[0]['contact.contact_id'] . "&option=delete"), 'Eliminar', null, '_top');
$btDel->set_tag_attribute('class', '');
$btBack = html_a(Util::format_URLPath("contact/index.php", ''), 'Volver', null, '_top');
$btBack->set_tag_attribute('class', '');
$table->add_row($btBack, $btDel);
return $table;
}
示例14: right_block
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;
}
示例15: form
function form()
{
$table =& html_table($this->_width, 0, 2, 2);
$table->set_class('ptabla02');
$labelAdd = html_label('submit');
$labelAdd->add($this->element_form('submit'));
$tdsubmit = html_td('', 'left', $labelAdd);
$this->set_form_tabindex('submit', '10');
$menu_id = $this->getViewVariable('menu_id');
$arrSmn = $this->getViewVariable('arrSubmenus');
for ($i = 0; $i < count($arrSmn); $i++) {
if ($arrSmn[$i]['name'] != '') {
$submenu_id = $arrSmn[$i]['submenu_id'];
$tdDelete = html_td('', '', html_a(Util::format_URLPath('moduleManager/index.php', "status=deleteSubmenu&menu_id={$menu_id}&submenu_id={$submenu_id}"), 'Eliminar'));
$opt_id = 'submenu' . $submenu_id;
$table->add_row($this->_showElement($opt_id, 7 + $i, $opt_id, $arrSmn[$i]['name'], $opt_id, 'left'), $tdDelete);
}
}
$table->add_row($tdsubmit);
return $table;
}