コード例 #1
0
function parser_test()
{
    echo "<br>***  ---------<b>структура заполняемого массива метаинформации=</b>---------- ***<br><br>";
    $tagarr = get_tag_list("../files/tags.txt");
    print_r($tagarr);
    echo "<br> <br> <br> ";
    echo "<br>***  ---------<b>заполнение массива метаинформации , после чтения meta.info файла=</b>---------- ***<br><br>";
    $str = tfile_to_str("../files/mag/meta.info");
    // указываем путь к файлу метаинформации.
    $rarr = meta_arr_fill($tagarr, $str);
    print_r($rarr);
    echo "<br> <br> <br> ";
    // get_inff_dir("/mag");
}
コード例 #2
0
ファイル: tag_manage.php プロジェクト: seanguo166/yinoos
        /* 娓呴櫎缂撳瓨 */
        clear_cache_files();
        $link[0]['text'] = $_LANG['back_list'];
        $link[0]['href'] = 'tag_manage.php?act=list';
        sys_msg($_LANG['tag_add_success'], 0, $link);
    } else {
        edit_tag($tag_words, $id, $goods_id);
        /* 娓呴櫎缂撳瓨 */
        clear_cache_files();
        $link[0]['text'] = $_LANG['back_list'];
        $link[0]['href'] = 'tag_manage.php?act=list';
        sys_msg($_LANG['tag_edit_success'], 0, $link);
    }
} elseif ($_REQUEST['act'] == 'query') {
    check_authz_json('tag_manage');
    $tag_list = get_tag_list();
    $smarty->assign('tag_list', $tag_list['tags']);
    $smarty->assign('filter', $tag_list['filter']);
    $smarty->assign('record_count', $tag_list['record_count']);
    $smarty->assign('page_count', $tag_list['page_count']);
    $sort_flag = sort_flag($tag_list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    make_json_result($smarty->fetch('tag_manage.htm'), '', array('filter' => $tag_list['filter'], 'page_count' => $tag_list['page_count']));
} elseif ($_REQUEST['act'] == 'search_goods') {
    check_authz_json('tag_manage');
    include_once ROOT_PATH . 'includes/cls_json.php';
    $json = new JSON();
    $filter = $json->decode($_GET['JSON']);
    $arr = get_goods_list($filter);
    if (empty($arr)) {
        $arr[0] = array('goods_id' => 0, 'goods_name' => '');
コード例 #3
0
ファイル: show.php プロジェクト: hw18708118867/htmlmoban
                <?php 
}
?>

                 <!--<div class="m_Grid4">-->
                    <!--<div class="m_T9">-->
                        <!--html模板分类-->
                    <!--</div>-->
                     <div class="n_h FR">
                         <div class="in-side-menu">
                             <h2>按模板行业分类</h2>
                             <p class="pbutton sort clearfix">
                                 <?php 
$n = 1;
if (is_array(get_tag_list())) {
    foreach (get_tag_list() as $tag) {
        ?>
                                 <a title="<?php 
        echo $tag;
        ?>
" href="<?php 
        echo search_tag($catid, $tag);
        ?>
"><?php 
        echo $tag;
        ?>
</a>
                                 <?php 
        $n++;
    }
}
コード例 #4
0
                 $replies = $auth->acl_get('m_approve', $forum_id) ? $row['topic_replies_real'] : $row['topic_replies'];
                 if ($row['topic_status'] == ITEM_MOVED) {
                     $topic_id = $row['topic_moved_id'];
                     $unread_topic = false;
                 } else {
                     $unread_topic = isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id] ? true : false;
                 }
                 // Get folder img, topic status/type related information
                 $folder_img = $folder_alt = $topic_type = '';
                 topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
                 // Generate all the URIs ...
                 $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . ($row['forum_id'] ? $row['forum_id'] : $forum_id) . '&amp;t=' . $topic_id);
                 $topic_unapproved = !$row['topic_approved'] && $auth->acl_get('m_approve', $forum_id) ? true : false;
                 $posts_unapproved = $row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id) ? true : false;
                 $u_mcp_queue = $topic_unapproved || $posts_unapproved ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=queue&amp;mode=' . ($topic_unapproved ? 'approve_details' : 'unapproved_posts') . "&amp;t={$topic_id}", true, $user->session_id) : '';
                 $template->assign_block_vars('topicrow', array('FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name']), 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name']), 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name']), 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), 'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']), 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url), 'REPLIES' => $replies, 'VIEWS' => $row['topic_views'], 'TOPIC_TITLE' => censor_text($row['topic_title']), 'TOPIC_TYPE' => $topic_type, 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt], 'TOPIC_ICON_IMG' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['img'] : '', 'TOPIC_ICON_IMG_WIDTH' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['width'] : '', 'TOPIC_ICON_IMG_HEIGHT' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['height'] : '', 'ATTACH_ICON_IMG' => $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment'] ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', 'UNAPPROVED_IMG' => $topic_unapproved || $posts_unapproved ? $user->img('icon_topic_unapproved', $topic_unapproved ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '', 'S_TOPIC_TYPE' => $row['topic_type'], 'S_USER_POSTED' => isset($row['topic_posted']) && $row['topic_posted'] ? true : false, 'S_UNREAD_TOPIC' => $unread_topic, 'S_TOPIC_REPORTED' => !empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id) ? true : false, 'S_TOPIC_UNAPPROVED' => $topic_unapproved, 'S_POSTS_UNAPPROVED' => $posts_unapproved, 'S_HAS_POLL' => isset($row['poll_start']) && $row['poll_start'] ? true : false, 'S_POST_ANNOUNCE' => $row['topic_type'] == POST_ANNOUNCE ? true : false, 'S_POST_GLOBAL' => $row['topic_type'] == POST_GLOBAL ? true : false, 'S_POST_STICKY' => $row['topic_type'] == POST_STICKY ? true : false, 'S_TOPIC_LOCKED' => $row['topic_status'] == ITEM_LOCKED ? true : false, 'S_TOPIC_MOVED' => $row['topic_status'] == ITEM_MOVED ? true : false, 'U_NEWEST_POST' => $view_topic_url . '&amp;view=unread#unread', 'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name']), 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . $forum_id . '&amp;t=' . $topic_id), 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=reports&amp;mode=reports&amp;f=' . $forum_id . '&amp;t=' . $topic_id, true, $user->session_id), 'U_MCP_QUEUE' => $u_mcp_queue, 'TAG_LIST' => get_tag_list($topic_id, 20), 'S_TOPIC_TYPE_SWITCH' => $s_type_switch == $s_type_switch_test ? -1 : $s_type_switch_test));
                 $s_type_switch = $row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL ? 1 : 0;
             }
             $template->assign_vars(array('PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}phpbb_topic_tagging.{$phpEx}", "tag={$search_tag}"), $topics_count, $config['topics_per_page'], $start), 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), 'TOTAL_TOPICS' => true ? false : ($topics_count == 1 ? $user->lang['PTT_NUM_TOPIC'] : sprintf($user->lang['PTT_NUM_TOPICS'], $topics_count)), 'S_DISPLAY_SEARCHBOX' => true, 'S_TAG_SEARCH_ACTION' => append_sid("{$phpbb_root_path}phpbb_topic_tagging.{$phpEx}", 'mode=search'), 'S_SEARCH_STRING' => $search_tag));
             page_header($user->lang['PTT_TAGS_RESULT_TITLE'] . ' - ' . $search_tag);
             $template->set_filenames(array('body' => 'phpbb_topic_tagging_search_results.html'));
             page_footer();
         } else {
             $meta_info = append_sid("{$phpbb_root_path}phpbb_topic_tagging.{$phpEx}");
             $message = sprintf($user->lang['PTT_NO_RESULTS'], $search_tag) . '<br /><br />' . sprintf($user->lang['PTT_RETURN_TO_SEARCH'], '<a href="' . $meta_info . '">', '</a>');
             trigger_error($message);
         }
     }
     break;
 case 'get_suggestions':
     header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
