本文整理汇总了PHP中Data::inHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::inHtml方法的具体用法?PHP Data::inHtml怎么用?PHP Data::inHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data
的用法示例。
在下文中一共展示了Data::inHtml方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
</p>
<h4>Título</h4>
<p>
<input type='text' name='title' value='<?php
echo $d['title'];
?>
'
size='65' maxlength='128' />
</p>
<h4>Código Fonte</h4>
<p>
<textarea name='source' rows='10'
cols='50'><?php
echo Data::inHtml($d['source']);
?>
</textarea>
</p>
<h4>Digite o que você vê escrito na imagem</h4>
<p>
<img src='createimg.php' alt='' style='border: 1pt solid #fff' /><br />
<input type='text' name='seccode' value='' size='10' maxlength='5' />
</p>
<hr />
<p>
<input type='submit' value=' É isso aí! ' />
</p>
示例2:
<h3><?php
echo $title;
?>
</h3>
<form id='f' method='get' action='<?php
echo b1n_URL;
?>
'>
<p>
<a href='<?php
echo b1n_URL_ID . $r['id'];
?>
'
title='<?php
echo Data::inHtml($r['pas_title']);
?>
'><?php
echo b1n_URL_ID . $r['id'];
?>
</a>
<br/>
<?php
echo $author;
?>
em <?php
echo $date;
?>
<small>(<?php
echo $language . ", " . $views . ", " . $size;
?>
示例3: show
public function show($d)
{
$q_orig = $d['q'];
$this->check($d);
$ret = $this->format($d['q']);
if (empty($d['q'])) {
$get_all = true;
$d['query_where'] = '';
} else {
$get_all = false;
$d['query_where'] = "\n WHERE\n pas_title ILIKE '%" . $d['q'] . "%' OR\n pas_source_text ILIKE '%" . $d['q'] . "%' OR\n pas_author ILIKE '%" . $d['q'] . "%'";
}
$navigation = $this->getNavigationStuff($d, $c);
$rs = $this->doSearch($d);
if (is_array($rs)) {
if (!$get_all) {
$ret .= "<p>Foram encontrados {$c} registros para sua busca por '{$q_orig}'.</p>";
} else {
$ret .= "<p>Nenhum critério para busca, mostrando todos {$c} registros.</p>";
}
$ret .= '<hr />';
$base = b1n_URL_ACTION . '?action=list&q=' . urlencode($q_orig) . '&pg=' . $d['pg'] . '&orderby=';
$ret .= '<table id="search"><tr>';
$ret .= '<th> </th>';
foreach ($this->DATA as $col => $o) {
$url = $base;
$order = '';
if (Data::cmp($d['orderby'], $o['db'])) {
if (Data::cmp($d['order'], 'DESC')) {
$order = '&order=ASC';
} elseif (Data::cmp($d['order'], 'ASC')) {
$order = '&order=DESC';
}
}
$ret .= '<th><a href="' . $base . $col . $order . '">' . $o['name'] . '</a></th>';
}
$ret .= '</tr>';
$tr = 's_even';
$i = 1 + ($d['pg'] - 1) * $d['per_page'];
foreach ($rs as $r) {
$id_base = base_convert($r['pas_id'], 10, b1n_CODE_BASE);
$ret .= '<tr class="' . $tr . '">';
$ret .= '<td class="s_number">' . $i . '</td>';
$ret .= '<td class="s_title"><a href="' . b1n_URL_ID . $id_base . '">' . Data::inHtmlLimit($r['pas_title'], b1n_TITLE_MAX_CHARS) . '</a></td>';
$ret .= '<td class="s_author">';
if (strlen($r['pas_author'])) {
$ret .= '<a href="' . b1n_URL_ACTION . '?action=list&q=' . urlencode($r['pas_author']) . '">' . Data::inHtmlLimit($r['pas_author'], b1n_AUTHOR_MAX_CHARS) . '</a>';
} else {
$ret .= 'Anônimo';
}
$ret .= '</td>' . '<td>' . Data::inHtml($r['pas_language']) . '</td>';
$ret .= '<td class="s_number">' . Data::inHtml($r['pas_view_qt']) . '</td>';
$ret .= '<td class="s_number">' . Data::inHtml(Data::formatSize($r['pas_length'])) . '</td>';
$ret .= '<td class="s_date">' . Data::formatDateShowAbr($r['pas_add_dt']) . '</td>';
$ret .= '</tr>';
$tr = $tr === 's_even' ? 's_odd' : 's_even';
$i++;
}
$ret .= '</table>';
if (!empty($navigation)) {
$ret .= $navigation;
}
} else {
$ret .= "Nenhum registro foi encontrado para sua busca por '{$q_orig}'";
}
return $ret;
}
示例4: foreach
foreach ($rs as $r) {
$title = $r['pas_title'] . ' (' . $r['pas_language'] . ', ' . $r['pas_view_qt'] . ', ' . Data::formatSize($r['pas_length']) . ')';
$id = base_convert($r['pas_id'], 10, b1n_CODE_BASE);
$dt = Data::formatDateShowRSS($r['pas_add_dt']);
?>
<item>
<title><?php
echo Data::inHtml($title);
?>
</title>
<link><?php
echo b1n_URL_ID . $id;
?>
</link>
<category><?php
echo Data::inHtml($r['pas_language']);
?>
</category>
<pubDate><?php
echo $dt;
?>
</pubDate>
<guid><?php
echo b1n_URL_ID . $id;
?>
</guid>
</item>
<?php
}
?>
</channel>
示例5:
<entry>
<title><?php
echo Data::inHtml($title);
?>
</title>
<link rel="alternate" type="text/html"
href="<?php
echo b1n_URL_ID . $id;
?>
"/>
<issued><?php
echo $dt;
?>
</issued>
<author><name><?php
echo Data::inHtml($r['pas_author']);
?>
</name></author>
<modified><?php
echo $dt;
?>
</modified>
<id><?php
echo b1n_URL_ID . $id;
?>
</id>
</entry>
<?php
}
?>
</feed>