GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — p2-php/menu_k.php at master · thermon/p2-php Expand file tree/ Copy pathmenu_k.phpMore file actions 220 lines (187 loc) · 5.95 KB / Copy pathmenu_k.phpFile metadata and controls220 lines (187 loc) · 5.95 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 <?php /** * rep2 - 板メニュー 携帯用 */ require_once './conf/conf.inc.php'; require_once P2_LIB_DIR . '/BrdCtl.php'; require_once P2_LIB_DIR . '/ShowBrdMenuK.php'; $_login->authorize(); // ユーザ認証 //============================================================== // 変数設定 //============================================================== $_conf['ktai'] = 1; $brd_menus = array(); $GLOBALS['menu_show_ita_num'] = 0; // {{{ 板検索のための設定 if (isset($_GET['word'])) { $word = $_GET['word']; } elseif (isset($_POST['word'])) { $word = $_POST['word']; } if (isset($word) && strlen($word) > 0) { if (substr_count($word, '.') == strlen($word)) { $word = null; } else { p2_set_filtering_word($word, 'and'); } } else { $word = null; } // }}} //============================================================ // 特殊な前置処理 //============================================================ // お気に板の追加・削除 if (isset($_GET['setfavita'])) { require_once P2_LIB_DIR . '/setfavita.inc.php'; setFavIta(); } //================================================================ // メイン //================================================================ $aShowBrdMenuK = new ShowBrdMenuK(); //============================================================ // ヘッダ //============================================================ if ($_GET['view'] == "favita") { $ptitle = "お気に板"; } elseif ($_GET['view'] == "rss") { $ptitle = "RSS"; } elseif ($_GET['view'] == "cate"){ $ptitle = "板リスト"; } elseif (isset($_GET['cateid'])){ $ptitle = "板リスト"; } else { $ptitle = "ユビキタスp2"; } echo $_conf['doctype']; echo <<<EOP <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <meta name="ROBOTS" content="NOINDEX, NOFOLLOW"> {$_conf['extra_headers_ht']} <title>{$ptitle}</title> EOP; echo <<<EOP </head> <body{$_conf['k_colors']}> EOP; echo $_info_msg_ht; $_info_msg_ht = ""; //============================================================== // お気に板をプリントする //============================================================== if($_GET['view']=="favita"){ $aShowBrdMenuK->printFavIta(); //RSSリスト読み込み } elseif ($_GET['view'] == "rss" && $_conf['expack.rss.enabled']) { if ($_conf['view_forced_by_query']) { output_add_rewrite_var('b', $_conf['b']); } require_once P2EX_LIB_DIR . '/rss/menu.inc.php'; // それ以外ならbrd読み込み }else{ $brd_menus = BrdCtl::read_brds(); } //=========================================================== // 板検索 //=========================================================== if ($_GET['view'] != "favita" && $_GET['view'] != "rss" && !$_GET['cateid']) { $kensaku_form_ht = <<<EOFORM <form method="GET" action="{$_SERVER['SCRIPT_NAME']}" accept-charset="{$_conf['accept_charset']}"> <input type="hidden" name="nr" value="1"> <input type="text" id="word" name="word" value="{$word}" size="12"> <input type="submit" name="submit" value="板検索"> {$_conf['detect_hint_input_ht']}{$_conf['k_input_ht']} </form>\n EOFORM; echo $kensaku_form_ht; echo "<br>"; } //=========================================================== // 検索結果をプリント //=========================================================== // {{{ 検索ワードがあれば if (isset($_REQUEST['word']) && strlen($_REQUEST['word']) > 0) { $hd['word'] = htmlspecialchars($word, ENT_QUOTES); if ($GLOBALS['ita_mikke']['num']) { $hit_ht = "<br>\"{$hd['word']}\" {$GLOBALS['ita_mikke']['num']}hit!"; } echo "板リスト検索結果{$hit_ht}<hr>"; if ($word) { // 板名を検索してプリントする if ($brd_menus) { foreach ($brd_menus as $a_brd_menu) { $aShowBrdMenuK->printItaSearch($a_brd_menu->categories); } } } if (!$GLOBALS['ita_mikke']['num']) { $_info_msg_ht .= "<p>\"{$hd['word']}\"を含む板は見つかりませんでした。</p>\n"; unset($word); } $modori_url_ht = <<<EOP <a href="menu_k.php?view=cate&nr=1{$_conf['k_at_a']}">板リスト</a> EOP; } // }}} //============================================================== // カテゴリを表示 //============================================================== if ((isset($_REQUEST['word']) && $_REQUEST['word'] == "") or $_GET['view'] == "cate") { echo "板リスト<hr>"; if($brd_menus){ foreach($brd_menus as $a_brd_menu){ $aShowBrdMenuK->printCate($a_brd_menu->categories); } } } //============================================================== // カテゴリの板を表示 //============================================================== if (isset($_GET['cateid'])) { if ($brd_menus) { foreach ($brd_menus as $a_brd_menu) { $aShowBrdMenuK->printIta($a_brd_menu->categories); } } $modori_url_ht = <<<EOP <a href="menu_k.php?view=cate&nr=1{$_conf['k_at_a']}">板リスト</a> EOP; } echo $_info_msg_ht; $_info_msg_ht = ""; //============================================================== // セット切り替えフォームを表示 //============================================================== if ($_conf['expack.misc.multi_favs'] && ($_GET['view'] == 'favita' || $_GET['view'] == 'rss')) { echo '<hr>'; if ($_GET['view'] == 'favita') { $set_name = 'm_favita_set'; $set_title = 'お気に板'; } elseif ($_GET['view'] == 'rss') { $set_name = 'm_rss_set'; $set_title = 'RSS'; } echo FavSetManager::makeFavSetSwitchForm($set_name, $set_title, NULL, NULL, FALSE, array('view' => $_GET['view'])); } //============================================================== // フッタを表示 //============================================================== echo '<hr>'; echo $list_navi_ht; echo '<div class="center">'; echo $modori_url_ht; echo $_conf['k_to_index_ht']; echo '</div></body></html>'; /* * Local Variables: * mode: php * coding: cp932 * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: nil * End: */ // vim: set syn=php fenc=cp932 ai et ts=4 sw=4 sts=4 fdm=marker: |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |