本文整理汇总了PHP中html::image方法的典型用法代码示例。如果您正苦于以下问题:PHP html::image方法的具体用法?PHP html::image怎么用?PHP html::image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类html
的用法示例。
在下文中一共展示了html::image方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __social_media
public function __social_media()
{
$view = new View('zest/tabs');
$tabs = array(html::image('http://www.twitter.com/favicon.ico', 'twitter') . ' twitter' => $this->__twitter(), html::image('http://www.technorati.com/favicon.ico', 'technorati') . ' technorati' => $this->__technorati(), html::image('http://bit.ly/favicon.ico', 'bit.ly') . ' bit.ly' => $this->__bitly());
$view->tabs = $tabs;
return $view;
}
示例2: printFiles
/**
* Print files.
*
* @param object $files
* @access public
* @return void
* @todo fix style.
*/
public function printFiles($files)
{
if (empty($files)) {
return false;
}
$imagesHtml = '';
$filesHtml = '';
foreach ($files as $file) {
if ($file->editor) {
continue;
}
if ($file->isVideo) {
continue;
}
$file->title = $file->title . ".{$file->extension}";
$fileMD5 = md5_file(rtrim($this->app->getWwwRoot(), '/') . $file->fullURL);
if ($file->isImage) {
if ($file->objectType == 'product') {
continue;
}
$imagesHtml .= "<li class='file-image file-{$file->extension}'>" . html::a(helper::createLink('file', 'download', "fileID={$file->id}&mouse=left"), html::image($file->smallURL), "target='_blank' data-toggle='lightbox' data-img-width='{$file->width}' data-img-height='{$file->height}' title='{$file->title}'") . '</li>';
} else {
$filesHtml .= "<li class='file file-{$file->extension}'>";
$filesHtml .= html::a(helper::createLink('file', 'download', "fileID={$file->id}&mouse=left"), $file->title, "target='_blank' title='{$file->title}'");
$filesHtml .= "<span class='file-download'><i class='icon-download'></i> " . $file->downloads . "</span>";
$filesHtml .= "<span class='file-md5'>";
$filesHtml .= html::a('javascript:void(0)', 'MD5', "class='label' data-toggle='popover' data-placement='bottom' data-content='{$fileMD5}'");
$filesHtml .= '</span></li>';
}
}
echo "<ul class='files-list clearfix'>" . $imagesHtml . $filesHtml . '</ul>';
}
示例3: bannerForm
function bannerForm($name, $path, $config)
{
if (isset($config["specials.{$name}"]) && file_exists(APPPATH . '../../..' . $path . $config["specials.{$name}"])) {
echo html::image('..' . $path . $config["specials.{$name}"]) . '<br/>';
}
$attributes = array('name' => $name, 'class' => 'banner_upload');
echo form::upload($attributes, $path);
}
示例4: onDefault
public function onDefault()
{
$site = array();
$site['name'] = zotop::config('zotop.site.name');
$site['totalsize'] = zotop::config('zotop.ftp.size');
$site['totalsize'] = (int) $site['totalsize'] == 0 ? '--' : format::byte($site['totalsize']);
$database = array();
$database['size'] = zotop::db()->size();
$database['size'] = format::byte($database['size']);
$page['title'] = '控制中心';
$page['css'][] = url::module() . '/admin/css/main.css';
zotop::add('zotop.main.main', array(&$this, 'notepad'));
zotop::add('zotop.main.main', array(&$this, 'mylog'));
page::header($page);
page::top();
page::navbar($this->navbar(), 'main');
page::add('');
page::add('<div id="user" class="clearfix">');
page::add(' <div id="userface"><span class="image">' . html::image(zotop::user('image')) . '</span></div>');
page::add(' <div id="userinfo">');
page::add(' <h2 id="welcome">欢迎您,' . zotop::user('name') . ' <span id="sign">' . zotop::user('sign') . '</span></h2>');
page::add(' <div id="login">登录时间:' . time::format(zotop::user('logintime')) . ' 登录次数:' . zotop::user('loginnum') . ' 登录IP:' . zotop::user('loginip') . '</div>');
//加载hook
zotop::run('zotop.main.action');
page::add('');
page::add('</div>');
page::add('<div class="grid-m-s">');
page::add('<div class="col-main">');
page::add('<div class="col-main-inner">');
zotop::run('zotop.main.main');
page::add('</div>');
page::add('</div>');
page::add('<div class="col-sub">');
zotop::run('zotop.main.sub');
block::header(array('title' => '网站信息', 'action' => '<a class="more" href="' . zotop::url('zotop/info/site') . '">详细</a>'));
echo '<table class="table">';
echo '<tr><td class="w80">网站名称:</td><td>' . $site['name'] . '</td></tr>';
echo '<tr><td class="w80">空间占用:</td><td>' . $site['totalsize'] . '</td></tr>';
echo '<tr><td class="w80">已上传文件:</td><td></td></tr>';
echo '<tr><td class="w80">数据库大小:</td><td>' . $database['size'] . '</td></tr>';
echo '</table>';
block::footer();
block::header(array('title' => '系统信息', 'action' => '<a class="more" href="' . zotop::url('zotop/main/system') . '">详细</a>'));
echo '<table class="table">';
echo '<tr><td class="w80">程序版本:</td><td>' . zotop::config('zotop.version') . '</td></tr>';
echo '<tr><td class="w80">程序设计:</td><td>' . zotop::config('zotop.author') . '</td></tr>';
echo '<tr><td class="w80">程序开发:</td><td>' . zotop::config('zotop.authors') . '</td></tr>';
echo '<tr><td class="w80">官方网站:</td><td><a href="' . zotop::config('zotop.homepage') . '" target="_blank">' . zotop::config('zotop.homepage') . '</a></td></tr>';
echo '<tr><td class="w80">安装时间:</td><td>' . zotop::config('zotop.install') . '</td></tr>';
echo '</table>';
block::footer();
page::add('</div>');
page::add('</div>');
page::bottom('<span class="zotop-tip">上次登录时间:' . time::format(zotop::user('logintime')) . '</span>');
page::footer();
}
示例5: action_index
public function action_index()
{
if ($user = Arr::get($_GET, 'user') or $user = Arr::get($_GET, 'user_id')) {
$user_id = $user;
}
$gallery_detail = ORM::factory('photo')->where('moderation_status_id', '=', '2')->where('user_id', '=', $user)->with('category')->with('user')->find_all();
$json = array();
foreach ($gallery_detail as $key => $photo) {
$json[] = array('category' => html::anchor('categories/' . $photo->category->id, $photo->category->name), 'share' => html::anchor('#', 'Share this photo'), 'current' => $key + 1, 'total' => $gallery_detail->count(), 'photo' => html::image(Helper_Photos::get($photo, 'medium')), 'display_name' => html::anchor('profile/' . $photo->user->username, $photo->user->display_name), 'name' => $photo->name, 'caption' => $photo->caption, 'tags' => Helper_Tags::print_tags($photo->tags->find_all()));
}
$this->resource = $json;
}
示例6: __list
public function __list()
{
$html = "<ul style='list-style:none'>";
$directory = APPPATH . '/views/snippets/';
$files = zest::dir_to_array($directory);
foreach ($files as $file) {
$filename = str_replace('.zest', '', $file);
$display_name = ucwords(str_replace('_', ' ', $filename));
$html .= "<li style='padding-left:45px !important;' class='snippet'><div class='right'> " . html::anchor('admin/snippets/edit/' . $filename, html::image('zest/images/icon_pencil.png')) . "</div><span>" . $display_name . "</span></li>";
// tidy up: close the handler
}
$html .= "</ul>";
return $html;
}
示例7: smileys
/**
* Return text with smileys
*
* @param string $text
*/
public static function smileys($text)
{
static $smileys;
// Load smileys
if (!is_array($smileys)) {
$smileys = array();
$config = Kohana::config('site.smiley');
if (!empty($config)) {
$url = url::base() . $config['dir'] . '/';
foreach ($config['smileys'] as $name => $smiley) {
$smileys[$name] = html::image(array('src' => $url . $smiley['src'], 'class' => 'smiley'), $name);
}
}
}
// Smile!
return empty($smileys) ? $text : str_replace(array_keys($smileys), $smileys, $text);
}
示例8: printFiles
/**
* Print files.
*
* @param object $files
* @access public
* @return void
* @todo fix style.
*/
public function printFiles($files)
{
if (empty($files)) {
return false;
}
$imagesHtml = '';
$filesHtml = '';
foreach ($files as $file) {
$file->title = $file->title . ".{$file->extension}";
if ($file->isImage) {
$imagesHtml .= "<li class='file-image file-{$file->extension}'>" . html::a(helper::createLink('file', 'download', "fileID={$file->id}&mouse=left"), html::image($file->smallURL), "target='_blank' data-toggle='lightbox' data-width='{$file->width}' data-height='{$file->height}'") . '</li>';
} else {
$filesHtml .= "<li class='file file-{$file->extension}'>" . html::a(helper::createLink('file', 'download', "fileID={$file->id}&mouse=left"), $file->title, "target='_blank'") . '</li>';
}
}
echo "<ul class='article-files clearfix'>" . $imagesHtml . $filesHtml . '</ul>';
}
示例9: onDefault
public function onDefault()
{
$User = zotop::model('zotop.user');
$list = $User->getAll(array('select' => '*', 'where' => array('modelid', '=', 'system'), 'orderby' => 'logintime desc'));
$page['title'] = '系统用户管理';
page::header($page);
page::top();
page::navbar($this->navbar());
form::header();
$column = array();
$column['status w30 center'] = '状态';
$column['username'] = '账号名称';
$column['name'] = '姓名';
$column['loginnum'] = '登录次数';
$column['loginip w120'] = '登录IP';
$column['logintime w150'] = '登录时间';
$column['manage lock'] = '锁定';
$column['manage rename'] = '修改密码';
$column['manage edit'] = '编辑';
$column['manage delete'] = '删除';
table::header('list', $column);
foreach ($list as $user) {
$user['status-icon'] = $user['status'] == -1 ? html::image(url::theme() . '/image/icon/lock.gif') : html::image(url::theme() . '/image/icon/user.gif');
$column = array();
$column['status w30 center'] = $user['status-icon'];
$column['username'] = '<a><b>' . $user['username'] . '</b></a><h5>' . $user['email'] . '</h5>';
$column['name w60'] = $user['name'];
$column['loginnum w60'] = $user['loginnum'];
$column['loginip w120'] = $user['loginip'];
$column['logintime w150'] = time::format($user['logintime']);
if ($user['status'] == -1) {
$column['manage lock'] = '<a class="confirm" href="' . zotop::url('zotop/user/lock', array('id' => $user['id'], 'status' => 0)) . '">解锁</a>';
} else {
$column['manage lock'] = '<a class="confirm" href="' . zotop::url('zotop/user/lock', array('id' => $user['id'])) . '">锁定</a>';
}
$column['manage rename'] = '<a href="' . zotop::url('zotop/user/changepassword', array('id' => $user['id'])) . '">修改密码</a>';
$column['manage edit'] = '<a href="' . zotop::url('zotop/user/changeinfo', array('id' => $user['id'])) . '">编辑</a>';
$column['manage delete'] = '<a>删除</a>';
table::row($column);
}
table::footer();
form::buttons();
form::footer();
page::bottom();
page::footer();
}
示例10: img
/**
* Methode : pour afficher l'img du badge
*/
public function img($type, $valeur)
{
$conf = Kohana::config('users.badge.' . $type);
$img = 0;
if ($conf[1] <= $valeur && $conf[2] > $valeur) {
$img = 1;
} elseif ($conf[2] <= $valeur && $conf[3] > $valeur) {
$img = 2;
} elseif ($conf[3] <= $valeur && $conf[4] > $valeur) {
$img = 3;
} elseif ($conf[4] <= $valeur && $conf[5] > $valeur) {
$img = 4;
} elseif ($conf[5] <= $valeur && $conf[6] > $valeur) {
$img = 5;
} elseif ($conf[6] < $valeur) {
$img = 6;
}
return html::image('images/medal/' . $img . '.png', array('width' => 15));
}
示例11: onDefault
public function onDefault()
{
$role = zotop::model('zotop.role');
$list = $role->getAll(array('select' => '*', 'orderby' => 'order desc'));
$page['title'] = '系统用户管理';
//zotop::dump($role->db()->lastsql());
page::header($page);
page::top();
page::navbar($this->navbar());
form::header();
$column = array();
$column['status w30 center'] = '状态';
$column['id w30 center'] = '编号';
$column['rolename'] = '角色名称';
$column['manage lock'] = '锁定';
$column['manage edit'] = '编辑';
$column['manage delete'] = '删除';
table::header('list', $column);
foreach ($list as $role) {
$role['status-icon'] = $role['status'] == -1 ? html::image(url::theme() . '/image/icon/lock.gif') : html::image(url::theme() . '/image/icon/ok.gif');
$column = array();
$column['status w30 center'] = $role['status-icon'];
$column['id w30 center'] = $role['id'];
$column['rolename'] = '<a><b>' . $role['name'] . '</b></a><h5>' . $role['description'] . '</h5>';
if ($role['status'] == -1) {
$column['manage lock'] = '<a class="confirm" href="' . zotop::url('zotop/role/lock', array('id' => $role['id'], 'status' => 0)) . '">解锁</a>';
} else {
$column['manage lock'] = '<a class="confirm" href="' . zotop::url('zotop/role/lock', array('id' => $role['id'])) . '">锁定</a>';
}
$column['manage edit'] = '<a href="' . zotop::url('zotop/role/edit', array('id' => $role['id'])) . '">编辑</a>';
$column['manage delete'] = '<a>删除</a>';
table::row($column);
}
table::footer();
form::buttons();
form::footer();
page::bottom();
page::footer();
}
示例12: render
public function render()
{
if (!$this->config['height']) {
throw new Kohana_User_Exception("Gallery not implemented correctly", "Height has not been set. Please call <code>$banner->set_height({$height})</code>");
} else {
if (!$this->config['width']) {
throw new Kohana_User_Exception("Gallery not implemented correctly", "Width has not been set. Please call <code>$banner->set_width({$width})</code>");
} else {
if ($this->config['view']) {
return $this->render_to_view($this->config['view']);
} else {
$html = "";
if ($this->config['thickbox']) {
$x = "thickbox";
}
$images = $this->get_formatted_image_array();
foreach ($images as $name => $filename) {
$html .= html::file_anchor('assets/images/' . $filename, html::image('index.php/image/crop/' . $this->config['width'] . "/" . $this->config['height'] . "/" . $filename, array('alt' => $name, 'class' => $this->config['class'])), array('class' => $x, 'title' => $name));
}
return $html;
}
}
}
}
示例13: foreach
if ($category_info[2] != NULL && file_exists(Kohana::config('upload.relative_directory') . '/' . $category_info[2])) {
$category_image = html::image(array('src' => Kohana::config('upload.relative_directory') . '/' . $category_info[2]));
$color_css = '';
}
echo '<li><a href="#" id="cat_' . $category . '"><span ' . $color_css . '>' . $category_image . '</span><span class="category-title">' . $category_title . '</span></a>';
// Get Children
echo '<div class="hide" id="child_' . $category . '">';
if (sizeof($category_info[3]) != 0) {
echo '<ul>';
foreach ($category_info[3] as $child => $child_info) {
$child_title = $child_info[0];
$child_color = $child_info[1];
$child_image = '';
$color_css = 'class="swatch" style="background-color:#' . $child_color . '"';
if ($child_info[2] != NULL && file_exists(Kohana::config('upload.relative_directory') . '/' . $child_info[2])) {
$child_image = html::image(array('src' => Kohana::config('upload.relative_directory') . '/' . $child_info[2]));
$color_css = '';
}
echo '<li style="padding-left:20px;"><a href="#" id="cat_' . $child . '"><span ' . $color_css . '>' . $child_image . '</span><span class="category-title">' . $child_title . '</span></a></li>';
}
echo '</ul>';
}
echo '</div></li>';
}
?>
</ul>
</div>
<!-- / category filters -->
<?php
// Action::main_sidebar - Add Items to the Entry Page Sidebar
示例14: printFiles
/**
* Print files of for a reply.
*
* @param object $thread
* @param bool $canManage
* @access public
* @return void
*/
public function printFiles($reply, $canManage)
{
if (empty($reply->files)) {
return false;
}
$imagesHtml = '';
$filesHtml = '';
foreach ($reply->files as $file) {
if ($file->isImage) {
$imagesHtml .= "<li class='file-image file-{$file->extension}'>" . html::a(helper::createLink('file', 'download', "fileID={$file->id}&mose=left"), html::image($file->fullURL), "target='_blank' data-toggle='lightbox'");
if ($canManage) {
$imagesHtml .= "<span class='file-actions'>" . html::a(helper::createLink('reply', 'deleteFile', "replyID={$reply->id}&fileID={$file->id}"), "<i class='icon-trash'></i>", "class='deleter'") . '</span>';
}
$imagesHtml .= '</li>';
} else {
$file->title = $file->title . ".{$file->extension}";
$filesHtml .= "<li class='file file-{$file->extension}'>" . html::a(helper::createLink('file', 'download', "fileID={$file->id}&mouse=left"), $file->title, "target='_blank'");
if ($canManage) {
$filesHtml .= "<span class='file-actions'>" . html::a(helper::createLink('reply', 'deleteFile', "replyID={$reply->id}&fileID={$file->id}"), "<i class='icon-trash'></i>", "class='deleter'") . '</span>';
}
$filesHtml .= '</li>';
}
}
echo "<ul class='files-list clearfix'><li class='files-list-heading'>" . $this->lang->reply->files . '</li>' . $imagesHtml . $filesHtml . '</ul>';
}
示例15: isset
?>
</div></div>
<div id='headTitle'>
<div class="wrapper">
<?php
$logoSetting = isset($this->config->site->logo) ? json_decode($this->config->site->logo) : new stdclass();
?>
<?php
$logo = isset($logoSetting->{$template}->themes->{$theme}) ? $logoSetting->{$template}->themes->{$theme} : (isset($logoSetting->{$template}->themes->all) ? $logoSetting->{$template}->themes->all : false);
?>
<?php
if ($logo) {
?>
<div id='siteLogo'>
<?php
echo html::a($this->config->webRoot, html::image($logo->webPath, "class='logo' title='{$this->config->company->name}'"));
?>
</div>
<?php
} else {
?>
<div id='siteName'><h2><?php
echo $config->site->name;
?>
</h2></div>
<?php
}
?>
</div>
</div>
<?php