本文整理汇总了PHP中Chtml::encode方法的典型用法代码示例。如果您正苦于以下问题:PHP Chtml::encode方法的具体用法?PHP Chtml::encode怎么用?PHP Chtml::encode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chtml
的用法示例。
在下文中一共展示了Chtml::encode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Template
<script type="text/x-jquery-tmpl" id="mappingRow">
<tr>
<td>
<input class="input text " type="text" name="mappings[#{mappingNum}][value]" value="#{value}" size="20" maxlength="64">
</td>
<td>⇒</td>
<td>
<input class="input text" type="text" name="mappings[#{mappingNum}][newvalue]" value="#{newvalue}" size="30" maxlength="64">
</td>
<td>
<input class="input link_menu removeMapping" type="button" value="<?php
echo Chtml::encode(_('Remove'));
?>
">
</td>
</tr>
</script>
<script type="text/javascript">
var mappingsManager = (function() {
var tpl = new Template(jQuery('#mappingRow').html()),
mappingsCount = 0,
nextMappingNum = 0;
function renderMappingRow(mapping) {
mapping.mappingNum = nextMappingNum++;
jQuery(tpl.evaluate(mapping)).insertBefore('#mappingsTable tr:last-child');
if (mapping.mappingid !== void(0)) {
jQuery('#mappingsTable tr:last-child')
.prev()
.find('td')
示例2: actionGetDorms
public function actionGetDorms()
{
if (!isset($_POST['building_id'])) {
return;
}
$building_id = $_POST['building_id'];
$dorms = Building::model()->findByPk($building_id)->dorms;
$dorms = CHtml::listData($dorms, 'dorm_id', 'dorm_name');
$htmlData = CHtml::tag('option', array('selected' => 'selected', 'value' => ''), '请选择宿舍');
foreach ($dorms as $value => $key) {
$htmlData .= Chtml::tag('option', array('value' => $value), Chtml::encode($key));
}
echo json_encode(array('htmlData' => $htmlData));
}
示例3:
?>
</td>
<td class="ths"></td>
<td class="ths"></td>
</tr>
<tr class="tr2">
<td class="ths"></td>
<td class="ths"></td>
<td class="ths"></td>
<td class="ths"></td>
</tr>
<tr class="tr1">
<th colspan="2"></th>
<td class= "td_u"><b>Total:</b></td>
<td class= "tdu"><?php
echo '<b>' . Chtml::encode($model->serviceOrder->price) . '</b>';
?>
</td>
</tr>
</table>
</div>
<br><br><br>
<table class ="table_4">
<tr>
<td>Nombre: <u><?php
echo CHtml::encode($model->name_deliverer_equipment);
?>
</u>
<div class="div4"></div>
示例4: actionGetBuildings
public function actionGetBuildings()
{
if (!isset($_POST['area_id'])) {
return;
}
$area_id = $_POST['area_id'];
$buildings = CampusArea::model()->findByPk($area_id)->buildings;
$buildings = CHtml::listData($buildings, 'building_id', 'building_id');
$htmlData = CHtml::tag('option', array('selected' => 'selected', 'value' => ''), '请选择楼栋');
foreach ($buildings as $value => $key) {
$htmlData .= Chtml::tag('option', array('value' => $value), Chtml::encode($key . '号'));
}
echo json_encode(array('htmlData' => $htmlData));
}
示例5: foreach
<div class="row">
<div class="col-md-12 headbox">
<p class="headbox">Lọc theo loại xe</p>
</div>
<div class="col-md-12 box boxfilter">
<ul class="list-unstyled" >
<div class="row">
<?php
foreach ($loaiXeGhep as $loai) {
$url = Chtml::encode($this->url . ConvertURL::refine($loai->loai_xe_ghep) . '/' . $loai->ma_loai_xe_ghep);
$loaiXeGhep = Chtml::encode($loai->loai_xe_ghep);
?>
<li><a href="<?php
echo $url;
?>
"><?php
echo $loaiXeGhep;
?>
</a></li>
<?php
}
?>
</div>
</ul>
</div>
</div>
示例6: json_encode
Yii::app()->clientScript->registerScript("ajaxBlogToken", "var ajaxToken = " . json_encode(Yii::app()->getRequest()->csrfTokenName . '=' . Yii::app()->getRequest()->csrfToken) . ";", CClientScript::POS_BEGIN);
$this->breadcrumbs = array(Yii::t('BlogModule.blog', 'Blogs') => array('/blog/blog/index/'), CHtml::encode($post->blog->name) => array('/blog/blog/show/', 'slug' => CHtml::encode($post->blog->slug)), CHtml::encode($post->title));
?>
<div class="post">
<div class="row">
<div class="span8">
<h4><strong><?php
echo CHtml::encode($post->title);
?>
</strong></h4>
<div class="posts-list-block-meta">
<span>
<i class="icon-pencil"></i>
<?php
echo CHtml::link(CHtml::encode($post->blog->name), array('/blog/blog/show/', 'slug' => Chtml::encode($post->blog->slug)));
?>
</span>
<span>
<i class="icon-calendar"></i>
<?php
echo Yii::app()->getDateFormatter()->formatDateTime($post->publish_date, "long", "short");
?>
</span>
</div>
</div>
</div>
<div class="row">
<div class="span8">
<p>
<?php
示例7:
<p><span class="blue-text">Điện thoại: </span>
<span class="red-text"><?php
echo Chtml::encode($tinXTK['so_dien_thoai']);
?>
</span></p>
<br/>
<p><span class="blue-text">Lộ trình: </span>
<span class="red-text"><?php
echo Chtml::encode($tinXTK['dia_chi_di']);
?>
- <?php
echo CHtml::encode($provinces[$tinXTK['tinh_thanh']]);
?>
<a class="glyphicon glyphicon-arrow-right red-text"></a>
<?php
echo Chtml::encode($tinXTK['dia_chi_den']);
?>
- <?php
echo CHtml::encode($provinces[$tinXTK['noi_den_tinh']]);
?>
</span></p>
<br/>
<p><strong class="blue-text ">Thông tin thêm:</strong><br/>
<span class="red-text"><?php
echo $tinXTK['noi_dung_tin'];
?>
</span></p>
</section>
</article>
</div>
</div>
示例8:
<div class="product-mini__thumbnail">
<a href="javascript:void(0);">
<img src="<?php
echo $data->getImageUrl(90, 90, false);
?>
"
class=" product-mini__img">
</a>
</div>
<div class="product-mini__info">
<div class="product-mini__title"><a href="<?php
echo ProductHelper::getUrl($data);
?>
"
class="product-mini__link"><?php
echo Chtml::encode($data->getName());
?>
</a>
</div>
<div class="product-mini__price">
<div class="product-price"><?php
echo $data->getResultPrice();
?>
<span class="ruble"> <?php
echo Yii::app()->getModule('store')->currency;
?>
</span>
</div>
</div>
</div>
</div>
示例9: foreach
?>
</div>
<div class="sidebar_right">
<span class="sidebar_block_header" id="po_staging_items_header">Purchase Order Staging</span>
<div class="sidebar_item" id="po_staging_items">
<span class="po_staging_items_header">Date / Num. / Vendor</span>
<div id="po_staging_items_block">
<table>
<?php
foreach ($stagingItems as $stagingItem) {
$color = '';
if ($poId == $stagingItem->PO_ID) {
$color = "style='color: #003399;'";
}
$str='';
$str = Helper::convertDateDayMonthSimple($stagingItem->PO_Date) . ' / ' . $stagingItem->PO_Number . (($stagingItem->vendor) ? ' / ' . Chtml::encode($stagingItem->vendor->client->company->Company_Name) : '');
$str=Helper::cutText(15, 180, 13, $str );
echo '<tr><td>';
echo "<a href='" . Yii::app()->request->baseUrl . "/po/create/" . $stagingItem->PO_ID . "' class='staging_item_link' " . $color . ">".$str. "</a>";
echo '</td><td>';
echo '<a href=# class="mark_as_void" data-id="'.$stagingItem->PO_ID.'">Delete</a>';
echo '</td></tr>';
}
?>
</table>
</div>
</div>
</div>
示例10:
<div class="col-md-12">
<article id="detail-ktx">
<header><div class="pribox"><?php
echo CHtml::encode($tinraovat['tieu_de_tin']);
?>
</div> </header>
<section>
<p><span class="blue-text">Tên liên hệ: </span>
<span class="red-text"> <?php
echo Chtml::encode($tinraovat['nguoi_lien_lac']);
?>
</span></p>
<br/>
<p><span class="blue-text">Điện thoại: </span>
<span class="red-text"><?php
echo Chtml::encode($tinraovat['so_dien_thoai']);
?>
</span></p>
<br/>
<p><strong class="blue-text ">Nội dung:</strong><br/>
<span class="red-text"><?php
echo $tinraovat['noi_dung_tin'];
?>
</span></p>
<?php
if (empty(CHtml::encode($tinraovat['anh']))) {
} else {
?>
<img src="<?php
echo Yii::app()->request->baseUrl;
?>
示例11: echo
</td>
</tr>
</table>
</div>
<div class="main">
<table cellspacing="0">
<tr>
<td rowspan="5" style="width: 400px;padding-left: 30px; font-size: 11px;"></td>
<td style="width: 90px; text-align: right;height: 17px;vertical-align: middle;"><b><?php echo ($approved) ? 'APPROVED ' : '';?></b> </td>
<td style="height: 17px; width: 120px; vertical-align: middle;"> <b><?php echo ($approved) ? date('m/d/Y') : '';?></b></td>
</tr>
<tr>
<td style="width: 120px; text-align: right;height: 17px;vertical-align: middle;">Requested By: </td>
<td style="border-bottom: 1px solid #000; height: 17px; width: 120px; vertical-align: middle;"><?php echo ($signRequestedByUser) ? Chtml::encode($signRequestedByUser->person->First_Name . ' ' . $signRequestedByUser->person->Last_Name) : ''; ?></td>
</tr>
</table>
</div>
<div class="sign" style=" position: absolute;top: 610px;left: 565px;">
<table cellspacing="0">
<? foreach ($aproval_detail_list as $approval_item) {?>
<tr>
<td style="width: 100px; vertical-align: top;padding-top:4px;"> <?= Helper::truncLongWordsToTable($approval_item['name'],10);?> </td>
<td style="width: 80px; vertical-align: top;padding-top:4px;"><?= $approval_item['date'];?></td>
<? ?>
</tr>
<?}?>
</table>
示例12: array
?>
</div>
<!--login end-->
</div>
<div class="subnav">
<div class="nav clearfix">
<ul>
<li class="select"><a title="浏览全部" href="<?php
echo Yii::app()->createUrl("/project/index");
?>
">浏览全部</a></li>
<?php
#获得项目下的分类项目
$project = Channel::model()->find("cl_en_name=:cl_en_name", array(":cl_en_name" => 'project'));
if ($project) {
$projectlist = Channel::model()->findAll("cl_class=:cl_class AND cl_status=1 order by cl_left asc ", array(":cl_class" => $project->id));
if ($projectlist) {
foreach ($projectlist as $key => $value) {
echo '<li ><a href="' . Yii::app()->createUrl('/project/' . $value->id) . '" title="' . Chtml::encode($value->cl_name) . '">' . Chtml::encode($value->cl_name) . '</a></li>';
}
}
}
?>
<li><em>|</em><a href="http://www.10000rmb.com">中国网赚平台</a></li>
</ul>
</div>
</div>
</div>
<!--header-end-->
示例13: array
<div class="view">
<?php
echo CHtml::link(CHtml::image($data->picture, CHtml::encode($data->picture), array('height' => '100px', 'width' => '80px')), $data->url);
?>
<br />
<?php
echo CHtml::link("《" . CHtml::encode($data->name) . "》", array('album/view', 'id' => $data->id));
?>
<br />
<p><?php
echo Chtml::encode($data->artist->name);
?>
于 <?php
echo $data->pub_time;
?>
推出.其中包含:
<?php
foreach ($data->musics as $music) {
?>
<?php
echo $music->name . " ";
?>
<?php
}
?>
</p>
</div>
示例14: echo
<!-- End of Important-->
<table class="details_table">
<tr>
<td class="width240">
<ul class="details_table_list">
<li>Amount: <span class="details_page_value"><?php echo ($payment->Payment_Amount != 0) ? CHtml::encode(number_format($payment->Payment_Amount, 2)) : '<span class="not_set">Not set</span>'; ?></span></li>
<li>Date: <span class="details_page_value"><?php echo $payment->Payment_Check_Date ? CHtml::encode(Helper::convertDate($payment->Payment_Check_Date)) : '<span class="not_set">Not set</span>'; ?></span></li>
<li>Bank Name: <span class="details_page_value"><?php echo isset($payment->bank_account->Bank_Name) ? CHtml::encode($payment->bank_account->Bank_Name) : '<span class="not_set">Not set</span>'; ?></span></li>
</ul>
</td>
<td>
<ul class="details_table_list">
<li>Check Num: <span class="details_page_value"><?php echo $payment->Payment_Check_Number ? CHtml::encode($payment->Payment_Check_Number) : '<span class="not_set">Not set</span>'; ?></span></li>
<li>Account Code: <span class="details_page_value"><?php echo '<span class="not_set">Not set</span>'; //echo $payment->Vendor_ID; ?></span></li>
<li>Acct. Number: <span class="details_page_value"><?php echo isset($payment->bank_account->Account_Name) ? Chtml::encode($payment->bank_account->Account_Name . ' / ' . $payment->bank_account->Account_Number) : '<span class="not_set">Not set</span>'; ?></span></li>
</ul>
</td>
</tr>
</table>
</div>
<?php
$tab_css = '/css/jquery.yiitab.css';
if (Helper::checkIE() || Helper::getMobileDetect()->isMobile() || Helper::getMobileDetect()->isTablet() || Helper::checkMobile()) {
$tab_css = '/css/jquery.yiitabie.css';
}
$this->widget('CTabView', array(
'activeTab'=>'tab3',
'cssFile'=>$tab_css,
示例15:
!</title>
</head>
<body>
Добавлен новый комментарий на сайте <?php
echo CHtml::encode(Yii::app()->name);
?>
!
<br/>
Запись: <?php
echo $model->getTargetTitleLink();
?>
<br/>
Текст: "<?php
echo CHtml::encode($model->text);
?>
"<br/>
Отправитель: <?php
echo Chtml::encode($model->name);
?>
<br/>
<br/><br/>
С уважением, администрация сайта <?php
echo CHtml::encode(Yii::app()->name);
?>
!
</body>
</html>