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


PHP luna_htmlspecialchars函数代码示例

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


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

示例1: online_list

function online_list()
{
    global $luna_config, $db, $luna_user;
    if ($luna_config['o_users_online'] == '1') {
        // Fetch users online info and generate strings for output
        $result = $db->query('SELECT user_id, ident FROM ' . $db->prefix . 'online WHERE idle=0 AND user_id>1 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
        if ($db->num_rows($result) > 0) {
            $ctr = 1;
            while ($luna_user_online = $db->fetch_assoc($result)) {
                if ($luna_user['g_view_users'] == '1') {
                    echo "\n\t\t\t\t" . '<li><a href="profile.php?id=' . $luna_user_online['user_id'] . '">' . luna_htmlspecialchars($luna_user_online['ident']) . '</a></li>';
                } else {
                    echo "\n\t\t\t\t" . '<li>' . luna_htmlspecialchars($luna_user_online['ident']) . '</li>';
                }
            }
        } else {
            echo '<li><a>' . __('No users online', 'luna') . '</a></li>';
        }
    }
}
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:20,代码来源:statistic_functions.php

示例2: parse_signature

function parse_signature($text)
{
    global $luna_config, $luna_user;
    if ($luna_config['o_censoring'] == '1') {
        $text = censor_words($text);
    }
    // Convert applicable characters to HTML entities
    $text = luna_htmlspecialchars($text);
    if (strpos($text, '[') !== false && strpos($text, ']') !== false) {
        $text = do_bbcode($text, true);
    }
    if ($luna_config['o_smilies_sig'] == '1' && $luna_user['show_smilies'] == '1') {
        $text = do_smilies($text);
    }
    // Deal with newlines, tabs and multiple spaces
    $pattern = array("\n", "\t", '  ', '  ');
    $replace = array('<br />', '&#160; &#160; ', '&#160; ', ' &#160;');
    $text = str_replace($pattern, $replace, $text);
    return clean_paragraphs($text);
}
开发者ID:BogusCurry,项目名称:Luna,代码行数:20,代码来源:parser.php

示例3: _e

?>
							</label>
						</div>
						<div class="radio">
							<label>
								<input type="radio" name="form[copyright_type]" id="o_copyright_type_1" value="1"<?php 
if ($luna_config['o_copyright_type'] == '1') {
    echo ' checked';
}
?>
 />
								<?php 
_e('Show personalized copyright notices:', 'luna');
?>
							</label><br /><br />
							<input type="text" class="form-control" name="form[custom_copyright]" placeholder="<?php 
_e('Your copyright', 'luna');
?>
" value="<?php 
echo luna_htmlspecialchars($luna_config['o_custom_copyright']);
?>
" />
						</div>
					</div>
				</div>
			</fieldset>
		</div>
	</div>
</form>
<?php 
require 'footer.php';
开发者ID:BogusCurry,项目名称:Luna,代码行数:31,代码来源:appearance.php

示例4: output_html

function output_html($feed)
{
    // Send the Content-type header in case the web server is setup to send something else
    header('Content-type: text/html; charset=utf-8');
    header('Expires: ' . date('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    foreach ($feed['items'] as $item) {
        if (utf8_strlen($item['title']) > LUNA_EXTERN_MAX_SUBJECT_LENGTH) {
            $subject_truncated = luna_htmlspecialchars(luna_trim(utf8_substr($item['title'], 0, LUNA_EXTERN_MAX_SUBJECT_LENGTH - 5))) . ' …';
        } else {
            $subject_truncated = luna_htmlspecialchars($item['title']);
        }
        echo '<li><a href="' . luna_htmlspecialchars($item['link']) . '" title="' . luna_htmlspecialchars($item['title']) . '">' . $subject_truncated . '</a></li>' . "\n";
    }
}
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:16,代码来源:extern.php

示例5: list

    list($num_messages) = $db->fetch_row($result);
    // What page are we on ?
    $num_pages = ceil($num_messages / $luna_config['o_message_per_page']);
    if ($page > $num_pages) {
        $page = 1;
    }
    $start_from = intval($luna_config['o_message_per_page']) * ($page - 1);
    $limit = $start_from . ',' . $luna_config['o_message_per_page'];
    // Start building page
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Private Messages', 'luna'), __('Inbox', 'luna'));
    $result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.facebook, u.msn, u.twitter, u.google, u.location, u.signature, u.disp_threads, u.disp_comments, u.email_setting, u.notify_with_comment, u.auto_notify, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.php_timezone, u.language, u.style, u.num_comments, u.last_comment, u.registered, u.registration_ip, u.admin_note, u.date_format, u.time_format, u.last_visit, u.color_scheme, u.accent, g.g_id, g.g_user_title, g.g_moderator FROM ' . $db->prefix . 'users AS u LEFT JOIN ' . $db->prefix . 'groups AS g ON g.g_id=u.group_id WHERE u.id=' . $id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
    if (!$db->num_rows($result)) {
        message(__('Bad request. The link you followed is incorrect, outdated or you are simply not allowed to hang around here.', 'luna'), false, '404 Not Found');
    }
    $user = $db->fetch_assoc($result);
    $user_username = luna_htmlspecialchars($user['username']);
    $user_usertitle = get_title($user);
    define('LUNA_ACTIVE_PAGE', 'inbox');
    require load_page('header.php');
    ?>
<script type="text/javascript">
/* <![CDATA[ */
function checkAll(checkWhat,command){
	var inputs = document.getElementsByTagName('input');
   
	for(index = 0; index < inputs.length; index++){
		if(inputs[index].name == checkWhat){
			inputs[index].checked=document.getElementById(command).checked;
		}
	}
}
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:inbox.php

示例6: header

if ($luna_user['is_admmod']) {
    header("Location: index.php");
}
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
$redirect_url = check_url();
?>
<div class="well form-box">
	<h3 class="form-title"><?php 
_e('Login', 'luna');
?>
</h3>
	<form id="login-form" method="post" action="../login.php?action=in" onsubmit="return">
		<input type="hidden" name="form_sent" value="1" />
		<input type="hidden" name="redirect_url" value="<?php 
echo luna_htmlspecialchars($redirect_url);
?>
" />
		<div class="form-group">
			<input class="form-control top-form" type="text" name="req_username" maxlength="25" tabindex="1" placeholder="<?php 
_e('Username', 'luna');
?>
" />
		</div>
		<div class="form-group">
			<input class="form-control bottom-form" type="password" name="req_password" tabindex="2" placeholder="<?php 
_e('Password', 'luna');
?>
" />
		</div>
		<div class="form-group">
开发者ID:istrwei,项目名称:Luna,代码行数:31,代码来源:login.php

示例7: load_admin_nav


//.........这里部分代码省略.........
    // See if there are any plugins
    $plugins = forum_list_plugins($is_admin);
    // Did we find any plugins?
    if (!empty($plugins)) {
        ?>
				<li class="dropdown<?php 
        if ($section == ' extensions') {
            echo 'active';
        }
        ?>
">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						<span class="fa fa-fw fa-cogs"></span> <?php 
        _e('Extensions', 'luna');
        ?>
 <span class="fa fa-fw fa-angle-down">
					</a>
					<ul class="dropdown-menu">
<?php 
        foreach ($plugins as $plugin_name => $plugin) {
            echo "\t\t\t\t\t" . '<li><a href="loader.php?plugin=' . $plugin_name . '">' . str_replace('_', ' ', $plugin) . '</a></li>' . "\n";
        }
        ?>
					</ul>
				</li>
<?php 
    }
    ?>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li class="dropdown usermenu">
					<a href="#" class="dropdown-toggle dropdown-user" data-toggle="dropdown">
						<span class="hidden-sm"><?php 
    print luna_htmlspecialchars($luna_user['username']);
    ?>
 </span><?php 
    echo draw_user_avatar($luna_user['id'], true, 'avatar');
    ?>
 <span class="fa fa-fw fa-angle-down"></span>
					</a>
					<ul class="dropdown-menu">
						<li><a href="../profile.php?id=<?php 
    echo $luna_user['id'];
    ?>
"><?php 
    _e('Profile', 'luna');
    ?>
</a></li>
						<li><a href="../settings.php?id=<?php 
    echo '' . $luna_user['id'];
    ?>
"><?php 
    _e('Settings', 'luna');
    ?>
</a></li>
						<li class="divider"></li>
						<li><a href="../help.php"><?php 
    _e('Help', 'luna');
    ?>
</a></li>
						<li><a href="http://getluna.org"><?php 
    _e('Support', 'luna');
    ?>
</a></li>
						<li class="divider"></li>
						<li><a href="../login.php?action=out&amp;id=<?php 
开发者ID:BogusCurry,项目名称:Luna,代码行数:67,代码来源:backstage_functions.php

示例8: message

if (!$db->num_rows($result)) {
    message(__('Bad request. The link you followed is incorrect, outdated or you are simply not allowed to hang around here.', 'luna'), false, '404 Not Found');
}
$user = $db->fetch_assoc($result);
$user_username = luna_htmlspecialchars($user['username']);
$avatar_field = generate_avatar_markup($id);
$avatar_user_card = draw_user_avatar($id);
if ($action == 'readnoti') {
    set_user_notifications_viewed($id);
    confirm_referrer('notifications.php');
    redirect('notifications.php?id=' . $id);
} elseif ($action == 'delnoti') {
    delete_user_notifications($id, $viewed = 1);
    confirm_referrer('notifications.php');
    redirect('notifications.php?id=' . $id);
}
$viewed_notifications = array();
$unviewed_notifications = array();
$num_viewed = has_viewed_notifications();
$num_unviewed = has_unviewed_notifications();
if ($num_viewed) {
    $viewed_notifications = get_user_viewed_notifications();
}
if ($num_unviewed) {
    $unviewed_notifications = get_user_unviewed_notifications();
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']) . ' / ' . __('Profile', 'luna'));
define('FORUM_ACTIVE_PAGE', 'me');
require load_page('header.php');
require load_page('notifications.php');
require load_page('footer.php');
开发者ID:BogusCurry,项目名称:Luna,代码行数:31,代码来源:notifications.php

示例9: luna_htmlspecialchars

<div class="row forum-entry <?php 
echo $item_status;
?>
">
	<div class="col-sm-6 col-xs-6">
		<strong><a href="viewforum.php?id=<?php 
echo $cur_forum['fid'];
?>
"><?php 
echo $faicon . luna_htmlspecialchars($cur_forum['forum_name']);
?>
</a></strong><br />
		<?php 
echo $forum_desc;
?>
	</div>
	<div class="col-sm-1 hidden-xs text-center">
		<?php 
echo '<b>' . $cur_forum['num_topics'] . '</b> ' . $topics_label;
?>
<br />
		<?php 
echo '<b>' . $cur_forum['num_posts'] . '</b> ' . $posts_label;
?>
	</div>
	<div class="col-sm-5 col-xs-6">
		<?php 
echo $last_post;
?>
 <?php 
echo $forum_field_new;
开发者ID:istrwei,项目名称:Luna,代码行数:31,代码来源:forum.php

示例10: generate_update_cache

    }
    // Regenerate the update cache
    generate_update_cache();
    header("Location: update.php");
}
if (file_exists(LUNA_CACHE_DIR . 'cache_update.php')) {
    include LUNA_CACHE_DIR . 'cache_update.php';
}
if (!defined('LUNA_UPDATE_LOADED') || $last_check_time > time() + 60 * 60 * 24) {
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_update_cache();
    require LUNA_CACHE_DIR . 'cache_update.php';
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Update', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('backstage', 'update');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
?>
<div class="row">
	<div class="col-sm-4 col-md-3">
		<form method="post" action="update.php">
			<input type="hidden" name="form_sent" value="1" />
			<fieldset>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title"><?php 
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:update.php

示例11: luna_htmlspecialchars

							<tr>
								<td>
									<input type="text" class="form-control" name="search_for[<?php 
        echo $cur_word['id'];
        ?>
]" value="<?php 
        echo luna_htmlspecialchars($cur_word['search_for']);
        ?>
" maxlength="60" />
								</td>
								<td>
									<input type="text" class="form-control" name="replace_with[<?php 
        echo $cur_word['id'];
        ?>
]" value="<?php 
        echo luna_htmlspecialchars($cur_word['replace_with']);
        ?>
