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


PHP Html::image方法代码示例

本文整理汇总了PHP中Html::image方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::image方法的具体用法?PHP Html::image怎么用?PHP Html::image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Html的用法示例。


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

示例1: overviewImage

 public function overviewImage()
 {
     if (!$this->isNewRecord) {
         if ($this->hasIcon()) {
             return Html::image('/uploads/' . $this->icon_file, $this->name);
         }
     }
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:8,代码来源:ContactsMarkers.php

示例2: getImageView

 public function getImageView()
 {
     // die($this->image);
     if (file_exists(Yii::getPathOfAlias('webroot.uploads.manufacturer') . DS . $this->image) && !empty($this->image)) {
         return Html::image($this->getImageUrl('image', 'manufacturer', '100x100'), $this->name, array('class' => 'overview-image'));
     } else {
         return Html::image('http://placehold.it/125x75/&text=No image', $this->name, array('class' => 'overview-image'));
     }
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:9,代码来源:ShopManufacturer.php

示例3: _field

 protected function _field($obj)
 {
     if (empty($obj[$this->get_name()])) {
         return '<td>no image</td>';
     }
     $path = $obj[$this->get_name()];
     if (!is_null($this->_resize)) {
         $path = Resizer::thumb($path, $this->_resize);
     }
     return '<td>' . Html::image($path) . '</td>';
 }
开发者ID:ariol,项目名称:adminshop,代码行数:11,代码来源:Image.php

示例4: image

 /**
  * Output HTML image tag from array
  *
  * @param array $array
  * @param array $param
  * @return string
  */
 public static function image(array $array, $param = array())
 {
     $out = "\n";
     foreach ($array as $key => $item) {
         if (is_array($item)) {
             $out .= Html::image($item[0], $item[1]) . "\n";
         } else {
             $out .= Html::image($item) . "\n";
         }
     }
     return $out;
 }
开发者ID:SerdarSanri,项目名称:arx-core,代码行数:19,代码来源:Load.php

示例5: display_channels

function display_channels($display_channels, $loginstatus)
{
    $current_item = 0;
    foreach ($display_channels as $channel) {
        if ($loginstatus) {
            echo "<div id='is_" . $channel->id . "'>" . $channel->name . "&nbsp;<a href=\"javascript:DeleteIdentifiedSourcesChannel('" . $channel->id . "');\">" . Html::image("media/images/button-markas-inaccurate.png") . "</a></div>";
        } else {
            echo "<div>" . $channel->name . "</div>";
        }
        $current_item++;
    }
}
开发者ID:ultimateprogramer,项目名称:Swiftriver,代码行数:12,代码来源:identifiedsourceswidget.php

示例6: display_channels

function display_channels($display_channels, $loginstatus)
{
    $output = "";
    foreach ($display_channels as $channel) {
        if (!$loginstatus) {
            $output .= $channel->name . ", ";
        } else {
            $output .= $channel->name . "<a href=\"javascript:DeleteTermsToMonitorChannel('" . $channel->id . "');\">" . Html::image("media/images/button-markas-inaccurate.png") . "</a>";
        }
    }
    if (!$loginstatus) {
        rtrim($output, ", ");
    }
    echo $output;
}
开发者ID:ultimateprogramer,项目名称:Swiftriver,代码行数:15,代码来源:termstomonitorwidget.php

示例7: getRowHost

 public static function getRowHost($refer, $ip, $proxy, $host)
 {
     $content = '';
     $p = self::$LANG[mb_strtoupper($host)];
     if ($proxy == "") {
         $content .= "<font color=grey>неизвестно</font>";
     } else {
         $content .= "<a target=_blank href=\"http://www.tcpiputils.com/browse/ip-address/" . ($ip != "" ? $ip : $host) . "\">" . $proxy . "</a>";
     }
     if ($refer != "") {
         $content .= "<br>Язык: " . (!empty($p) ? $p : "<font color=grey>неизвестно</font>");
         if (file_exists(Yii::getPathOfAlias('webroot.stats.flags') . DS . mb_strtolower($p) . ".gif")) {
             $content .= Html::image('/stats/flags/' . mb_strtolower($p) . '.gif', $p);
         }
     }
     return $content;
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:17,代码来源:StatsHelper.php

示例8: array

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'comment-reply-form-' . $model->id, 'action' => '/comments/reply_submit/', 'htmlOptions' => array('class' => 'form', 'name' => 'comment-reply-form')));
?>


<div class="input-group">
    <span class="input-group-addon"><?php 
echo Html::image(Yii::app()->user->avatarPath);
?>
</span>
    <?php 
echo $form->textArea($model, 'text', array('rows' => 3, 'class' => 'form-control', 'placeholder' => $model->getAttributeLabel('text')));
?>
    <?php 
echo $form->error($model, 'text');
?>
</div>
<div class="text-right" style="margin-top:10px;">
    <?php 
echo Html::link(Yii::t('default', 'Ответить'), 'javascript:void(0)', array('onClick' => '$("#comment_' . $model->id . '").comment("reply_submit",{pk:"' . $model->id . '", model:"' . $model->model . '"}); return false;', 'class' => 'btn btn-success'));
?>
</div>

<?php 
$this->endWidget();
开发者ID:buildshop,项目名称:bs-common,代码行数:25,代码来源:_reply_form.php

示例9: showForm


//.........这里部分代码省略.........
        }
        echo "<tr class='tab_bg_1'>";
        echo "<td>" . __('Category') . "</td><td>";
        TaskCategory::dropdown(array('value' => $this->fields["taskcategories_id"], 'rand' => $rand_type, 'entity' => $item->fields["entities_id"], 'condition' => "`is_active` = '1'"));
        echo "</td></tr>\n";
        if (isset($this->fields["state"])) {
            echo "<tr class='tab_bg_1'>";
            echo "<td>" . __('Status') . "</td><td>";
            Planning::dropdownState("state", $this->fields["state"]);
            echo "</td></tr>\n";
        }
        if ($this->maybePrivate()) {
            echo "<tr class='tab_bg_1'>";
            echo "<td>" . __('Private') . "</td>";
            echo "<td>";
            Dropdown::showYesNo('is_private', $this->fields["is_private"]);
            echo "</td>";
            echo "</tr>";
        }
        echo "<tr class='tab_bg_1'>";
        echo "<td>" . __('Duration') . "</td><td>";
        $toadd = array();
        for ($i = 9; $i <= 100; $i++) {
            $toadd[] = $i * HOUR_TIMESTAMP;
        }
        Dropdown::showTimeStamp("actiontime", array('min' => 0, 'max' => 8 * HOUR_TIMESTAMP, 'value' => $this->fields["actiontime"], 'rand' => $rand_time, 'addfirstminutes' => true, 'inhours' => true, 'toadd' => $toadd));
        echo "</td></tr>\n";
        if ($ID <= 0) {
            Document_Item::showSimpleAddForItem($item);
        }
        echo "<tr class='tab_bg_1'>";
        echo "<td>" . __('By') . "</td>";
        echo "<td colspan='2'>";
        echo Html::image($CFG_GLPI['root_doc'] . "/pics/user.png") . "&nbsp;";
        echo _n('User', 'Users', 1);
        $rand_user = mt_rand();
        $params = array('name' => "users_id_tech", 'value' => $ID > -1 ? $this->fields["users_id_tech"] : Session::getLoginUserID(), 'right' => "own_ticket", 'rand' => $rand_user, 'entity' => $item->fields["entities_id"], 'width' => '');
        $params['toupdate'] = array('value_fieldname' => 'users_id', 'to_update' => "user_available{$rand_user}", 'url' => $CFG_GLPI["root_doc"] . "/ajax/planningcheck.php");
        User::dropdown($params);
        echo " <a href='#' onClick=\"" . Html::jsGetElementbyID('planningcheck' . $rand) . ".dialog('open');\">";
        echo "&nbsp;<img src='" . $CFG_GLPI["root_doc"] . "/pics/reservation-3.png'\n             title=\"" . __s('Availability') . "\" alt=\"" . __s('Availability') . "\"\n             class='calendrier'>";
        echo "</a>";
        Ajax::createIframeModalWindow('planningcheck' . $rand, $CFG_GLPI["root_doc"] . "/front/planning.php?checkavailability=checkavailability" . "&itemtype=" . $item->getType() . "&{$fkfield}=" . $item->getID(), array('title' => __('Availability')));
        echo "<br />";
        echo Html::image($CFG_GLPI['root_doc'] . "/pics/group.png") . "&nbsp;";
        echo _n('Group', 'Groups', 1) . "&nbsp;";
        $rand_group = mt_rand();
        $params = array('name' => "groups_id_tech", 'value' => $ID > -1 ? $this->fields["groups_id_tech"] : Dropdown::EMPTY_VALUE, 'condition' => "is_task", 'rand' => $rand_group, 'entity' => $item->fields["entities_id"]);
        $params['toupdate'] = array('value_fieldname' => 'users_id', 'to_update' => "group_available{$rand_group}", 'url' => $CFG_GLPI["root_doc"] . "/ajax/planningcheck.php");
        Group::dropdown($params);
        echo "</td>\n";
        echo "<td>";
        if ($canplan) {
            echo __('Planning');
        }
        if (!empty($this->fields["begin"])) {
            if (Session::haveRight('planning', Planning::READMY)) {
                echo "<script type='text/javascript' >\n";
                echo "function showPlan" . $ID . $rand_text . "() {\n";
                echo Html::jsHide("plan{$rand_text}");
                $params = array('action' => 'add_event_classic_form', 'form' => 'followups', 'users_id' => $this->fields["users_id_tech"], 'groups_id' => $this->fields["groups_id_tech"], 'id' => $this->fields["id"], 'begin' => $this->fields["begin"], 'end' => $this->fields["end"], 'rand_user' => $rand_user, 'rand_group' => $rand_group, 'entity' => $item->fields["entities_id"], 'itemtype' => $this->getType(), 'items_id' => $this->getID());
                Ajax::updateItemJsCode("viewplan{$rand_text}", $CFG_GLPI["root_doc"] . "/ajax/planning.php", $params);
                echo "}";
                echo "</script>\n";
                echo "<div id='plan{$rand_text}' onClick='showPlan" . $ID . $rand_text . "()'>\n";
                echo "<span class='showplan'>";
开发者ID:glpi-project,项目名称:glpi,代码行数:67,代码来源:commonitiltask.class.php

示例10: renderWatermarkImageTag

 public function renderWatermarkImageTag()
 {
     if (file_exists(Yii::getPathOfAlias('webroot') . '/uploads/watermark.png')) {
         return Html::image('/uploads/watermark.png?' . time());
     }
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:6,代码来源:SettingsShopForm.php

示例11: elseif

    } elseif ($data->productLabel['class'] == 'hit') {
        $color = 'purple';
    } else {
        $color = 'blue';
    }
    echo Html::tag('div', array('class' => 'corner-right-' . $color . ' ' . $data->productLabel['class']), '', true);
}
?>

        <?php 
if ($data->mainImage) {
    $imgSource = $data->mainImage->getUrl('270x347');
} else {
    $imgSource = 'http://placehold.it/270x347';
}
echo Html::link(Html::image($imgSource, $data->mainImageTitle, array()), $data->getRelativeUrl(), array('class' => 'product-image'));
?>
        <div class="text-center product-title">
            <?php 
echo Html::link(Html::encode($data->name), $data->getRelativeUrl());
?>
        </div>
        <div class="text-center">
            <span class="price">
                <span><?php 
echo $data->priceRange();
?>
</span>
                <small><?php 
echo Yii::app()->currency->active->symbol;
?>
开发者ID:buildshop,项目名称:bs-client,代码行数:31,代码来源:_view_grid.php

示例12:

')" title="Mark this content as inaccurate"><?php 
echo Html::image("media/images/button-markas-inaccurate.png");
?>
</a>
            <a href="javascript:listController.MarkContentAsCrossTalk('<?php 
echo $content->id;
?>
')" title="Mark this content as cross talk"><?php 
echo Html::image("media/images/button-markas-crosstalk.png");
?>
</a>
            <a href="<?php 
echo $content->link;
?>
" title="View original content" target="_blank"><?php 
echo Html::image("media/images/button-view-article.png");
?>
</a>
        </div>
        <div class="veracity">
            <p class="<?php 
echo $content->source->id;
?>
">
                <?php 
echo $content->source->score == "null" ? "not rated" : $content->source->score . "&#37;";
?>
            </p>
        </div>
    </div>
开发者ID:katembu,项目名称:Swiftriver,代码行数:30,代码来源:contentitem.php

示例13: foreach

?>
            <?php 
foreach ($soal as $row) {
    ?>
                <?php 
    $no++;
    ?>
                <tr>
                    <td><?php 
    echo e($no);
    ?>
</td>
                    <td>
                        <a href="#" class="">
                            <?php 
    echo e(Html::image('uploads/small/' . $row->gambar_kecil, '', ['class' => 'img-responsive', 'style' => 'width:100px;']));
    ?>

                        </a>
                    </td>
                    <td><?php 
    echo e($row->kunci_jawaban);
    ?>
</td>
                    <td></td>
                    <td></td>
                </tr>
            <?php 
}
?>
        </tbody>
开发者ID:jamalapriadi,项目名称:uas-smagawi,代码行数:31,代码来源:ea6661cbd492d5f6cac87ee976f27a05b630b5f0.php

示例14: showTimeline


//.........这里部分代码省略.........
             echo "</p>";
             if (!empty($long_text)) {
                 echo "<p class='read_more'>";
                 echo "<a class='read_more_button'>.....</a>";
                 echo "</p>";
             }
             echo "</div>";
         }
         echo "<div class='b_right'>";
         if (isset($item_i['solutiontypes_id']) && !empty($item_i['solutiontypes_id'])) {
             echo Dropdown::getDropdownName("glpi_solutiontypes", $item_i['solutiontypes_id']) . "<br>";
         }
         if (isset($item_i['taskcategories_id']) && !empty($item_i['taskcategories_id'])) {
             echo Dropdown::getDropdownName("glpi_taskcategories", $item_i['taskcategories_id']) . "<br>";
         }
         if (isset($item_i['requesttypes_id']) && !empty($item_i['requesttypes_id'])) {
             echo Dropdown::getDropdownName("glpi_requesttypes", $item_i['requesttypes_id']) . "<br>";
         }
         if (isset($item_i['actiontime']) && !empty($item_i['actiontime'])) {
             echo "<span class='actiontime'>";
             echo Html::timestampToString($item_i['actiontime'], false);
             echo "</span>";
         }
         if (isset($item_i['begin'])) {
             echo "<span class='planification'>";
             echo Html::convDateTime($item_i["begin"]);
             echo " &rArr; ";
             echo Html::convDateTime($item_i["end"]);
             echo "</span>";
         }
         if (isset($item_i['users_id_tech']) && $item_i['users_id_tech'] > 0) {
             echo "<div class='users_id_tech' id='users_id_tech_" . $item_i['users_id_tech'] . "'>";
             $user->getFromDB($item_i['users_id_tech']);
             echo Html::image($CFG_GLPI['root_doc'] . "/pics/user.png") . "&nbsp;";
             $userdata = getUserName($item_i['users_id_tech'], 2);
             echo $user->getLink() . "&nbsp;";
             echo Html::showToolTip($userdata["comment"], array('link' => $userdata['link']));
             echo "</div>";
         }
         if (isset($item_i['groups_id_tech']) && $item_i['groups_id_tech'] > 0) {
             echo "<div class='groups_id_tech'>";
             $group->getFromDB($item_i['groups_id_tech']);
             echo Html::image($CFG_GLPI['root_doc'] . "/pics/group.png") . "&nbsp;";
             echo $group->getLink() . "&nbsp;";
             echo Html::showToolTip($group->getComments(), array('link' => $group->getLinkURL()));
             echo "</div>";
         }
         // show "is_private" icon
         if (isset($item_i['is_private']) && $item_i['is_private']) {
             echo "<div class='private'>" . __('Private') . "</div>";
         }
         echo "</div>";
         // b_right
         if ($item['type'] == 'Document_Item') {
             $filename = $item_i['filename'];
             $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
             echo "<img src='";
             if (empty($filename)) {
                 $filename = $item_i['name'];
             }
             if (file_exists(GLPI_ROOT . "/pics/icones/{$ext}-dist.png")) {
                 echo $CFG_GLPI['root_doc'] . "/pics/icones/{$ext}-dist.png";
             } else {
                 echo "{$pics_url}/file.png";
             }
             echo "' title='file' />&nbsp;";
开发者ID:glpi-project,项目名称:glpi,代码行数:67,代码来源:ticket.class.php

示例15: header


//.........这里部分代码省略.........
         if (isset($menu[$sector]['default'])) {
             $link = $menu[$sector]['default'];
         }
         echo "<li class='breadcrumb_item'><a href='" . $CFG_GLPI["root_doc"] . $link . "' title=\"" . $menu[$sector]['title'] . "\">" . $menu[$sector]['title'] . "</a></li>";
     }
     if (isset($menu[$sector]['content'][$item])) {
         // Title
         $with_option = false;
         if (!empty($option) && isset($menu[$sector]['content'][$item]['options'][$option]['title']) && isset($menu[$sector]['content'][$item]['options'][$option]['page'])) {
             $with_option = true;
         }
         if (isset($menu[$sector]['content'][$item]['page'])) {
             echo "<li class='breadcrumb_item'><a href='" . $CFG_GLPI["root_doc"] . $menu[$sector]['content'][$item]['page'] . "' " . ($with_option ? "" : "class='here'") . " title=\"" . $menu[$sector]['content'][$item]['title'] . "\" >" . $menu[$sector]['content'][$item]['title'] . "</a>" . "</li>";
         }
         if ($with_option) {
             echo "<li class='breadcrumb_item'><a href='" . $CFG_GLPI["root_doc"] . $menu[$sector]['content'][$item]['options'][$option]['page'] . "' class='here' title=\"" . $menu[$sector]['content'][$item]['options'][$option]['title'] . "\" >";
             echo self::resume_name($menu[$sector]['content'][$item]['options'][$option]['title'], 17);
             echo "</a></li>";
         }
         $links = array();
         // Item with Option case
         if (!empty($option) && isset($menu[$sector]['content'][$item]['options'][$option]['links']) && is_array($menu[$sector]['content'][$item]['options'][$option]['links'])) {
             $links = $menu[$sector]['content'][$item]['options'][$option]['links'];
             // Without option case : only item links
         } else {
             if (isset($menu[$sector]['content'][$item]['links']) && is_array($menu[$sector]['content'][$item]['links'])) {
                 $links = $menu[$sector]['content'][$item]['links'];
             }
         }
         // Add item
         echo "<li class='icons_block'>";
         echo "<span>";
         if (isset($links['add'])) {
             echo Html::image($CFG_GLPI["root_doc"] . "/pics/menu_add.png", array('alt' => __('Add'), 'url' => $CFG_GLPI["root_doc"] . $links['add']));
         } else {
             echo Html::image($CFG_GLPI["root_doc"] . "/pics/menu_add_off.png", array('alt' => __('Add')));
         }
         echo "</span>";
         // Search Item
         echo "<span>";
         if (isset($links['search'])) {
             echo Html::image($CFG_GLPI["root_doc"] . "/pics/menu_search.png", array('alt' => __('Search'), 'url' => $CFG_GLPI["root_doc"] . $links['search']));
         } else {
             echo Html::image($CFG_GLPI["root_doc"] . "/pics/menu_search_off.png", array('alt' => __('Search')));
         }
         echo "</span>";
         // Links
         if (count($links) > 0) {
             foreach ($links as $key => $val) {
                 switch ($key) {
                     case "add":
                     case "search":
                         break;
                     case "template":
                         echo "<span>";
                         echo Html::image($CFG_GLPI["root_doc"] . "/pics/menu_addtemplate.png", array('alt' => __('Manage templates...'), 'url' => $CFG_GLPI["root_doc"] . $val));
                         echo "</span>";
                         break;
                     case "showall":
                         echo "<span>";
                         echo Html::image($CFG_GLPI["root_doc"] . "/pics/menu_showall.png", array('alt' => __('Show all'), 'url' => $CFG_GLPI["root_doc"] . $val));
                         echo "</span>";
                         break;
                     case "summary":
                         echo "<span>";
                         echo Html::image($CFG_GLPI["root_doc"] . "/pics/menu_show.png", array('alt' => __('Summary'), 'url' => $CFG_GLPI["root_doc"] . $val));
开发者ID:OlivierLM,项目名称:glpi,代码行数:67,代码来源:html.class.php


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