diff -urN p2ex-050315-1311.orig/p2/conf/conf.php p2ex-050315-1311.P004_framesetchange/p2/conf/conf.php --- p2ex-050315-1311.orig/p2/conf/conf.php 2005-03-15 13:11:20.000000000 +0900 +++ p2ex-050315-1311.P004_framesetchange/p2/conf/conf.php 2005-03-16 16:29:19.000000000 +0900 @@ -220,6 +220,9 @@ if (!isset($_conf['pre_thumb_height'])) { $_conf['pre_thumb_height'] = "32"; } if (!isset($_conf['quote_res_view'])) { $_conf['quote_res_view'] = 1; } if (!isset($_conf['res_write_rec'])) { $_conf['res_write_rec'] = 1; } +if (!isset($_conf['frame_type'])) { $_conf['frame_type'] = 0; } +if (!isset($_conf['frame_cols'])) { $_conf['frame_cols'] = "156,*"; } +if (!isset($_conf['frame_rows'])) { $_conf['frame_rows'] = "40%,60%"; } if (!isset($STYLE['post_pop_size'])) { $STYLE['post_pop_size'] = "610,350"; } if (!isset($STYLE['post_msg_rows'])) { $STYLE['post_msg_rows'] = 10; } diff -urN p2ex-050315-1311.orig/p2/conf/conf_user.php p2ex-050315-1311.P004_framesetchange/p2/conf/conf_user.php --- p2ex-050315-1311.orig/p2/conf/conf_user.php 2005-03-15 13:11:20.000000000 +0900 +++ p2ex-050315-1311.P004_framesetchange/p2/conf/conf_user.php 2005-03-16 16:29:19.000000000 +0900 @@ -95,4 +95,8 @@ // 0-9A-Za-z_/.,以外の文字を含むときは正規表現として扱う // そうでないときはカンマ区切りとして扱う +$_conf['frame_type']=0; // (0) frame分割形式(従来:0 その他:1-3) +$_conf['frame_cols']="156,*"; // ("156,*") 横方向の分割パラメータ +$_conf['frame_rows']="40%,60%"; // ("40%,60%") 縦方向の分割パラメータ + ?> diff -urN p2ex-050315-1311.orig/p2/index.php p2ex-050315-1311.P004_framesetchange/p2/index.php --- p2ex-050315-1311.orig/p2/index.php 2005-03-15 13:11:21.000000000 +0900 +++ p2ex-050315-1311.P004_framesetchange/p2/index.php 2005-03-16 16:48:40.000000000 +0900 @@ -29,56 +29,13 @@ index_print_k(); } else { - //========================================= - // 変数 - //========================================= - $title_page = "title.php"; - if (!$_conf['first_page']) { $_conf['first_page'] = "first_cont.php"; } - $sidebar = !empty($_GET['sidebar']); - - $ptitle = " p2"; - //====================================================== - // PC用 HTMLプリント - //====================================================== - header_nocache(); - header_content_type(); - if ($doctype) { echo $doctype;} - echo << - - - - - - {$ptitle} - - -EOHEADER; - - if (!$sidebar) { - echo << - -EOMENUFRAME; - } - - echo << - - - -EOMAINFRAME; - if (!$sidebar) { - echo << -EOMENUFRAME; - } + //========================================================= + // PC用 インデックス + //========================================================= + include(P2_LIBRARY_DIR . '/index_print.inc.php'); + index_print(); - echo << -EOFOOTER; - } ?> diff -urN p2ex-050315-1311.orig/p2/lib/index_print.inc.php p2ex-050315-1311.P004_framesetchange/p2/lib/index_print.inc.php --- p2ex-050315-1311.orig/p2/lib/index_print.inc.php 1970-01-01 09:00:00.000000000 +0900 +++ p2ex-050315-1311.P004_framesetchange/p2/lib/index_print.inc.php 2005-03-16 16:51:00.000000000 +0900 @@ -0,0 +1,128 @@ +\n +EOS; + $tablevel++; +} + + +function print_frameset_close(&$tablevel) +{ + $tablevel--; + echo str_repeat("\t", $tablevel); + echo "\n"; +} + + +function print_frame(&$tablevel, $src, $name, $scrolling) +{ + echo str_repeat("\t", $tablevel); + echo <<\n +EOS; +} + + +function print_frame_menu(&$tablevel) +{ + print_frame($tablevel, "menu.php", "menu", "auto"); +} +function print_frame_subject(&$tablevel) +{ + print_frame($tablevel, "title.php", "subject", "auto"); +} +function print_frame_read(&$tablevel) +{ + global $_conf; + print_frame($tablevel, $_conf['first_page'], "read", "auto"); +} + + +function index_print() +{ + global $_conf, $_GET; + global $doctype; + + //========================================= + // 変数 + //========================================= + if (!$_conf['first_page']) { $_conf['first_page'] = "first_cont.php"; } + $sidebar = !empty($_GET['sidebar']); + + $ptitle = " p2"; + //====================================================== + // PC用 HTMLプリント + //====================================================== + header_nocache(); + header_content_type(); + if ($doctype) { echo $doctype;} + echo << + + + + + + {$ptitle} + +\n +EOHEADER; + + $tablevel=0; + switch($_conf['frame_type']){ + case 0: + case 1: + if(!$sidebar){ + print_frameset_open($tablevel, 1, 1, "cols", $_conf['frame_cols']); + if($_conf['frame_type'] == 0){ + print_frame_menu($tablevel); + } + } + print_frameset_open($tablevel, 1, 2, "rows", $_conf['frame_rows']); + print_frame_subject($tablevel); + print_frame_read($tablevel); + print_frameset_close($tablevel); + if(!$sidebar){ + if($_conf['frame_type'] == 1){ + print_frame_menu($tablevel); + } + print_frameset_close($tablevel); + } + break; + case 2: + case 3: + print_frameset_open($tablevel, 1, 2, "rows", $_conf['frame_rows']); + if(!$sidebar && $_conf['frame_type'] == 2){ + print_frameset_open($tablevel, 1, 1, "cols", $_conf['frame_cols']); + print_frame_menu($tablevel); + } + print_frame_subject($tablevel); + if(!$sidebar && $_conf['frame_type'] == 2){ + print_frameset_close($tablevel); + } + if(!$sidebar && $_conf['frame_type'] == 3){ + print_frameset_open($tablevel, 1, 1, "cols", $_conf['frame_cols']); + print_frame_menu($tablevel); + } + print_frame_read($tablevel); + if(!$sidebar && $_conf['frame_type'] == 3){ + print_frameset_close($tablevel); + } + print_frameset_close($tablevel); + break; + } + + echo "\n"; +} + +?>