Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 private static function getLibrariesHTML()
 {
     $result = array();
     foreach (self::getLibraries() as $k => $v) {
         $result[$k] = html::link($v['home'], $k) . ' v' . $v['version'];
     }
     return $result;
 }
Exemplo n.º 3
0
 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(' &nbsp; ', $links);
     return $output;
 }
Exemplo n.º 4
0
 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)));
     }
 }
Exemplo n.º 5
0
 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']));
 }
Exemplo n.º 6
0
 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);
 }
Exemplo n.º 7
0
 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;
 }
Exemplo n.º 8
0
 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;
 }
Exemplo n.º 9
0
 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);
 }
Exemplo n.º 10
0
 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;
 }
Exemplo n.º 11
0
 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;
 }
Exemplo n.º 12
0
 * @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 
}
?>
Exemplo n.º 13
0
<!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'));
Exemplo n.º 14
0
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>
Exemplo n.º 15
0
</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>


Exemplo n.º 16
0
<?php 
echo html::link('Lacs base of water and solvent', array('products2'));
?>
</li><br />
&nbsp;<br />

<?php 
echo html::link('Patina base of water and solvent', array('products3'));
?>
</li><br />
&nbsp;<br />

<?php 
echo html::link('Primers &amp; coating base of water', array('products4'));
?>
</li><br />
&nbsp;<br />

<?php 
echo html::link('Primers &amp; coatings base of solvent', array('products5'));
?>
</li><br />
&nbsp;<br />

<?php 
echo html::link('Maintenance and protection of wood', array('products6'));
?>
</li><br />
&nbsp;<br />

Exemplo n.º 17
0
<?php

echo $document->test_results;
?>
<hr/>
<?php 
echo html::link('test/', 'Back');
Exemplo n.º 18
0
 public function render()
 {
     $html = '';
     foreach ($this as $link) {
         $html .= html::link($link[0], $link[1], $link[2], NULL, NULL, TRUE);
     }
     return $html;
 }
Exemplo n.º 19
0
Arquivo: less.php Projeto: anqqa/Anqh
 /**
  * Creates a stylesheet link with LESS support
  *
  * @param   string|array  $style    filename, or array of filenames to match to array of medias
  * @param   string|array  $media    media type of stylesheet, or array to match filenames
  * @param   boolean       $index    include the index_page in the link
  * @param   array         $imports  compare file date for these too, CSS and LESS in style @import
  * @return  string
  */
 public static function stylesheet($style, $media = false, $index = false, $imports = null)
 {
     $style = (array) $style;
     $imports = (array) $imports;
     $compiled = array();
     // Loop through styles and compile less if necessary
     foreach ($style as $_style) {
         // Detect suffix
         if (substr_compare($_style, '.less', -5, 5, FALSE) === 0) {
             $_style = substr_replace($_style, '', -5, 5);
             $less = $_style . '.less';
             $css = $_style . '.css';
             try {
                 // Check if included files have changed
                 $compile = false;
                 if (!empty($imports)) {
                     foreach ($imports as $import) {
                         if (!is_file($css) || filemtime($import) > filemtime($css)) {
                             $compile = true;
                             break;
                         }
                     }
                 }
                 // Compile LESS
                 if ($compile || !is_file($css) || filemtime($less) > filemtime($css)) {
                     $compiler = new less($less);
                     file_put_contents($css, $compiler->parse());
                 }
                 $_style = $css;
             } catch (Exception $e) {
                 Kohana_Log::add('error', __METHOD__ . ': Error compiling LESS file ' . $less . ', ' . $e->getMessage());
                 continue;
             }
         } else {
             if (strpos($_style, '.css') === false) {
                 // Require suffix to support timestamp cache overrides
                 $_style .= '.css';
             }
         }
         // Add to compiled, with timestamp
         $compiled[] = $_style . '?' . filemtime($_style);
     }
     return html::link($compiled, 'stylesheet', 'text/css', false, $media, $index);
 }
Exemplo n.º 20
0
 /**
  * Creates a link tag.
  *
  * @param   string|array  filename
  * @param   string|array  relationship
  * @param   string|array  mimetype
  * @param   string        specifies suffix of the file
  * @param   string|array  specifies on what device the document will be displayed
  * @param   boolean       include the index_page in the link
  * @return  string
  */
 public static function link($href, $rel, $type, $suffix = FALSE, $media = FALSE, $index = FALSE)
 {
     $compiled = '';
     if (is_array($href)) {
         foreach ($href as $_href) {
             $_rel = is_array($rel) ? array_shift($rel) : $rel;
             $_type = is_array($type) ? array_shift($type) : $type;
             $_media = is_array($media) ? array_shift($media) : $media;
             $compiled .= html::link($_href, $_rel, $_type, $suffix, $_media, $index);
         }
     } else {
         if (strpos($href, '://') === FALSE) {
             // Make the URL absolute
             $href = url::base($index) . $href;
         }
         $length = strlen($suffix);
         if ($length > 0 and substr_compare($href, $suffix, -$length, $length, FALSE) !== 0) {
             // Add the defined suffix
             $href .= $suffix;
         }
         $attr = array('rel' => $rel, 'type' => $type, 'href' => $href);
         if (!empty($media)) {
             // Add the media type to the attributes
             $attr['media'] = $media;
         }
         $compiled = '<link' . html::attributes($attr) . ' />';
     }
     return $compiled . "\n";
 }
