熊猫云搜-智能研判

主页修补功能的源代码

home。php

';
echo '
'; echo '
'; $side_menus = []; // 搜索框 include View::getView('components/search-box'); foreach ($arr as $item) { $item = trim($item); $key = 'id-' . $item; if ($item === 'new_nav') { $logs = getNewLogsFromTemplate('log_list_link', _g('home_new_nav_count')); $icon = _g('new_link_icon'); $icon = ""; echo "
{$icon}" . _t('new_websites') . "
"; if (_g('new_nav_list_type') === 'card') { log_list_link_card($logs); } if (_g('new_nav_list_type') === 'icon') { log_list_link($logs); } echo '
'; $side_menus[] = [ 'id' => $key, 'name' => _t('new_websites'), 'icon' => $icon ]; } else if ($item === 'new_log') { $logs = getNewLogsFromTemplate('', _g('home_new_log_count')); $icon = _g('new_article_icon'); $icon = ""; // 最新资讯 添加 更多按钮 https://www.panda.tw/sort/7 echo "
{$icon}" . _t('new_articles') . " " . _t('more') . " " . "
"; if (_g('new_log_list_type') === 'log_list_log_normal') { log_list_log_normal($logs); } else { log_list_card($logs); } echo '
'; $side_menus[] = [ 'id' => $key, 'name' => _t('new_articles'), 'icon' => $icon ]; } else if (_g($item)) { // 广告位 echo "
"; echo _g($item); echo "
"; } } // 获取所有导航分类并展示 if (_g('home_sorts') === 'all') { $sorts = get_sorts_by_templates([]); } elseif (_g('home_sorts') === 'log_list') { $sorts = get_sorts_by_template(''); } else { $sorts = get_sorts_by_template(); } $sorts_cache = Cache::getInstance()->readCache('sort'); $dict = []; foreach ($sorts_cache as $sort) { if (isset($sort['children'])) { foreach ($sort['children'] as $child) { $dict[$sort['sid']][] = $sorts_cache[$child]; } } } $hide_sorts = explode(",", _g('home_sorts_hide')); foreach ($sorts as $sort) { $sid = $sort['sid']; if (in_array($sid, $hide_sorts)) { continue; } $key = 'id-' . $sid; if ($sort) { $sort_url = Url::sort($sid); $count = $sort['template'] === 'log_list_link' ? _g('sort_nav_count') : _g('sort_log_count'); $logs = getArticleBySortID($sid, $count); $icon = $sort['sortimg'] ? "" : ""; $children = []; if (isset($dict[$sid])) { $children = array_map(function ($item) { $url = Url::sort($item['sid']); return "{$item['sortname']}"; }, $dict[$sid]); } ?>
= $icon; ?>= $sort['sortname']; ?> = implode("", $children) ?> = _t('more') ?>
'; $side_menus[] = [ 'id' => $key, 'name' => $sort['sortname'], 'icon' => $icon ]; } } ?> readCache('link'); $links = array_slice($links, 0, _g('home_links_num')); $bar = TEMPLATE_URL . 'static/images/link.png'; if (count($links) > 0): ?> '; echo '
'; $side_menu_url = OpzNavTemplate::getInstance()->load_static('js/side-menu.js'); $side_menu_data = json_encode($side_menus, JSON_UNESCAPED_SLASHES); echo ""; echo ""; include View::getView('footer');
工欲善其事,必先利其器。
收藏
Related articles
智能AI助手

Hello, I am your AI Assistant

You can ask me anything about tech, tools, or site content.

Content generated by AI. For reference only.
Guess you're curious about:
What is AI? Help me write a JS quicksort. What tech articles are on this site?
AI Assistant: You can ask me anything about tech, tools, or site content.