예제 #1
0
/**
 * 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 
}
예제 #2
0
파일: login.php 프로젝트: poppen/p2
        if ($_login->pass_x) {
            $atag = P2View::tagA(UriUtil::buildQueryUri('cookie.php', array('ctl_regist_cookie' => '1', 'regist_cookie' => '1', UA::getQueryKey() => UA::getQueryValue())), 'cookieに認証を登録');
            $auth_cookie_html = sprintf('[%s]<br>', $atag);
        }
    }
}
// Cookie認証登録解除処理
_preExecCheckRegistCookie();
//=================================================================
// HTMLプリント
//=================================================================
$p_htm['body_onload'] = '';
if (!$_conf['ktai']) {
    $p_htm['body_onload'] = ' onLoad="setWinTitle();"';
}
$body_at = P2View::getBodyAttrK();
P2Util::headerNoCache();
P2View::printDoctypeTag();
?>
<html lang="ja">
<head>
<?php 
P2View::printExtraHeadersHtml();
?>
    <title><?php 
eh($p_str['ptitle']);
?>
</title>
<?php 
if (!$_conf['ktai']) {
    P2View::printIncludeCssHtml('style');
예제 #3
0
파일: editpref.php 프로젝트: poppen/p2
?>
<title><?php 
eh($ptitle);
?>
</title>
<?php 
if (!$_conf['ktai']) {
    P2View::printIncludeCssHtml('style');
    P2View::printIncludeCssHtml('editpref');
    ?>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"><?php 
}
?>
</head>
<body<?php 
echo P2View::getBodyAttrK();
echo $parent_reload;
?>
>
<?php 
if (!$_conf['ktai']) {
    //<p id="pan_menu"><a href="setting.php">設定</a> &gt; {$ptitle}</p>
    ?>
<p id="pan_menu"><?php 
    eh($ptitle);
    ?>
</p><?php 
}
P2Util::printInfoHtml();
$aborn_res_txt = $_conf['pref_dir'] . '/p2_aborn_res.txt';
$aborn_name_txt = $_conf['pref_dir'] . '/p2_aborn_name.txt';
예제 #4
0
파일: post.php 프로젝트: poppen/p2
/**
 * 書き込み処理結果をHTML表示する
 *
 * @param   boolean  $is_done       書き込み完了したならtrue
 * @param   string   $msg_ht        結果メッセージHTML
 * @param   boolean  $reload_opener opener画面を自動で更新するならtrue
 * @return  void
 */
function _showPostMsg($is_done, $msg_ht, $reload_opener)
{
    global $_conf, $location_url, $location_sid_url, $popup, $STYLE, $ttitle, $ptitle;
    $body_at = P2View::getBodyAttrK();
    $class_ttitle = '';
    if (!$_conf['ktai']) {
        $class_ttitle = ' class="thre_title"';
    }
    $ttitle_ht = "<b{$class_ttitle}>{$ttitle}</b>";
    // 2005/04/25 rsk: <script>タグ内もCDATAとして扱われるため、&amp;にしてはいけない
    $popup_ht = '';
    $meta_refresh_ht = '';
    if ($popup) {
        $reload_js = $reload_opener ? 'opener.location.href="' . $location_sid_url . '"' : '';
        $popup_ht = <<<EOJS
<script language="JavaScript">
<!--
    resizeTo({$STYLE['post_pop_size']});
    {$reload_js}
    var delay = 3*1000;
    var closeid = setTimeout("window.close()", delay);
// -->
</script>
EOJS;
        $body_at .= ' onUnload="clearTimeout(closeid)"';
    } else {
        // 2005/03/01 aki: jigブラウザに対応するため、&amp; ではなく & で
        // 2007/10/17 ↑今もそうなのかな。hs()するように変更してみた。
        $meta_refresh_ht = '<meta http-equiv="refresh" content="1;URL=' . hs($location_sid_url) . '">';
    }
    // HTMLプリント
    P2View::printDoctypeTag();
    ?>
<html lang="ja">
<head>
<?php 
    P2View::printExtraHeadersHtml();
    echo $meta_refresh_ht;
    if ($is_done) {
        echo "<title>p2 - 書きこみました。</title>";
    } else {
        echo "<title>{$ptitle}</title>";
    }
    $kakunin_ht = '';
    // PC向け
    if (!$_conf['ktai']) {
        P2View::printIncludeCssHtml('style');
        P2View::printIncludeCssHtml('post');
        ?>
	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<?php 
        echo $popup_ht;
        // 携帯向け
    } else {
        $kakunin_ht = '<p><a href="' . hs($location_url) . '">確認</a></p>';
    }
    echo "</head><body{$body_at}>\n";
    P2Util::printInfoHtml();
    echo <<<EOP
<p>{$ttitle_ht}</p>
<p>{$msg_ht}</p>
{$kakunin_ht}
</body>
</html>
EOP;
}