/** * p2 - 携帯用インデックスをHTMLプリントする関数 * * @access public * @return void */ function index_print_k() { global $_conf, $_login; $menuKLinkHtmls = getIndexMenuKLinkHtmls(getIndexMenuKIni()); $ptitle = $_conf['p2name'] . 'iPhone'; // ログインユーザ情報 $auth_user_ht = sprintf('<p>ログインユーザ: %s - %s</p>', hs($_login->user_u), date('Y/m/d (D) G:i:s')); // p2ログイン用URL $login_url = rtrim(dirname(UriUtil::getMyUri()), '/') . '/'; $login_url_pc = UriUtil::buildQueryUri($login_url, array(UA::getQueryKey() => 'pc')); $login_url_k = UriUtil::buildQueryUri($login_url, array(UA::getQueryKey() => 'k', 'user' => $_login->user_u)); // 前回のログイン情報 if ($_conf['login_log_rec'] && $_conf['last_login_log_show']) { if (false !== ($log = P2Util::getLastAccessLog($_conf['login_log_file']))) { $log_hs = array_map('htmlspecialchars', $log); $htm['last_login'] = <<<EOP <font color="#888888"> 前回のログイン情報 - {$log_hs['date']}<br> ユーザ: {$log_hs['user']}<br> IP: {$log_hs['ip']}<br> HOST: {$log_hs['host']}<br> UA: {$log_hs['ua']}<br> REFERER: {$log_hs['referer']} </font> EOP; } } // 古いセッションIDがキャッシュされていることを考慮して、ユーザ情報を付加しておく // (リファラを考慮して、つけないほうがいい場合もあるので注意) $narabikae_uri = UriUtil::buildQueryUri('edit_indexmenui.php', array('user' => $_login->user_u, UA::getQueryKey() => UA::getQueryValue())); require_once P2_LIB_DIR . '/BrdCtl.php'; $search_form_htm = BrdCtl::getMenuKSearchFormHtml('menu_i.php'); $body_at = P2View::getBodyAttrK(); $hr = P2View::getHrHtmlK(); //========================================================= // 携帯用 HTML出力 //========================================================= P2Util::headerNoCache(); P2View::printDoctypeTag(); ?> <html> <head> <?php P2View::printExtraHeadersHtml(); ?> <script type="text/javascript"> <!-- window.onload = function() { setTimeout(scrollTo, 100, 0, 1); } // --> </script> <style type="text/css" media="screen">@import "./iui/iui.css";</style> <title><?php eh($ptitle); ?> </title> </head> <body> <div class="toolbar"> <h1 id="pageTitle"><?php eh($ptitle); ?> </h1> <a class="button" href="<?php eh($narabikae_uri); ?> ">並替</a> </div> <ul id="home"> <li class="group">メニュー</li> <?php P2Util::printInfoHtml(); foreach ($menuKLinkHtmls as $v) { ?> <li><?php echo $v; ?> </li><?php } ?> <li class="group">検索</li> <?php echo $search_form_htm; ?> </ul> <br> </body> </html> <?php }
// {{{ 特殊な前処理 // 並び替え if (isset($_GET['code']) && isset($_GET['set'])) { _setOrderIndexMenuK($_GET['code'], $_GET['set']); } elseif (isset($_REQUEST['setfrom1'])) { P2Util::setConfUser('index_menu_k_from1', (int) $_REQUEST['setfrom1']); // デフォルトに戻す } elseif (isset($_GET['setdef'])) { P2Util::setConfUser('index_menu_k', $conf_user_def['index_menu_k']); P2Util::setConfUser('index_menu_k_from1', $conf_user_def['index_menu_k_from1']); } // }}} require_once P2_LIB_DIR . '/index_print_k.inc.php'; $setfrom1 = (int) (!$_conf['index_menu_k_from1']); require_once P2_LIB_DIR . '/index.funcs.php'; $menuKLinkHtmls = getIndexMenuKLinkHtmls(getIndexMenuKIni(), $noLink = true); $body_at = P2View::getBodyAttrK(); $hr = P2View::getHrHtmlK(); $index_uri = UriUtil::buildQueryUri('index.php', array(UA::getQueryKey() => UA::getQueryValue())); //================================================================ // ヘッダHTML表示 //================================================================ P2Util::headerNoCache(); P2View::printDoctypeTag(); ?> <html lang="ja"> <head> <?php P2View::printExtraHeadersHtml(); ?> <title><?php