Пример #1
0
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: ' . gmdate('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']) > FORUM_EXTERN_MAX_SUBJECT_LENGTH) {
            $subject_truncated = panther_htmlspecialchars(panther_trim(utf8_substr($item['title'], 0, FORUM_EXTERN_MAX_SUBJECT_LENGTH - 5))) . ' …';
        } else {
            $subject_truncated = panther_htmlspecialchars($item['title']);
        }
        echo '<li><a href="' . panther_htmlspecialchars($item['link']) . '" title="' . panther_htmlspecialchars($item['title']) . '">' . $subject_truncated . '</a></li>' . "\n";
    }
}
Пример #2
0
        ?>
" />
				<input type="hidden" name="db_name" value="<?php 
        echo panther_htmlspecialchars($config['db_name']);
        ?>
" />
				<input type="hidden" name="db_username" value="<?php 
        echo panther_htmlspecialchars($config['username']);
        ?>
" />
				<input type="hidden" name="db_password" value="<?php 
        echo panther_htmlspecialchars($config['password']);
        ?>
" />
				<input type="hidden" name="db_prefix" value="<?php 
        echo panther_htmlspecialchars($config['prefix']);
        ?>
" />

<?php 
        if (!empty($alerts)) {
            ?>
				<div class="box">
					<ul class="row error-list">
<?php 
            foreach ($alerts as $cur_alert) {
                echo "\t\t\t\t\t" . '<li>' . $cur_alert . '</li>' . "\n";
            }
            ?>
					</ul>
				</div>
Пример #3
0
 public function parse_signature($text)
 {
     if ($this->config['o_censoring'] == '1') {
         $text = censor_words($text);
     }
     // Convert applicable characters to HTML entities
     $text = panther_htmlspecialchars($text);
     if ($this->config['p_sig_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false) {
         $text = $this->do_bbcode($text, true);
     }
     if ($this->config['o_smilies_sig'] == '1' && $this->user['show_smilies'] == '1') {
         $text = $this->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 $this->clean_paragraphs($text);
 }
Пример #4
0
function colourize_group($username, $gid, $user_id = 1)
{
    global $panther_user, $panther_url;
    static $colourize_cache = array();
    if (!isset($colourize_cache[$username])) {
        $name = '<span class="gid' . $gid . '">' . panther_htmlspecialchars($username) . '</span>';
        if ($panther_user['g_view_users'] == 1 && $user_id > 1) {
            $colourize_cache[$username] = '<a href="' . panther_link($panther_url['profile'], array($user_id, url_friendly($username))) . '">' . $name . '</a>';
        } else {
            $colourize_cache[$username] = $name;
        }
    }
    return $colourize_cache[$username];
}