" maxlength="60" />
								</td>
								<td>
									<div class="btn-group">
										<button class="btn btn-primary" type="submit" name="update[<?php 
        echo $cur_word['id'];
        ?>
]"><span class="fa fa-fw fa-check"></span> <?php 
        _e('Update', 'luna');
        ?>
</button>
										<button class="btn btn-danger" type="submit" name="remove[<?php 
        echo $cur_word['id'];
        ?>
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:censoring.php

示例12: delete_thread

    require LUNA_ROOT . 'include/search_idx.php';
    if ($is_thread_comment) {
        // Delete the thread and all of its comments
        delete_thread($cur_comment['tid'], "hard");
        update_forum($cur_comment['fid']);
        redirect('viewforum.php?id=' . $cur_comment['fid']);
    } else {
        // Delete just this one comment
        delete_comment($id, $cur_comment['tid'], $cur_comment['commenter_id']);
        update_forum($cur_comment['fid']);
        // Redirect towards the previous comment
        $result = $db->query('SELECT id FROM ' . $db->prefix . 'comments WHERE thread_id=' . $cur_comment['tid'] . ' AND id < ' . $id . ' ORDER BY id DESC LIMIT 1') or error('Unable to fetch comment info', __FILE__, __LINE__, $db->error());
        $comment_id = $db->result($result);
        redirect('thread.php?pid=' . $comment_id . '#p' . $comment_id);
    }
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Delete comment', 'luna'));
define('LUNA_ACTIVE_PAGE', 'delete');
require LUNA_ROOT . 'include/parser.php';
$cur_comment['message'] = parse_message($cur_comment['message']);
require load_page('header.php');
if ($action == "reset") {
    require load_page('reset.php');
}
if ($action == "soft") {
    require load_page('soft.php');
}
if ($action == "delete") {
    require load_page('delete.php');
}
require load_page('footer.php');
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:delete.php

示例13: _e

    ?>
</th>
					<td>
						<select class="form-control" name="user_group" tabindex="23">
							<option value="-1" selected><?php 
    _e('All groups', 'luna');
    ?>
</option>
							<option value="0"><?php 
    _e('Unverified users', 'luna');
    ?>
</option>
<?php 
    $result = $db->query('SELECT g_id, g_title FROM ' . $db->prefix . 'groups WHERE g_id!=' . FORUM_GUEST . ' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
    while ($cur_group = $db->fetch_assoc($result)) {
        echo "\t\t\t\t\t\t\t\t\t\t\t" . '<option value="' . $cur_group['g_id'] . '">' . luna_htmlspecialchars($cur_group['g_title']) . '</option>' . "\n";
    }
    ?>
						</select>
					</td>
				</tr>
				<tr>
					<th><?php 
    _e('Admin note', 'luna');
    ?>
</th>
					<td colspan="3"><input type="text" class="form-control" name="form[admin_note]" maxlength="30" tabindex="13" /></td>
				</tr>
				<tr>
					<th><?php 
    _e('Number of posts less than', 'luna');
开发者ID:BogusCurry,项目名称:Luna,代码行数:31,代码来源:users.php

示例14: luna_htmlspecialchars

    echo luna_htmlspecialchars($p_destinataire);
    ?>
" tabindex="<?php 
    echo $cur_index++;
    ?>
" autofocus />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><?php 
    _e('Subject', 'luna');
    ?>
</label>
					<div class="col-sm-9">
						<input class="form-control" type="text" name="req_subject" value="<?php 
    echo $p_subject != '' ? luna_htmlspecialchars($p_subject) : '';
    ?>
" tabindex="<?php 
    echo $cur_index++;
    ?>
" />
					</div>
				</div>
				<?php 
}
?>
				<div class="form-group">
					<label class="col-sm-3 control-label"><?php 
_e('Message', 'luna');
?>
</label>
开发者ID:BogusCurry,项目名称:Luna,代码行数:31,代码来源:inbox-new.php

示例15: explode

        ?>
							</td>
							<td>
		<?php 
        if ($luna_user['g_view_users'] == '1') {
            $ids_list = explode(', ', $cur_mess['receiver_id']);
            $sender_list = explode(', ', $cur_mess['receiver']);
            $sender_list = str_replace('Deleted', __('Deleted', 'luna'), $sender_list);
            for ($i = '0'; $i < count($ids_list); $i++) {
                echo '<a href="profile.php?id=' . $ids_list[$i] . '">' . luna_htmlspecialchars($sender_list[$i]) . '</a>';
                if ($ids_list[$i][count($ids_list[$i]) - '1']) {
                    echo '<br />';
                }
            }
        } else {
            echo luna_htmlspecialchars($cur_mess['receiver']);
        }
        ?>
							</td>
							<td><?php 
        echo $last_comment;
        ?>
</td>
						</tr>
<?php 
    }
} else {
    echo "\t" . '<tr><td colspan="4">' . __('No messages', 'luna') . '</td></tr>' . "\n";
}
?>
					</tbody>
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:31,代码来源:inbox.php


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