Exemplo n.º 21
0
?>
		</script>
		
		<script type="text/template" id="report-form-template">
	<?php 
include 'report-form-template.php';
?>
		</script>
		
		<script type="text/template" id="settings-edit-template">
	<?php 
include 'settings-edit-template.php';
?>
		</script>
		<?php 
echo html::link($css, 'stylesheet', 'text/css');
foreach ($js as $script) {
    $script = url::base() . $script;
    echo "<script type=\"text/javascript\" src=\"{$script}\"></script>\n";
}
?>
		<script>
			var baseURL = '<?php 
echo url::base();
?>
';
			window.baseURL = baseURL;
			
			var categoryTree = <?php 
echo json_encode(category::get_category_tree_data(FALSE, $this->auth->admin_access()));
?>
Exemplo n.º 22
0
<h2>Unit Tests</h2>

<h3>Application Tests</h3>
<ul>
<?php 
foreach ($document->application_tests as $test) {
    $test = substr(basename($test), 0, -4);
    print '<li>' . html::link('test/run/application/' . $test, htmlspecialchars($test)) . '</li>';
}
?>
</ul>

<h3>Xoket Tests</h3>
<ul>
<?php 
foreach ($document->system_tests as $test) {
    $test = substr(basename($test), 0, -4);
    print '<li>' . html::link('test/run/system/' . $test, htmlspecialchars($test)) . '</li>';
}
?>
</ul>
Exemplo n.º 23
0
Arquivo: html.php Projeto: Toushi/flow
 /**
  * Creates a link tag.
  *
  * @param   string|array  filename
  * @param   string|array  relationship
  * @param   string|array  mimetype
  * @param   string        specifies suffix of the file
  * @param   string|array  specifies on what device the document will be displayed
  * @param   boolean       include the index_page in the link
  * @return  string
  */
 public static function link($href, $rel, $type, $suffix = FALSE, $media = FALSE, $index = FALSE)
 {
     $compiled = '';
     if (is_array($href)) {
         foreach ($href as $_href) {
             $_rel = is_array($rel) ? array_shift($rel) : $rel;
             $_type = is_array($type) ? array_shift($type) : $type;
             $_media = is_array($media) ? array_shift($media) : $media;
             $compiled .= html::link($_href, $_rel, $_type, $suffix, $_media, $index);
         }
     } else {
         // Add the suffix only when it's not already present
         $suffix = (!empty($suffix) and strpos($href, $suffix) === FALSE) ? $suffix : '';
         $media = empty($media) ? '' : ' media="' . $media . '"';
         $compiled = '<link rel="' . $rel . '" type="' . $type . '" href="' . url::base((bool) $index) . $href . $suffix . '"' . $media . ' />';
     }
     return $compiled . "\n";
 }
Exemplo n.º 24
0
<!DOCTYPE html> 
<html> 
<head> 
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<?php 
echo html::link('media/images/home.png', 'apple-touch-icon', "");
echo html::stylesheet('media/css/jquery.mobile.min.css');
echo html::stylesheet('media/css/mobile.css');
echo html::script('media/js/jquery-min.js');
echo html::script('media/js/jquery.mobile.min.js');
?>
</head> 
<body> 

<div data-role="page" data-theme="b" data-add-back-btn="true">
<div data-role="header">
<h1>PNP4Nagios</h1>
<a href="<?php 
echo url::base(TRUE);
?>
/mobile" data-icon="home" class="ui-btn-right">Home</a>
</div><!-- /header -->
<?php 
if (!empty($home)) {
    echo $home;
}
if (!empty($about)) {
    echo $about;
}
Exemplo n.º 25
0
echo html::link('Brushed anodized metal effect', array('effects13'));
?>
</li><br />
&nbsp;<br />

<?php 
echo html::link('Reflective effect', array('effects14'));
?>
</li><br />
&nbsp;<br />

<?php 
echo html::link('Soft rubber touch effect', array('effects15'));
?>
</li><br />
&nbsp;<br />

