本文整理汇总了PHP中htmlEnt函数的典型用法代码示例。如果您正苦于以下问题:PHP htmlEnt函数的具体用法?PHP htmlEnt怎么用?PHP htmlEnt使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了htmlEnt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setting
function setting( $name, $idx, $val, $attrs=null, $writeable=false, $xml=false )
{
if ($xml === true)
echo ' <ConfigurationItem><Parameter>', $name , ($idx>0? ' '.$idx :'') ,'</Parameter><Value>', htmlEnt(str_replace(array("\n", "\r"), array(' ', ' '), $val)) , '</Value></ConfigurationItem>', "\n";
else
echo ($writeable == false ? '!' : ''), $name , ($idx>0? ' '.$idx :'') ,': ', str_replace(array("\n", "\r"), array(' ', ' '), $val) ,"\n";
}
示例2: _err
function _err($msg = "")
{
@ob_end_clean();
ob_start();
echo "<html>\n";
echo "<head><title>" . __("Fehler") . "</title></head>\n";
echo "<body><b>" . __("Fehler") . "</b>: " . htmlEnt($msg) . "</body>\n";
echo "</html>\n";
_ob_send();
}
示例3: _grandstream_xml_esc
function _grandstream_xml_esc($str)
{
/*
return str_replace(
array('&' , '"' , '\'' , '<' , '>' ),
array('&', '"', ''', '>', '<'),
utf8_strip_invalid( $str ));
*/
return htmlEnt($str);
}
示例4: _err
function _err($msg = '')
{
@ob_end_clean();
ob_start();
echo '<html>', "\n";
echo '<head><title>' . __('Fehler') . '</title></head>', "\n";
echo '<body><b>' . __('Fehler') . '</b>: ' . htmlEnt($msg) . '</body>', "\n";
echo '</html>', "\n";
_ob_send();
}
示例5: write_alert
function write_alert($message, $alert_type = 'ERROR')
{
xml('<' . '?xml version="1.0" encoding="UTF-8" ?' . '>');
xml('<IppDisplay>');
xml('<IppScreen ID="1" HiddenCount="0" CommandCount="0">');
xml(' <IppAlert Type="' . htmlEnt($alert_type) . '" Delay="5000">');
xml(' <Title>' . htmlEnt(__('Fehler')) . '</Title>');
xml(' <Text>' . htmlEnt($message) . '</Text>');
xml(' <Image></Image>');
xml(' </IppAlert>');
xml('</IppScreen>');
xml('</IppDisplay>');
xml_output();
}
示例6: Edit
/**
* Edit a selected content, or prepare to create new content if argument is missing.
*
* @param id integer the id of the content.
*/
public function Edit($id = null)
{
$content = new ContentModel($id);
$form = new FormContent($content);
$status = $form->Check();
if ($status === false) {
$this->AddMessage('error', 'The form could not be processed.');
$this->RedirectToController('edit', $id);
} else {
if ($status === true) {
$this->RedirectToController('edit', $content['id']);
}
}
$title = isset($id) ? 'Edit' : 'Create';
$this->views->SetTitle("{$title} content: " . htmlEnt($content['title']))->AddInclude(HAL_INSTALL_PATH . '/view/contentedit.tpl.php', array('user' => $this->user, 'content' => $content, 'form' => $form));
}
示例7: View
/**
* Display a page.
*
* @param $id integer the id of the page.
*/
public function View($id = null)
{
$content = new CMContent($id);
if (!isset($this->user->profile['hasRoleAdmin'])) {
if (isset($content->data['type'])) {
} else {
$this->RedirectTo('user', 'index');
}
if ($content->data['type'] == 'post') {
$this->views->SetTitle('Page: ' . htmlEnt($content['title']))->AddInclude(__DIR__ . '/index.tpl.php', array('content' => $content));
} else {
$this->RedirectTo('user', 'index');
}
} else {
if (isset($content->data['type'])) {
} else {
$this->RedirectTo('user', 'index');
}
$this->views->SetTitle('Page: ' . htmlEnt($content['title']))->AddInclude(__DIR__ . '/index.tpl.php', array('content' => $content));
}
}
示例8: htmlEnt
}
echo '</td>', "\n";
echo '<td>';
if ($phone['user_id'] > 0) {
if ($phone['exten'] != '') {
echo htmlEnt($phone['exten']);
} else {
echo '-';
}
} else {
echo '?';
}
echo '</td>', "\n";
echo '<td>';
if ($phone['firmware_cur'] != '') {
echo htmlEnt($phone['firmware_cur']);
} else {
echo '?';
}
echo '</td>', "\n";
/*
echo '<td>';
echo '<select name="firmware_upgrade">' ,"\n";
echo '<option value="">-</option>' ,"\n";
//...
echo '</select>' ,"\n";
echo '</td>' ,"\n";
*/
echo '</tr>', "\n";
++$i;
}
示例9: mb_strCut
}
$first_digit = $new_first_digit;
//echo '<div class="first-digit">', $first_digit ,'</div>' ,"\n";
}
echo '<div class="e e_ukn" id="e', $ext, '">';
echo '<span class="num">', $ext, '</span>';
//echo '<span class="nam">', $ext_info['abbr'] ,'</span>';
$ext_info['ln'] = $ext_info['ln'];
$abbr = mb_strCut($ext_info['ln'], 0, 18 - strLen($ext) * 2.8);
if (mb_strLen($abbr) < 9 && trim($ext_info['fn']) != '') {
$abbr = mb_subStr($ext_info['fn'], 0, 1) . '. ' . $abbr;
}
if (mb_strLen($ext_info['ln']) > mb_strLen($abbr)) {
$abbr = mb_strCut($abbr, 0, -1) . '.';
}
echo '<span class="nam">', htmlEnt($abbr), '</span>';
echo '<span class="link" id="e', $ext, 'l"></span>';
echo '</div>', "\n";
}
echo '<br class="nofloat" />', "\n";
echo '</div>', "\n";
}
?>
<br />
<div style="float:left; width:40%; color:#ddd;"><small>Status: <span id="mon-status">---</span></small></div>
示例10: trim
$user = trim(@$_REQUEST['u']);
ob_start();
echo $phonemenu_doctype . "\n";
echo '<html>', "\n";
echo "<head><title>" . htmlEnt(__("Konfigurationsmenü")) . "</title></head>\n";
echo '<body><br />', "\n";
echo '- <a href="' . $url_polycom_menu . '?m=' . $mac . '&u=' . $user . '&t=forward">' . htmlEnt(__("Rufumleitung")) . '</a><br />', "\n";
echo '- <a href="' . $url_polycom_provdir . 'features.php?m=' . $mac . '&u=' . $user . '&t=forward">' . htmlEnt(__("Dienstmerkmale")) . '</a><br />', "\n";
// echo '- <a href="'. $url_polycom_provdir .'rt.php?m='. $mac .'&u='. $user .'&t=forward">'. __("Klingelt\xC3\xB6ne") .'</a><br />',"\n";
echo '- <a href="Key:Setup">' . htmlEnt(__("Lokale Telefoneinstellungen")) . '</a><br />', "\n";
echo '</body>', "\n";
echo "</html>\n";
_ob_send();
}
#################################### INITIAL SCREEN }
#################################### FORWARD SCREEN {
if ($type == 'forward') {
$mac = preg_replace('/[^\\dA-Z]/', '', strtoupper(trim(@$_REQUEST['m'])));
$user = trim(@$_REQUEST['u']);
ob_start();
echo $phonemenu_doctype . "\n";
echo '<html>', "\n";
echo '<head><title>' . htmlEnt(__("Rufumleitung")) . '</title></head>', "\n";
echo '<body><br />', "\n";
echo '- <a href="' . $url_polycom_provdir . 'callforward.php?m=' . $mac . '&u=' . $user . '">' . htmlEnt(__("Rufumleitung")) . '</a><br />', "\n";
echo '- <a href="' . $url_polycom_provdir . 'extnumbers.php?m=' . $mac . '&u=' . $user . '">' . htmlEnt(__("Externe Nummern")) . '</a><br />', "\n";
echo '</body>', "\n";
echo '</html>', "\n";
_ob_send();
}
#################################### FORWARD SCREEN }
示例11: __
echo "<img alt=\"". __('Speichern') ."\" src=\"". GS_URL_PATH ."crystal-svg/16/act/filesave.png\" />";
echo "</button>\n";
echo " \n";
echo "<a href=\"". gs_url($SECTION, $MODULE) ."\"><button type=\"button\" title=\"". __('Abbrechen') ."\" class=\"plain\">";
echo "<img alt=\"". __('Abbrechen') ."\" src=\"". GS_URL_PATH ."crystal-svg/16/act/cancel.png\" />";
echo "</button></a>\n";
echo "</td>\n";
}
else
{
echo "<td class=\"r\">". htmlEnt($r['id']) ."</td>\n";
echo "<td>". htmlEnt($r['description']) ."</td>\n";
echo "<td class=\"r\">". $r_length ."</td>\n";
echo "<td class=\"r\">". $r_created ."</td>\n";
echo "<td>\n";
echo "<a href=\"". gs_url($SECTION, $MODULE, null, "playback=". $r['id'] ."&page=". $page ."&phonenum=". $_SESSION["real_user"]["info"]["ext"]) ."\" title=\"". __('abspielen') ."\"><img alt=\"". __('abspielen') ."\" src=\"". GS_URL_PATH ."crystal-svg/16/app/kmix.png\" /></a> ";
echo "<a href=\"". gs_url($SECTION, $MODULE, null, "edit=". $r['id'] ."&page=".$page) ."\" title=\"". __('bearbeiten') ."\"><img alt=\"". __('bearbeiten') ."\" src=\"". GS_URL_PATH ."crystal-svg/16/act/edit.png\" /></a> ";
echo "<a href=\"". gs_url($SECTION, $MODULE, null, "delete=". $r['id'] ."&page=".$page) ."\" title=\"". __('löschen') ."\"><img alt=\"". __('entfernen') ."\" src=\"". GS_URL_PATH ."crystal-svg/16/act/editdelete.png\" /></a>";
echo "</td>\n";
}
echo "</tr>\n";
}
}
示例12: tiptelXmlEsc
function tiptelXmlEsc($str)
{
return htmlEnt($str);
}
示例13: esc
/**
* Escape data to make it safe to write in the browser.
*
* @param $str string to escape.
* @returns string the escaped string.
*/
function esc($str)
{
return htmlEnt($str);
}
示例14: htmlEnt
$member['name'] .= htmlEnt($r['firstname']);
}
if ($queues[$r['queue']]['display_name'] == 3) {
$member['name'] .= htmlEnt($r['firstname']) . ' ' . htmlEnt($r['lastname']);
}
if ($queues[$r['queue']]['display_name'] == 4) {
$member['name'] .= htmlEnt($r['lastname']) . ', ' . htmlEnt($r['firstname']);
}
if ($queues[$r['queue']]['display_name'] == 5) {
$member['name'] .= htmlEnt($r['lastname']) . ', ' . htmlEnt(substr($r['firstname'], 0, 1)) . '.';
}
if ($queues[$r['queue']]['display_name'] == 6) {
$member['name'] .= htmlEnt(substr($r['firstname'], 0, 1)) . '. ' . htmlEnt($r['lastname']);
}
if ($queues[$r['queue']]['display_name'] == 7) {
$member['name'] .= htmlEnt(substr($r['firstname'], 0, 1)) . '.' . htmlEnt(substr($r['lastname'], 0, 1)) . '.';
}
}
$member['ext'] = $r['ext'];
if (!array_key_exists($r['queue'], $members)) {
$members[$r['queue']] = array();
}
if ($queues[$r['queue']]['active']) {
$members[$r['queue']][] = $member;
}
}
}
foreach ($members as $queue => $queue_members) {
$queues[$queue]['members'] = $queue_members;
}
$queuemon_data['queues'] = array();
示例15: ceil
$num_pages = ceil($num_total / $per_page);
if ($name_search) {
$page_title = $name_search;
} else {
$page_title = $typeToTitle[$type];
}
if ($num_pages > 1) {
$page_title .= ' ' . ($page + 1) . '/' . $num_pages;
}
if ($rs && $rs->numRows() !== 0) {
$xml = '<AastraIPPhoneTextMenu destroyOnExit="yes" LockIn="no" style="none" cancelAction="' . $url_aastra_pb . '">' . "\n";
$xml .= '<Title>' . $page_title . '</Title>' . "\n";
while ($r = $rs->fetchRow()) {
$name = $r['ln'] . (strLen($r['fn']) > 0 ? ', ' . $r['fn'] : '');
$xml .= '<MenuItem>' . "\n";
$xml .= ' <Prompt>' . htmlEnt($name) . ' - ' . $r['number'] . '</Prompt>' . "\n";
$xml .= ' <Dial>' . $r['number'] . '</Dial>' . "\n";
$xml .= ' <URI>' . $url_aastra_pb . '?t=prvs&e=' . $r['id'] . '</URI>' . "\n";
$xml .= '</MenuItem>' . "\n";
}
$xml .= '<SoftKey index="1">' . "\n";
$xml .= ' <Label>' . __('OK') . '</Label>' . "\n";
$xml .= ' <URI>SoftKey:Select</URI>' . "\n";
$xml .= '</SoftKey>' . "\n";
$xml .= '<SoftKey index="2">' . "\n";
$xml .= ' <Label>' . __('Anrufen') . '</Label>' . "\n";
$xml .= ' <URI>SoftKey:Dial2</URI>' . "\n";
$xml .= '</SoftKey>' . "\n";
$xml .= '<SoftKey index="4">' . "\n";
$xml .= ' <Label>' . __('Abbrechen') . '</Label>' . "\n";
$xml .= ' <URI>SoftKey:Exit</URI>' . "\n";