当前位置: 首页>>代码示例>>PHP>>正文


PHP smarty_function_html_image函数代码示例

本文整理汇总了PHP中smarty_function_html_image函数的典型用法代码示例。如果您正苦于以下问题:PHP smarty_function_html_image函数的具体用法?PHP smarty_function_html_image怎么用?PHP smarty_function_html_image使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了smarty_function_html_image函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: smarty_function_html_image

            ?>
      <th style="display:none"><?php 
            echo $this->_tpl_vars['string'];
            ?>
 <?php 
            echo smarty_function_html_image(array('href' => "javascript:hideColumn(" . $this->_tpl_vars['column'] . ",'" . $this->_tpl_vars['cID'] . "');", 'file' => "images/x-icon.gif"), $this);
            ?>
</th>
    <?php 
        } else {
            ?>
      <th><?php 
            echo $this->_tpl_vars['string'];
            ?>
 <?php 
            echo smarty_function_html_image(array('href' => "javascript:hideColumn(" . $this->_tpl_vars['column'] . ",'" . $this->_tpl_vars['cID'] . "');", 'file' => "images/x-icon.gif"), $this);
            ?>
</th>
    <?php 
        }
    }
    unset($_from);
}
?>

    </tr>
</thead>

<?php 
if (count($_from = (array) $this->_tpl_vars['data'])) {
    foreach ($_from as $this->_tpl_vars['resultID'] => $this->_tpl_vars['value']) {
开发者ID:window98lsq,项目名称:autoweb,代码行数:31,代码来源:%25%25A4^A48^A4855752%25%25smokeruns_ts.tpl.php

示例2: array

$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['admBaitaiAgencyHeader'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
</head>
<body>

<div id="KingCol">
<h1 class="SiteName">代理店媒体CHK管理画面</h1>
<div id="QueenCol" class="ClearBox">

<div id="LeftCol">
<h3 class="MenuH3">サイト概要</h3>
<ul class="MenuBox">
<li><?php 
echo smarty_function_html_image(array('file' => "./img/sitelogo.gif", 'border' => '0', 'width' => '190'), $this);
?>
</li>
<li>運営会社:<?php 
echo $this->_tpl_vars['config']['define']['COMPANY_NAME'];
?>
</li>
</ul>
</div>

<div id="RightCol">
<div id="RightColFloatHack">

<h2 id="LoginTitle">Login...</h2>
<?php 
if (count($this->_tpl_vars['errMsg'])) {
开发者ID:noriotakei,项目名称:suraimu,代码行数:31,代码来源:%%05^05C^05C566E2%%index.tpl.php

示例3: smarty_function_html_image

                <th>画像ID</th>
                <td style="text-align: left;font-size:large;">
                    <b><?php 
    echo $this->_tpl_vars['param']['id'];
    ?>
</b>
                </td>
                </tr>
                <tr>
                <th>画像</th>
                <td style="text-align: left;">
                <?php 
    if ($this->_tpl_vars['param']['extension_type'] == IMAGETYPE_SWF || $this->_tpl_vars['param']['extension_type'] == IMAGETYPE_SWC) {
        ?>
                    <?php 
        echo smarty_function_html_image(array('file' => "./img/thumbnails/swf.jpg", 'width' => '150', 'height' => '94', 'alt' => $this->_tpl_vars['param']['name']), $this);
        ?>

                <?php 
    } else {
        ?>
                    <img src="./<?php 
        echo $this->_tpl_vars['imagePath'];
        echo $this->_tpl_vars['param']['file_name'];
        ?>
.<?php 
        echo $this->_tpl_vars['extensionTypeArray'][$this->_tpl_vars['param']['extension_type']];
        ?>
?<?php 
        echo time();
        ?>
开发者ID:noriotakei,项目名称:suraimu,代码行数:31,代码来源:%%7A^7AB^7AB5241D%%imageUpd.tpl.php

示例4: smarty_function_icon


//.........这里部分代码省略.........
                            $params['file'] = "styles/{$style_base}/{$v}";
                        } else {
                            $params['file'] = $v;
                        }
                    }
                    break;
                case '_type':
                    switch ($v) {
                        case 'absolute_uri':
                            $params['path_prefix'] = $base_url;
                            break;
                        case 'absolute_path':
                            $params['path_prefix'] = $url_path;
                            break;
                    }
                    break;
                case '_notag':
                    $notag = $v == 'y';
                    break;
                case '_menu_text':
                    $menu_text = $v == 'y';
                    $menu_icon = !isset($params['_menu_icon']) || $params['_menu_icon'] == 'y';
                    break;
                case '_tag':
                    $tag = $v;
                    break;
                case '_confirm':
                    if ($prefs['javascript_enabled'] == 'y') {
                        $params['onclick'] = "return confirm('" . str_replace("'", "\\'", $v) . "');";
                    }
                    break;
            }
            unset($params[$k]);
        }
    }
    // default values for some params
    if (!isset($params['border'])) {
        $params['border'] = '0';
    }
    if (isset($params['path_prefix'])) {
        $params['basedir'] = $tikipath;
        $params['file'] = '/' . $params['file'];
    }
    if ($tag == 'img') {
        if (!isset($params['width'])) {
            $params['width'] = $default_width;
        }
        if (!isset($params['height'])) {
            $params['height'] = $default_height;
        }
    }
    if ($notag) {
        $html = $params['path_prefix'] . $params['file'];
    } else {
        // use 'alt' as 'title' if not set
        if (!isset($params['title'])) {
            $params['title'] = $params['alt'];
        }
        // use default class if not set
        if (!isset($params['class'])) {
            $params['class'] = $default_class;
        }
        // remove empty arguments
        foreach ($params as $k => $v) {
            if ($v == '') {
                unset($params[$k]);
            }
        }
        // No need to add a title on a menu icon since there will be the same text just after the icon
        if ($menu_text) {
            $menu_text_val = $params['title'];
            unset($params['title']);
        }
        if ($menu_icon) {
            if ($tag != 'img') {
                $params['src'] = $params['file'];
                unset($params['file']);
                foreach ($params as $k => $v) {
                    $html .= ' ' . htmlspecialchars($k, ENT_QUOTES, 'UTF-8') . '="' . htmlspecialchars($v, ENT_QUOTES, 'UTF-8') . '"';
                }
            }
            switch ($tag) {
                case 'input_image':
                    $html = '<input type="image"' . $html . ' />';
                    break;
                case 'img':
                default:
                    $html = smarty_function_html_image($params, $smarty);
            }
            if ($tag != 'img') {
                // Add a span tag to be able to apply a CSS style on hover for the icon
                $html = "<span>{$html}</span>";
            }
        }
        if ($menu_text) {
            $html = '<div class="iconmenu">' . $html . '<span class="iconmenutext"> ' . $menu_text_val . '</span></div>';
        }
    }
    return $html;
}
开发者ID:Kraiany,项目名称:kraiany_site_docker,代码行数:101,代码来源:function.icon.php

