forked from BOINC/boinc-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
309 lines (288 loc) · 11.6 KB
/
index.php
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<?php
if (isset($_SERVER) && array_key_exists('SERVER_NAME', $_SERVER)) {
$host = $_SERVER["SERVER_NAME"];
if ($host == "bossa.berkeley.edu") {
Header("Location: https://boinc.berkeley.edu/trac/wiki/BossaIntro");
exit();
}
if ($host == "bolt.berkeley.edu") {
Header("Location: https://boinc.berkeley.edu/trac/wiki/BoltIntro");
exit();
}
}
require_once("../inc/util.inc");
require_once("../inc/language_names.inc");
require_once("../inc/news.inc");
require_once("../inc/forum.inc");
function show_participant() {
$i = rand(0, 99);
$j = $i+1;
panel(
tra("Computing power"),
function() use ($i) {
echo "
<center>
";
show_totals();
echo '
<p> </p>
<a class="btn btn-xs btn-primary" href=chart_list.php>'.tra("Top 100 volunteers").'</a>
<a class="btn btn-xs btn-primary" href="links.php#stats">'.tra("Statistics").'</a>
<hr>
<p>
';
echo "</center>";
include("piecharts/$i.html");
}
);
}
function show_totals() {
$fn = "boinc_state.xml";
if (!file_exists($fn) || filemtime($fn) < time()-86400) {
$uid = time();
$x = file_get_contents("https://boincstats.com/en/xml/boincState?uid=$uid");
if ($x) {
$f = fopen($fn, "w");
fwrite($f, $x);
} else return;
}
$x = file_get_contents($fn);
$users = parse_element($x, "<participants_active>");
$hosts = parse_element($x, "<hosts_active>");
$credit_day = parse_element($x, "<credit_day>");
$users = number_format($users);
$hosts = number_format($hosts);
$petaflops = number_format($credit_day/200000000, 3);
echo
tra("24-hour average:")." $petaflops ".tra("PetaFLOPS.")."
<br>
".tra("Active:")." $users ".tra("volunteers,")." $hosts ".tra("computers.
")."
";
}
function show_news_items() {
panel(
tra("News"),
function() {
if (!file_exists("stop_web")) {
show_news(0, 5);
} else {
echo "<p>".tra("Database not available; please try again later.");
}
}
);
}
function top() {
panel(
//"Volunteer" is used as a verb
//tra("Volunteer"),
"",
function () {
echo "<p>\n ";
echo tra(
"BOINC lets you help cutting-edge science research
using your computer (Windows, Mac, Linux) or Android device.
BOINC downloads scientific computing jobs
to your computer and runs them invisibly in the background.
It's easy and safe."
);
echo "</p><p>\n ";
echo tra(
"About 30 science projects use BOINC; examples include %3, %4, and %5.",
'<a href="projects.php">', '</a>',
'<a href="https://einsteinathome.org">Einstein@Home</a>',
'<a href="https://worldcommunitygrid.org">IBM World Community Grid</a>',
'<a href="https://setiathome.berkeley.edu">SETI@home</a>'
);
echo ' These projects investigate diseases, study global warming, discover pulsars, and do many other types of scientific research.
</p><p>
You can participate in either of two ways:
</p><p>
';
echo '
<div class="container-fluid">
<div class="row">
<div class="col-sm-6" style="background-color:#efefef">
<center>
<p>
<font size=+2>Choose science areas</font>
</p><p>
To contribute to science areas
(biomedicine, physics, astronomy, and so on)
use <a href=https://scienceunited.org>Science United</a>.
Your computer will do work for current and future projects
in those areas.
</p><p>
<a class="btn btn-lg btn-success" href="https://scienceunited.org/su_join.php"><font size=+2>'.tra("Join Science United").'</font></a>
</center>
</div>
<div class="col-sm-1" ><p></p><center><font size=+1>or</font></center></div>
<div class="col-sm-5" style="background-color:#efefef">
<center>
<p>
<font size=+2>Choose projects</font>
</p><p>
To contribute to specific projects,
download BOINC and follow the directions.
</p><p>
<a class="btn btn-lg btn-success" href="download.php">'.tra("Download BOINC").'</a>
</center>
</div>
</div>
</div>
';
echo '
</p>
<div class="container-fluid">
<div class="row">
<div class="col-sm-4">
<font size=+2>
'.tra("Learn more").'
</font>
<br><a href="projects.php">'.tra("Science projects").'</a>
<br><a href="https://boinc.berkeley.edu/wiki/User_manual"><span class=nobr>'.tra("User manual").'</span></a>
<br><a " href="addons.php"><span class=nobr>'.tra("Add-ons").'</span></a>
<br><a btn-primary" href="links.php"><span class=nobr>'.tra("Web resources").'</span></a>
<p>
</div><div class="col-sm-4">
<font size=+2>
'.tra("Communicate").'
</font>
<br><a href="forum_index.php">'.tra("Message boards").'</a>
<br><a href="https://boinc.berkeley.edu/wiki/BOINC_Help">'.tra("Help").'</a>
<br><a href="trac/wiki/EmailLists">'.tra("Email lists").'</a>
<br><a href="trac/wiki/ReportBugs">'.tra("Report bugs").'</a>
<p>
</div><div class="col-sm-4">
<font size=+2>
'.tra("Other ways to help").'
</font>
<br><a href="trac/wiki/TranslateIntro">'.tra("Translate").'</a>
<br><a href="trac/wiki/AlphaInstructions">'.tra("Test").'</a>
<br><a href="trac/wiki/WikiMeta">'.tra("Document").'</a>
<br><a href="https://boinc.berkeley.edu/wiki/Publicizing_BOINC">'.tra("Publicize").'</a>
</div>
</div>
</div>
';
}
);
}
function show_science() {
panel(
tra("High-Throughput Computing with BOINC"),
function() {
echo "
<p>
BOINC is a platform for high-throughput computing
on a large scale (thousands or millions of computers).
It can be used for volunteer computing
(using consumer devices)
or grid computing (using organizational resources).
It supports virtualized, parallel, and GPU-based applications.
<p>
BOINC is distributed under the LGPL open source license.
It can be used for commercial purposes,
and applications need not be open source.
";
echo '
<center>
<a class="btn btn-xs btn-primary" href="trac/wiki/BoincOverview">'.tra("Computing with BOINC").'</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/ProjectMain">'.tra("Technical Documentation").'</a>
</center>
';
}
);
}
function show_software() {
panel(
tra("Software"),
function() {
echo
tra("BOINC includes client, server, and web components, and APIs for connecting other components.").'
'.tra("It is distributed under the LGPLv3 open-source license.").'
<p></p>
<center>
<a class="btn btn-xs btn-primary" href="trac/wiki/SourceCodeGit">'.tra("Source code").'</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/SoftwareBuilding">'.tra("Building BOINC").'</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/SoftwareAddon">APIs</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/SoftwareDevelopment">'.tra("Design documents").'</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/CodingStyle">'.tra("Coding style").'</a>
</center>
<p></p>
'.tra("BOINC software development is community-based. Everyone is welcome to participate.").'
<p></p>
<center>
<a class="btn btn-xs btn-primary" href="https://github.com/BOINC/boinc">'.tra("Github").'</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/BoincGovernanceWorkingGroups">'.tra("Organization").'</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/AdminTasks">'.tra("Tasks").'</a>
</center>
<p></p>
';
}
);
}
// <a class="btn btn-xs btn-primary" href="trac/wiki/DevProcess">'.tra("Development process").'</a>
// <a class="btn btn-xs btn-primary" href="trac/wiki/DevProjects">'.tra("Development tasks").'</a>
// <a class="btn btn-xs btn-primary" href="trac/wiki/AdminTasks">'.tra("Maintenance tasks").'</a>
// <a class="btn btn-xs btn-primary" href="logo.php">'.tra("Graphics").'</a>
function show_boinc() {
panel(
'The BOINC Project',
function() {
echo '
The BOINC project is located at the University of California, Berkeley. It has existed since 2002, with funding primarily from the National Science Foundation.
<p></p>
<center>
<a class="btn btn-xs btn-primary" href="trac/wiki/ProjectPeople">Contact us</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/BoincPapers">Papers</a>
<a class="btn btn-xs btn-primary" href="trac/wiki/BoincEvents">'.tra("Events").'</a>
</center>
';
}
);
}
function show_nsf() {
echo "
<img hspace=8 src=images/nsf.gif alt=\"NSF logo\">
BOINC is supported by the
<a href=\"https://nsf.gov\">National Science Foundation</a>
through awards SCI-0221529, SCI-0438443, SCI-0506411,
PHY/0555655, and OCI-0721124.
";
}
header("Content-type: text/html; charset=utf-8");
//html_tag();
$rh_col_width = 390;
echo '
<head>
<link rel="shortcut icon" href="logo/favicon.gif">
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link href="https://plus.google.com/117150698502685192946" rel="publisher" />
<title>BOINC</title>
<meta name=description content="BOINC is an open-source software platform for computing using volunteered resources">
<meta name=keywords content="distributed scientific computing supercomputing grid SETI@home public computing volunteer computing ">
</head>
<body>
<div class="container-fluid">
';
function left() {
echo '<div class="container-fluid">';
show_science();
show_software();
show_boinc();
show_participant();
echo '</div>';
}
function right() {
echo '<div class="container-fluid">';
show_news_items();
echo '</div>';
}
echo "<p> </p>\n";
page_head(tra("Compute for Science"), null, true);
grid('top', 'left', 'right');
show_nsf();
echo "<br>";
page_tail(true, true);
?>