= 3 order by rating desc, username asc limit 12;"); $hotusers = DB::selectAll("select username, rating, rating_rd, rating_vol, qq, motto from user_info order by rating_vol desc, username asc limit 12;"); $topblogs = DB::selectAll("select id from blogs where is_hidden = false and zan >= 10 order by zan desc limit 10;"); $recentblogs = DB::selectAll("select id from blogs where is_hidden = false and zan < 10 order by post_time desc limit 10;"); $songs_data = htmlspecialchars(json_encode(DB::selectAll("select * from songs;")), ENT_QUOTES, 'UTF-8'); // 最近比赛:未结束的按开始时间升序取,不足 5 场时补最近结束的 $recent_contests = array(); $result = DB::selectAll("select * from contests where status != 'finished' order by start_time asc, id asc limit 5"); foreach ($result as $contest) { genMoreContestInfo($contest); $recent_contests[] = $contest; } if (count($recent_contests) < 5) { $need = 5 - count($recent_contests); $result = DB::selectAll("select * from contests where status = 'finished' order by start_time desc, id desc limit $need"); foreach ($result as $contest) { genMoreContestInfo($contest); $recent_contests[] = $contest; } } // 随机用户背景图展示用 $rand_users = []; $rand_users_raw = DB::selectAll("select username, bgurl, motto from user_info where bgurl is not null and bgurl != ''"); foreach ($rand_users_raw as $u) { if (!preg_match('#^https?://#i', $u['bgurl'])) continue; $u_obj = queryUser($u['username']); if (!$u_obj) continue; $rand_users[] = [ 'username' => $u['username'], 'href' => '/user/profile/' . urlencode($u['username']), 'bgurl' => $u['bgurl'], 'motto' => $u['motto'], 'userlink' => getUserLink($u['username']), 'avatar' => HTML::avatar_addr($u_obj, 128), ]; } $rand_users_json = htmlspecialchars(json_encode($rand_users), ENT_QUOTES, 'UTF-8'); ?>
| = $blog['title'] ?>= $new_tag ?> | by = getUserLink($blog['poster']) ?> | = $blog['post_time'] ?> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 本歌曲由 推荐 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WyOJ 以及所有相关项目均为自由软件。 = UOJLocale::get('all the announcements') ?> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 声明:本网站属个人非经营性网站,仅用于学习交流,无任何盈利目的,与任何组织无关 我要推歌 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||