GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — p2-php/index.php at master · thermon/p2-php

Expand file tree

/

index.php

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
140 lines (121 loc) · 3.9 KB
/

index.php

Copy path

File metadata and controls

140 lines (121 loc) · 3.9 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
/**
* rep2 - インデックスページ
*/
require_once './conf/conf.inc.php';
$_login->authorize(); //ユーザ認証
//=============================================================
// 前処理
//=============================================================
// アクセス拒否用の.htaccessをデータディレクトリに作成する
makeDenyHtaccess($_conf['pref_dir']);
makeDenyHtaccess($_conf['dat_dir']);
makeDenyHtaccess($_conf['idx_dir']);
//=============================================================
$me_url = P2Util::getMyUrl();
$me_dir_url = dirname($me_url);
$me_url_b = htmlspecialchars(rtrim($me_dir_url, '/') . '/?b=', ENT_QUOTES);
if ($_conf['ktai']) {
//=========================================================
// 携帯用 インデックス
//=========================================================
// url指定があれば、そのままスレッド読みへ飛ばす
if (!empty($_GET['url']) || !empty($_GET['nama_url'])) {
header('Location: '.$me_dir_url.'/read.php?'.$_SERVER['QUERY_STRING']);
exit;
}
if ($_conf['iphone']) {
include P2_BASE_DIR . '/menu_i.php';
exit;
}
require_once P2_LIB_DIR . '/index_print_k.inc.php';
index_print_k();
} else {
//=========================================
// PC用 変数
//=========================================
$title_page = "title.php";
if (!empty($_GET['url']) || !empty($_GET['nama_url'])) {
$htm['read_page'] = "read.php?".$_SERVER['QUERY_STRING'];
} else {
if (!empty($_conf['first_page'])) {
$htm['read_page'] = $_conf['first_page'];
} else {
$htm['read_page'] = 'first_cont.php';
}
}
$sidebar = !empty($_GET['sidebar']);
$v3pane = !empty($_GET['v3pane']);
$ptitle = "rep2";
//======================================================
// PC用 HTMLプリント
//======================================================
//P2Util::header_nocache();
if ($_conf['doctype']) {
echo str_replace(
array('Transitional', 'loose.dtd'),
array('Frameset', 'frameset.dtd'),
$_conf['doctype']);
}
echo <<<EOHEADER
<html lang="ja">
<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>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
</head>\n
EOHEADER;
if (!$sidebar) {
echo <<<EOMENUFRAME
<frameset id="menuframe" cols="{$_conf['frame_menu_width']},*" border="1">
<frame src="menu.php" id="menu" name="menu" scrolling="auto" frameborder="1">\n
EOMENUFRAME;
}
$direction = ($v3pane) ? 'cols' : 'rows';
echo <<<EOMAINFRAME
<frameset id="mainframe" {$direction}="{$_conf['frame_subject_width']},{$_conf['frame_read_width']}" border="2">
<frame src="{$title_page}" id="subject" name="subject" scrolling="auto" frameborder="1">
<frame src="{$htm['read_page']}" id="read" name="read" scrolling="auto" frameborder="1">
</frameset>\n
EOMAINFRAME;
if (!$sidebar) {
echo <<<EONOFRAMES
</frameset>
<noframes>
<body>
<h1>{$ptitle}</h1>
<ul>
<li> 携帯用URL: <a href="{$me_url_b}k">{$me_url_b}k</a></li>
<li>iPhone用URL: <a href="{$me_url_b}i">{$me_url_b}i</a></li>
</ul>
</body>
</noframes>\n
EONOFRAMES;
}
echo '</html>';
}
// {{{ makeDenyHtaccess()
/**
* ディレクトリに(アクセス拒否のための) .htaccess がなければ、自動で生成する
*/
function makeDenyHtaccess($dir)
{
$hta = $dir . '/.htaccess';
if (!file_exists($hta)) {
$data = 'Order allow,deny'."\n".'Deny from all'."\n";
FileCtl::file_write_contents($hta, $data);
}
}
// }}}
/*
* 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.