本文整理汇总了PHP中smilies_pass函数的典型用法代码示例。如果您正苦于以下问题:PHP smilies_pass函数的具体用法?PHP smilies_pass怎么用?PHP smilies_pass使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smilies_pass函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
global $template, $db, $board_config, $phpbb_seo, $lang;
global $rcs, $get, $qte;
$template->assign_vars(array('MARQUEE_TOPIC' => str_replace("%s", $board_config['topics_on_index'], $lang['marquee_topic'])));
if (!($result = $db->sql_query($this->getFetchSql(), false, 'topics_recent_'))) {
message_die(GENERAL_ERROR, 'Could not query recent posts marquee information', '', __LINE__, __FILE__);
}
if ($rows = $db->sql_fetchrowset($result)) {
$db->sql_freeresult($result);
}
$topics = count($rows) <= $board_config['topics_on_index'] ? count($rows) : $board_config['topics_on_index'];
for ($i = 0; $i < $topics; ++$i) {
$topic = $rows[$i];
$mar_title = $topic["topic_title"];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (!isset($phpbb_seo->seo_url['topic'][$topic['topic_id']])) {
$phpbb_seo->seo_url['topic'][$topic['topic_id']] = $phpbb_seo->format_url($mar_title);
}
// www.phpBB-SEO.com SEO TOOLKIT END
$mar_url = $get->url('viewtopic', array(POST_TOPIC_URL => $topic["topic_id"]));
$mar_user = $topic["username"];
$pic = pic_for_topic($topic);
if ($board_config['allow_smilies']) {
$topic["topic_title"] = smilies_pass($topic["topic_title"]);
}
$topic_title = $topic['topic_title'];
$qte->attr($topic_title, $topic['topic_attribute']);
$template->assign_block_vars('marqueerow', array('FOLD_URL' => $pic, 'TOPIC_TITLE' => $topic_title, 'TOPIC_URL' => $get->url('viewtopic', array(POST_TOPIC_URL => $topic["topic_id"]), true), 'POST_URL' => $get->url('viewtopic', array('p' => $topic["post_id"]), true) . '#' . $topic["post_id"], 'STYLE' => $rcs->get_colors($topic), 'USERNAME' => $topic["username"], 'USER_PROF' => $get->url('userlist', array('mode' => 'viewprofile', POST_USERS_URL => $topic["user_id"]), true), 'POST_DATE' => create_date($board_config['default_dateformat'], $topic["post_time"], $board_config['board_timezone'])));
}
}
示例2: __construct
public function __construct()
{
global $template, $announcement_centre_config;
$this->config = $announcement_centre_config;
$this->config['announcement_text'] = smilies_pass($this->config['announcement_text']);
$announcement_text_uid = make_bbcode_uid();
$this->config['announcement_text'] = bbencode_first_pass($this->config['announcement_text'], $announcement_text_uid);
$this->config['announcement_text'] = bbencode_second_pass($this->config['announcement_text'], $announcement_text_uid);
$this->config['announcement_text'] = str_replace("\n", "\n<br />\n", $this->config['announcement_text']);
$this->config['announcement_guest_text'] = smilies_pass($this->config['announcement_guest_text']);
$announcement_guest_text_uid = make_bbcode_uid();
$this->config['announcement_guest_text'] = bbencode_first_pass($this->config['announcement_guest_text'], $announcement_guest_text_uid);
$this->config['announcement_guest_text'] = bbencode_second_pass($this->config['announcement_guest_text'], $announcement_guest_text_uid);
$this->config['announcement_guest_text'] = str_replace("\n", "\n<br />\n", $this->config['announcement_guest_text']);
$announcement_guest_text = $this->config['announcement_guest_text'];
$announcement_title = empty($this->config['announcement_title']) ? $lang['Site_announcement_block_title'] : str_replace("\n", "\n<br />\n", $this->config['announcement_title']);
$announcement_guest_title = empty($this->config['announcement_guest_title']) ? $lang['Guest_announcement_block_title'] : str_replace("\n", "\n<br />\n", $this->config['announcement_guest_title']);
// get the post information in case last topic or forum has been entered
if (!$this->config['announcement_forum_id'] == '' || !$this->config['announcement_topic_id'] == '') {
if (!($result = $db->sql_query($this->getFetchSql()))) {
message_die(GENERAL_ERROR, 'Error in getting announcement post', '', __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result)) {
$row['post_text'] = smilies_pass($row['post_text']);
$row['post_text'] = bbencode_first_pass($row['post_text'], $row['bbcode_uid']);
$row['post_text'] = bbencode_second_pass($row['post_text'], $row['bbcode_uid']);
$row['post_text'] = str_replace("\n", "\n<br />\n", $row['post_text']);
$announcement_text = $row['post_text'];
}
} else {
$announcement_text = $this->config['announcement_text'];
}
// who sees the announcements
if ($this->config['announcement_status'] == ANNOUNCEMENTS_LEFTY74_SHOW_YES) {
switch ($this->getDisplay()) {
case 'normal':
$template->assign_block_vars('announcement_displayed', array());
break;
case 'guest':
$template->assign_block_vars('guest_announcement_displayed', array());
break;
default:
$template->assign_block_vars('announcement_not_displayed', array());
}
}
//BEGIN ACP Site Announcement Centre by lefty74
$template->assign_vars(array('L_ANNOUNCEMENT_TITLE' => $announcement_title, 'SITE_ANNOUNCEMENTS_LEFTY74' => $announcement_text, 'L_ANNOUNCEMENT_GUEST_TITLE' => $announcement_guest_title, 'GUEST_ANNOUNCEMENTS_LEFTY74' => $announcement_guest_text));
}
示例3: _sf_display_nav
function _sf_display_nav($forum_id, $tpl_switch = '')
{
global $db, $template;
global $phpbb_root_path, $phpEx;
// read forum
$sql = 'SELECT f.forum_id, f.forum_name, f.forum_desc, f.forum_parent, c.cat_id, c.cat_title
FROM ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c, ' . FORUMS_TABLE . ' fo
WHERE fo.forum_id = ' . intval($forum_id) . '
AND c.cat_id = fo.cat_id
AND f.cat_id = c.cat_id
AND f.forum_order <= fo.forum_order
ORDER BY f.forum_order DESC';
if (!($result = $db->sql_query($sql, false, 'forums'))) {
message_die(GENERAL_ERROR, 'Could not query forums data', '', __LINE__, __FILE__, $sql);
}
$nav = array();
$find_id = $forum_id;
while ($row = $db->sql_fetchrow($result)) {
if (empty($cat)) {
$cat = array('forum_id' => intval($row['cat_id']), 'forum_name' => $row['cat_title'], 'forum_desc' => '', 'forum_parent' => 0, 'forum_type' => POST_CAT_URL);
}
unset($row['cat_id']);
unset($row['cat_title']);
if (intval($row['forum_id']) == $find_id) {
$row['forum_type'] = POST_FORUM_URL;
$find_id = intval($row['forum_parent']);
unset($row['forum_parent']);
$nav[] = $row;
}
if (!$find_id) {
break;
}
}
$db->sql_freeresult($result);
if (!empty($nav)) {
$nav[] = $cat;
$nav = array_reverse($nav);
}
// display
if ($count_nav = count($nav)) {
for ($i = 0; $i < $count_nav; $i++) {
$template->assign_block_vars('nav', array('U_NAV' => append_sid(($nav[$i]['forum_type'] == POST_CAT_URL ? 'index.' : 'viewforum.') . $phpEx . '?' . $nav[$i]['forum_type'] . '=' . $nav[$i]['forum_id']), 'L_NAV' => smilies_pass($nav[$i]['forum_name']), 'L_NAV_DESC' => $nav[$i]['forum_desc'], 'L_NAV_DESC_HTML' => $nav[$i]['forum_desc'] ? htmlspecialchars(preg_replace('#<[\\/\\!]*?[^<>]*?>#si', '', $nav[$i]['forum_desc'])) : ''));
if ($tpl_switch) {
$template->assign_block_vars('nav.' . $tpl_switch, array());
}
}
}
}
示例4: smilies_pass
$on_off_hidden = '<img src="' . $images['icon_online'] . '" alt="' . $lang['Online'] . '" title="' . $lang['Online'] . '" border="0" />';
} else {
if ($postrow[$i]['user_allow_viewonline'] == 0) {
$on_off_hidden = '<img src="' . $images['icon_hidden'] . '" alt="' . $lang['Hidden'] . '" title="' . $lang['Hidden'] . '" border="0" />';
} else {
if ($poster_id == ANONYMOUS) {
$on_off_hidden = '';
} else {
$on_off_hidden = '<img src="' . $images['icon_offline'] . '" alt="' . $lang['Offline'] . '" title="' . $lang['Offline'] . '" border="0" />';
}
}
}
//Online/Offline
// Start Smilies Invasion Mod
if ($board_config['allow_smilies']) {
$post_subject = smilies_pass($post_subject);
}
// End Smilies Invasion Mod
$message = AddClicksCounter($message);
$template->assign_block_vars('postrow', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'ADR_TOPIC_BOX' => $adr_topic_box, 'RABBITOSHI_LINK' => $rabbitoshi_link, 'POSTER_NAME' => $poster_id == ANONYMOUS ? $postrow[$i]['post_username'] != '' ? $postrow[$i]['post_username'] : $lang['Guest'] : $rcs->get_colors($postrow[$i], $postrow[$i]['username']), 'PAGERANK' => $PageRank, 'POSTER_RANK' => $poster_rank, 'POSTER_GENDER' => $gender_image, 'RANK_IMAGE' => $rank_image, 'POSTER_JOINED' => $poster_joined, 'POSTER_POSTS' => $poster_posts, 'POSTER_FROM' => $poster_from, 'POSTER_AVATAR' => $poster_avatar, 'POSTER_ONLINE' => $on_off_hidden, 'POST_DATE' => $post_date, 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'POST_NUMBER' => $post_number, 'POST_ID' => $post_id, 'SIGNATURE' => $user_sig, 'EDITED_MESSAGE' => $l_edited_by, 'S_NUM_ROW' => $num_row, 'S_NAV_BUTTONS' => $nav_buttons, 'I_MINITIME' => $images['icon_minitime'], 'MINI_POST_IMG' => $mini_post_img, 'PROFILE_IMG' => $profile_img, 'PROFILE' => $profile, 'MINI_PROFILE_IMG' => $mini_profile_img, 'MINI_PROFILE' => $mini_profile, 'SEARCH_IMG' => $search_img, 'SEARCH' => $search, 'PM_IMG' => $pm_img, 'PM' => $pm, 'EMAIL_IMG' => $email_img, 'EMAIL' => $email, 'WWW_IMG' => $www_img, 'WWW' => $www, 'ICQ_STATUS_IMG' => $icq_status_img, 'ICQ_IMG' => $icq_img, 'ICQ' => $icq, 'AIM_IMG' => $aim_img, 'AIM' => $aim, 'MSN_IMG' => $msn_img, 'MSN' => $msn, 'YIM_IMG' => $yim_img, 'YIM' => $yim, 'EDIT_IMG' => $edit_img, 'EDIT' => $edit, 'QUOTE_IMG' => $quote_img, 'QUOTE' => $quote, 'IP_IMG' => $ip_img, 'IP' => $ip, 'DELETE_IMG' => $delpost_img, 'DELETE' => $delpost, 'I_QP_QUOTE' => $qp_quote_img, 'L_GENDER' => $lang['Gender'], 'POINTS' => $user_points, 'DONATE_POINTS' => $donate_points, 'USER_WARNINGS' => $user_warnings, 'CARD_IMG' => $card_img, 'CARD_HIDDEN_FIELDS' => $card_hidden, 'CARD_EXTRA_SPACE' => $r_card_img || $y_card_img || $g_card_img || $b_card_img ? ' ' : '', 'L_MINI_POST_ALT' => $mini_post_alt, 'KEEP_UNREAD_IMG' => $keep_unread_img, 'L_POST' => $lang['Post'], 'U_MINI_POST' => $mini_post_url, 'U_G_CARD' => $g_card_img, 'U_Y_CARD' => $y_card_img, 'U_R_CARD' => $r_card_img, 'U_B_CARD' => $b_card_img, 'S_CARD' => append_sid("card." . $phpEx), 'U_VIEW_POSTER_PROFILE' => $userdata['user_level'] != ADMIN ? append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . "=" . $poster_id) : append_sid("admin/admin_users.{$phpEx}?mode=edit&" . POST_USERS_URL . "=" . $poster_id . "&sid=" . $userdata['session_id']), 'POSTER_STYLE' => $poster_style_color, 'U_POST_ID' => $postrow[$i]['post_id']));
display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']);
//-- mod : birthday ------------------------------------------------------------
$birthday->display_details($poster_birthday, $poster_zodiac, false, 'postrow');
//-- mod : flags ---------------------------------------------------------------
display_flag($poster_flag, false, 'postrow');
//-- mod : post description ----------------------------------------------------
display_sub_title('postrow', $post_sub_title, $board_config['sub_title_length']);
//-- mod : topics enhanced -----------------------------------------------------
if ($i != $total_posts - 1) {
$template->assign_block_vars('postrow.spacing', array());
}
示例5: topic_review
//.........这里部分代码省略.........
// Start session management
//
$userdata = session_pagestart($user_ip, $forum_id);
init_userprefs($userdata);
//
// End session management
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row);
if (!$is_auth['auth_read']) {
message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']));
}
}
//
// Define censored word matches
//
if (empty($orig_word) && empty($replacement_word)) {
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
}
//
// Dump out the page header and load viewtopic body template
//
if (!$is_inline_review) {
$gen_simple_header = TRUE;
$page_title = $lang['Topic_review'] . ' - ' . $topic_title;
include $phpbb_root_path . 'includes/page_header.' . $phpEx;
$template->set_filenames(array('reviewbody' => 'posting_topic_review.tpl'));
}
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_id, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid\n\t\tFROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt\n\t\tWHERE p.topic_id = {$topic_id}\n\t\t\tAND p.poster_id = u.user_id\n\t\t\tAND p.post_id = pt.post_id\n\t\tORDER BY p.post_time DESC\n\t\tLIMIT " . $board_config['posts_per_page'];
if (!($result = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not obtain post/user information', '', __LINE__, __FILE__, $sql);
}
//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
if ($row = $db->sql_fetchrow($result)) {
$mini_post_img = $images['icon_minipost'];
$mini_post_alt = $lang['Post'];
$i = 0;
do {
$poster_id = $row['user_id'];
$poster = $row['username'];
$post_date = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);
//
// Handle anon users posting with usernames
//
if ($poster_id == ANONYMOUS && $row['post_username'] != '') {
$poster = $row['post_username'];
$poster_rank = $lang['Guest'];
} elseif ($poster_id == ANONYMOUS) {
$poster = $lang['Guest'];
$poster_rank = '';
}
$post_subject = $row['post_subject'] != '' ? $row['post_subject'] : '';
$message = $row['post_text'];
$bbcode_uid = $row['bbcode_uid'];
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if (!$board_config['allow_html'] && $row['enable_html']) {
$message = preg_replace('#(<)([\\/]?.*?)(>)#is', '<\\2>', $message);
}
if ($bbcode_uid != "") {
$message = $board_config['allow_bbcode'] ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $message);
}
$message = make_clickable($message);
if (count($orig_word)) {
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
$message = preg_replace($orig_word, $replacement_word, $message);
}
if ($board_config['allow_smilies'] && $row['enable_smilies']) {
$message = smilies_pass($message);
}
$message = str_replace("\n", '<br />', $message);
//
// Again this will be handled by the templating
// code at some point
//
$row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars('postrow', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'MINI_POST_IMG' => $mini_post_img, 'POSTER_NAME' => $poster, 'POST_DATE' => $post_date, 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'L_MINI_POST_ALT' => $mini_post_alt));
$i++;
} while ($row = $db->sql_fetchrow($result));
} else {
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
$template->assign_vars(array('L_AUTHOR' => $lang['Author'], 'L_MESSAGE' => $lang['Message'], 'L_POSTED' => $lang['Posted'], 'L_POST_SUBJECT' => $lang['Post_subject'], 'L_TOPIC_REVIEW' => $lang['Topic_review']));
if (!$is_inline_review) {
$template->pparse('reviewbody');
include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
}
}
示例6: array
$_sf_last_child_idx = array();
$display_categories = _sf_get_last_stacked_data($forum_data, $is_auth_ary, $_sf_root_forum_id, $_sf_cat_first, $_sf_last_sub_id, $_sf_last_child_idx);
if (empty($display_categories)) {
if (defined('IN_VIEWFORUM')) {
return;
}
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
//-- mod: sf - end
//
// Okay, let's build the index
//
for ($i = 0; $i < $total_categories; $i++) {
$cat_id = $category_rows[$i]['cat_id'];
if ($board_config['allow_smilies']) {
$category_rows[$i]['cat_title'] = smilies_pass($category_rows[$i]['cat_title']);
}
//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if (isset($display_categories[$cat_id]) && $display_categories[$cat_id]) {
if (!isset($phpbb_seo->seo_url['cat'][$cat_id])) {
$phpbb_seo->seo_url['cat'][$cat_id] = $phpbb_seo->format_url($category_rows[$i]['cat_title'], $phpbb_seo->seo_static['cat']);
}
$template->assign_block_vars('catrow', array('DISPLAY' => is_category_collapsed($cat_id) ? '' : 'none', 'CAT_ID' => $cat_id, 'CAT_DESC' => trim($category_rows[$i]['cat_title']), 'CAT_DESC_NOHTML' => trim(preg_replace('#<([^>]+)>(([^<]+)<\\/([^>]+)>)?#iU', '', $category_rows[$i]['cat_title'])), 'U_VIEWCAT' => append_sid("index.{$phpEx}?" . POST_CAT_URL . "={$cat_id}")));
//-- mod: sf
if (!defined('IN_VIEWFORUM')) {
$template->assign_block_vars('catrow.cat', array());
$_sf_prev_forum_id = 0;
} else {
示例7: str_replace
// Highlight active words (primarily for search)
//
if ($highlight_match) {
$shout = str_replace('\\"', '"', substr(@preg_replace('#(\\>(((?>([^><]+|(?R)))*)\\<))#se', "@preg_replace('#\\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $shout . '<'), 1, -1));
}
//
// Replace naughty words
//
if (count($orig_word)) {
if ($user_sig != '') {
$user_sig = preg_replace($orig_word, $replacement_word, $user_sig);
}
$shout = preg_replace($orig_word, $replacement_word, $shout);
}
if ($smilies_on && $shout != '' && $shout_row['enable_smilies']) {
$shout = smilies_pass($shout);
}
$shout = bbencode_second_pass($shout, $shout_row['shout_bbcode_uid']);
$shout = str_replace("\n", "\n<br />\n", $shout);
if ($is_auth['auth_mod'] && $is_auth['auth_delete']) {
$temp_url = append_sid("shoutbox_max.{$phpEx}?mode=ip&" . POST_POST_URL . "=" . $shout_row['shout_id']);
$ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
$ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
$temp_url = append_sid("shoutbox_max.{$phpEx}?mode=delete&" . POST_POST_URL . "=" . $shout_row['shout_id']);
$delshout_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a> ';
$delshout = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
$temp_url = append_sid("shoutbox_max.{$phpEx}?mode=censor&" . POST_POST_URL . "=" . $shout_row['shout_id']);
$censorshout_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_censor'] . '" alt="' . $lang['Censor'] . '" title="' . $lang['Censor'] . '" border="0" /></a> ';
$censorshout = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
} else {
$ip_img = '';
示例8: message_die
if (!($result = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not query battle list', '', __LINE__, __FILE__, $sql);
}
$player_details = $db->sql_fetchrow($result);
// Get player 2 infos
$sql = "SELECT character_name FROM " . ADR_CHARACTERS_TABLE . "\n\t\tWHERE character_id = '{$purple}'";
if (!($result = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not query battle list', '', __LINE__, __FILE__, $sql);
}
$player_2_details = $db->sql_fetchrow($result);
// Set name colours
$new_blue = $player_details['character_name'];
$new_purple = $player_2_details['character_name'];
$new_orange = $player_details['monster_name'];
/* Start: Format chat */
$log = smilies_pass($log);
$format_chat = str_replace('%ST%', '<tr><td class="row2" align="left" width="100%" cellpadding="3"><span class="genmed"><i>', $log);
$format_chat2 = str_replace('%END%', '</i></span></td></tr>', $format_chat);
$format_chat3 = str_replace('%APOS%', '\'', $format_chat2);
$format_chat4 = str_replace($new_orange, '<font color="orange"><b>' . $new_orange . '</b></font>', $format_chat3);
$format_chat5 = str_replace($new_purple, '<font color="purple"><b>' . $new_purple . '</b></font>', $format_chat4);
$format_chat6 = str_replace($new_blue, '<font color="blue"><b>' . $new_blue . '</b></font>', $format_chat5);
$format_chat7 = str_replace('%BSS%', '<tr><td class="row2" align="left" width="100%"><span class="genmed"><font color="red"><i>', $format_chat6);
$format_chat8 = str_replace('%BSE%', '</i></font></span></td></tr>', $format_chat7);
$formatted = $format_chat8;
$formatted = stripslashes($formatted);
/* End: Format chat */
if (empty($formatted)) {
$formatted = '<tr><td class="row2" align="left" width="100%"><span class="genmed"><font color="red"><i>The battle has begun!<i></font></span></td></tr>';
}
$template->assign_vars(array('LOG' => $formatted));
示例9: format_rss_txt
/**
* format_rss_txt() will put together BBcodes and smilies before the output
* @access private
*/
function format_rss_txt($subject, $message, $msg_sumarize = 0, $message_url, $bbcode_uid, $allow_smiles = TRUE, $allow_html = FALSE, $allow_sig = FALSE)
{
global $board_config, $userdata, $lang;
// Since ' is not HTML, but is XML convert.
$message = ' ' . str_replace("’", "'", $message);
if (!empty($this->rss_config['rss_bbcode_filters'])) {
$patterns = $this->rss_config['rss_bbcode_filters']['pattern'];
$replaces = $this->rss_config['rss_bbcode_filters']['replace'];
if (!empty($patterns)) {
$message = preg_replace($patterns, $replaces, $message);
// Take care of nested bbcode tags when filtering all
if (strpos($this->rss_config['rss_strip_bbcode'], 'all') !== FALSE) {
$nested_cnt = preg_match_all("`(\\[[a-z]([^\\[\\]]*)\\])`i", $message, $matches);
for ($i = 1; $i <= $nested_cnt; $i++) {
$message = preg_replace($patterns, $replaces, $message);
}
}
}
}
if ($msg_sumarize > 0) {
$message = $this->summarize($message, $msg_sumarize, $this->rss_config['msg_sumarize_method']);
}
// Close all possibly broken quote tags after summarize, since they could break the layout.
if (strpos($message, "[quote:{$bbcode_uid}") !== FALSE) {
$open_count = preg_match_all("#\\[quote\\:{$bbcode_uid}#si", $message, $open_matches);
$close_count = preg_match_all("#\\[/quote\\:{$bbcode_uid}#si", $message, $close_matches);
$tags_to_close = $open_count - $close_count;
if ($tags_to_close > 0) {
for ($i = 1; $i <= $tags_to_close; $i++) {
$message .= ($i == $tags_to_close ? '<br/><br/><b>...</b>' : '') . " [/quote:{$bbcode_uid}]";
}
}
}
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
// Left commented for now as it would only be usefull for atom feed format
// And everything goes through htmlspecialchars anyway
//if ( $board_config['allow_html'] || !$userdata['user_allowhtml']) {
// if ( !$allow_html ) {
// $message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $message);
// }
//}
if ($bbcode_uid != '') {
if ($this->rss_config['rss_allow_bbcode']) {
if (!$this->rss_config['rss_allow_links']) {
$message = preg_replace("`\\[/?url(=.*?)?\\]`si", "", $message);
}
$message = bbencode_second_pass($message, $bbcode_uid);
if ($msg_sumarize > 0 || !empty($this->rss_config['rss_bbcode_filters'])) {
// Clean all possible bbcode_uids left
$message = preg_replace('`\\:[0-9a-z\\:=\\"]+\\]`si', ']', $message);
}
} else {
$message = preg_replace("`\\:[0-9a-z\\:=\"]+\\]`i", "]", $message);
}
}
if ($this->rss_config['rss_allow_links']) {
$message = make_clickable($message);
}
// Parse smilies
if ($this->rss_config['rss_allow_smilies']) {
if ($allow_smiles) {
$message = smilies_pass($message);
$message = preg_replace('`' . $this->path_config['smilies_path'] . '`', $this->path_config['smilies_url'], $message);
}
}
// Replace naughty words
if (count($orig_word)) {
$message = str_replace('\\"', '"', substr(@preg_replace('#(\\>(((?>([^><]+|(?R)))*)\\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
}
$message .= '<br/><br/><a href="' . $message_url . '" title="' . $subject . '"><b>' . $lang['rss_more'] . '</b></a>';
$message = str_replace("\n", "\n<br/>\n", $message);
$message = str_replace("span", "div class=\"detail\"", $message);
$message = preg_replace('|[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1f]|', '', $message);
return $message;
}
示例10: foreach
foreach ($k_blocks as $blk) {
if ($blk['html_file_name'] == 'block_top_topics.html') {
$block_cache_time = $blk['block_cache_time'];
}
}
$block_cache_time = isset($block_cache_time) ? $block_cache_time : $k_config['block_cache_time_default'];
$max_top_topics = $k_config['max_top_topics'];
$days_top_topics = $k_config['days_top_topics'];
$sql = 'SELECT topic_id, topic_title, topic_replies, forum_id
FROM ' . TOPICS_TABLE . '
WHERE topic_approved = 1
AND topic_replies <> 0
AND topic_status <> 2
AND topic_last_post_time > ' . (time() - $days_top_topics * 86400) . '
ORDER BY topic_replies DESC';
$result = $db->sql_query_limit($sql, $max_top_topics, 0, $block_cache_time);
while ($row = $db->sql_fetchrow($result)) {
if (!$row['topic_title']) {
continue;
}
if ($auth->acl_gets('f_list', 'f_read', $row['forum_id'])) {
// reduce length and pad with ... if too long //
$my_title = smilies_pass($row['topic_title']);
if (strlen($my_title) > 16) {
$my_title = sgp_checksize($my_title, 14);
}
$template->assign_block_vars('top_topics', array('TOPIC_TITLE' => $my_title, 'FULL_T_TITLE' => smilies_pass($row['topic_title']), 'S_SEARCH_ACTION' => append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']), 'TOPIC_REPLIES' => $row['topic_replies']));
}
}
$db->sql_freeresult($result);
$template->assign_vars(array('TOP_TOPICS_DAYS' => sprintf($user->lang['TOP_TOPICS_DAYS'], $k_config['days_top_topics']), 'TOP_TOPICS_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));
示例11: array
$row++;
} else {
$col++;
}
}
if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns) {
$template->assign_block_vars('switch_smilies_extra', array());
$template->assign_vars(array('L_MORE_SMILIES' => $lang['More_emoticons'], 'U_MORE_SMILIES_ANNOUNCEMENT_TEXT' => append_sid("../posting.{$phpEx}?mode=smilies_announcement_text")));
}
$template->assign_vars(array('L_EMOTICONS' => $lang['Emoticons'], 'L_CLOSE_WINDOW' => $lang['Close_window'], 'S_SMILIES_COLSPAN' => $s_colspan));
}
}
$template->set_filenames(array("body" => "admin/announcement_centre_config_body.tpl"));
//
// Escape any quotes in the site description for proper display in the text
// box on the Announcement Box page
//
$new['announcement_text'] = str_replace('"', '"', $new['announcement_text']);
$new['announcement_guest_text'] = str_replace('"', '"', $new['announcement_guest_text']);
$new['announcement_text_draft'] = str_replace('"', '"', $new['announcement_text_draft']);
$new['announcement_title'] = str_replace('"', '"', $new['announcement_title']);
$new['announcement_guest_title'] = str_replace('"', '"', $new['announcement_guest_title']);
$preview_announcement = $new['announcement_text_draft'];
$preview_announcement_uid = make_bbcode_uid();
$preview_announcement = bbencode_first_pass($preview_announcement, $preview_announcement_uid);
$preview_announcement = bbencode_second_pass($preview_announcement, $preview_announcement_uid);
$preview_announcement = smilies_pass($preview_announcement, './../');
$preview_announcement = str_replace("\n", "\n<br />\n", $preview_announcement);
$template->assign_vars(array("S_ANNOUNCEMENT_ACTION" => append_sid("admin_announcement_centre.{$phpEx}"), "L_BBCODE_B_HELP" => $lang['bbcode_b_help'], "L_BBCODE_I_HELP" => $lang['bbcode_i_help'], "L_BBCODE_U_HELP" => $lang['bbcode_u_help'], "L_BBCODE_Q_HELP" => $lang['bbcode_q_help'], "L_BBCODE_C_HELP" => $lang['bbcode_c_help'], "L_BBCODE_L_HELP" => $lang['bbcode_l_help'], "L_BBCODE_O_HELP" => $lang['bbcode_o_help'], "L_BBCODE_P_HELP" => $lang['bbcode_p_help'], "L_BBCODE_W_HELP" => $lang['bbcode_w_help'], "L_BBCODE_A_HELP" => $lang['bbcode_a_help'], "L_BBCODE_S_HELP" => $lang['bbcode_s_help'], "L_BBCODE_F_HELP" => $lang['bbcode_f_help'], "L_EMPTY_MESSAGE" => $lang['Empty_message'], "L_FONT_COLOR" => $lang['Font_color'], "L_COLOR_DEFAULT" => $lang['color_default'], "L_COLOR_DARK_RED" => $lang['color_dark_red'], "L_COLOR_RED" => $lang['color_red'], "L_COLOR_ORANGE" => $lang['color_orange'], "L_COLOR_BROWN" => $lang['color_brown'], "L_COLOR_YELLOW" => $lang['color_yellow'], "L_COLOR_GREEN" => $lang['color_green'], "L_COLOR_OLIVE" => $lang['color_olive'], "L_COLOR_CYAN" => $lang['color_cyan'], "L_COLOR_BLUE" => $lang['color_blue'], "L_COLOR_DARK_BLUE" => $lang['color_dark_blue'], "L_COLOR_INDIGO" => $lang['color_indigo'], "L_COLOR_VIOLET" => $lang['color_violet'], "L_COLOR_WHITE" => $lang['color_white'], "L_COLOR_BLACK" => $lang['color_black'], "L_FONT_SIZE" => $lang['Font_size'], "L_FONT_TINY" => $lang['font_tiny'], "L_FONT_SMALL" => $lang['font_small'], "L_FONT_NORMAL" => $lang['font_normal'], "L_FONT_LARGE" => $lang['font_large'], "L_FONT_HUGE" => $lang['font_huge'], "L_BBCODE_CLOSE_TAGS" => $lang['Close_Tags'], "L_STYLES_TIP" => $lang['Styles_tip'], "L_ANNOUNCEMENT_MAIN_TITLE" => $lang['Announcement_main_title'], "L_ANNOUNCEMENT_MAIN_TITLE_EXPLAIN" => $lang['Announcement_main_title_explain'], "L_ANNOUNCEMENT_BLOCK_TITLE" => $lang['Announcement_block_title'], "L_ANNOUNCEMENT_DRAFT_TEXT" => $lang['Announcement_draft_text'], "L_ANNOUNCEMENT_DRAFT_TEXT_EXPLAIN" => $lang['Announcement_draft_text_explain'], "L_SHOW_ANNOUNCEMENT_TEXT" => $lang['Show_announcement_text'], "L_ANNOUNCEMENT_TITLE" => $lang['Announcement_title'], "L_ANNOUNCEMENT_TITLE_EXPLAIN" => $lang['Announcement_title_explain'], "L_ANNOUNCEMENT_DEFAULT_TITLE_EXPLAIN" => $lang['Announcement_default_title_explain'] . $lang['Site_announcement_block_title'], "L_ANNOUNCEMENT_TEXT" => $lang['Announcement_text'], "L_ANNOUNCEMENT_TEXT_EXPLAIN" => $lang['Announcement_text_explain'], "L_FORUM_ID" => $lang['Forum_ID'], "L_TOPIC_ID" => $lang['Topic_ID'], "L_ANNOUNCEMENT_FORUM_TOPIC_LATEST" => $lang['Announcement_forum_topic_latest'], "L_ANNOUNCEMENT_FORUM_TOPIC_FIRST" => $lang['Announcement_forum_topic_first'], "L_ANNOUNCEMENT_GUEST_TITLE" => $lang['Announcement_guest_title'], "L_ANNOUNCEMENT_DEFAULT_GUEST_TITLE_EXPLAIN" => $lang['Announcement_default_title_explain'] . $lang['Guest_announcement_block_title'], "L_ANNOUNCEMENT_GUEST_TITLE_EXPLAIN" => $lang['Announcement_guest_title_explain'], "L_ANNOUNCEMENT_GUEST_TEXT" => $lang['Announcement_guest_text'], "L_SELECT_ALL" => $lang['Select_all'], "L_COPY_TO_ANNOUNCEMENT" => $lang['Copy_to_Announcement'], "L_COPY_TO_GUEST_ANNOUNCEMENT" => $lang['Copy_to_Guest_Announcement'], "L_SUBMIT" => $lang['Submit'], "L_PREVIEW" => $lang['Preview'], "L_RESET" => $lang['Reset'], "L_YES" => $lang['Yes'], "L_NO" => $lang['No'], "ANNOUNCEMENT_VERSION" => sprintf($announcement_centre_config['announcement_mod_version']), "L_SHOW_ANNOUNCEMENT_ALL" => $lang['Show_announcement_all'], "L_SHOW_ANNOUNCEMENT_REG" => $lang['Show_announcement_reg'], "L_SHOW_ANNOUNCEMENT_MOD" => $lang['Show_announcement_mod'], "L_SHOW_ANNOUNCEMENT_ADM" => $lang['Show_announcement_adm'], "L_SHOW_ANNOUNCEMENT_WHO" => $lang['Show_announcement_who'], "L_ANNOUNCEMENT_GUESTS_ONLY" => $lang['Announcement_guests_only'], "L_ANNOUNCEMENT_GUESTS_ONLY_EXPLAIN" => $lang['Announcement_guests_only_explain'], "ANNOUNCEMENT_FORUM_ID" => $new['announcement_forum_id'], "ANNOUNCEMENT_TOPIC_ID" => $new['announcement_topic_id'], "ANNOUNCEMENT_TITLE" => $new['announcement_title'], "ANNOUNCEMENT_TEXT" => $new['announcement_text'], "ANNOUNCEMENT_GUEST_TITLE" => $new['announcement_guest_title'], "ANNOUNCEMENT_GUEST_TEXT" => $new['announcement_guest_text'], "ANNOUNCEMENT_TEXT_DRAFT" => $new['announcement_text_draft'], "ANNOUNCEMENT_PREVIEW" => $preview_announcement, "S_ANNOUNCEMENT_STATUS_YES" => $announcement_status_yes, "SHOW_ANNOUNCEMENT_YES" => ANNOUNCEMENTS_LEFTY74_SHOW_YES, "S_ANNOUNCEMENT_STATUS_NO" => $announcement_status_no, "SHOW_ANNOUNCEMENT_NO" => ANNOUNCEMENTS_LEFTY74_SHOW_NO, "S_ANNOUNCEMENT_FORUM_TOPIC_LATEST" => $announcement_forum_topic_latest, "ANNOUNCEMENT_FORUM_TOPIC_LATEST" => ANNOUNCEMENTS_LEFTY74_FORUM_TOPIC_LATEST, "S_ANNOUNCEMENT_FORUM_TOPIC_FIRST" => $announcement_forum_topic_first, "ANNOUNCEMENT_FORUM_TOPIC_FIRST" => ANNOUNCEMENTS_LEFTY74_FORUM_TOPIC_FIRST, "ANNOUNCEMENT_GUEST_SEPARATE_STATUS_YES" => ANNOUNCEMENTS_LEFTY74_GUEST_YES, "S_ANNOUNCEMENT_GUEST_SEPARATE_STATUS_YES" => $announcement_guestannouncement_status_yes, "ANNOUNCEMENT_GUEST_SEPARATE_STATUS_NO" => ANNOUNCEMENTS_LEFTY74_GUEST_NO, "S_ANNOUNCEMENT_GUEST_SEPARATE_STATUS_NO" => $announcement_guestannouncement_status_no, "SHOW_ANNOUNCEMENT_ALL" => ANNOUNCEMENTS_LEFTY74_SHOW_ALL, "S_SHOW_ANNOUNCEMENT_ALL_CHECKED" => $show_announcement_all, "SHOW_ANNOUNCEMENT_REG" => ANNOUNCEMENTS_LEFTY74_SHOW_REG, "S_SHOW_ANNOUNCEMENT_REG_CHECKED" => $show_announcement_reg, "SHOW_ANNOUNCEMENT_MOD" => ANNOUNCEMENTS_LEFTY74_SHOW_MOD, "S_SHOW_ANNOUNCEMENT_MOD_CHECKED" => $show_announcement_mod, "SHOW_ANNOUNCEMENT_ADM" => ANNOUNCEMENTS_LEFTY74_SHOW_ADM, "S_SHOW_ANNOUNCEMENT_ADM_CHECKED" => $show_announcement_adm));
$template->pparse("body");
include './page_footer_admin.' . $phpEx;
示例12: phpbb_parse_text
function phpbb_parse_text($text = null, $bbcode_uid = null, $enable_smilies = true, $enable_bbcode = true, $enable_html = true, $hide_images = false, $replace_images = '')
{
global $CFG;
if (!$text) {
return;
}
//
// remove slashes
//
stripslashes($text);
//
// remove images if requested
//
if ($hide_images) {
if ($replace_images) {
$replacement = '[url=\\1]' . $replace_images . '[/url]';
} else {
$replacement = '';
}
$text = preg_replace("#\\[img:{$bbcode_uid}\\](.*?)\\[/img:{$bbcode_uid}\\]#si", $replacement, $text);
}
//
// parse html
//
if (!$enable_html) {
$text = preg_replace('#(<)([\\/]?.*?)(>)#is', "<\\2>", $text);
}
//
// parse bbcode
//
if ($enable_bbcode) {
$text = bbencode_second_pass($text, $bbcode_uid);
} else {
$text = preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $text);
}
//
// parse smilies if requested
//
if ($enable_smilies == 1 and $CFG['enable_smilies'] == true) {
$text = smilies_pass($text);
//
// need to overwrite the smilie path since we might not be
// within the phpBB directory
//
$text = preg_replace("/images\\/smiles/", $CFG['smilie_url'], $text);
}
//
// parse url's
//
$text = make_clickable($text);
//
// change newlines to HTML
//
$text = str_replace("\n", "\n<br />\n", $text);
return $text;
}
示例13: str_replace
}
#==== Generic BBCode Pass ===================================== |
# Did it this way so i wouldn't have to use bbcode_uid for each post
$todays_chat = str_replace('[b]', '<b>', $todays_chat);
$todays_chat = str_replace('[/b]', '</b>', $todays_chat);
$todays_chat = str_replace('[i]', '<i>', $todays_chat);
$todays_chat = str_replace('[/i]', '</i>', $todays_chat);
#==== HTML Block Pass ========================================= |
# This is done to prevent stretching the page or a redirect exploit.
$allowed = '<b><i><a><font>';
$todays_chat = strip_tags($todays_chat, $allowed);
#==== Starting Pass =========================================== |
$todays_chat = str_replace('%S%', '<tr><td class="row2" align="left" width="100%"><span class="genmed">', $todays_chat);
#==== Closing Pass ============================================ |
$todays_chat = str_replace('%E%', '</span></td></tr>', $todays_chat);
#==== Smilies Pass ============================================ |
if ($board_config['allow_smilies']) {
$todays_chat = smilies_pass($todays_chat);
}
#==== Unquote where necessary ===================================== |
$todays_chat = stripslashes($todays_chat);
$chat_session = $todays_chat;
$error_messages = $_POST['err'] ? $_POST['err'] : $_POST['err'];
if (!$error_messages) {
$error_messages = $_GET['err'] ? $_GET['err'] : $_GET['err'];
}
$error_messages = !$error_messages ? '' : $error_[$error_messages];
$template->assign_block_vars('chat_body', array('FORM' => append_sid("adr_global_chat.{$phpEx}"), 'TOP_L' => sprintf($lang['Adr_shoutbox_archive'], date('Y-m-d')), 'TOP_M' => ' : ', 'TOP_R' => '<a href="' . append_sid('adr_global_chat.' . $phpEx . '?mode=archives') . '">Archives</a>', 'MSG' => $lang['Adr_shoutbox_enter'], 'BUTTON' => $lang['Adr_shoutbox_shout'], 'ERROR' => $error_messages, 'TXT' => $chat_session, 'U_CHAT_VIEW' => append_sid("adr_global_chat.{$phpEx}")));
}
$template->assign_vars(array('U_CHAT_VIEW' => append_sid("adr_global_chat.{$phpEx}")));
$template->pparse('body');
示例14: message_die
message_die(GENERAL_ERROR, $lang['Error_Posts_Table'], '', __LINE__, __FILE__);
}
$privmsg = $db->sql_fetchrow($result);
/************************/
/* Just stole all the phpBB code for message processing :) And edited a ton of it out since we are all admins here */
/**********************/
$private_message = $privmsg['privmsgs_text'];
$bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
if ($bbcode_uid != '') {
$private_message = bbencode_second_pass($private_message, $bbcode_uid);
}
$private_message = make_clickable($private_message);
if ($privmsg['privmsgs_enable_smilies']) {
$old_config = $board_config['smilies_path'];
$board_config['smilies_path'] = '../' . $board_config['smilies_path'];
$private_message = smilies_pass($private_message);
$board_config['smilies_path'] = $old_config;
}
$private_message = str_replace("\n", '<br />', $private_message);
$template->set_filenames(array('viewmsg_body' => 'admin/admin_priv_msgs_view_body.tpl'));
$template->assign_vars(array('L_SUBJECT' => $lang['Subject'], 'L_TO' => $lang['To'], 'L_FROM' => $lang['From'], 'L_SENT_DATE' => $lang['Sent_Date'], 'L_PRIVATE_MESSAGES' => $aprvmUtil->modName));
$template->assign_vars(array('SUBJECT' => $privmsg['privmsgs_subject'], 'FROM' => $aprvmUtil->id_2_name($privmsg['privmsgs_from_userid']), 'FROM_IP' => $board_config['aprvmIP'] ? ' : (' . decode_ip($privmsg['privmsgs_ip']) . ')' : '', 'TO' => $aprvmUtil->id_2_name($privmsg['privmsgs_to_userid']), 'DATE' => create_date($lang['DATE_FORMAT'], $privmsg['privmsgs_date'], $board_config['board_timezone']), 'MESSAGE' => $private_message));
if ($board_config['aprvmView']) {
$template->assign_block_vars('popup_switch', array());
$template->pparse('viewmsg_body');
$aprvmUtil->copyright();
break;
} else {
$template->assign_var_from_handle('PM_MESSAGE', 'viewmsg_body');
}
case 'remove_old':
示例15: intval
$sqlN = "SELECT * FROM " . ADR_CLANS_NEWS_TABLE . " WHERE clan = '" . intval($_GET['clan']) . "' ORDER BY " . $order . " " . $asc . " LIMIT " . $start . ", " . $board_config['posts_per_page'];
if (!($resultN = $db->sql_query($sqlN))) {
message_die(GENERAL_ERROR, 'Error retrieving data', '', __LINE__, __FILE__, $sqlN);
}
$x = 1;
while ($rowN = $db->sql_fetchrow($resultN)) {
$sqlU = "SELECT character_name FROM " . ADR_CHARACTERS_TABLE . "\r\n\t\t\t\t\tWHERE character_id = '" . $rowN['poster'] . "' ";
if (!($resultU = $db->sql_query($sqlU))) {
message_die(GENERAL_ERROR, 'Error retrieving data', '', __LINE__, __FILE__, $sqlU);
}
while ($rowU = $db->sql_fetchrow($resultU)) {
$poster = $rowU['character_name'];
}
$text = stripslashes($rowN['text']);
$text = nl2br($text);
$template->assign_block_vars('news', array('FILE' => $file, 'BULLET' => $lang['clans_clp_news_bullet'], 'ID' => $rowN['id'], 'NID' => $rowN['id'], 'TITLE' => smilies_pass($rowN['title']), 'TEXT' => smilies_pass($text), 'ROW' => $x, 'POSTER' => $poster, 'POSTERID' => $rowN['poster'], 'BY' => $lang['clans_postedby'], 'DATE' => create_date($board_config['default_dateformat'], $rowN['date'], $board_config['board_timezone']), 'L_BACK_TO_CLANPAGE' => sprintf($lang['clans_clp_back_to_clanpage'], '<a href="' . $file . '?action=clanpage&clan=' . $_GET['clan'] . '">', '</a>'), 'L_ID' => $lang['clans_clp_news_postid'], 'ORDER' => $order, 'START' => $start, 'ASC' => $asc, 'CLAN' => $_GET['clan']));
$x++;
if ($x > 2) {
$x = 1;
}
}
$template->assign_vars(array('FILE' => $file, 'L_HEADER' => $lang['clans_clp'], 'L_INTRO' => $lang['clans_clp_intro'], 'L_DETAILS' => $lang['clans_clp_details'], 'L_MEMBERS' => $lang['clans_clp_members'], 'L_NEWS' => $lang['clans_clp_news'], 'L_TITLE' => $lang['clans_title'], 'L_NEWSPOST' => $lang['clans_message'], 'L_EDIT' => $lang['clans_edit'], 'AUTHOR' => $lang['clans_clp_news_author'], 'DATE' => $lang['clans_clp_news_date'], 'GO' => $lang['clans_clp_news_go'], 'L_SORT_BY' => $lang['clans_clp_news_sortby'], 'ASC' => $lang['clans_clp_news_asc'], 'DESC' => $lang['clans_clp_news_desc'], 'D_SELECTED' => $d_selected, 'A_SELECTED' => $a_selected, 'T_SELECTED' => $t_selected, 'ASC_SELECTED' => $asc_selected, 'DESC_SELECTED' => $desc_selected, 'U_ORDER' => $order, 'U_START' => $start, 'U_ASC' => $asc, 'NEWPOST_IMG' => $images['pm_postmsg'], 'MINIPOST_IMG' => $images['icon_minipost'], 'EDIT_IMG' => $images['icon_edit'], 'DELETE_IMG' => $images['icon_delpost'], 'CLAN' => $_GET['clan']));
// $template->set_filenames(array('body' => 'adr_clans_clp_news_body.tpl'));
adr_template_file('adr_clans_clp_news_body.tpl');
}
if ($_GET['a'] == "new") {
$this_title = $lang['clans_clp_news_new'];
$sqlN = "SELECT name FROM " . ADR_CLANS_TABLE . "\r\n\t\t\t\tWHERE id = '" . intval($_GET['clan']) . "' ";
if (!($resultN = $db->sql_query($sqlN))) {
message_die(GENERAL_ERROR, 'Error retrieving data', '', __LINE__, __FILE__, $sqlN);
}