|
|
1.1 root 1: <?php
2: /*
3: * nono
4: * Copyright (C) 2020 nono project
5: * Licensed under nono-license.txt
6: */
1.1.1.7 ! root 7:
! 8: $nono_ver = "@version@";
! 9: $nono_date = "@date@";
! 10:
! 11: function get_version()
! 12: {
! 13: global $nono_ver;
! 14: global $nono_date;
! 15:
! 16: $fp = fopen("../lib/nono.h", "r");
! 17: if ($fp !== false) {
! 18: while (($buf = fgets($fp)) !== false) {
! 19: if (preg_match("/NONO_MAJOR_VER\s+\((\d+)\)/", $buf, $m)) {
! 20: $nono_major = $m[1];
! 21: }
! 22: if (preg_match("/NONO_MINOR_VER\s+\((\d+)\)/", $buf, $m)) {
! 23: $nono_minor = $m[1];
! 24: }
! 25: if (preg_match("/NONO_PATCH_VER\s+\((\d+)\)/", $buf, $m)) {
! 26: $nono_patch = $m[1];
! 27: }
! 28: if (preg_match("/NONO_DATE\s+\"([^\"]+)\"/", $buf, $m)) {
! 29: $nono_date = $m[1];
! 30: }
! 31: }
! 32: fclose($fp);
! 33:
! 34: $nono_ver = "${nono_major}.${nono_minor}.${nono_patch}";
! 35: }
! 36: }
! 37:
! 38: function print_head_common()
! 39: {
! 40: print <<<__EOM__
1.1 root 41: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
42: <style type="text/css">
43: /* https://jfly.uni-koeln.de/colorset/ */
44:
45: :root {
46: --blue: rgb( 0, 90, 255);
47: --brown: rgb(128, 64, 0);
48: --green: rgb( 3, 175, 122);
49: --grey: rgb(132, 145, 158);
1.1.1.5 root 50: --cream: rgb(255, 255, 128);
51: --yellow-green: rgb(216, 242, 85);
1.1.1.4 root 52: --light-pink: rgb(255, 202, 191);
1.1.1.5 root 53: --light-green: rgb(119, 217, 168);
1.1 root 54: --light-grey: rgb(200, 200, 203);
1.1.1.2 root 55:
56: --bg-grey: rgb(220, 220, 223);
1.1 root 57: }
58: body {
1.1.1.2 root 59: background-color: var(--bg-grey);
1.1 root 60: }
61: q {
62: color: var(--brown);
63: }
64: q:before {
65: content: "[";
66: }
67: q:after {
68: content: "]";
69: }
70: dt.dt-indent {
71: padding-left: 1ex;
72: }
1.1.1.6 root 73: .h4 {
74: font-weight: bold;
75: font-size: 110%;
76: }
77: .h5 {
78: font-weight: bold;
79: padding-left: 1ex;
80: }
1.1 root 81: .main {
1.1.1.6 root 82: margin-left: 2em;
83: }
84: .main1 {
1.1 root 85: margin-left: 1em;
86: }
87: .cons {
88: background-color: black;
89: color: white;
90: }
91: .file {
92: background-color: white;
93: color: black;
94: }
95: .strike {
96: color: var(--grey);
97: }
1.1.1.3 root 98: .strike > q {
99: color: var(--grey);
100: }
1.1.1.5 root 101: .new {
102: background-color: var(--light-green);
103: }
104: .new > q {
105: background-color: var(--light-green);
106: }
1.1 root 107: </style>
1.1.1.7 ! root 108:
! 109: __EOM__;
! 110: }
! 111:
! 112: function linkto_str($to, $msg)
! 113: {
! 114: $str = "<a href=\"{$to}.html\">{$msg}</a>";
! 115: // ブラウザから見てる時だけ .php へのリンクを貼る
! 116: if (isset($_SERVER["HTTP_HOST"])) {
! 117: $str .= "(<a href=\"{$to}.php\">{$to}.php</a>)";
! 118: }
! 119: return $str;
! 120: }
! 121:
! 122: function linkto($to, $msg)
! 123: {
! 124: print linkto_str($to, $msg);
! 125: }
! 126: ?>
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.