コード例 #5
0
ファイル: list_cool.php プロジェクト: hw18708118867/htmlmoban
        $n++;
    }
}
unset($n);
?>
            </div>
            <div class="paixu word">
                <h1>按类别:</h1>
                <a class="red" href="<?php 
echo search_tag($catid, '', '', 13);
?>
">全部</a>
                <?php 
$n = 1;
if (is_array(get_tag_list(182))) {
    foreach (get_tag_list(182) as $tag) {
        ?>
                <a href="<?php 
        echo search_tag($catid, '', '', 13, '', $tag);
        ?>
"><?php 
        echo $tag;
        ?>
酷站</a>
                <?php 
        $n++;
    }
}
unset($n);
?>
            </div>
コード例 #6
0
ファイル: fetch_a_question.php プロジェクト: vilsu/codes
/** Tee tagilista kysymykselle
 * @param $question_id integer
 */
function create_tag_list($question_id)
{
    /* 
     * $tags_array array
     */
    $tags_array = get_tag_list($question_id);
    echo "<div id='tag_list'>";
    for ($i = 0; $i < count($tags_array); $i++) {
        create_tags($tags_array[$i]);
    }
    echo "</div>";
}
コード例 #7
0
ファイル: phpBBFolk.php プロジェクト: pombredanne/ArcherSys
						'S_POST_ANNOUNCE'		=> ($row['topic_type'] == POST_ANNOUNCE) ? true : false,
						'S_POST_GLOBAL'			=> ($row['topic_type'] == POST_GLOBAL) ? true : false,
						'S_POST_STICKY'			=> ($row['topic_type'] == POST_STICKY) ? true : false,
						'S_TOPIC_LOCKED'		=> ($row['topic_status'] == ITEM_LOCKED) ? true : false,
						'S_TOPIC_MOVED'			=> ($row['topic_status'] == ITEM_MOVED) ? true : false,
			
						'U_NEWEST_POST'			=> $view_topic_url . '&amp;view=unread#unread',
						'U_LAST_POST'			=> $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
						'U_LAST_POST_AUTHOR'	=> get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
						'U_TOPIC_AUTHOR'		=> get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
						'U_VIEW_TOPIC'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $forum_id . '&t=' . $topic_id),
						'U_MCP_REPORT'			=> append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=reports&amp;f=' . $forum_id . '&amp;t=' . $topic_id, true, $user->session_id),
						'U_MCP_QUEUE'			=> $u_mcp_queue,
			
						'S_TOPIC_TYPE_SWITCH'	=> ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test,
						'TAG_LIST'				=> get_tag_list($topic_id, 20))
					);			
				}
				$template->assign_vars(array(
					'PAGINATION'	=> generate_pagination(append_sid("{$phpbb_root_path}phpBBFolk.$phpEx","tag=$search_tag"), $topics_count, $config['topics_per_page'], $start),
					'PAGE_NUMBER'	=> on_page($topics_count, $config['topics_per_page'], $start),
					'TOTAL_TOPICS'	=> ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['PBF_NUM_TOPIC'] : sprintf($user->lang['PBF_NUM_TOPICS'], $topics_count)),
					'S_DISPLAY_SEARCHBOX'		=> true,
					'S_TAG_SEARCH_ACTION'		=> append_sid("{$phpbb_root}phpBBFolk.{$phpEx}", 'mode=search'),
					'S_SEARCH_STRING'			=> $search_tag,
					'TAG_CLOUD'					=> get_tag_cloud()
					)
				);		
				page_header($user->lang['PBF_TAGS_RESULT_TITLE']);
					
				$template->set_filenames(array(
コード例 #8
0
ファイル: get_tag_list.php プロジェクト: verenka/notes
<?php

function get_tag_list()
{
    include 'dbconnect.php';
    $mysqli_result = mysqli_query($connection, "SELECT tag as tagname, concat(tag, ' (', COUNT(tag), ')') as tag FROM Notiz GROUP BY tag");
    $tag_list = array();
    foreach ($mysqli_result as $row) {
        $tag_list[] = $row;
    }
    return $tag_list;
}
echo json_encode(get_tag_list());