本文整理汇总了PHP中html::link方法的典型用法代码示例。如果您正苦于以下问题:PHP html::link方法的具体用法?PHP html::link怎么用?PHP html::link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类html
的用法示例。
在下文中一共展示了html::link方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
public static function header($page = array())
{
$page['js'] = array_merge(array('jquery' => url::common() . '/js/jquery.js', 'plugins' => url::common() . '/js/jquery.plugins.js', 'zotop' => url::common() . '/js/zotop.js'), (array) $page['js']);
$page['css'] = array_merge(array('zotop' => url::theme() . '/css/zotop.css', 'global' => url::theme() . '/css/global.css'), (array) $page['css']);
$page = self::settings($page);
$html[] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$html[] = '<html xmlns="http://www.w3.org/1999/xhtml">';
$html[] = '<head>';
$html[] = ' <title>' . $page['title'] . ' Powered by ' . zotop::config("zotop.title") . '</title>';
$html[] = self::meta($page['meta']);
$html[] = self::stylesheet($page['css']);
$html[] = self::script($page['js']);
$html[] = ' ' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'shortcut icon', 'type' => 'image/x-icon'));
$html[] = ' ' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'icon', 'type' => 'image/x-icon'));
$html[] = ' ' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'bookmark', 'type' => 'image/x-icon'));
$html[] = ' <script type="text/javascript">';
$html[] = ' zotop.url.base = "' . url::base() . '";';
$html[] = ' zotop.url.common = "' . url::common() . '";';
$html[] = ' zotop.page.id = "' . page::id() . '";';
$html[] = ' zotop.user.id =0;';
$html[] = ' zotop.user.username = "";';
$html[] = ' </script>';
$html[] = '</head>';
$html[] = '<body' . html::attributes($page['body']) . '>';
$html[] = '<div id="wrapper">';
$html[] = '';
$str = implode("\n", $html);
echo $str;
}
示例2: getLibrariesHTML
private static function getLibrariesHTML()
{
$result = array();
foreach (self::getLibraries() as $k => $v) {
$result[$k] = html::link($v['home'], $k) . ' v' . $v['version'];
}
return $result;
}
示例3: getWorkingForm
private function getWorkingForm($stats, $voted)
{
$links = array();
for ($idx = 1; $idx <= 5; $idx++) {
$links[] = html::link($idx, array($this->getInstanceName() => array('action' => 'vote', 'vote' => $idx)));
}
$output = t('Ваша оценка: ') . join(' ', $links);
return $output;
}
示例4: checkAccessRights
private static function checkAccessRights(Context $ctx)
{
$types = $ctx->db->getResultsKV("id", "name", "SELECT `id`, `name` FROM `node` WHERE `class` = 'type' AND `deleted` = 0 AND `id` IN (SELECT `nid` FROM `node__access` WHERE `uid` = 0 AND (`u` = 1 OR `d` = 1 OR `p` = 1))");
if (!empty($types)) {
$list = array();
foreach ($types as $id => $name) {
$list[] = html::link('?q=admin/structure/edit/' . $id . '&destination=CURRENT', $name);
}
return t('<p class="important">Нарушение безопасности: документы типов !list могут быть изменены анонимно.</p>', array('!list' => join(', ', $list)));
}
}
示例5: getProductLink
private function getProductLink(array $item)
{
$ctx = Context::last();
if (empty($item['id'])) {
return htmlspecialchars($item['name']);
}
if (0 === strpos($ctx->query(), 'admin/')) {
$url = '?q=admin/edit/' . $item['id'] . '&destination=admin';
} else {
$url = '?q=nodeapi.rpc&action=locate&node=' . $item['id'];
}
return html::link($url, html::plain($item['name']));
}
示例6: _getOutput
private function _getOutput()
{
// Make $template and $title accessible in the descendant views
$this->__set('template', $this);
$this->__set('title', $this->title);
// Template View (must run first since ancestor views might call functions from $template)
$templateView = XML::text($this->_template->__toString());
// <html>
$this->_html = XML::element('html');
$this->_html->dir = $this->dir;
if (Kennel::getSetting('i18n', 'enabled')) {
$this->_html->lang = i18n::getLang();
}
// <head>
$this->_head = XML::element('head', $this->_html);
// <title>
$title = XML::element('title', $this->_head);
$title->setValue($this->getTitle());
// favicon
if ($this->favicon) {
$this->_head->adopt(html::favicon($this->favicon));
}
// Content Type
$this->_head->adopt(html::meta(array('charset' => 'utf-8')));
// <meta>
foreach ($this->_meta as $meta) {
$this->_head->adopt(html::meta($meta));
}
// <link>
foreach ($this->_links as $link) {
$this->_head->adopt(html::link($link['rel'], $link['href'], $link['type'], $link['title']));
}
// <style>
$this->_head->adopt(html::css($this->_stylesheets));
// <script>
$this->_head->adopt(html::js($this->_scripts));
// <body>
$this->_body = XML::element('body', $this->_html);
$this->_body->class = browser::css();
if (Kennel::getSetting('i18n', 'enabled')) {
$this->_body->class .= ' ' . i18n::getLang();
}
if ($this->bodyClass) {
$this->_body->class .= ' ' . $this->bodyClass;
}
// Inject the Template View
$this->_body->adopt($templateView);
// Return the whole shebang
return self::$DOCTYPE_DECLARATIONS[$this->doctype] . $this->_html->output(true);
}
示例7: header
public function header()
{
$header = $this->render('header');
if (!$header) {
$javascript = (array) $this->js;
$css = (array) $this->css;
$metas = (array) $this->meta;
$html[] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$html[] = '<html xmlns="http://www.w3.org/1999/xhtml">';
$html[] = '<head>';
$html[] = ' <title>' . $this->title . ' ' . zotop::config("zotop.title") . '</title>';
$html[] = ' ' . html::meta('keywords', $this->keywords . ' ' . zotop::config("zotop.keywords"));
$html[] = ' ' . html::meta('description', $this->description . ' ' . zotop::config("zotop.description"));
$html[] = ' ' . html::meta('Content-Type', 'text/html;charset=utf-8');
$html[] = ' ' . html::meta('X-UA-Compatible', 'IE=EmulateIE7');
foreach ($metas as $meta) {
$html[] = ' ' . html::meta($meta);
}
$html[] = ' ' . html::stylesheet('$theme/css/zotop.css', array('id' => 'zotop'));
$html[] = ' ' . html::stylesheet('$theme/css/global.css', array('id' => 'global'));
foreach ($css as $stylesheet) {
$html[] = ' ' . html::stylesheet($stylesheet);
}
$html[] = ' ' . html::script('$common/js/jquery.js', array('id' => 'jquery'));
$html[] = ' ' . html::script('$common/js/jquery.plugins.js', array('id' => 'plugins'));
$html[] = ' ' . html::script('$common/js/zotop.js', array('id' => 'zotop'));
$html[] = ' ' . html::script('$common/js/global.js', array('id' => 'global'));
foreach ($javascript as $js) {
$html[] = ' ' . html::script($js);
}
$html[] = ' ' . html::link('$theme/image/favicon.ico', array('rel' => 'shortcut icon', 'type' => 'image/x-icon'));
$html[] = ' ' . html::link('$theme/image/favicon.ico', array('rel' => 'icon', 'type' => 'image/x-icon'));
$html[] = ' ' . html::link('$theme/image/favicon.ico', array('rel' => 'bookmark', 'type' => 'image/x-icon'));
$html[] = '</head>';
$html[] = '<body' . html::attributes($this->body) . '>';
$html[] = '<div id="wrapper">';
$html[] = '<div id="page">';
$html[] = '';
$header = implode("\n", $html);
}
echo $header;
}
示例8: header
public function header()
{
$html[] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$html[] = '<html xmlns="http://www.w3.org/1999/xhtml">';
$html[] = '<head>';
$html[] = ' <title>' . $this->title . ' ' . zotop::config("zotop.title") . '</title>';
$html[] = ' ' . html::meta('keywords', $this->keywords);
$html[] = ' ' . html::meta('description', $this->description);
$html[] = ' ' . html::meta('Content-Type', 'text/html;charset=utf-8');
$html[] = ' ' . html::meta('X-UA-Compatible', 'IE=EmulateIE7');
$html[] = ' ' . html::stylesheet(ZOTOP_APP_URL_CSS . '/zotop.css', array('id' => 'zotop'));
$html[] = ' ' . html::stylesheet(ZOTOP_APP_URL_CSS . '/global.css', array('id' => 'global'));
$html[] = ' ' . html::link(ZOTOP_APP_URL_IMAGE . '/fav.ico', array('rel' => 'shortcut icon', 'type' => 'image/x-icon'));
$html[] = ' ' . html::link(ZOTOP_APP_URL_IMAGE . '/fav.ico', array('rel' => 'icon', 'type' => 'image/x-icon'));
$html[] = ' ' . html::link(ZOTOP_APP_URL_IMAGE . '/fav.ico', array('rel' => 'bookmark', 'type' => 'image/x-icon'));
$html[] = '</head>';
$html[] = '<body' . html::attributes($this->body) . '>';
$str = implode("\n", $html);
echo $str;
}
示例9: header
public function header()
{
$javascript = (array) $this->js;
$css = (array) $this->css;
$metas = (array) $this->meta;
$html[] = '<!DOCTYPE html>';
$html[] = '<html>';
$html[] = '<head>';
$html[] = ' <title>' . $this->title . ' ' . zotop::config("zotop.title") . '</title>';
$html[] = ' ' . html::meta('keywords', $this->keywords . ' ' . zotop::config("zotop.keywords"));
$html[] = ' ' . html::meta('description', $this->description . ' ' . zotop::config("zotop.description"));
$html[] = ' ' . html::meta('Content-Type', 'text/html;charset=utf-8');
$html[] = ' ' . html::meta('X-UA-Compatible', 'IE=EmulateIE7');
foreach ($metas as $meta) {
$html[] = ' ' . html::meta($meta);
}
$html[] = ' ' . html::stylesheet('$theme/css/zotop.css', array('id' => 'zotop'));
$html[] = ' ' . html::stylesheet('$theme/css/global.css', array('id' => 'global'));
foreach ($css as $stylesheet) {
$html[] = ' ' . html::stylesheet($stylesheet);
}
$html[] = ' ' . html::script('$common/js/jquery.js', array('id' => 'jquery'));
$html[] = ' ' . html::script('$common/js/jquery.plugins.js', array('id' => 'plugins'));
$html[] = ' ' . html::script('$common/js/zotop.js', array('id' => 'zotop'));
$html[] = ' ' . html::script('$common/js/global.js', array('id' => 'global'));
foreach ($javascript as $js) {
$html[] = ' ' . html::script($js);
}
$html[] = ' ' . html::link('$theme/image/favicon.ico', array('rel' => 'shortcut icon', 'type' => 'image/x-icon'));
$html[] = ' ' . html::link('$theme/image/favicon.ico', array('rel' => 'icon', 'type' => 'image/x-icon'));
$html[] = ' ' . html::link('$theme/image/favicon.ico', array('rel' => 'bookmark', 'type' => 'image/x-icon'));
$html[] = '</head>';
$html[] = '<body' . html::attributes($this->body) . '>';
$html[] = '<div id="wrapper">';
$html[] = '<div id="container" class="clearfix">';
$html[] = '';
echo implode("\n", $html);
}
示例10: getNodeBody
private static function getNodeBody(Node $node)
{
$body = '<dl>';
$schema = $node->getSchema();
foreach ($schema as $k => $v) {
if (isset($node->{$k})) {
if ($v instanceof PasswordControl) {
$value = null;
} elseif ($v instanceof EmailControl) {
$value = html::em('a', array('href' => 'mailto:' . $node->{$k}), $node->{$k});
} elseif (!is_object($node->{$k})) {
$value = $node->{$k};
}
if (null !== $value) {
$body .= '<dt>' . html::plain($v->label) . ':</dt>';
$body .= '<dd>' . $value . '</dd>';
}
}
}
$body .= '</dl>';
$body .= '<p>' . html::link('admin/node/' . $node->id . '?destination=admin', t('Открыть в админке')) . '</p>';
return $body;
}
示例11: header
public static function header($header = array())
{
$header = self::settings($header);
$html[] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$html[] = '<html xmlns="http://www.w3.org/1999/xhtml">';
$html[] = '<head>';
$html[] = ' <title>' . $header['title'] . ' Powered by ' . zotop::config("zotop.title") . '</title>';
$html[] = self::meta($header['meta']);
$html[] = self::stylesheet($header['css']);
$html[] = self::script($header['js']);
$html[] = ' ' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'shortcut icon', 'type' => 'image/x-icon'));
$html[] = ' <script type="text/javascript">';
$html[] = ' zotop.user.id =0;';
$html[] = ' zotop.user.username = "";';
$html[] = ' zotop.url.base = "' . url::base() . '";';
$html[] = ' </script>';
$html[] = '</head>';
$html[] = '<body' . html::attributes($header['body']) . '>';
$html[] = '<div id="wrapper">';
$html[] = '';
$str = implode("\n", $html);
echo $str;
}
示例12:
* @package Ushahidi - http://source.ushahididev.com
* @module API Controller
* @copyright Ushahidi - http://www.ushahidi.com
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License (LGPL)
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Crowdmap</title>
<?php
echo html::stylesheet('media/css/mhi/reset', '', true);
echo "<!--[if lte IE 7]>" . html::stylesheet('media/css/mhi/reset.ie', '', true) . "\n" . "<![endif]-->";
echo html::stylesheet('http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz', '', false);
echo html::link('http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz', 'stylesheet', 'text/css', false);
echo html::stylesheet('media/css/mhi/base', '', true);
echo html::script(array('http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', 'http://ajax.microsoft.com/ajax/jquery.validate/1.6/jquery.validate.min.js', 'media/js/mhi/jquery.cycle.min.js', 'media/js/mhi/initialize.js'), true);
?>
<?php
if ($js != '') {
?>
<script type="text/javascript" language="javascript">
<?php
echo $js . "\n";
?>
</script>
<?php
}
?>
示例13:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?php
echo html::specialchars($title);
?>
</title>
<?php
echo html::link(array('zest/css/reset.css', 'zest/css/formss.css', 'zest/css/layout.css', 'zest/css/typography.css', 'zest/css/design.css', 'zest/css/login.css'), 'stylesheet', 'text/css', FALSE, 'screen', null, TRUE);
echo html::script(array('zest/js/jquery-1.2.6.min.js', 'zest/js/ui.jquery.js'), FALSE);
?>
<script type="text/javascript">
$(document).ready(function(){
$(".hide").hide();
});
</script>
</head>
<body>
<div id="head">
<div id="logo">
<?php
echo html::image(array('src' => 'zest/images/logo.jpg', 'alt' => 'logo'));
示例14: array
echo url::base();
?>
skins/installer/assets/css/screen.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php
echo url::base();
?>
skins/installer/assets/css/forms.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php
echo url::base();
?>
skins/installer/assets/css/installer.css" media="screen" />
<?php
echo $js;
?>
<?php
echo html::link('skins/bluebox/assets/img/favicon.ico', 'icon', 'image/x-icon');
?>
</head>
<body>
<div class="container">
<div class="header">
<div class="topbar">
<?php
echo html::anchor('installer/reset', __('Restart Wizard'), array('title' => 'Reset the installation wizard, and start again.'));
?>
|
<?php
echo html::anchor('http://help.2600hz.org', __('Wiki'), array('title' => 'Find answers on the wiki for common problems.', 'target' => '_blank'));
?>
</div>
示例15: array
</li>
<li><?php
echo html::link('Brushed anodized metal effect', array('effects13'));
?>
</li>
<li><?php
echo html::link('Reflective effect', array('effects14'));
?>
</li>
<li><?php
echo html::link('Soft rubber touch effect', array('effects15'));
?>
</li>
<li><?php
echo html::link('Liquid crystal effect', array('effects16'));
?>
</li>
<li><?php
echo html::link('Concrete effect', array('effects17'));
?>
</li>
</ul>
</li>
<li><?php
echo html::link('Contact', array('contact'));
?>
</li>
</ul>