示例5: smarty_core_load_plugins

<?php

/* Smarty version 2.6.19, created on 2012-01-08 12:41:14
   compiled from constructors/message.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_image', 'constructors/message.tpl', 21, false), array('modifier', 'nl2br', 'constructors/message.tpl', 24, false))), $this);
if ($this->_tpl_vars['image'] != '') {
    echo smarty_function_html_image(array('file' => $this->_tpl_vars['image']), $this);
}
if ($this->_tpl_vars['forward'] != '') {
    $this->assign('f', "<br /><br /><div align=\"center\"><a href=\"" . $this->_tpl_vars['forward'] . "\">" . $this->_tpl_vars['forward_text'] . "</a></div>");
}
?>
<table width="400" align="center">
<tr><td><?php 
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "generic/title1.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['title'], 'content' => is_array($_tmp = $this->_tpl_vars['message'] . " " . $this->_tpl_vars['f']) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
</td></tr>
</table>
开发者ID:codeministry,项目名称:wind-ng-mc,代码行数:22,代码来源:%%2525^253^253A99EF%%message.tpl.php

示例6: smarty_function_html_image

<?php 
}
?>
</td></tr><tr><td style="font-size:12px;" align="center">
<input type="checkbox" name="p2p" checked="checked" onclick="gmap_refresh();" /><?php 
echo smarty_function_html_image(array('file' => $this->_tpl_vars['img_dir'] . "/gmap/mm_20_orange.png", 'alt' => $this->_tpl_vars['lang']['backbone']), $this);
echo $this->_tpl_vars['lang']['backbone'];
?>

<input type="checkbox" name="aps" checked="checked" onclick="gmap_refresh();" /><?php 
echo smarty_function_html_image(array('file' => $this->_tpl_vars['img_dir'] . "/gmap/mm_20_green.png", 'alt' => $this->_tpl_vars['lang']['aps']), $this);
echo $this->_tpl_vars['lang']['aps'];
?>

<input type="checkbox" name="hs" checked="checked" onclick="gmap_refresh();" /><?php 
echo smarty_function_html_image(array('file' => $this->_tpl_vars['img_dir'] . "/gmap/mm_20_green.png", 'alt' => $this->_tpl_vars['lang']['hs']), $this);
echo $this->_tpl_vars['lang']['hs'];
?>

<input type="checkbox" name="clients" checked="checked" onclick="gmap_refresh();" /><?php 
echo smarty_function_html_image(array('file' => $this->_tpl_vars['img_dir'] . "/gmap/mm_20_blue.png", 'alt' => $this->_tpl_vars['lang']['clients']), $this);
echo $this->_tpl_vars['lang']['clients'];
?>

<input type="checkbox" name="unlinked" onclick="gmap_refresh();" /><?php 
echo smarty_function_html_image(array('file' => $this->_tpl_vars['img_dir'] . "/gmap/mm_20_red.png", 'alt' => $this->_tpl_vars['lang']['unlinked']), $this);
echo $this->_tpl_vars['lang']['unlinked'];
?>

</td></tr>
</table>
开发者ID:codeministry,项目名称:wind-ng-mc,代码行数:31,代码来源:%%9E^9E2^9E2EE575%%gmap_fullmap.tpl.php

示例7: smarty_function_html_image

            ?>
&v=0'>
	<?php 
            echo smarty_function_html_image(array('file' => 'web/images/_err.png', 'border' => '0'), $this);
            ?>

	</a>
	<?php 
        } else {
            ?>
	<a href='rules.php?tab=rfile&cmd=validity&id=<?php 
            echo $this->_tpl_vars['data'][$this->_sections['rule_file']['index']]['rf_id'];
            ?>
&v=1'>
	<?php 
            echo smarty_function_html_image(array('file' => 'web/images/_ok.png', 'border' => '0'), $this);
            ?>

	</a>
	<?php 
        }
        ?>
	</td>
      </tr>
   <?php 
    }
}
?>
</table>

</td></tr>
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:%%0B^0B0^0B0B2A53%%rule_files.tpl.php

示例8: smarty_function_cycle

        $this->_sections['alog']['rownum'] = $this->_sections['alog']['iteration'];
        $this->_sections['alog']['index_prev'] = $this->_sections['alog']['index'] - $this->_sections['alog']['step'];
        $this->_sections['alog']['index_next'] = $this->_sections['alog']['index'] + $this->_sections['alog']['step'];
        $this->_sections['alog']['first'] = $this->_sections['alog']['iteration'] == 1;
        $this->_sections['alog']['last'] = $this->_sections['alog']['iteration'] == $this->_sections['alog']['total'];
        ?>
   <tr bgcolor="<?php 
        echo smarty_function_cycle(array('values' => "#eeeeee,#dddddd"), $this);
        ?>
">
	 <td><a href="javascript:void(0);" OnClick="WindowOpen('reports.php?tab=audit&cmd=show_det&id=<?php 
        echo $this->_tpl_vars['data'][$this->_sections['alog']['index']]['alog_id'];
        ?>
');">
	<?php 
        echo smarty_function_html_image(array('file' => 'web/images/edit.gif', 'border' => '0'), $this);
        ?>

	</a></td>
         <td><?php 
        echo $this->_tpl_vars['data'][$this->_sections['alog']['index']]['source_ip'];
        ?>
</td>
         <td><?php 
        echo $this->_tpl_vars['data'][$this->_sections['alog']['index']]['source_port'];
        ?>
</td>
         <td><?php 
        echo $this->_tpl_vars['data'][$this->_sections['alog']['index']]['date'];
        ?>
</td>
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:%%95^959^9593F15C%%audit_records.tpl.php

示例9: renderInnerOutput

 function renderInnerOutput($context = array())
 {
     global $prefs;
     $smarty = TikiLib::lib('smarty');
     $val = $this->getConfiguration('value');
     $list_mode = !empty($context['list_mode']) ? $context['list_mode'] : 'n';
     if ($list_mode == 'csv') {
         return $val;
         // return the filename
     }
     $pre = '';
     if (!empty($val) && file_exists($val)) {
         $params['file'] = $val;
         $shadowtype = $this->getOption('shadowbox');
         if ($prefs['feature_shadowbox'] == 'y' && !empty($shadowtype)) {
             switch ($shadowtype) {
                 case 'item':
                     $rel = '[' . $this->getItemId() . ']';
                     break;
                 case 'individual':
                     $rel = '';
                     break;
                 default:
                     $rel = '[' . $this->getConfiguration('fieldId') . ']';
                     break;
             }
             $pre = "<a href=\"{$val}\" rel=\"shadowbox{$rel};type=img\">";
         }
         if ($this->getOption('xListSize') || $this->getOption('yListSize') || $this->getOption('xDetailSize') || $this->getOption('yDetailSize')) {
             $image_size_info = getimagesize($val);
         }
         if ($list_mode != 'n') {
             if ($this->getOption('xListSize') || $this->getOption('yListSize')) {
                 list($params['width'], $params['height']) = $this->get_resize_dimensions($image_size_info[0], $image_size_info[1], $this->getOption('xListSize'), $this->getOption('yListSize'));
             }
         } else {
             if ($this->getOption('xDetailSize') || $this->getOption('yDetailSize')) {
                 list($params['width'], $params['height']) = $this->get_resize_dimensions($image_size_info[0], $image_size_info[1], $this->getOption('xDetailSize'), $this->getOption('yDetailSize'));
             }
         }
     } else {
         if ($this->getOption('imageMissingIcon')) {
             $params['file'] = $this->getOption('imageMissingIcon');
             $params['alt'] = 'n/a';
         } else {
             return '';
         }
     }
     $smarty->loadPlugin('smarty_function_html_image');
     $ret = smarty_function_html_image($params, $smarty);
     if (!empty($pre)) {
         $ret = $pre . $ret . '</a>';
     }
     return $ret;
 }
开发者ID:ameoba32,项目名称:tiki,代码行数:55,代码来源:Image.php

示例10: smarty_function_html_image

" size="20" style="ime-mode:disabled;">
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center">
                    <input type="button" name="submit" value="更 新">
            </td>
        </tr>
    </table>
    </form>
    </div>
    <br>
    <hr>
    <br>
<div id="progressbar" style="width: 20%; text-align:center; margin:0 auto 0 auto; display:none;"><?php 
echo smarty_function_html_image(array('file' => "./img/roller.gif"), $this);
?>
 データ受信中です。</div>
<div id="results"></div>
<?php 
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['admFooter'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
</div>
<script language="JavaScript">
<!--
    $(function() {

                $(".datepicker").datepicker({
开发者ID:noriotakei,项目名称:suraimu,代码行数:31,代码来源:%%AB^AB0^AB053E95%%top.tpl.php

示例11: smarty_function_html_image

            ?>
&amp;watch_action=add"><?php 
            echo smarty_function_html_image(array('file' => 'img/icons/icon_watch.png', 'border' => '0', 'alt' => 'monitor this page', 'title' => 'monitor this page'), $this);
            ?>
</a>
		<?php 
        } else {
            ?>
			<a href="tiki-index.php?page=<?php 
            echo is_array($_tmp = $this->_tpl_vars['page']) ? $this->_run_mod_handler('escape', true, $_tmp, 'url') : smarty_modifier_escape($_tmp, 'url');
            ?>
&amp;watch_event=wiki_page_changed&amp;watch_object=<?php 
            echo is_array($_tmp = $this->_tpl_vars['page']) ? $this->_run_mod_handler('escape', true, $_tmp, 'url') : smarty_modifier_escape($_tmp, 'url');
            ?>
&amp;watch_action=remove"><?php 
            echo smarty_function_html_image(array('file' => 'img/icons/icon_unwatch.png', 'border' => '0', 'alt' => 'stop monitoring this page', 'title' => 'stop monitoring this page'), $this);
            ?>
</a>
		<?php 
        }
        ?>
	<?php 
    }
    ?>
	</td>

	<?php 
    if ($this->_tpl_vars['feature_backlinks'] == 'y' && $this->_tpl_vars['backlinks']) {
        ?>
		<td style="text-align:right;width:42px;">
		<form action="tiki-index.php" method="get">
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:746E86FB%%tiki-show_page.tpl.php

示例12: content_562260dc87f239_09371670

    function content_562260dc87f239_09371670($_smarty_tpl)
    {
        if (!is_callable('smarty_function_counter')) {
            include 'D:\\Documents\\Desktop\\Code\\PSD1507\\9_Smarty\\day1017\\smarty\\plugins\\function.counter.php';
        }
        if (!is_callable('smarty_function_cycle')) {
            include 'D:\\Documents\\Desktop\\Code\\PSD1507\\9_Smarty\\day1017\\smarty\\plugins\\function.cycle.php';
        }
        if (!is_callable('smarty_function_html_image')) {
            include 'D:\\Documents\\Desktop\\Code\\PSD1507\\9_Smarty\\day1017\\smarty\\plugins\\function.html_image.php';
        }
        $_config = new Smarty_Internal_Config('config.conf', $_smarty_tpl->smarty, $_smarty_tpl);
        $_config->loadConfigVars(null, 'local');
        ?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>test1</title>
</head>
<body>
	hello world3
	
	<?php 
        $_smarty_tpl->tpl_vars["name"] = new Smarty_variable("Lee", null, 0);
        ?>
	<?php 
        echo $_smarty_tpl->tpl_vars['name']->value;
        ?>

	<?php 
        echo $_smarty_tpl->tpl_vars['username']->value;
        ?>

	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array('start' => 4, 'skip' => 2), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array('start' => 18), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array('print' => false), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array('direction' => 'down'), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	
	
	<!-- 交替循环 -->
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
//.........这里部分代码省略.........
开发者ID:denson7,项目名称:phpstudy,代码行数:101,代码来源:1f1255cb245ec35124576402148aaa26d9a8c21b.file.test3.tpl.php

示例13: smarty_function_icon


//.........这里部分代码省略.........
                $a_onclick = 'onclick="' . $params['onclick'] . '"';
            } else {
                $a_onclick = '';
            }
            //assemble the link from the components
            if ($menu_text) {
                $icon = isset($params['_menu_icon']) && $params['_menu_icon'] === 'y' ? $html : '';
                $html = '<div class="iconmenu">' . $icon . '<span class="iconmenutext"> ' . $a_title . '</span></div>';
            } else {
                $html = "<a class='{$a_class}' {$title_attr} {$a_href} {$a_datatoggle} {$a_onclick}>{$html}</a>";
            }
        }
        //return the icon
        return $html;
    }
    //ICONSET END
    // Handle _ids that contains the real filename and path
    if (strpos($params['_id'], '/') !== false || strpos($params['_id'], '.') !== false) {
        if (($icons_basedir = dirname($params['_id'])) == '') {
            $icons_basedir = $basedirs[0];
        }
        $icons_basedir .= '/';
        if (($pos = strrpos($params['_id'], '.')) !== false) {
            $icons_extension = substr($params['_id'], $pos);
        }
        $params['_id'] = preg_replace('/^' . str_replace('/', '\\/', $icons_basedir) . '|' . $icons_extension . '$/', '', $params['_id']);
    } else {
        $icons_basedir = $basedirs[0] . '/';
    }
    if (!preg_match('/^[a-z0-9_-]+$/i', $params['_id'])) {
        return;
    }
    // Include smarty functions used below
    $smarty->loadPlugin('smarty_function_html_image');
    // auto-detect 'alt' param if not set
    if (!isset($params['alt'])) {
        $alt_pos = ($alt_pos = strrpos($params['_id'], '_')) === false ? 0 : $alt_pos + 1;
        $params['alt'] = tra(ucfirst(substr($params['_id'], $alt_pos)));
    }
    // handle special params and clean unrecognized params
    foreach ($params as $k => $v) {
        if ($k[0] == '_') {
            switch ($k) {
                case '_id':
                    $img_file = $v . $icons_extension;
                    $v = $icons_basedir . $img_file;
                    $themelib = TikiLib::lib('theme');
                    $v2 = $themelib->get_theme_path($current_theme, $current_theme_option, $img_file, 'icons/');
                    if (!empty($v2)) {
                        $params['file'] = $v2;
                    } else {
                        $params['file'] = $v;
                    }
                    break;
                case '_notag':
                    $notag = $v == 'y';
                    break;
                case '_menu_text':
                    $menu_text = $v == 'y';
                    $menu_icon = isset($params['_menu_icon']) && $params['_menu_icon'] == 'y';
                    break;
                case '_tag':
                    $tag = $v;
                    break;
                case '_confirm':
                    if ($prefs['javascript_enabled'] == 'y') {
开发者ID:rjsmelo,项目名称:tiki,代码行数:67,代码来源:function.icon.php

示例14: time

                <a href="./<?php 
                echo $this->_tpl_vars['bannerPath'];
                echo $this->_tpl_vars['val']['file_name'];
                ?>
.<?php 
                echo $this->_tpl_vars['extensionTypeArray'][$this->_tpl_vars['val']['extension_type']];
                ?>
" toptions="type = image, group = 'images', parameters = '<?php 
                echo time();
                ?>
 =1', title=<?php 
                echo $this->_tpl_vars['val']['name'];
                ?>
">
                <?php 
                echo smarty_function_html_image(array('file' => is_array($_tmp = is_array($_tmp = is_array($_tmp = is_array($_tmp = is_array($_tmp = is_array($_tmp = "./") ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['bannerPath']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['bannerPath'])) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['val']['file_name']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['val']['file_name'])) ? $this->_run_mod_handler('cat', true, $_tmp, ".") : smarty_modifier_cat($_tmp, ".")) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['extensionTypeArray'][$this->_tpl_vars['val']['extension_type']]) : smarty_modifier_cat($_tmp, $this->_tpl_vars['extensionTypeArray'][$this->_tpl_vars['val']['extension_type']])) ? $this->_run_mod_handler('cat', true, $_tmp, "?") : smarty_modifier_cat($_tmp, "?")) ? $this->_run_mod_handler('cat', true, $_tmp, time()) : smarty_modifier_cat($_tmp, time()), 'width' => '150', 'height' => '60', 'alt' => $this->_tpl_vars['val']['name']), $this);
                ?>
</a>
            <?php 
            }
            ?>
        </div>
        </td>
        <td><?php 
            echo $this->_tpl_vars['val']['name'];
            ?>
</td>
        <td><?php 
            echo $this->_tpl_vars['categoryList'][$this->_tpl_vars['val']['banner_image_category_id']];
            ?>
</td>
开发者ID:noriotakei,项目名称:suraimu,代码行数:31,代码来源:%%9F^9F7^9F740A74%%list.tpl.php

示例15: smarty_function_icon

function smarty_function_icon($params, $smarty)
{
    if (!is_array($params)) {
        $params = array();
    }
    global $prefs, $tc_theme, $tc_theme_option, $cachelib, $url_path, $base_url, $tikipath, $tikilib;
    if (empty($tc_theme)) {
        $current_style = $prefs['style'];
        $current_style_option = isset($prefs['style_option']) ? $prefs['style_option'] : '';
    } else {
        $current_style = $tc_theme;
        $current_style_option = !empty($tc_theme_option) ? $tc_theme_option : '';
    }
    if (isset($params['_type'])) {
        if ($params['_type'] === 'absolute_uri') {
            $params['path_prefix'] = $base_url;
        } else {
            if ($params['_type'] === 'absolute_path') {
                $params['path_prefix'] = $url_path;
            }
        }
    }
    $serialized_params = serialize(array_merge($params, array($current_style, $current_style_option, isset($_SERVER['HTTPS']))));
    if ($prefs['mobile_feature'] === 'y') {
        $serialized_params .= $prefs['mobile_mode'];
    }
    $language = isset($prefs['language']) ? $prefs['language'] : 'en';
    $cache_key = 'icons_' . $language . '_' . md5($serialized_params);
    if ($cached = $cachelib->getCached($cache_key)) {
        return $cached;
    }
    $basedirs = array('img/icons', 'img/icons/mime');
    $icons_extension = empty($params['_extension']) ? '.png' : '.' . $params['_extension'];
    $tag = 'img';
    $notag = false;
    $default_class = 'icon';
    $default_width = 16;
    $default_height = 16;
    $menu_text = false;
    $menu_icon = false;
    $confirm = '';
    $html = '';
    if (empty($params['_id'])) {
        if (isset($params['_defaultdir']) && $params['_defaultdir'] == 'img/icons/large') {
            $params['_id'] = 'green_question48x48';
        } else {
            $params['_id'] = 'green_question';
        }
    }
    if (!empty($params['_defaultdir'])) {
        array_unshift($basedirs, $params['_defaultdir']);
        if ($params['_defaultdir'] == 'img/icons/large') {
            $default_width = $default_height = strpos($params['_id'], '48x48') !== false ? 48 : 32;
        }
    }
    // Handle _ids that contains the real filename and path
    if (strpos($params['_id'], '/') !== false || strpos($params['_id'], '.') !== false) {
        if (($icons_basedir = dirname($params['_id'])) == '') {
            $icons_basedir = $basedirs[0];
        }
        $icons_basedir .= '/';
        if (($pos = strrpos($params['_id'], '.')) !== false) {
            $icons_extension = substr($params['_id'], $pos);
        }
        $params['_id'] = preg_replace('/^' . str_replace('/', '\\/', $icons_basedir) . '|' . $icons_extension . '$/', '', $params['_id']);
    } else {
        $icons_basedir = $basedirs[0] . '/';
    }
    if (!preg_match('/^[a-z0-9_-]+$/i', $params['_id'])) {
        return;
    }
    // Include smarty functions used below
    $smarty->loadPlugin('smarty_function_html_image');
    // auto-detect 'alt' param if not set
    if (!isset($params['alt'])) {
        $alt_pos = ($alt_pos = strrpos($params['_id'], '_')) === false ? 0 : $alt_pos + 1;
        $params['alt'] = tra(ucfirst(substr($params['_id'], $alt_pos)));
    }
    // handle special params and clean unrecognized params
    foreach ($params as $k => $v) {
        if ($k[0] == '_') {
            switch ($k) {
                case '_id':
                    $v = $icons_basedir . $v . $icons_extension;
                    if ($tikilib != NULL) {
                        $v2 = $tikilib->get_style_path($prefs['style'], $prefs['style_option'], $v);
                    }
                    if (!empty($v2)) {
                        $params['file'] = $v2;
                    } else {
                        $params['file'] = $v;
                    }
                    break;
                case '_notag':
                    $notag = $v == 'y';
                    break;
                case '_menu_text':
                    $menu_text = $v == 'y';
                    $menu_icon = isset($params['_menu_icon']) && $params['_menu_icon'] == 'y';
                    break;
//.........这里部分代码省略.........
开发者ID:jkimdon,项目名称:cohomeals,代码行数:101,代码来源:function.icon.php


注:本文中的smarty_function_html_image函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。