<?php 
echo html::link('Liquid crystal effect', array('effects16'));
?>
</li><br />
&nbsp;<br />

<?php 
echo html::link('Concrete effect', array('effects17'));
?>
</li><br />
&nbsp;<br />


Exemplo n.º 26
0
 protected function getData()
 {
     if ('404' == $this->preset) {
         $data = array();
         $limit = $this->ctx->get('limit', 10);
         $offset = $limit * $this->ctx->get('page') - $limit;
         foreach ($this->ctx->db->getResults("SELECT * FROM `node__fallback` ORDER BY `old` LIMIT {$offset}, {$limit}") as $row) {
             $row['_links'] = array('edit' => array('href' => '?q=admin/content/edit/404' . '&subid=' . urlencode($row['old']) . '&destination=CURRENT', 'title' => 'Изменить', 'icon' => 'edit'), 'delete' => array('href' => '?q=admin.rpc&action=404&mode=delete' . '&src=' . urlencode($row['old']) . '&destination=CURRENT', 'title' => 'Удалить', 'icon' => 'delete'));
             if (!empty($row['new'])) {
                 $row['new'] = html::em('a', array('href' => '?q=' . urlencode($row['new'])), html::plain($row['new']));
             }
             if (!empty($row['ref'])) {
                 $url = new url($row['ref']);
                 if (0 === strpos($name = $url->host, 'www.')) {
                     $name = substr($name, 4);
                 }
                 $row['ref'] = html::link($row['ref'], $name);
             }
             $data[] = $row;
         }
         return $data;
     }
     $result = '';
     $filter = $this->getNodeFilter();
     if (null !== $this->limit) {
         $filter['#limit'] = $this->limit;
         $filter['#offset'] = ($this->page - 1) * $this->limit;
     }
     $result = Node::findXML($filter);
     return html::em('data', $result);
 }
Exemplo n.º 27
0
?>
"; URL="<?php 
echo $_SERVER['REQUEST_URI'];
?>
">
<title><?php 
if (isset($this->title)) {
    echo html::specialchars($this->title);
}
?>
</title>
<?php 
echo html::stylesheet('media/css/common.css');
echo html::stylesheet('media/css/imgareaselect-default.css');
echo html::stylesheet('media/css/ui-' . $this->theme . '/jquery-ui.css');
echo html::link('media/images/favicon.ico', 'icon', 'image/ico');
echo html::script('media/js/jquery-min.js');
echo html::script('media/js/jquery.imgareaselect.min.js');
echo html::script('media/js/jquery-ui.min.js');
?>
<script type="text/javascript">
jQuery.noConflict();
jQuery(window).load(
    function() {

    jQuery('div.graph').each(function(){
	var img_width = jQuery(this).next('img').width();
	var rrd_width = parseInt(jQuery(this).css('width'));
	var left = img_width - rrd_width - <?php 
echo $this->config->conf['right_zoom_offset'];
?>
Exemplo n.º 28
0
<?php 
echo html::link('Λάκες Νερού και Διαλυτικού', array('products2'));
?>
<br />
&nbsp;<br/ >

<?php 
echo html::link('Πατίνες Νερού και Διαλυτικού', array('products3'));
?>
<br />
&nbsp;<br/ >

<?php 
echo html::link('Υποστρώματα και Βερνίκια Νερού', array('products4'));
?>
<br />
&nbsp;<br/ >

<?php 
echo html::link('Υποστρώματα και Βερνίκια Διαλυτικού', array('products5'));
?>
<br />
&nbsp;<br/ >

<?php 
echo html::link('Υλικά Συντήρησης και Προστασίας Ξύλου', array('products6'));
?>
<br />
&nbsp;<br/ >

Exemplo n.º 29
0
 public static function stylesheet($href, $attrs = '')
 {
     $attrs['rel'] = 'stylesheet';
     $attrs['type'] = 'text/css';
     return html::link($href, $attrs);
 }
Exemplo n.º 30
0
</li>
			<li><?php 
echo html::link('Εφέ Ανοδίωσης Μετάλλου', array('effects13'));
?>
</li>
			<li><?php 
echo html::link('Αντιχαρακτικό Εφέ Διαμαντιού', array('effects14'));
?>
</li>
			<li><?php 
echo html::link('Εφε Απαλής Υφής', array('effects15'));
?>
</li>
			<li><?php 
echo html::link('Εφέ Υγρών Κρυστάλλων', array('effects16'));
?>
</li>
			<li><?php 
echo html::link('Εφέ Τσιμέντου', array('effects17'));
?>
</li>
		</ul>
	</li>
	<li><?php 
echo html::link('Επικοινωνία', array('contact'));
?>
</li>
</ul>