2007-05-09 15:51:21 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("docutil.php");
|
|
|
|
require_once("addon_data.php");
|
|
|
|
|
|
|
|
$platform = $_GET['platform'];
|
|
|
|
$item = $_GET['item'];
|
|
|
|
|
|
|
|
function show_item($y) {
|
|
|
|
$d = gmdate("g:i A \U\T\C, F d Y", $y[7]);
|
|
|
|
$file = $y[0];
|
|
|
|
if (strstr($file, 'http://')) {
|
|
|
|
$url = $file;
|
|
|
|
} else {
|
|
|
|
$url = "http://boinc.berkeley.edu/addons/$file";
|
|
|
|
}
|
|
|
|
|
|
|
|
page_head($y[1]);
|
|
|
|
list_start();
|
|
|
|
list_item(
|
|
|
|
"Name<br><font size=-2>Click to download</font>",
|
2007-07-17 20:34:37 +00:00
|
|
|
"<a href=\"$url\">".$y[1].'</a>');
|
2007-05-09 15:51:21 +00:00
|
|
|
if ($y[2]) {
|
|
|
|
list_item("Version", $y[2]);
|
|
|
|
}
|
|
|
|
if ($y[3]) {
|
|
|
|
list_item("Summary", $y[3]);
|
|
|
|
}
|
|
|
|
if ($y[4]) {
|
|
|
|
list_item("Origin",
|
|
|
|
'<a href='.$y[4].'>'.$y[4].'</a>'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
if ($y[5]) {
|
|
|
|
list_item("Platform", $y[5]);
|
|
|
|
}
|
|
|
|
if ($y[6]) {
|
|
|
|
list_item("Description", $y[6]);
|
|
|
|
}
|
|
|
|
list_item("Date", $d);
|
|
|
|
list_end();
|
|
|
|
|
|
|
|
page_tail();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($platform == 'win') {
|
|
|
|
$x = $win;
|
|
|
|
} else if ($platform == 'mac') {
|
|
|
|
$x = $mac;
|
|
|
|
} else if ($platform == 'linux') {
|
|
|
|
$x = $linux;
|
|
|
|
} else if ($platform == 'browser') {
|
|
|
|
$x = $browser;
|
|
|
|
} else if ($platform == 'web') {
|
|
|
|
$x = $web;
|
2012-09-08 05:39:44 +00:00
|
|
|
} else if ($platform == 'mobile') {
|
|
|
|
$x = $mobile;
|
2007-05-09 15:51:21 +00:00
|
|
|
} else {
|
2009-12-18 04:32:30 +00:00
|
|
|
boinc_error_page('bad name');
|
2007-05-09 15:51:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$found = false;
|
|
|
|
foreach ($x as $y) {
|
|
|
|
if ($y[0] == $item) {
|
|
|
|
show_item($y);
|
|
|
|
$found = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!$found) {
|
2009-12-18 04:32:30 +00:00
|
|
|
boinc_error_page('bad item');
|
2007-05-09 15:51:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|