".$contents[$i]["name"]."",
$contents[$i]["version"],
$contents[$i]["short_description"]
));
}
//echo $contents[$i]["platform"];
}
}
}
function refresh_file() {
if (@$fhandle = fopen(MASTER_SERVER, "rb")){
$fhandle2 = fopen(DOWNLOAD_TEMP_FILE, "wb");
if (!$fhandle2) {
echo "CAN'T OPEN TEMP FILE\n";
return;
}
$data = "";
do {
$io = fread($fhandle, 8192);
if (strlen($io) == 0) {
break;
}
fwrite($fhandle2, $io);
} while (true);
fclose($fhandle);
fclose($fhandle2);
unlink(MIRROR_FILE);
rename(DOWNLOAD_TEMP_FILE, MIRROR_FILE);
} else {
echo "
Refreshing the application list failed. Information here is currently not up to date.
";
}
}
function BOINC_download_network_print_download_links() {
$mirror_file_header_size=512000;
$platforms[1]["nr"]=1;//Windows
$platforms[1]["name"]="Windows";
$platforms[2]["nr"]=2;//UNix
$platforms[2]["name"]="Linux/Unix";
$platforms[3]["nr"]=3;//Mac
$platforms[3]["name"]="Mac";
$platforms[4]["nr"]=8;//Web
$platforms[4]["name"]="Web application";
if (!$fhandle=fopen(MIRROR_FILE, "r")){
refresh_file();
if (!$fhandle=fopen(MIRROR_FILE, "r")){
return;
}
}
$header=fread($fhandle,$mirror_file_header_size);
$contents=getContentArray($header);
// print_r($contents);
fclose($fhandle);
$i=0;
do {
$i++;
echo "