本文整理汇总了PHP中html_a函数的典型用法代码示例。如果您正苦于以下问题:PHP html_a函数的具体用法?PHP html_a怎么用?PHP html_a使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了html_a函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form
/**
* Este metodo construye el formulario en sí.
*/
function form()
{
$ret_val = container();
$table =& html_table($this->_width, 0, 2);
$table->set_class("table100 main-info-cell");
$row0 = html_tr("");
$col0 = html_td("");
$col0->set_tag_attribute("align", "center");
$col0->set_tag_attribute("colspan", "2");
$col0->add($this->element_form("Licence"));
$row0->add($col0);
$table->add($row0);
$row00 = html_tr("");
$col00 = html_td("");
$col00->set_tag_attribute("align", "center");
$col00->set_tag_attribute("colspan", "2");
$col00->add(html_a(Util::app_urlPath('install/include/gpl_print.txt'), agt('Versión Imprimible')));
$row00->add($col00);
$table->add($row00);
$row = html_tr("");
$col1 = html_td("");
$col1->set_tag_attribute("align", "left");
$col1->add($this->element_form("Salir"));
$container = container();
$container->add($this->element_form("Regresar"));
$container->add($this->element_form("Acepto"));
$col2 = html_td("");
$col2->set_tag_attribute("align", "right");
$col2->add($container);
$row->add($col1, $col2);
$table->add($row);
$ret_val->add($table);
return $ret_val;
}
示例2: 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;
}
示例3: 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;
}
示例4: guiDelete
function guiDelete($table, $id)
{
$param = 'perm=delete&table=' . $table . '&id=' . $id;
$file = 'delete.php';
$title = 'Delete';
return html_a($file . '?' . $param, $title);
}
示例5: add_notice
function add_notice($author, $subject, $time, $notice_id)
{
$row = html_tr();
$nombre = html_td('ptabla03', '', $author);
$subject = html_td('ptabla03', '', html_a(Util::format_URLPath('notice/index.php', "status=show&id={$notice_id}"), $subject, 'titulo03a'));
$tiempo = html_td('ptabla03', '', $time);
$row->add($nombre);
$row->add($subject);
$row->add($tiempo);
return $row;
}
示例6: 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;
}
示例7: 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;
}
示例8: show_benefactor_logo
/** output the logos of zero, one or more of the Website@School benefactors
*
* @param object &$output collects the html output
* @param bool $text_only if TRUE do not show a graphical image
* @param int $num the number of benefactors to show this time around
* @param string $m margin for increased readability
* @return void output added to output
*/
function show_benefactor_logo(&$output, $text_only = FALSE, $num = 1, $m = '')
{
global $CFG;
static $benefactors = array(array('width' => 160, 'height' => 160, 'img' => 'anonymousdonor.gif', 'url' => 'http://websiteatschool.eu', 'alt' => 'Anonymous Donor', 'title' => 'Anonymous Donor'), array('width' => 160, 'height' => 40, 'img' => 'blindenpenning.gif', 'url' => 'http://www.blinden-penning.nl', 'alt' => 'Stichting Blinden-Penning', 'title' => 'Stichting Blinden-Penning - Fonds & recreatieve activiteiten voor slechtzienden en blinden'), array('width' => 160, 'height' => 170, 'img' => 'enablement.gif', 'url' => 'http://www.enablement.nl', 'alt' => 'Enablement', 'title' => 'Enablement'), array('width' => 160, 'height' => 40, 'img' => 'europeesplatform.gif', 'url' => 'http://www.europeesplatform.nl', 'alt' => 'Europees Platform', 'title' => 'Europees Platform - internationaliseren in onderwijs'), array('width' => 160, 'height' => 100, 'img' => 'mijnco2spoor.gif', 'url' => 'http://www.mijnco2spoor.nl', 'alt' => 'Stichting Mijn CO2 Spoor', 'title' => 'Stichting Mijn CO2 Spoor - Burgers voor een veilig en rechtvaardig klimaat'), array('width' => 160, 'height' => 80, 'img' => 'nvbs.gif', 'url' => 'http://www.nvbs.nl', 'alt' => 'Nederlandse Vereniging van Blinden en Slechtzienden', 'title' => 'Nederlandse Vereniging van Blinden en Slechtzienden - Oog voor U'), array('width' => 160, 'height' => 40, 'img' => 'rosaboekdrukker.gif', 'url' => 'http://rosaboekdrukker.net', 'alt' => 'Openbare Basisschool Rosa Boekdrukker', 'title' => 'Openbare Basisschool Rosa Boekdrukker'), array('width' => 160, 'height' => 72, 'img' => 'stkba.gif', 'url' => 'http://www.stkba.nl', 'alt' => 'Stichting KBA Nieuw West', 'title' => 'Stichting KBA Nieuw West'), array('width' => 160, 'height' => 98, 'img' => 'lemstratechniek.jpg', 'url' => 'http://www.lemstratechniek.nl', 'alt' => 'Lemstra Techniek', 'title' => 'Lemstra Techniek - elektrische schuifdeurkozijen en elektrisch schuifdeurbeslag'), array('width' => 160, 'height' => 106, 'img' => 'sidn.gif', 'url' => 'https://www.sidn.nl', 'alt' => 'SIDN', 'title' => 'Foundation for Internet Domain Registration in the Netherlands'));
// 0 -- work to do at all?
if ($num < 1) {
return;
}
// 1 -- make sure we have shuffled array the first time around
if (!isset($_SESSION['donor_index']) || !isset($_SESSION['donor_array'])) {
$donor_array = array_keys($benefactors);
for ($j = sizeof($donor_array) - 1; $j > 1; $j--) {
$i = mt_rand(0, $j - 1);
$k = $donor_array[$j];
$donor_array[$j] = $donor_array[$i];
$donor_array[$i] = $k;
}
$_SESSION['donor_array'] = $donor_array;
$_SESSION['donor_index'] = 0;
unset($donor_array);
}
$output->add_menu($m . '<h2>' . t('donors', 'admin') . '</h2>');
if ($text_only) {
$output->add_menu($m . '<ul>');
$li = ' <li>';
} else {
$li = '';
}
for ($i = 0; $i < $num; ++$i) {
$index = $_SESSION['donor_array'][$_SESSION['donor_index']++];
$benefactor = $benefactors[$index];
$_SESSION['donor_index'] = $_SESSION['donor_index'] % sizeof($_SESSION['donor_array']);
$title = $benefactor['title'];
if ($text_only) {
$anchor = $benefactor['alt'];
} else {
$img_attr = array('height' => $benefactor['height'], 'width' => $benefactor['width'], 'alt' => $benefactor['alt'], 'title' => $title);
$anchor = html_img($CFG->progwww_short . '/lib/donors/' . $benefactor['img'], $img_attr);
}
$a_params = array('target' => '_blank', 'title' => $title);
$output->add_menu($m . $li . html_a($benefactor['url'], NULL, $a_params, $anchor));
}
if ($text_only) {
$output->add_menu($m . '</ul>');
}
}
示例9: content_block
function content_block()
{
$container = container();
$content = new FlipTurnOptionMeta();
// Account for no data in the options table
if ($content->existOptionMetaByKey(FT_HOME_PAGE_OPTION)) {
$content->loadOptionMetaByKey(FT_HOME_PAGE_OPTION);
$container->add(htmlspecialchars_decode($content->getOptionMetaValue()));
} else {
$container->add(FT_HOME_PAGE_OPTION_DEFAULT_CONTENT);
}
// Allow the Admin to Edit the page content
if ($this->user_is_logged_in()) {
$container->add(div_font8bold(html_a('home_edit.php', 'Edit')));
}
return $container;
}
示例10: 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;
}
示例11: item
function item($n, $type = 'v')
{
$tbl = str_replace(' ', '', $n);
global $sessionInfo;
$tablePerm = admin_getpermissionstable($sessionInfo['userid'], $tbl);
$tblstr = 'table=' . $tbl;
$viewfile = 'view.php';
$addfile = 'addedit.php';
$target = 'target="main"';
$class = 'leftnavitem';
if ($tablePerm['view']) {
if (is_integer(strpos($type, 'v')) || is_integer(strpos($type, 'a'))) {
echo html_a($viewfile . '?' . $tblstr, $n, $class, $target);
}
if ($tablePerm['add'] && is_integer(strpos($type, 'a'))) {
echo html_a($addfile . '?' . $tblstr, '(Add)', $class, $target);
}
echo '<br />' . "\n";
}
}
示例12: _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;
}
示例13: 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;
}
示例14: main_block
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;
}
示例15: addData
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;
}