-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathlib_general.inc.php
More file actions
112 lines (107 loc) · 4.55 KB
/
lib_general.inc.php
File metadata and controls
112 lines (107 loc) · 4.55 KB
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
<?php
/*
+----------------------------------------------------------------------+
| PHP Documentation Tools Site Source Code |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Nilgün Belma Bugüner <nilgun@php.net> |
| Yannick Torres <yannick@php.net> |
| Mehdi Achour <didou@php.net> |
| Gabor Hojtsy <goba@php.net> |
| Sean Coates <sean@php.net> |
| Maciej Sobaczewski <sobak@php.net> |
+----------------------------------------------------------------------+
*/
function get_svn_dir($project)
{
// @@@ make this return something until the function is found
return $GLOBALS['PROJECTS'][$project][1] . '/';
}
function site_header()
{
$TITLE = 'Documentation Tools';
$SUBDOMAIN = 'doc';
$CSS = array('/styles/doc.css');
$LINKS = array(
array('href' => '/guide/', 'text' => 'How to Contribute'),
array('href' => '/revcheck.php', 'text' => 'Translation Status'),
array('href' => '/phd.php', 'text' => 'PhD Homepage'),
);
require __DIR__ . '/../shared/templates/header.inc';
echo <<<END_OF_MULTILINE
<style type="text/css">
table { margin-left: auto; margin-right: auto; text-align: left; border-spacing: 2px; font-size: 14px;}
th { color: white; background-color: #666699; padding: 0.2em; text-align: center; vertical-align: middle; }
td { background-color: #dcdcdc; padding: 0.2em 0.3em; }
.c { text-align: center; }
.n { white-space: nowrap; }
.o3 { overflow: hidden; max-width: 3em; }
.o6 { overflow: hidden; max-width: 6em; }
.copy { margin:0; padding: 0; font-size:small; }
.copy:hover { text-transform: uppercase; }
.copy:active { background: aqua; font-weight: bold; }
pre {
background: white;
border: solid 1px rgb(214, 214, 214);
padding: 0.75rem;
overflow: auto;
font: normal 0.875rem/1.5rem "Source Code Pro", monospace;
}
</style>
END_OF_MULTILINE;
echo '<section class="mainscreen">';
}
function site_footer($SECONDSCREEN = false)
{
echo '</section>';
echo <<<END_OF_MULTILINE
<script src="//cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script>
var clipboard = new ClipboardJS('.btn');
clipboard.on('success', function (e) {
console.log(e);
});
clipboard.on('error', function (e) {
console.log(e);
});
</script>
END_OF_MULTILINE;
require __DIR__ . '/../shared/templates/footer.inc';
}
function nav_languages($lang = null)
{
global $LANGUAGES;
$out = '<div class="panel">';
$out .= '<p class="headline"><a href="/revcheck.php">Translation status</a></p>';
$out .= '<div class="body">';
$out .= '<ul>';
if ($lang === null) {
$out .= '<li><a href="/revcheck.php?p=alllangs&lang=en">All languages</a></li>';
}
foreach ($LANGUAGES as $code => $name)
{
$out .= '<li><a href="/revcheck.php?lang='.$code.'">'.$name.'</a>';
if ($lang === $code) {
$out .= '<ul>';
$out .= '<li><a href="/revcheck.php?p=translators&lang='.$lang.'">Translators</a></li>';
$out .= '<li><a href="/revcheck.php?p=filesummary&lang='.$lang.'">File summary</a></li>';
$out .= '<li><a href="/revcheck.php?p=files&lang='.$lang.'">Outdated files</a></li>';
$out .= '<li><a href="/revcheck.php?p=misstags&lang='.$lang.'">Missing revision numbers</a></li>';
$out .= '<li><a href="/revcheck.php?p=missfiles&lang='.$lang.'">Untranslated files</a></li>';
$out .= '<li><a href="/revcheck.php?p=oldfiles&lang='.$lang.'">Not in EN tree</a></li>';
$out .= '</ul>';
}
$out .= '</li>';
}
$out .= '</ul></div></div>';
return $out;
}