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


PHP create_date_ip函数代码示例

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


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

示例1: cms_block_center_downloads

 function cms_block_center_downloads()
 {
     global $db, $cache, $config, $template, $theme, $images, $lang, $table_prefix, $block_id, $cms_config_vars;
     include IP_ROOT_PATH . PA_FILE_DB_PATH . 'pafiledb_constants.' . PHP_EXT;
     $template->_tpldata['dlrow.'] = array();
     $template->_tpldata['dlrow2.'] = array();
     $sql = "SELECT * FROM " . PA_FILES_TABLE . "\n\t\t\t\t\t\tWHERE file_approved = '1'\n\t\t\t\t\t\t\tORDER BY file_dls DESC LIMIT 0," . $cms_config_vars['md_num_top_downloads'][$block_id];
     $result = $db->sql_query($sql);
     $i = 1;
     while ($file_most = $db->sql_fetchrow($result)) {
         $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
         $template->assign_block_vars('dlrow', array('NUMBER_MOST' => strval($i), 'ROW_CLASS' => $row_class, 'FILELINK_MOST' => append_sid('dload.' . PHP_EXT . '?action=file&file_id=' . $file_most['file_id']), 'FILENAME_MOST' => $file_most['file_name'], 'DESCRIP_MOST' => $file_most['file_desc'], 'INFO_MOST' => $file_most['file_dls'] . ' ' . $lang['Dls']));
         $i++;
     }
     $sql = "SELECT * FROM " . PA_FILES_TABLE . "\n\t\t\t\t\t\tWHERE file_approved = '1'\n\t\t\t\t\t\t\tORDER BY file_time DESC LIMIT 0," . $cms_config_vars['md_num_new_downloads'][$block_id];
     $result = $db->sql_query($sql);
     $i = 1;
     while ($file_latest = $db->sql_fetchrow($result)) {
         $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
         $template->assign_block_vars('dlrow2', array('NUMBER_LATEST' => strval($i), 'FILELINK_LATEST' => append_sid('dload.' . PHP_EXT . '?action=file&file_id=' . $file_latest['file_id']), 'ROW_CLASS' => $row_class, 'FILENAME_LATEST' => $file_latest['file_name'], 'DESCRIP_LATEST' => $file_latest['file_desc'], 'INFO_LATEST' => create_date_ip($config['default_dateformat'], $file_latest['file_time'], $config['board_timezone'])));
         $i++;
     }
     $db->sql_freeresult($result);
     $template->assign_vars(array('TOP_DOWNLOADS' => $lang['Top_downloads'], 'NEW_DOWNLOADS' => $lang['New_downloads']));
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:25,代码来源:center_downloads.php

示例2: cms_block_recent_articles

 function cms_block_recent_articles()
 {
     // if article approved in the table is equal to 1 the article has been approved, else it is not approved, so don't show it.
     global $db, $cache, $config, $template, $user, $lang, $table_prefix, $style_row, $block_id, $cms_config_vars;
     $template->_tpldata['recent_articles.'] = array();
     @(include_once IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
     $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " ORDER BY article_id DESC LIMIT " . $cms_config_vars['md_total_articles'][$block_id];
     $result = $db->sql_query($sql);
     //now lets get our info
     if ($row = $db->sql_fetchrow($result)) {
         $i = 0;
         do {
             if ($row['approved'] == 1) {
                 $title = $row['article_title'];
                 $author_id = $row['article_author_id'];
                 $author = colorize_username($author_id);
                 $article_category_id = $row['article_id'];
                 $url = append_sid(IP_ROOT_PATH . 'kb.' . PHP_EXT . '?mode=article&k=' . $article_category_id);
                 if ($cms_config_vars['md_recent_articles_style'][$block_id] == '1') {
                     $style_row = 'articles_scroll';
                 } else {
                     $style_row = 'articles_static';
                 }
                 $template->assign_block_vars($style_row, '');
                 // Convert and clean special chars!
                 $title = htmlspecialchars_clean($title);
                 $template->assign_block_vars($style_row . '.recent_articles', array('TITLE' => $title, 'U_ARTICLE' => $url, 'AUTHOR' => $author, 'DATE' => create_date_ip($config['default_dateformat'], $row['article_date'], $config['board_timezone'])));
             }
             $i++;
         } while ($row = $db->sql_fetchrow($result));
         $db->sql_freeresult($result);
     }
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:33,代码来源:recent_articles.php

示例3: cms_block_recent_topics

 function cms_block_recent_topics()
 {
     global $db, $cache, $config, $template, $user, $lang, $block_id, $cms_config_vars;
     $template->_tpldata['recent_topic_row.'] = array();
     $except_forums = build_exclusion_forums_list();
     $current_time = time();
     $extra = "AND t.topic_time <= {$current_time}";
     $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username, u.user_active, u.user_color\n\t\t\tFROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u\n\t\t\tWHERE t.forum_id NOT IN (" . $except_forums . ")\n\t\t\t\tAND t.topic_status <> 2\n\t\t\t\tAND p.post_id = t.topic_last_post_id\n\t\t\t\tAND p.poster_id = u.user_id\n\t\t\t\t{$extra}\n\t\t\tORDER BY p.post_time DESC\n\t\t\tLIMIT " . $cms_config_vars['md_num_recent_topics'][$block_id];
     $result = $db->sql_query($sql);
     $number_recent_topics = $db->sql_numrows($result);
     $recent_topic_row = array();
     while ($row1 = $db->sql_fetchrow($result)) {
         $recent_topic_row[] = $row1;
     }
     $db->sql_freeresult($result);
     if ($cms_config_vars['md_recent_topics_style'][$block_id]) {
         $style_row = 'scroll';
     } else {
         $style_row = 'static';
     }
     $template->assign_block_vars($style_row, '');
     for ($i = 0; $i < $number_recent_topics; $i++) {
         $recent_topic_row[$i]['topic_title'] = censor_text($recent_topic_row[$i]['topic_title']);
         // Convert and clean special chars!
         $topic_title = htmlspecialchars_clean($recent_topic_row[$i]['topic_title']);
         $template->assign_block_vars($style_row . '.recent_topic_row', array('U_TITLE' => append_sid(CMS_PAGE_VIEWTOPIC . '?' . POST_FORUM_URL . '=' . $recent_topic_row[$i]['forum_id'] . '&amp;' . POST_TOPIC_URL . '=' . $recent_topic_row[$i]['topic_id'] . '&amp;' . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#p' . $recent_topic_row[$i]['post_id'], 'L_TITLE' => $topic_title, 'L_BY' => $lang['By'], 'L_ON' => $lang['POSTED_ON'], 'S_POSTER' => colorize_username($recent_topic_row[$i]['user_id'], $recent_topic_row[$i]['username'], $recent_topic_row[$i]['user_color'], $recent_topic_row[$i]['user_active']), 'S_POSTTIME' => create_date_ip($config['default_dateformat'], $recent_topic_row[$i]['post_time'], $config['board_timezone'])));
     }
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:28,代码来源:recent_topics.php

示例4: cms_block_random_topics

 function cms_block_random_topics()
 {
     global $db, $cache, $config, $template, $user, $lang, $bbcode, $block_id, $cms_config_vars;
     @(include_once IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
     $template->_tpldata['random_topic_row.'] = array();
     $bbcode->allow_html = $user->data['user_allowhtml'] && $config['allow_html'] ? true : false;
     $bbcode->allow_bbcode = $user->data['user_allowbbcode'] && $config['allow_bbcode'] ? true : false;
     $bbcode->allow_smilies = $user->data['user_allowsmile'] && $config['allow_smilies'] ? true : false;
     $allowed_forum_id = build_allowed_forums_list();
     if ($allowed_forum_id != '') {
         $allow_forum_id = $cms_config_vars['md_random_topics_forums'][$block_id];
         if ($allow_forum_id == '0') {
             $allowed_forums_sql = 'AND t.forum_id IN (' . $allowed_forum_id . ')';
         } else {
             $allowed_forums = explode(',', $allow_forum_id);
             $allowed_forums_tmp = explode(',', $allowed_forum_id);
             $allowed_forum_id = '';
             for ($i = 0; $i < sizeof($allowed_forums); $i++) {
                 for ($j = 0; $j < sizeof($allowed_forums_tmp); $j++) {
                     if ($allowed_forums[$i] == $allowed_forums_tmp[$j]) {
                         $allowed_forum_id .= $allowed_forums[$i] . ',';
                         break;
                     }
                 }
             }
             if ($allowed_forum_id != '') {
                 $allowed_forum_id = substr($allowed_forum_id, -1, 1) == ',' ? substr($allowed_forum_id, 0, -1) : $allowed_forum_id;
                 $allowed_forums_sql = 'AND t.forum_id IN (' . $allowed_forum_id . ')';
             } else {
                 $no_topics_found = true;
             }
         }
     } else {
         $allowed_forums_sql = '';
     }
     $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username, u.user_active, u.user_color, f.forum_name\n\t\t\tFROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u, " . FORUMS_TABLE . " AS f\n\t\t\tWHERE t.topic_status <> 2\n\t\t\t\t" . $allowed_forums_sql . "\n\t\t\t\tAND f.forum_id = t.forum_id\n\t\t\t\tAND p.post_id = t.topic_last_post_id\n\t\t\t\tAND p.poster_id = u.user_id\n\t\t\tORDER BY RAND()\n\t\t\tLIMIT " . $cms_config_vars['md_num_random_topics'][$block_id];
     $result = $db->sql_query($sql);
     $number_random_topics = $db->sql_numrows($result);
     $random_topic_row = array();
     while ($row1 = $db->sql_fetchrow($result)) {
         $random_topic_row[] = $row1;
     }
     $db->sql_freeresult($result);
     if ($number_random_topics == 0 || $no_topics_found == true) {
         $template->assign_block_vars('no_topics', array('L_NO_TOPICS' => $lang['No_topics_found']));
     } else {
         if ($cms_config_vars['md_random_topics_style'][$block_id]) {
             $style_row = 'scroll';
         } else {
             $style_row = 'static';
         }
         $template->assign_block_vars($style_row, '');
         for ($i = 0; $i < $number_random_topics; $i++) {
             $random_topic_row[$i]['topic_title'] = censor_text($recent_topic_row[$i]['topic_title']);
             $template->assign_block_vars($style_row . '.random_topic_row', array('U_FORUM' => append_sid(CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $random_topic_row[$i]['forum_id']), 'L_FORUM' => $random_topic_row[$i]['forum_name'], 'U_TITLE' => append_sid(CMS_PAGE_VIEWTOPIC . '?' . POST_FORUM_URL . '=' . $random_topic_row[$i]['forum_id'] . '&amp;' . POST_TOPIC_URL . '=' . $random_topic_row[$i]['topic_id'] . '&amp;' . POST_POST_URL . '=' . $random_topic_row[$i]['post_id']) . '#p' . $random_topic_row[$i]['post_id'], 'L_TITLE' => $bbcode->parse(htmlspecialchars($random_topic_row[$i]['topic_title'])), 'L_BY' => $lang['By'], 'L_ON' => $lang['POSTED_ON'], 'S_POSTER' => colorize_username($random_topic_row[$i]['user_id'], $random_topic_row[$i]['username'], $random_topic_row[$i]['user_color'], $random_topic_row[$i]['user_active']), 'S_POSTTIME' => create_date_ip($config['default_dateformat'], $random_topic_row[$i]['post_time'], $config['board_timezone'])));
         }
     }
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:58,代码来源:random_topics.php

示例5: cms_block_new_downloads

 function cms_block_new_downloads()
 {
     global $db, $cache, $config, $template, $theme, $lang, $table_prefix, $block_id, $cms_config_vars;
     $template->_tpldata['dlrow2.'] = array();
     $sql = "SELECT * FROM " . $table_prefix . "pa_files ORDER BY file_time DESC LIMIT 0," . $cms_config_vars['md_num_new_downloads'][$block_id];
     if (!($result = $db->sql_query($sql))) {
         message_die(GENERAL_ERROR, 'Could not query database for the most downloads');
     }
     $i = 1;
     while ($file_latest = $db->sql_fetchrow($result)) {
         $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
         $template->assign_block_vars('dlrow2', array('NUMBER_LATEST' => strval($i), 'FILELINK_LATEST' => append_sid('dload.' . PHP_EXT . '?action=file&file_id=' . $file_latest['file_id']), 'ROW_CLASS' => $row_class, 'FILENAME_LATEST' => $file_latest['file_name'], 'DESCRIP_LATEST' => $file_latest['file_desc'], 'INFO_LATEST' => create_date_ip($config['default_dateformat'], $file_latest['file_time'], $config['board_timezone'])));
         $i++;
     }
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:15,代码来源:new_downloads.php

示例6: display_comments

/**
*
* @Extra credits for this file
* Mohd - (mohdalbasri@hotmail.com)
*
*/
function display_comments(&$file_data)
{
    global $pafiledb, $pafiledb_config, $pafiledb_functions;
    global $db, $cache, $config, $template, $images, $user, $lang, $bbcode;
    @(include_once IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
    @(include_once IP_ROOT_PATH . 'includes/functions_users.' . PHP_EXT);
    $template->assign_vars(array('L_COMMENTS' => $lang['Comments']));
    $sql = 'SELECT c.*, u.username, u.user_id, u.user_active, u.user_color, u.user_level, u.user_allow_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, u.user_skype, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_from, u.user_from_flag, u.user_rank, u.user_rank2, u.user_rank3, u.user_rank4, u.user_rank5, u.user_birthday, u.user_gender, u.user_allow_viewonline, u.user_lastvisit, u.user_session_time, u.user_style, u.user_lang
		FROM ' . PA_COMMENTS_TABLE . ' AS c
			LEFT JOIN ' . USERS_TABLE . " AS u ON c.poster_id = u.user_id\n\t\tWHERE c.file_id = '" . $file_data['file_id'] . "'\n\t\tORDER BY c.comments_time ASC";
    $result = $db->sql_query($sql);
    if (!($comment_number = $db->sql_numrows($result))) {
        $template->assign_vars(array('L_NO_COMMENTS' => $lang['No_comments'], 'NO_COMMENTS' => true));
    }
    $ranks_array = $cache->obtain_ranks(false);
    while ($comments_row = $db->sql_fetchrow($result)) {
        $time = create_date_ip($config['default_dateformat'], $comments_row['comments_time'], $config['board_timezone']);
        $comments_text = $comments_row['comments_text'];
        $comments_text = comment_suite($comments_text);
        $comments_text = censor_text($comments_text);
        //bbcode parser Start
        $bbcode->allow_html = $pafiledb_config['allow_html'] ? true : false;
        $bbcode->allow_bbcode = $pafiledb_config['allow_bbcode'] ? true : false;
        $bbcode->allow_smilies = $pafiledb_config['allow_smilies'] ? true : false;
        $comments_text = $bbcode->parse($comments_text);
        //bbcode parser End
        $poster = $comments_row['user_id'] == ANONYMOUS ? $lang['Guest'] : colorize_username($comments_row['user_id'], $comments_row['username'], $comments_row['user_color'], $comments_row['user_active']);
        $user_info = array();
        $user_info = generate_user_info($comments_row);
        foreach ($user_info as $k => $v) {
            ${$k} = $v;
        }
        $poster_posts = $comments_row['user_id'] != ANONYMOUS ? $lang['Posts'] . ': ' . $comments_row['user_posts'] : '';
        $poster_from = $user_info['from'];
        $poster_joined = $user_info['joined'];
        $poster_avatar = $user_info['avatar'];
        // Mighty Gorgon - Multiple Ranks - BEGIN
        $user_ranks = generate_ranks($comments_row, $ranks_array);
        // Mighty Gorgon - Multiple Ranks - END
        $comments_text = str_replace("\n", "\n<br />\n", $comments_text);
        $template->assign_block_vars('text', array('POSTER' => $poster, 'U_COMMENT_DELETE' => $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_delete_comment'] && $file_info['user_id'] == $user->data['user_id'] || $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_mod'] ? append_sid('dload.' . PHP_EXT . "?action=post_comment&amp;cid={$comments_row['comments_id']}&amp;delete=do&amp;file_id={$file_data['file_id']}") : '', 'AUTH_COMMENT_DELETE' => $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_delete_comment'] && $file_info['user_id'] == $user->data['user_id'] || $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_mod'] ? true : false, 'DELETE_IMG' => $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_delete_comment'] && $file_info['user_id'] == $user->data['user_id'] || $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_mod'] ? $images['icon_delpost'] : '', 'ICON_MINIPOST_IMG' => IP_ROOT_PATH . $images['icon_minipost'], 'ICON_SPACER' => IP_ROOT_PATH . $images['spacer'], 'GENDER' => $user_info['gender'], 'USER_RANK_01' => $user_ranks['rank_01_html'], 'USER_RANK_01_IMG' => $user_ranks['rank_01_img_html'], 'USER_RANK_02' => $user_ranks['rank_02_html'], 'USER_RANK_02_IMG' => $user_ranks['rank_02_img_html'], 'USER_RANK_03' => $user_ranks['rank_03_html'], 'USER_RANK_03_IMG' => $user_ranks['rank_03_img_html'], 'USER_RANK_04' => $user_ranks['rank_04_html'], 'USER_RANK_04_IMG' => $user_ranks['rank_04_img_html'], 'USER_RANK_05' => $user_ranks['rank_05_html'], 'USER_RANK_05_IMG' => $user_ranks['rank_05_img_html'], 'POSTER_JOINED' => $poster_joined, 'POSTER_POSTS' => $poster_posts, 'POSTER_FROM' => $poster_from, 'POSTER_AVATAR' => $poster_avatar, 'TITLE' => $comments_row['comments_title'], 'TIME' => $time, 'TEXT' => $comments_text));
    }
    $db->sql_freeresult($result);
    $template->assign_vars(array('REPLY_IMG' => $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_post_comment'] ? $images['pa_comment_post'] : '', 'AUTH_POST' => $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_post_comment'] ? true : false, 'L_COMMENT_DO' => $pafiledb->modules[$pafiledb->module_name]->auth[$file_data['file_catid']]['auth_post_comment'] ? $lang['Comment_do'] : '', 'L_COMMENTS' => $lang['Comments'], 'L_AUTHOR' => $lang['Author'], 'L_POSTED' => $lang['Posted'], 'L_COMMENT_SUBJECT' => $lang['Comment_subject'], 'L_COMMENT_ADD' => $lang['Comment_add'], 'L_COMMENT_DELETE' => $lang['Comment_delete'], 'L_COMMENTS_NAME' => $lang['Name'], 'L_BACK_TO_TOP' => $lang['Back_to_top'], 'SPACER' => $images['spacer'], 'U_COMMENT_DO' => append_sid('dload.' . PHP_EXT . '?action=post_comment&amp;file_id=' . $file_data['file_id'])));
}
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:51,代码来源:functions_comment.php

示例7: create_date_ip

			$first_post_time = create_date_ip($config['default_dateformat'], $topic_rowset[$i]['topic_time'], $config['board_timezone']);
			//$first_post_author = ($topic_rowset[$i]['topic_starter_id'] == ANONYMOUS) ? (($topic_rowset[$i]['topic_starter_guest'] != '') ? $topic_rowset[$i]['topic_starter_guest'] . ' ' : $lang['Guest'] . ' ') : '<a href="' . append_sid(CMS_PAGE_PROFILE . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $topic_rowset[$i]['topic_starter_id']) . '">' . $topic_rowset[$i]['topic_starter'] . '</a> ';
			$first_post_author =  colorize_username($topic_rowset[$i]['topic_starter_id'], $topic_rowset[$i]['topic_starter'], $topic_rowset[$i]['topic_starter_color'], $topic_rowset[$i]['topic_starter_active']);

			$first_post_url = ($type == 'shadow') ? '' : '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id) . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

			$last_post_time = create_date_ip($config['default_dateformat'], $topic_rowset[$i]['post_time'], $config['board_timezone']);
			//$last_post_author = ($topic_rowset[$i]['user_id'] == ANONYMOUS) ? (($topic_rowset[$i]['post_username'] != '') ? $topic_rowset[$i]['post_username'] . ' ' : $lang['Guest'] . ' ') : '<a href="' . append_sid(CMS_PAGE_PROFILE . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' . $topic_rowset[$i]['username'] . '</a> ';
			$last_post_author =  colorize_username($topic_rowset[$i]['user_id'], $topic_rowset[$i]['username'], $topic_rowset[$i]['user_color'], $topic_rowset[$i]['user_active']);
			$last_post_url = '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#p' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

			$u_view_topic = 'modcp.' . PHP_EXT . '?mode=split&amp;' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $user->data['session_id'];
			$topic_replies = $topic_rowset[$i]['topic_replies'];

			$last_post_time = create_date_ip($config['default_dateformat'], $topic_rowset[$i]['post_time'], $config['board_timezone']);

			$template->assign_block_vars('topicrow', array(
				'U_VIEW_TOPIC' => $u_view_topic,
				'TOPIC_ID' => $topic_id,
				'TOPIC_FOLDER_IMG' => $topic_link['image'],
				'L_TOPIC_FOLDER_ALT' => $topic_link['image_alt'],
				'TOPIC_AUTHOR' => $topic_author,
				'TOPIC_TITLE' => $topic_title,
				'TOPIC_TYPE' => $topic_link['type'],
				'TOPIC_TYPE_ICON' => $topic_link['icon'],
				'TOPIC_CLASS' => (!empty($topic_link['class_new']) ? ('topiclink' . $topic_link['class_new']) : $topic_link['class']),
				'CLASS_NEW' => $topic_link['class_new'],
				'NEWEST_POST_IMG' => $topic_link['newest_post_img'],
				'GOTO_PAGE' => $topic_pagination['base'],
				'GOTO_PAGE_FULL' => $topic_pagination['full'],
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:30,代码来源:modcp.php

示例8: album_build_last_comments_info

function album_build_last_comments_info($cats)
{
    global $db, $cache, $config, $template, $user, $lang, $bbcode, $album_config, $album_data;
    @(include_once IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
    $number_of_comments = 5;
    $album_show_pic_url = 'album_showpage.' . PHP_EXT;
    if ($cats == '') {
        $sql_where = '';
    } else {
        $sql_where = 'WHERE a.pic_cat_id IN (' . $cats . ')';
    }
    //$sql_group = 'GROUP BY c.comment_pic_id';
    $sql_group = '';
    // get last comment information, and user, comment and pic informations
    $sql = "SELECT c.*, u.user_id, u.username, u.user_active, u.user_color, a.*\n\t\tFROM " . ALBUM_COMMENT_TABLE . " AS c\n\t\tLEFT JOIN " . USERS_TABLE . " AS u ON c.comment_user_id = u.user_id\n\t\tLEFT JOIN " . ALBUM_TABLE . " AS a ON c.comment_pic_id = a.pic_id\n\t\t{$sql_where}\n\t\t{$sql_group}\n\t\tORDER BY c.comment_id DESC\n\t\tLIMIT {$number_of_comments}";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
        $commentsrow[] = $row;
    }
    $db->sql_freeresult($result);
    if (sizeof($commentsrow) > 0) {
        $template->assign_block_vars('recent_comments_block', array('L_COMMENTS' => $lang['Comments'], 'L_LAST_COMMENT' => $lang['Last_Comment'], 'L_LAST_COMMENT_INFO' => $lang['Last_Comments']));
        for ($i = 0; $i < sizeof($commentsrow); $i++) {
            if ($commentsrow[$i]['comment_username'] == ALBUM_GUEST || $commentsrow[$i]['comment_username'] == '') {
                $poster = $commentsrow[$i]['comment_username'] == '' ? $lang['Guest'] : $commentsrow[$i]['comment_username'];
            } else {
                $poster = colorize_username($commentsrow[$i]['user_id'], $commentsrow[$i]['username'], $commentsrow[$i]['user_color'], $commentsrow[$i]['user_active']);
            }
            $info .= '<br />' . $lang['Pic_Image'] . ': <a href="' . append_sid(album_append_uid($album_show_pic_url . '?pic_id=' . $commentsrow[$i]['pic_id'])) . '">' . $commentsrow[$i]['pic_title'] . '</a>';
            $pic_preview = '';
            $pic_preview_hs = '';
            if ($album_config['lb_preview']) {
                $slideshow_cat = '';
                $slideshow = !empty($slideshow_cat) ? ', { slideshowGroup: \'' . $slideshow_cat . '\' } ' : '';
                $pic_preview_hs = ' class="highslide" onclick="return hs.expand(this' . $slideshow . ');"';
                $pic_preview = 'onmouseover="showtrail(\'' . append_sid(album_append_uid('album_picm.' . PHP_EXT . '?pic_id=' . $commentsrow[$i]['pic_id'])) . '\',\'' . addslashes($commentsrow[$i]['pic_title']) . '\', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"';
            }
            $commentsrow[$i]['comment_text'] = censor_text($commentsrow[$i]['comment_text']);
            $html_on = $user->data['user_allowhtml'] && $config['allow_html'] ? 1 : 0;
            $bbcode_on = $user->data['user_allowbbcode'] && $config['allow_bbcode'] ? 1 : 0;
            $smilies_on = $user->data['user_allowsmile'] && $config['allow_smilies'] ? 1 : 0;
            $bbcode->allow_html = $html_on;
            $bbcode->allow_bbcode = $bbcode_on;
            $bbcode->allow_smilies = $smilies_on;
            $commentsrow[$i]['comment_text'] = $bbcode->parse($commentsrow[$i]['comment_text']);
            $commentsrow[$i]['comment_text'] = strtr($commentsrow[$i]['comment_text'], array_flip(get_html_translation_table(HTML_ENTITIES)));
            $commentsrow[$i]['comment_text'] = $bbcode->acronym_pass($commentsrow[$i]['comment_text']);
            $commentsrow[$i]['comment_text'] = $bbcode->autolink_text($commentsrow[$i]['comment_text'], '999999');
            $template_vars = array('POSTER' => $poster, 'PIC_PREVIEW_HS' => $pic_preview_hs, 'PIC_PREVIEW' => $pic_preview, 'COMMENT_TEXT' => $commentsrow[$i]['comment_text'], 'GROUP_NAME' => 'comments');
            album_build_detail_vars($template_vars, $commentsrow[$i]);
            // Overwrite the picture time with the comment time
            $template_vars['TIME'] = create_date_ip($config['default_dateformat'], $commentsrow[$i]['comment_time'], $config['board_timezone']);
            $template->assign_block_vars('recent_comments_block.comment_row', $template_vars);
        }
    }
}
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:56,代码来源:album_hierarchy_sql.php

示例9: colorize_username

	$reg_length = $row['reg_length'];

	$reg_max_option1 = $row['topic_reg_max_option1'];
	$reg_max_option2 = $row['topic_reg_max_option2'];
	$reg_max_option3 = $row['topic_reg_max_option3'];

	$self_registered = 0;

	for($u = 0; $u < $numregs; $u++)
	{
		if ($reg_info[$u]['user_id'] == $user->data['user_id'])
		{
			$self_registered = $reg_info[$u]['registration_status'];
		}
		$current_user = colorize_username($reg_info[$u]['user_id'], $reg_info[$u]['username'], $reg_info[$u]['user_color'], $reg_info[$u]['user_active']);
		$user_registered = create_date_ip($config['default_dateformat'], $reg_info[$u]['registration_time'], $config['board_timezone']);
		$reg_option_data = '<tr><td><span class="gensmall">' . $current_user . '</span></td><td class="gensmall">' . $user_registered . '</td></tr>';
		if ($reg_info[$u]['registration_status'] == REG_OPTION1)
		{
			$option1_count++;
			$template->assign_block_vars('reg_option1_users', array(
				'USER' => $current_user,
				'DATE' => $user_registered,
				)
			);
			$reg_option1_data .= $reg_option_data;
		}
		elseif ($reg_info[$u]['registration_status'] == REG_OPTION2)
		{
			$option2_count++;
			$template->assign_block_vars('reg_option2_users', array(
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:viewtopic_events_reg.php

示例10: str_replace

		}

		$message = str_replace('<', '&lt;', $message);
		$message = str_replace('>', '&gt;', $message);
		$message = str_replace('<br />', "\n", $message);

		if ($mode == 'quote')
		{
			if(preg_match('/\[hide/i', $message))
			{
				$search = array("/\[hide\](.*?)\[\/hide\]/");
				$replace = array('[hide]' . $lang['xs_bbc_hide_quote_message'] . '[/hide]');
				$message = preg_replace($search, $replace, $message);
			}

			$msg_date = create_date_ip($config['default_dateformat'], $postrow['post_time'], $config['board_timezone']);

			// Use trim to get rid of spaces placed there by MS-SQL 2000
			$quote_username = (trim($post_info['post_username']) != '') ? $post_info['post_username'] : $post_info['username'];
			//$message = '[quote="' . $quote_username . '"]' . $message . '[/quote]';
			$message = '[quote user="' . $quote_username . '" post="' . $post_id . '"]' . $message . '[/quote]';

			$subject = censor_text($subject);
			$message = censor_text($message);

			$subject = (((strlen($subject) > 0) && ((substr($subject, 0, strlen($lang['REPLY_PREFIX'])) == $lang['REPLY_PREFIX']) || (substr($subject, 0, strlen($lang['REPLY_PREFIX']))) == $lang['REPLY_PREFIX_OLD'])) ? '' : $lang['REPLY_PREFIX']) . $subject;
			$mode = 'reply';
		}
		else
		{
			$username = ($post_info['user_id'] == ANONYMOUS && !empty($post_info['post_username'])) ? $post_info['post_username'] : '';
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:posting.php

示例11: create_view_page

 function create_view_page(&$table_fields, &$inputs_array, $items_row, $template_row = 'field')
 {
     global $config, $template, $theme, $lang, $bbcode;
     $row_class = '';
     foreach ($table_fields as $k => $v) {
         $inputs_array[$k] = isset($items_row[$k]) ? $items_row[$k] : $v['default'];
         // We convert HTML entities only if we do not need to parse HTML...
         if (is_string($inputs_array[$k]) && !empty($v['html_parse'])) {
             $value = htmlspecialchars_decode($inputs_array[$k], ENT_COMPAT);
         }
         $auth_level = $v['view_level'];
         $is_auth = check_auth_level($auth_level);
         if ($is_auth) {
             $value = $inputs_array[$k];
             $s_bbcb = !empty($v['bbcode_box']) ? true : false;
             // SPECIAL PROCESSING - BEGIN
             // Convert back values from RADIO, SELECT or CHECKBOX
             if (in_array($v['type'], array('LIST_CHECKBOX', 'LIST_DROP', 'LIST_FLAGS', 'LIST_RADIO', 'LIST_RADIO_BR'))) {
                 $tmp_value = $this->get_lang_from_value($inputs_array[$k], $v['values']);
                 $value = $tmp_value != '' ? $tmp_value : $value;
             }
             // Convert empty numbers fields to 0
             if (!empty($v['is_number']) && empty($value)) {
                 $value = (int) 0;
             }
             // Apply number format if needed
             if (!empty($v['number_format'])) {
                 $v['number_format']['decimals'] = isset($v['number_format']['decimals']) ? $v['number_format']['decimals'] : (isset($lang['NUMBER_FORMAT_DECIMALS']) ? $lang['NUMBER_FORMAT_DECIMALS'] : 0);
                 $v['number_format']['decimals_sep'] = !empty($v['number_format']['decimals_sep']) ? $v['number_format']['decimals_sep'] : (isset($lang['NUMBER_FORMAT_DECIMALS_SEP']) ? $lang['NUMBER_FORMAT_DECIMALS_SEP'] : ',');
                 $v['number_format']['thousands_sep'] = !empty($v['number_format']['thousands_sep']) ? $v['number_format']['thousands_sep'] : (isset($lang['NUMBER_FORMAT_THOUSANDS_SEP']) ? $lang['NUMBER_FORMAT_THOUSANDS_SEP'] : '.');
                 $value = number_format($inputs_array[$k], $v['number_format']['decimals'], $v['number_format']['decimals_sep'], $v['number_format']['thousands_sep']);
             }
             // Create rating image
             if (!empty($v['is_rating'])) {
                 $rating = $value;
                 $rating_path = !empty($v['rating_path']) ? $v['rating_path'] : IP_ROOT_PATH . 'images/rates/';
                 $rating_min = !empty($v['rating_min']) ? $v['rating_min'] : 0;
                 $rating_max = !empty($v['rating_max']) ? $v['rating_max'] : 10;
                 $rating_extension = !empty($v['rating_extension']) ? $v['rating_extension'] : 'png';
                 $value = '<img src="' . $this->build_rating_image($rating, $rating_path, $rating_min, $rating_max, $rating_extension) . '" alt="' . $rating . '" title="' . $rating . '" />';
             }
             // Text processing... BBCode, HTML or plain text
             if ($s_bbcb || !empty($v['bbcode_parse'])) {
                 $value = $bbcode->parse($inputs_array[$k]);
             } else {
                 if (empty($v['html_parse']) && in_array($v['type'], array('TEXT', 'HTMLTEXT'))) {
                     $value = nl2br($inputs_array[$k]);
                 }
             }
             // Convert dates and times
             $v['datetime_format'] = !empty($v['datetime_format']) ? $v['datetime_format'] : 'unix';
             switch ($v['datetime_format']) {
                 case 'mysql':
                     $output = !empty($v['is_date']) ? 'date' : (!empty($v['is_time']) ? 'time' : 'datetime');
                     $value = format_date_mysql_php($inputs_array[$k], $output, 'php');
                     break;
                 default:
                     if (!empty($v['is_time'])) {
                         $value = create_date_ip($config['default_dateformat'], $inputs_array[$k], $config['board_timezone']);
                     }
                     if (!empty($v['is_date'])) {
                         $value = create_date($this->date_format_php, $inputs_array[$k], $config['board_timezone']);
                     }
                     break;
             }
             // Create user link (with user_id)
             if ($v['is_user_id']) {
                 $value = colorize_username($inputs_array[$k]);
             }
             // Create user link (with username)
             if ($v['is_username']) {
                 $target_userid = $this->get_user_id($inputs_array[$k]);
                 $value = colorize_username($target_userid);
             }
             // Create user link (with username)
             if ($v['type'] == 'PASSWORD') {
                 $value = '********';
             }
             // Create thumbnails for images
             if ($v['is_image']) {
                 $value = '<a href="' . append_sid($inputs_array[$k]) . '"><img src="' . append_sid(CMS_PAGE_IMAGE_THUMBNAIL . '?pic_id=' . urlencode($inputs_array[$k]) . (isset($v['thumbnail_size']) ? '&amp;thumbnail_size=' . intval($v['thumbnail_size']) : '')) . '" alt="" /></a>';
             }
             if (!empty($v['display_func']) && function_exists($v['display_func'])) {
                 $value = $v['display_func']($inputs_array[$k]);
             }
             // SPECIAL PROCESSING - END
             $row_class = ip_zebra_rows($row_class);
             $template_row = empty($template_row) ? 'field' : (string) $template_row;
             $template->assign_block_vars($template_row, array('CLASS' => $row_class, 'L_NAME' => $this->get_lang($v['lang_key']), 'L_EXPLAIN' => !empty($v['explain']) ? $this->get_lang($v['explain']) : '', 'S_BBCB' => $s_bbcb ? true : false, 'VALUE' => !empty($value) || $value === 0 ? $value : '&nbsp;'));
         }
     }
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:92,代码来源:class_form.php

示例12: create_date_ip

	// SELF AUTH - BEGIN
	// Comment the lines below if you wish to show RESERVED topics for AUTH_SELF.
	/*
	if ((($user->data['user_level'] != ADMIN) && ($user->data['user_level'] != MOD)) && (intval($is_auth_ary[$line[$i]['forum_id']]['auth_read']) == AUTH_SELF) && ($line[$i]['first_poster_id'] != $user->data['user_id']))
	{
		$first_author = $lang['Reserved_Author'];
		$last_author = $lang['Reserved_Author'];
		$topic_title = $lang['Reserved_Topic'];
	}
	*/
	// SELF AUTH - END

	if($mode == 'utview')
	{
		$last_time = $last_time = create_date_ip($config['default_dateformat'], $line[$i]['view_time'], $config['board_timezone']);;
		$last_author = '';
		$last_url = '';
	}

	$template->assign_block_vars('recent', array(
		'ROW_CLASS' => (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2'],

		'TOPIC_ID' => $topic_id,
		'TOPIC_FOLDER_IMG' => $topic_link['image'],
		'L_TOPIC_FOLDER_ALT' => $topic_link['image_alt'],
		'TOPIC_TITLE' => $topic_title,
		'TOPIC_TITLE_PLAIN' => $topic_title_plain,
		'TOPIC_TYPE' => $topic_link['type'],
		'TOPIC_TYPE_ICON' => $topic_link['icon'],
		'TOPIC_CLASS' => (!empty($topic_link['class_new']) ? ('topiclink' . $topic_link['class_new']) : $topic_link['class']),
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:30,代码来源:recent.php

示例13: cms_block_album


//.........这里部分代码省略.........
     }
     // $catrows now stores all categories which this user can view. Dump them out!
     for ($i = 0; $i < sizeof($catrows); $i++) {
         // Build allowed category-list (for recent pics after here)
         $allowed_cat .= $allowed_cat == '' ? $catrows[$i]['cat_id'] : ',' . $catrows[$i]['cat_id'];
         // Get Last Pic of this Category
         if ($catrows[$i]['count'] == 0) {
             //
             // Oh, this category is empty
             //
             $last_pic_info = $lang['No_Pics'];
             $u_last_pic = '';
             $last_pic_title = '';
         } else {
             // Check Pic Approval
             if ($catrows[$i]['cat_approval'] == ALBUM_ADMIN || $catrows[$i]['cat_approval'] == ALBUM_MOD) {
                 $pic_approval_sql = 'AND p.pic_approval = 1';
                 // Pic Approval ON
             } else {
                 $pic_approval_sql = '';
                 // Pic Approval OFF
             }
         }
     }
     if ($cms_config_vars['md_pics_all'][$block_id] == '1') {
         $pics_allowed = '0';
     } else {
         $pics_allowed = '';
     }
     $no_pics = false;
     if ($allowed_cat != $pics_allowed) {
         $category_id = $cms_config_vars['md_cat_id'][$block_id];
         if ($cms_config_vars['md_pics_sort'][$block_id] == '1') {
             if ($category_id != 0) {
                 $sql = "SELECT p.*, u.user_id, u.username, u.user_active, u.user_color, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments\n\t\t\t\t\t\tFROM " . ALBUM_TABLE . " AS p\n\t\t\t\t\t\t\tLEFT JOIN " . USERS_TABLE . " AS u ON p.pic_user_id = u.user_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_CAT_TABLE . " AS ct ON p.pic_cat_id = ct.cat_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_RATE_TABLE . " AS r ON p.pic_id = r.rate_pic_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_COMMENT_TABLE . " AS c ON p.pic_id = c.comment_pic_id\n\t\t\t\t\t\tWHERE p.pic_cat_id IN ({$allowed_cat}) AND (p.pic_approval = 1 OR ct.cat_approval = 0) AND pic_cat_id IN ({$category_id})\n\t\t\t\t\t\tGROUP BY p.pic_id\n\t\t\t\t\t\tORDER BY RAND()\n\t\t\t\t\t\tLIMIT " . $cms_config_vars['md_pics_number'][$block_id];
             } else {
                 $sql = "SELECT p.*, u.user_id, u.username, u.user_active, u.user_color, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments\n\t\t\t\t\t\tFROM " . ALBUM_TABLE . " AS p\n\t\t\t\t\t\t\tLEFT JOIN " . USERS_TABLE . " AS u ON p.pic_user_id = u.user_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_CAT_TABLE . " AS ct ON p.pic_cat_id = ct.cat_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_RATE_TABLE . " AS r ON p.pic_id = r.rate_pic_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_COMMENT_TABLE . " AS c ON p.pic_id = c.comment_pic_id\n\t\t\t\t\t\tWHERE p.pic_cat_id IN ({$allowed_cat}) AND (p.pic_approval = 1 OR ct.cat_approval = 0)\n\t\t\t\t\t\tGROUP BY p.pic_id\n\t\t\t\t\t\tORDER BY RAND()\n\t\t\t\t\t\tLIMIT " . $cms_config_vars['md_pics_number'][$block_id];
             }
         } elseif ($cms_config_vars['md_pics_sort'][$block_id] == '0') {
             if ($category_id != 0) {
                 $sql = "SELECT p.*, u.user_id, u.username, u.user_active, u.user_color, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments\n\t\t\t\t\t\tFROM " . ALBUM_TABLE . " AS p\n\t\t\t\t\t\t\tLEFT JOIN " . USERS_TABLE . " AS u ON p.pic_user_id = u.user_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_CAT_TABLE . " AS ct ON p.pic_cat_id = ct.cat_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_RATE_TABLE . " AS r ON p.pic_id = r.rate_pic_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_COMMENT_TABLE . " AS c ON p.pic_id = c.comment_pic_id\n\t\t\t\t\t\tWHERE p.pic_cat_id IN ({$allowed_cat}) AND (p.pic_approval = 1 OR ct.cat_approval = 0) AND pic_cat_id IN ({$category_id})\n\t\t\t\t\t\tGROUP BY p.pic_id\n\t\t\t\t\t\tORDER BY pic_time DESC\n\t\t\t\t\t\tLIMIT " . $cms_config_vars['md_pics_number'][$block_id];
             } else {
                 $sql = "SELECT p.*, u.user_id, u.username, u.user_active, u.user_color, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments\n\t\t\t\t\t\tFROM " . ALBUM_TABLE . " AS p\n\t\t\t\t\t\t\tLEFT JOIN " . USERS_TABLE . " AS u ON p.pic_user_id = u.user_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_CAT_TABLE . " AS ct ON p.pic_cat_id = ct.cat_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_RATE_TABLE . " AS r ON p.pic_id = r.rate_pic_id\n\t\t\t\t\t\t\tLEFT JOIN " . ALBUM_COMMENT_TABLE . " AS c ON p.pic_id = c.comment_pic_id\n\t\t\t\t\t\tWHERE p.pic_cat_id IN ({$allowed_cat}) AND (p.pic_approval = 1 OR ct.cat_approval = 0)\n\t\t\t\t\t\tGROUP BY p.pic_id\n\t\t\t\t\t\tORDER BY pic_time DESC\n\t\t\t\t\t\tLIMIT " . $cms_config_vars['md_pics_number'][$block_id];
             }
         }
         $result = $db->sql_query($sql);
         $recentrow = array();
         while ($row = $db->sql_fetchrow($result)) {
             $recentrow[] = $row;
         }
         $db->sql_freeresult($result);
         $total_pics = sizeof($recentrow);
         if ($total_pics > 0) {
             $total_rows = ceil($total_pics / $cms_config_vars['md_pics_rows_number'][$block_id]);
             $total_cols = ceil($total_pics / $cms_config_vars['md_pics_cols_number'][$block_id]);
             $image_counter = 0;
             while ($image_counter < $total_pics) {
                 for ($i = 0; $i < $cms_config_vars['md_pics_rows_number'][$block_id]; $i++) {
                     $template->assign_block_vars('recent_pics', array());
                     for ($j = 0; $j < $cms_config_vars['md_pics_cols_number'][$block_id]; $j++) {
                         if ($image_counter >= $total_pics) {
                             $template->assign_block_vars('recent_pics.recent_no_detail', array());
                         } else {
                             if (!$recentrow[$image_counter]['rating']) {
                                 $recentrow[$image_counter]['rating'] = $lang['Not_rated'];
                             } else {
                                 $recentrow[$image_counter]['rating'] = round($recentrow[$image_counter]['rating'], 2);
                             }
                             if ($recentrow[$image_counter]['user_id'] == ALBUM_GUEST || $recentrow[$image_counter]['username'] == '') {
                                 $recent_poster = $recentrow[$image_counter]['pic_username'] == '' ? $lang['Guest'] : $recentrow[$image_counter]['pic_username'];
                             } else {
                                 $recent_poster = colorize_username($recentrow[$image_counter]['user_id'], $recentrow[$image_counter]['username'], $recentrow[$image_counter]['user_color'], $recentrow[$image_counter]['user_active']);
                             }
                             $thumbnail_file = append_sid(album_append_uid('album_thumbnail.' . PHP_EXT . '?pic_id=' . $recentrow[$image_counter]['pic_id']));
                             if ($album_config['thumbnail_cache'] == true && $album_config['quick_thumbs'] == true) {
                                 $thumbnail_file = picture_quick_thumb($recentrow[$image_counter]['pic_filename'], $recentrow[$image_counter]['pic_thumbnail'], $thumbnail_file);
                             }
                             $pic_sp_link = append_sid(album_append_uid('album_showpage.' . PHP_EXT . '?pic_id=' . $recentrow[$image_counter]['pic_id']));
                             $pic_dl_link = append_sid(album_append_uid('album_pic.' . PHP_EXT . '?pic_id=' . $recentrow[$image_counter]['pic_id']));
                             $template->assign_block_vars('recent_pics.recent_detail', array('U_PIC' => $album_config['fullpic_popup'] ? $pic_dl_link : $pic_sp_link, 'U_PIC_SP' => $pic_sp_link, 'U_PIC_DL' => $pic_dl_link, 'IS_FIRST_PIC' => $image_counter == 0 ? true : false, 'THUMBNAIL' => $thumbnail_file, 'DESC' => $recentrow[$image_counter]['pic_desc'], 'TITLE' => $recentrow[$image_counter]['pic_title'], 'POSTER' => $recent_poster, 'TIME' => create_date_ip($config['default_dateformat'], $recentrow[$image_counter]['pic_time'], $config['board_timezone']), 'VIEW' => $recentrow[$image_counter]['pic_view_count'], 'RATING' => $album_config['rate'] == 1 ? $lang['Rating'] . ': ' . $recentrow[$image_counter]['rating'] . '<br />' : '', 'COMMENTS' => $album_config['comment'] == 1 ? $lang['Comments'] . ': ' . $recentrow[$image_counter]['comments'] . '<br />' : ''));
                             if ($image_counter == 0) {
                                 $template->assign_vars(array('HS_GALLERY_ID' => 'hs_gallery_id_' . $recentrow[$image_counter]['pic_id'], 'HS_PIC_ID' => 'hs_pic_id_' . $recentrow[$image_counter]['pic_id'], 'HS_PIC_TITLE' => $recentrow[$image_counter]['pic_title'], 'HS_PIC_FULL' => $pic_dl_link, 'HS_PIC_THUMB' => $thumbnail_file));
                             }
                         }
                         $image_counter++;
                     }
                 }
             }
         } else {
             // No Pics Found
             $template->assign_block_vars('no_pics', array());
             $no_pics = true;
         }
     } else {
         // No Cats Found
         $template->assign_block_vars('no_pics', array());
         $no_pics = true;
     }
     $template->assign_vars(array('S_COL_WIDTH' => 100 / ($cms_config_vars['md_pics_cols_number'][$block_id] == 0 ? 4 : $cms_config_vars['md_pics_cols_number'][$block_id]) . '%', 'S_THUMBNAIL_SIZE' => $album_config['thumbnail_size'], 'TARGET_BLANK' => $album_config['fullpic_popup'] ? 'target="_blank"' : '', 'S_HIGHSLIDE' => !empty($config['thumbnail_highslide']) ? true : false, 'S_HIGHSLIDER' => !empty($cms_config_vars['md_pics_slider'][$block_id]) ? true : false, 'S_JQ_NIVO_SLIDER' => !empty($cms_config_vars['md_pics_slider'][$block_id]) ? true : false, 'S_SLIDER_ID' => 'cms_slider_' . $block_id, 'S_NO_PICS' => !empty($no_pics) ? true : false, 'L_NO_PICS' => $lang['No_Pics'], 'L_PIC_TITLE' => $lang['Pic_Title'], 'L_VIEW' => $lang['View'], 'L_POSTER' => $lang['Poster'], 'L_POSTED' => $lang['Posted'], 'U_ALBUM' => append_sid('album.' . PHP_EXT), 'L_ALBUM' => $lang['Album']));
 }
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:101,代码来源:album.php

示例14: nl2br

     $bbcode->allow_bbcode = $config['allow_bbcode'] ? true : false;
     $bbcode->allow_smilies = $config['allow_smilies'] ? true : false;
     $pic_desc = $bbcode->parse($pic_desc);
 } else {
     $pic_desc = nl2br(htmlspecialchars($pic_desc));
 }
 $pic_sp_link = append_sid(album_append_uid('album_showpage.' . PHP_EXT . '?pic_id=' . $thispic['pic_id']));
 $pic_dl_link = append_sid(album_append_uid('album_pic.' . PHP_EXT . '?pic_id=' . $thispic['pic_id']));
 $pic_full_set = $picm == false || $nuff_display == true ? true : false;
 $user_info = array();
 $user_info = generate_user_info($thispic);
 foreach ($user_info as $k => $v) {
     ${$k} = $v;
 }
 $poster_avatar = $user_info['avatar'];
 $template->assign_vars(array('CAT_TITLE' => $thispic['cat_title'], 'U_VIEW_CAT' => append_sid(album_append_uid('album_cat.' . PHP_EXT . '?cat_id=' . $cat_id)), 'ALBUM_NAVIGATION_ARROW' => ALBUM_NAV_ARROW, 'NAV_CAT_DESC' => $album_nav_cat_desc, 'EDIT' => $auth_data['moderator'] || $user->data['user_id'] == $thispic['pic_user_id'] ? '<a href="' . append_sid(album_append_uid('album_edit.' . PHP_EXT . '?pic_id=' . $thispic['pic_id'])) . '">' . $edit_link_content . '</a>' : '', 'DELETE' => $auth_data['moderator'] || $user->data['user_id'] == $thispic['pic_user_id'] ? '<a href="' . append_sid(album_append_uid('album_delete.' . PHP_EXT . '?pic_id=' . $thispic['pic_id'])) . '">' . $delete_link_content . '</a>' : '', 'LOCK' => $auth_data['moderator'] ? '<a href="' . append_sid(album_append_uid('album_modcp.' . PHP_EXT . '?mode=' . ($thispic['pic_lock'] == 0 ? 'lock' : 'unlock') . '&amp;pic_id=' . $thispic['pic_id'])) . '">' . $lock_link_content . '</a>' : '', 'MOVE' => $auth_data['moderator'] ? '<a href="' . append_sid(album_append_uid('album_modcp.' . PHP_EXT . '?mode=move&amp;pic_id=' . $thispic['pic_id'])) . '">' . $move_link_content . '</a>' : '', 'COPY' => $auth_data['moderator'] ? '<a href="' . append_sid(album_append_uid('album_modcp.' . PHP_EXT . '?mode=copy&amp;pic_id=' . $thispic['pic_id'])) . '">' . $copy_link_content . '</a>' : '', 'U_PIC_FULL_URL' => $server_url . $pic_fullpath, 'U_PIC' => $pic_link, 'U_PIC_SP' => $pic_sp_link, 'U_PIC_DL' => $pic_dl_link, 'U_PIC_L1' => $pic_full_set ? '' : '<a href="' . append_sid(album_append_uid('album_showpage.' . PHP_EXT . '?full=true&amp;pic_id=' . $pic_id . $sort_append . $nuffimage_vars)) . '">', 'U_PIC_L2' => $pic_full_set ? '' : '</a>', 'U_PIC_CLICK' => $pic_full_set ? '' : $lang['Click_enlarge'], 'U_PIC_THUMB' => append_sid(album_append_uid('album_thumbnail.' . PHP_EXT . '?pic_id=' . $pic_id . $sort_append)), 'U_SMILEY_CREATOR' => append_sid('smiley_creator.' . PHP_EXT . '?mode=text2shield'), 'PIC_COUNT' => sprintf($lang['Pics_Counter'], $new_pic_array_id + 1, $total_pic_count), 'NEXT_PIC' => $next_pic, 'PREV_PIC' => $prev_pic, 'L_PIC_DETAILS' => $lang['Pic_Details'], 'L_PIC_SIZE' => $lang['Pic_Size'], 'L_PIC_TYPE' => $lang['Pic_Type'], 'PIC_HEIGHT' => $pic_full_set ? $pic_height : $album_config['midthumb_height'], 'PIC_WIDTH' => $pic_full_set ? $pic_width : $album_config['midthumb_width'], 'PIC_SIZE' => $pic_width . ' x ' . $pic_height . ' (' . intval($pic_filesize / 1024) . 'KB)', 'PIC_TYPE' => strtoupper(substr($thispic['pic_filename'], strlen($thispic['pic_filename']) - 3, 3)), 'PIC_ID' => $pic_id, 'PIC_BBCODE' => '[albumimg]' . $pic_id . '[/albumimg]', 'PIC_TITLE' => $thispic['pic_title'], 'PIC_DESC' => $pic_desc, 'S_THUMBNAIL_SIZE' => $album_config['thumbnail_size'], 'POSTER' => $poster, 'POSTER_AVATAR' => $poster_avatar, 'PIC_TIME' => create_date_ip($config['default_dateformat'], $thispic['pic_time'], $config['board_timezone']), 'PIC_VIEW' => $thispic['pic_view_count'], 'PIC_COMMENTS' => $total_comments, 'TARGET_BLANK' => $album_config['fullpic_popup'] ? 'target="_blank"' : '', 'L_PIC_ID' => $lang['Pic_ID'], 'L_PIC_BBCODE' => $lang['Pic_BBCode'], 'L_PIC_TITLE' => $lang['Pic_Image'], 'L_PIC_DESC' => $lang['Pic_Desc'], 'L_POSTER' => $lang['Pic_Poster'], 'L_POSTED' => $lang['Posted'], 'L_VIEW' => $lang['Views'], 'L_COMMENTS' => $lang['Comments'], 'L_RATING' => $lang['Rating'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'L_USER_WWW' => $lang['Website'], 'L_USER_EMAIL' => $lang['Send_Email'], 'L_USER_PROFILE' => $lang['Profile'], 'L_ONLINE_STATUS' => $lang['Online_status'], 'L_PM' => $lang['Private_Message'], 'L_POST_YOUR_COMMENT' => $lang['Post_your_comment'], 'L_MESSAGE' => $lang['Message'], 'L_USERNAME' => $lang['Username'], 'L_COMMENT_NO_TEXT' => $lang['Comment_no_text'], 'L_COMMENT_TOO_LONG' => $lang['Comment_too_long'], 'L_MAX_LENGTH' => $lang['Max_length'], 'S_MAX_LENGTH' => $album_config['desc_length'], 'L_ORDER' => $lang['Order'], 'L_SORT' => $lang['Sort'], 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], 'L_BACK_TO_TOP' => $lang['Back_to_top'], 'L_COMMENT_WATCH' => $lang['Pic_comment_notification'], 'SORT_ASC' => $sort_order == 'ASC' ? 'selected="selected"' : '', 'SORT_DESC' => $sort_order == 'DESC' ? 'selected="selected"' : '', 'L_SUBMIT' => $lang['Submit'], 'S_ALBUM_ACTION' => append_sid(album_append_uid('album_showpage.' . PHP_EXT . '?pic_id=' . $pic_id)), 'U_COMMENT_WATCH_LINK' => $is_watching_comments ? '<a href="' . append_sid('album_showpage.' . PHP_EXT . '?pic_id=' . $pic_id . '&amp;unwatch=comment') . '">' . $lang['Unwatch_pic'] . '</a>' : ($user->data['session_logged_in'] ? '<a href="' . append_sid('album_showpage.' . PHP_EXT . '?pic_id=' . $pic_id . '&amp;watch=comment') . '">' . $lang['Watch_pic'] . '</a>' : ''), 'S_RATE_MSG' => !$user->data['session_logged_in'] && $auth_data['rate'] == 0 ? $lang['Login_To_Vote'] : ($own_pic_rate == true && $user->data['user_level'] != ADMIN ? $lang['Own_Pic_Rate'] : ($already_rated == true && $user->data['user_level'] != ADMIN ? $lang['Already_rated'] : $lang['Please_Rate_It'])), 'PIC_RATING' => $image_rating . ($own_pic_rate == true && $user->data['user_level'] != ADMIN ? '&nbsp;(' . $lang['Own_Pic_Rate'] . ')' : ($already_rated == true && $user->data['user_level'] != ADMIN ? '&nbsp;(' . $lang['Already_rated'] . ')' : '')), 'L_CURRENT_RATING' => $lang['Current_Rating'], 'L_PLEASE_RATE_IT' => $lang['Please_Rate_It']));
 // Social Bookmarks
 if ($config['show_social_bookmarks'] == true) {
     $template->assign_block_vars('social_bookmarks', array());
 }
 $topic_title_enc = urlencode(ip_utf8_decode($thispic['pic_title']));
 $topic_title_enc_utf8 = urlencode($thispic['pic_title']);
 $topic_link = 'album_showpage.' . PHP_EXT . '?pic_id=' . $thispic['pic_id'] . $full_size_param . $nuffimage_vars . $sort_append;
 $topic_url_enc = urlencode(ip_utf8_decode(create_server_url() . $topic_link));
 $topic_url_enc_utf8 = urlencode(create_server_url() . $topic_link);
 $template->assign_vars(array('TOPIC_TITLE_ENC' => $topic_title_enc, 'TOPIC_TITLE_ENC_UTF8' => $topic_title_enc_utf8, 'TOPIC_URL_ENC' => $topic_url_enc, 'TOPIC_URL_ENC_UTF8' => $topic_url_enc_utf8, 'U_TELL' => append_sid('tellafriend.' . PHP_EXT . '?topic_title=' . $topic_title_enc . '&amp;topic_url=' . urlencode(ip_utf8_decode(str_replace('&amp;', '&', $topic_link)))), 'L_SHARE_TOPIC' => $lang['ShareThisTopic']));
 // BBCBMG - BEGIN
 include IP_ROOT_PATH . 'includes/bbcb_mg.' . PHP_EXT;
 $template->assign_var_from_handle('BBCB_MG', 'bbcb_mg');
 // BBCBMG - END
 // BBCBMG SMILEYS - BEGIN
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:31,代码来源:album_showpage.php

示例15: censor_text

	$bbcode->allow_smilies = (($config['allow_smilies'] && $shout_row['user_allowsmile'] && ($shout != '') && $shout_row['enable_smilies']) ? true : false);
	$shout = $bbcode->parse($shout);
	$shout = (!$shout_row['shout_active']) ? $shout : $lang['Shout_censor'];
	$shout = censor_text($shout);

	//$shout = str_replace("\n", "\n<br />\n", $shout);

	$shout = (preg_match('/<a/', $shout)) ? str_replace('">', '" target="_top">', $shout) : $shout;

	$shout = $bbcode->acronym_pass($shout);
	$shout = $bbcode->autolink_text($shout, '999999');

	$template->assign_block_vars('shoutrow', array(
		'ROW_CLASS' => $row_class,
		'SHOUT' => $shout,
		'TIME' => create_date_ip($lang['Shoutbox_date'], $shout_row['shout_session_time'], $config['board_timezone']),
		'USERNAME' => $username,
		'PROFILE' => ($user_id == ANONYMOUS) ? '' : append_sid(CMS_PAGE_PROFILE . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $shout_row['user_id']),
		)
	);
}

$template->assign_vars(array(
	'U_SHOUTBOX_VIEW' => append_sid('shoutbox_view.' . PHP_EXT),
	'T_NAME' => $theme['template_name'],
	'T_URL' => 'templates/' . $theme['template_name'],
	'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
	'S_CONTENT_ENCODING' => $lang['ENCODING']
	)
);
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:30,代码来源:shoutbox_view.php


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