本文整理汇总了PHP中img_url函数的典型用法代码示例。如果您正苦于以下问题:PHP img_url函数的具体用法?PHP img_url怎么用?PHP img_url使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了img_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: respond
public function respond()
{
global $_W;
$rid = $this->rule;
$reply = pdo_fetch("SELECT * FROM " . tablename('vote_reply') . " WHERE `rid`=:rid LIMIT 1", array(':rid' => $rid));
if ($reply == false) {
return $this->respText('活动已经取消...');
}
$nowtime = time();
$endtime = $reply['endtime'] + 86399;
if ($reply['status'] == 0) {
return $this->respText("投票已暂停,请等待...");
}
if ($reply['votelimit'] == 1) {
if ($reply['votetotal'] > 0 && $reply['votenum'] >= $reply['votetotal']) {
return $this->respText("投票人数已满,活动结束...");
}
} else {
if ($reply['starttime'] > $nowtime) {
return $this->respText("投票未开始,请等待...");
} elseif ($endtime < $nowtime) {
return $this->respText("投票已结束...");
} else {
// if ($reply['status'] != 1) {
// return $this->respText("投票已暂停,请等待...");
// }
}
}
return $this->respNews(array('Title' => $reply['title'], 'Description' => $reply['description'], 'PicUrl' => img_url($reply['thumb']), 'Url' => $this->createMobileUrl("index", array("id" => $rid, 'from_user' => base64_encode(authcode($this->message['from'], 'ENCODE'))))));
}
示例2: tagimg
function tagimg($nom, $alt = '', $x = '', $y = '')
{
if ($x and $y != null) {
return '<img src="' . img_url($nom) . '" alt="' . $alt . '" width="' . $x . '" height="' . $y . '" />';
} else {
return '<img src="' . img_url($nom) . '" alt="' . $alt . '" />';
}
}
示例3: define_header
public function define_header()
{
$this->layout->ajouter_js('it_assets/message');
$img = array('grdtitre' => $this->titre, 'logo' => img_url('perenco_intranet/logo_v2.gif'), 'vignette' => img_url($this->imgtop));
foreach ($this->menus as $menu) {
$this->layout->ajouter_menu($menu);
}
//$this->layout->views('perenco/top_menu', $img);
}
示例4: Header
public function Header()
{
global $data;
$style = array('position' => '', 'align' => 'C', 'stretch' => false, 'fitwidth' => true, 'cellfitalign' => '', 'border' => false, 'hpadding' => 'auto', 'vpadding' => 'auto', 'fgcolor' => array(0, 0, 0), 'bgcolor' => false, 'text' => true, 'font' => 'msungstdlight', 'fontsize' => 8, 'stretchtext' => 4);
$image_file = img_url("/banner.jpg");
$this->Image($image_file, 10, 5, 50, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);
// Set font
$this->SetFont('msungstdlight', 'B', 20);
// Title
// $this->Cell(x, y, ' text', 0, false,'x-align' , 0, '', 0, false, 'J', 'B');
$this->Cell(76, 16, ' 蔡阿姨宿舍租賃合約', 0, false, 0, 0, '', 0, false, 'J', 'B');
}
示例5: img
function img($nom, $alt = '', $height = '', $width = '')
{
$h = '';
$w = '';
if (!empty($height)) {
$h = ' height="' . $height . '"';
}
if (!empty($width)) {
$w = ' width="' . $width . '"';
}
if (!empty($alt)) {
$a = ' alt="' . $alt . '" ';
}
return '<img src="' . img_url($nom) . '" ' . $a . ' ' . $h . ' ' . $w . ' />';
}
示例6: getDatas
function getDatas($limitation)
{
$query = $this->lib->getMostViewed(0, $limitation);
$controler = $this->tendoo->getControllersAttachedToModule('blogster');
$final = array();
if ($controler) {
foreach ($query as $q) {
$category_datas = $this->lib->getArticlesRelatedCategory($q['ID']);
foreach ($category_datas as &$i) {
$i['CATEGORY_LINK'] = $this->url->site_url(array($controler[0]['PAGE_CNAME'], 'categorie', $i['CATEGORY_URL_TITLE']));
}
$user = $this->users_global->getUser($q['AUTEUR']);
$final[] = array('link' => $this->url->site_url(array($controler[0]['PAGE_CNAME'], 'lecture', $q['URL_TITLE'])), 'title' => $q['TITLE'], 'content' => $q['CONTENT'], 'date' => $q['DATE'], 'auteur' => $user['PSEUDO'], 'thumb' => $q['IMAGE'], 'categories' => $category_datas);
}
} else {
$final[] = array('LINK' => 'http://tendoo.org/index.php/get-involved/astuces/comment-attacher-un-module', 'TITLE' => 'Blogster non affecté à une page', 'CONTENT' => 'Le module Blogster n\'est pas attaché à une page', 'DATE' => '', 'AUTEUR' => '', 'THUMB' => img_url('Hub_back.png'), 'CATEGORIES' => array());
}
return $final;
}
示例7: __construct
public function __construct()
{
$this->CI =& get_instance();
$this->var['output'] = '';
// Le titre est composé du nom de la méthode et du nom du contrôleur
// La fonction ucfirst permet d'ajouter une majuscule
$this->var['titre'] = ucfirst($this->CI->router->fetch_method()) . ' - ' . ucfirst($this->CI->router->fetch_class());
//l'icon du site
$this->var['icon'] = img_url('perenco1/favicon.ico');
// Nous initialisons la variable $charset avec la même valeur que
// la clé de configuration initialisée dans le fichier config.php
$this->var['charset'] = $this->CI->config->item('charset');
$this->var['css'] = array();
$this->var['js'] = array();
$this->var['logo'] = img_url('perenco_intranet/logo_v2.gif');
$this->var['vignette'] = img_url('perenco_intranet/vignette.jpg');
$this->var['menu'] = array();
// $this->var['sous_menu'] = array();
}
示例8: get_res
/**
* 获取广告数据
**/
public function get_res()
{
$fiel_name = $this->php_file();
if ($fiel_name === false) {
return false;
}
$admin_agency_id = agency_id();
$res = $this->db->getAll("SELECT position_id,id,keyword,particulars,url,img,width,height,admin_agency_id,file,ad_name FROM " . $this->ecs->table('ad_new') . " WHERE file like '%,{$fiel_name},%' AND start = 1 AND admin_agency_id = {$admin_agency_id}");
//$res = $this->db->getAll("SELECT position_id,id,keyword,particulars,url,img,width,height,admin_agency_id,file,ad_name FROM ".
//$this->ecs->table('ad_new')." WHERE file like '%,$fiel_name,%' AND start = 1");
if (empty($res)) {
return false;
}
$return_arr = array();
foreach ($res as $key => $value) {
if (strpos($value['img'], 'http://') === false) {
$value['img'] = img_url() . $value['img'];
}
$return_arr[$value['position_id']] = $value;
}
return $return_arr;
}
示例9: insert_get_ad
function insert_get_ad($arr)
{
$position_name = $arr['cat_name'] . $arr['ad_name'];
/* 替换广告 */
$obj_ad = class_ad::new_ad();
$new_ad = $obj_ad->replace_ad($position_name);
/* end */
$time = gmtime();
if (empty($arr['num']) || $arr['num'] < 1) {
$arr['num'] = 1;
}
if (!empty($arr['cat_name']) && !empty($arr['ad_name'])) {
$sql = 'SELECT a.ad_id, a.position_id, a.media_type, a.ad_link, a.ad_code, a.ad_name, p.ad_width, ' . 'p.ad_height, p.position_style ' . 'FROM ' . $GLOBALS['ecs']->table('ad') . ' AS a ' . 'LEFT JOIN ' . $GLOBALS['ecs']->table('ad_position') . ' AS p ON a.position_id = p.position_id ' . "WHERE enabled = 1 AND start_time <= '" . $time . "' AND end_time >= '" . $time . "' " . "AND p.position_name = '" . $position_name . "' " . 'ORDER BY a.ad_id ASC LIMIT ' . $arr['num'];
$res = $GLOBALS['db']->GetAll($sql);
} else {
echo "cat_goods.lbi缺少参数";
}
foreach ($res as $idx => $row) {
switch ($row['media_type']) {
case 0:
// 图片广告
$res[$idx]['link'] = urlencode($row["ad_link"]);
$res[$idx]['src'] = strpos($row['ad_code'], 'http://') === false && strpos($row['ad_code'], 'https://') === false ? img_url() . DATA_DIR . "/afficheimg/{$row['ad_code']}" : $row['ad_code'];
break;
}
}
$need_cache = $GLOBALS['smarty']->caching;
$GLOBALS['smarty']->caching = false;
$GLOBALS['smarty']->assign('ad_res', $res);
$GLOBALS['smarty']->assign('type', $arr['type']);
$GLOBALS['smarty']->assign('media_type', $arr['media_type']);
$val = $GLOBALS['smarty']->fetch('library/get_ad.lbi');
$GLOBALS['smarty']->caching = $need_cache;
if ($position_name != $new_ad) {
return $new_ad;
}
return $val;
}
示例10: slide_img
function slide_img()
{
header('Content-type:text/javascript; $charset=iso-8859-1');
$id = $_POST['actu'];
$actu = $this->doctrine->em->getRepository("Entities\\intranet\\Actualite")->findOneBy(array("idactualite" => $id));
$ret = array();
if ($actu) {
$ret["success"] = true;
$ret["title"] = $actu->getTitre();
if (strlen($actu->getContenu()) > 660) {
$contenu = character_limiter($actu->getContenu(), 660);
$ret['suite'] = array("lien" => base_url() . "working_area", "lib" => ">> Lire la suite");
} else {
$contenu = $actu->getContenu();
$ret['suite'] = "";
}
$ret["contenu"] = $contenu;
$ret["image"] = img_url("actu/" . $actu->getLienPhoto());
} else {
$ret["success"] = false;
}
echo json_encode($ret);
}
示例11: respond
public function respond()
{
global $_W;
$rid = $this->rule;
$sql = "SELECT * FROM " . tablename('weisrc_dragonboat_reply') . " WHERE `rid`=:rid LIMIT 1";
$row = pdo_fetch($sql, array(':rid' => $rid));
$from_user = $this->message['from'];
if ($row == false) {
return $this->respText("活动已取消...");
}
if ($row['status'] == 0) {
return $this->respText("活动暂停,请稍后...");
}
if ($row['starttime'] > time()) {
return $this->respText("活动未开始,请等待...");
}
$endtime = $row['endtime'] + 68399;
if ($endtime < time()) {
return $this->respNews(array('Title' => $row['end_theme'], 'Description' => $row['end_instruction'], 'PicUrl' => img_url($row['end_picurl']), 'Url' => $this->createMobileUrl('index', array('id' => $rid))));
} else {
return $this->respNews(array('Title' => $row['title'], 'Description' => $row['description'], 'PicUrl' => img_url($row['start_picurl']), 'Url' => $this->createMobileUrl('index', array('id' => $rid))));
}
}
示例12: word_limiter
echo word_limiter($C['CONTENT'], 20);
?>
</a></p>
<small class=""> <span class="text-muted"><a href="<?php
echo get_instance()->url->site_url(array('admin', 'open', 'modules', $MODULE['namespace'], 'edit', $ARTICLE[0]['ID']));
?>
"><i class="fa fa-share"></i> <?php
echo $ARTICLE[0]['TITLE'];
?>
</a></span></small>
</div>
<?php
} else {
$AUTEUR = get_user($C['AUTEUR'], 'as_id');
$AUTEUR_METAS = get_user_meta('all', $C['AUTEUR'], 'as_id');
$avatar = return_if_array_key_exists('avatar_link', $AUTEUR_METAS) ? return_if_array_key_exists('avatar_link', $AUTEUR_METAS) : img_url('avatar_default.jpg');
?>
<div class="panel-body">
<div class="clearfix m-b"> <small class="text-muted pull-right"><?php
echo $timespan;
?>
</small> <a href="#" class="thumb-sm pull-left m-r"> <img src="<?php
echo $avatar;
?>
" class="img-circle"> </a>
<div class="clear"> <a href="#"><strong><?php
echo $AUTEUR['PSEUDO'];
?>
</strong></a> <small class="block text-muted"><?php
echo return_if_array_key_exists('town', $AUTEUR_METAS) != '' && return_if_array_key_exists('state', $AUTEUR_METAS) != '' ? return_if_array_key_exists('town', $AUTEUR_METAS) . ', ' . return_if_array_key_exists('state', $AUTEUR_METAS) : __('Unknow');
?>
示例13: get
<body cz-shortcut-listen="true" id="backgroundLogin" >
<section class="thinwrapper stretch">
<section class="hbox stretch">
<footer id="footer">
<div class="text-center padder clearfix">
<p>
<small><a href="https://github.com/Blair2004/tendoo-cms"><?php
echo get('core_version');
?>
</a> © 2015</small>
</p>
</div>
</footer>
<img src="<?php
echo img_url($this->instance->tendoo->getBackgroundImage());
?>
" style="width:100%;float:left">
<section id="content" class="wrapper-md animated fadeInDown scrollable">
<section class="wrapper">
<section class="panel">
<div class="wizard clearfix">
<ul class="steps">
<li data-target="#step1"><span class="badge">1</span>Accueil</li>
<li data-target="#step2"><span class="badge">2</span>Base de données</li>
<li data-target="#step3"><span class="badge">3</span>Options</li>
<li data-target="#step4" class="active"><span class="badge badge-info">4</span>Fin de l'installation</li>
</ul>
<div class="actions">
<a href="<?php
echo $this->instance->url->main_url();
示例14: site_url
echo $obj['id'];
?>
"
title="flip Storyboard" href="#"></a>
<div class="m-l-10 flip_sb" data-card-id="<?php
echo $obj['id'];
?>
">
<a href="<?php
echo site_url('storyboard/view/' . $obj['id']);
?>
">
<div class="tiles white cards text-center pagination-centered" style="position:relative;">
<?php
echo '<img src="' . img_url('empty_template_start_' . $obj["start_end_template"] . '.png') . '" style="width:100%; height:100%;" />';
if ($obj['start_end_template'] == 1) {
if (!empty($obj['start_image'])) {
echo '<img src="' . $obj["start_image"] . '" style="width:90px; height:80px; position:absolute; position:absolute; top:27px; left:1px" />';
}
if (!empty($obj['title'])) {
echo '<span style="position:absolute; position:absolute; top:56px; left:100px; font-family:verdana; font-size:12px; line-height:15px; color:#fff; text-align:center; width:190px; display:inline-block;">' . $obj['title'] . '</span>';
}
if (!empty($obj['description'])) {
echo '<div style="position:absolute; position:absolute; top:114px; left:130px; font-family:verdana; font-size:9px; line-height:12px; color:#666; text-align:left; width:156px; height:75px; overflow:hidden; display:inline-block;">' . $obj['description'] . '</div>';
}
}
if ($obj['start_end_template'] == 2) {
if (!empty($obj['start_image'])) {
echo '<img src="' . $obj['start_image'] . '" style="width:135px; height:135px; border-radius:50%; position:absolute; top:45px; left:15px" />';
}
示例15: show_mensage
public function show_mensage()
{
$html = '';
$html .= '<div id="div_erro" class="conteudo display_none">';
$html .= '<div id="messageErro"></div>';
$html .= '</div>';
if (count($this->_mensagens) > 0) {
foreach ($this->_mensagens as $mensagem) {
$html .= '<div class="conteudo mensage_flash">';
if ($mensagem['tipo'] === 'success') {
$html .= '<div class="mensagem_sucesso">';
$html .= '<div class="mensagem cor_ffffff" style="text-transform: uppercase;">';
$html .= '<div class="icone_mensagens"><img src="' . img_url('icone_sucesso.png') . '"></div>';
$html .= $mensagem['texto'];
$html .= '</div>';
$html .= '</div>';
} else {
$html .= '<div class="mensagem_erro">';
$html .= '<div class="mensagem cor_000000" style="text-transform: uppercase;">';
$html .= '<div class="icone_mensagens"><img src="' . img_url('icone_alerta.png') . '"></div>';
$html .= $mensagem['texto'];
$html .= '</div>';
$html .= '</div>';
}
$html .= '</div>';
}
$this->_clear_mensage();
}
echo $html;
}