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/css.php at master · unpush/p2-php

Expand file tree

/

css.php

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
52 lines (44 loc) · 1.15 KB
/

css.php

Copy path

File metadata and controls

52 lines (44 loc) · 1.15 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
<?php
/**
* rep2expack - スタイルシートを外部スタイルシートとして出力する
*/
// {{{ 初期設定読み込み & ユーザ認証
require_once './conf/conf.inc.php';
$_login->authorize();
require_once P2_STYLE_DIR . '/mystyle_css.php';
// }}}
// {{{ 妥当なファイルか検証
if (isset($_GET['css']) && preg_match('/^\\w+$/', $_GET['css'])) {
$cssName = $_GET['css'];
$cssFilePath = P2_STYLE_DIR . DIRECTORY_SEPARATOR . $cssName . '_css.inc';
if (!file_exists($cssFilePath)) {
exit;
}
} else {
exit;
}
// }}}
// {{{ 出力
// クエリにユニークキーを埋め込んでいるいるので、キャッシュさせてよい
$now = time();
header('Expires: ' . http_date($now + 3600));
header('Last-Modified: ' . http_date($now));
header('Pragma: cache');
header('Content-Type: text/css; charset=Shift_JIS');
echo "@charset \"Shift_JIS\";\n\n";
ob_start();
include $cssFilePath;
disp_mystyle($cssName);
// 空スタイルを除去
echo preg_replace('/[a-z\\-]+[ \\t]*:[ \\t]*;/', '', ob_get_clean());
// }}}
/*
* 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 01402775 — 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.