From: Kern Sibbald Date: Fri, 1 Jan 2010 13:41:23 +0000 (+0100) Subject: Add new files X-Git-Tag: Release-5.0.0~26 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=44703e467d3f4977190e9505d87f7f1a8560d204;p=bacula%2Fdocs Add new files --- diff --git a/docs/home-page/en/pages/dl.php b/docs/home-page/en/pages/dl.php new file mode 100644 index 00000000..573743c7 --- /dev/null +++ b/docs/home-page/en/pages/dl.php @@ -0,0 +1,198 @@ + + + "Source Code", + "Win32_64" => "Windows", + "rpms" => "Linux RPMs (official)", + "rpms-contrib-psheaffer" => "Linux RPMs (psheaffer)", + "rpms-contrib-fschwarz" => "Linux RPMs (fschwarz)", + "depkgs" => "Dependency package (mtx, SQLite3)", + "depkgs-qt" => "Dependency package (qt4 to build bat)" +); + +$URL = 1; +$CAT = 2; +$VER = 3; +$NAM = 4; +$SIZ = 5; +$DAT = 6; +$DLS = 7; + +function getfiles() +{ + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, "http://sourceforge.net/projects/bacula/files/"); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + $res = curl_exec($ch); + curl_close($ch); + + $res = strstr($res, "All Files"); +// echo "res=$res"; + $res = str_replace("\n", "", $res); + $res = str_replace("\r", "", $res); + + // get list of all available files and their attributes + $count = preg_match_all( + // cat vers name + "!href=\"(/projects/bacula/files/([^/]+)/([^/]+)/([^/]+)/download)\"" . + // size date downloads + ".*?([\d\.]+ [a-zA-Z]+).*?(.*?).*?(.*?)!", + $res, $files, PREG_SET_ORDER); + + // remove duplicates (due to "latest files" list) + $out = array_filter_unique( + $files, create_function('$a,$b', 'return strcmp($a[1], $b[1]);')); + return $out; +} + +function array_filter_unique($array, $compare) +{ + usort($array, $compare); + for ($x = 0; $x < count($array) - 1; $x++) + if (call_user_func($compare, $array[$x], $array[$x+1]) != 0) + $out[] = $array[$x]; + if (count($array)) + $out[] = $array[count($array) - 1]; // last one is never a dupe + return $out; +} + +function versioncmp($a, $b) +{ + // [0] = entire string, [1] = major, [2] = minor, [3] = rev + for ($x = 1; $x < count($a); $x++) + { + if ($a[$x] < $b[$x]) + return -1; + if ($a[$x] > $b[$x]) + return 1; + } + + return 0; +} + +function getversions(&$files) +{ + global $VER; + + // assemble version strings into their own array + foreach ($files as $file) + $versions[] = $file[$VER]; + + // filter out versions not matching A.B.Cd format + $versions = preg_grep("/^[0-9]+\.[0-9]+\.[0-9]+[a-z]?$/", $versions); + + // split string into array at '.' and prepend original string + foreach ($versions as $version) + { + $tmp = explode(".", $version); + $out[] = array_merge((array)$version, $tmp); + } + + // remove identical versions + $out = array_filter_unique($out, "versioncmp"); + + // create result array containing original strings + for ($x = 0; $x < count($out); $x++) + $out2[] = $out[$x][0]; + + // finally, return array in reverse order (most recent version first) + return array_reverse($out2); +} + +$files = getfiles(); +$avail_versions = getversions($files); + +if ($version == "") + $version = $avail_versions[0]; + +$version_ = strtr($version, ".", "_"); + +$notes = "https://bacula.git.sourceforge.net/git/gitweb-index.cgi"; +$chglog = "http://apcupsd.cvs.sourceforge.net/viewvc/*checkout*/apcupsd/apcupsd/ChangeLog?pathrev=Release-$version_"; +$pubkey = "https://sourceforge.net/projects/apcupsd/files/apcupsd%20Public%20Key/Current%20Public%20Key/apcupsd.pub/download"; +$rpmkey = "https://sourceforge.net/projects/apcupsd/files/apcupsd%20Public%20Key/Current%20Public%20Key/rpmkey-apcupsd-0.1-3.noarch.rpm/download"; + +echo "\n"; +echo "Bacula $version Downloads\n"; +echo "\n"; +echo "

Bacula $version Downloads

\n"; +echo "
\n"; +echo "Other Versions:\n"; +echo "\n"; +echo "\n"; +echo "
\n"; +echo "

\n"; +echo "Release Notes | \n"; +echo "ChangeLog | \n"; +echo "Public Key | \n"; +echo "RPM Public Key\n"; +echo "

\n"; + +$colors = array("#E8E8FF", "#B9B9FF"); + +foreach ($category_map as $category => $catname) +{ + $color = 0; + $header = false; + + foreach ($files as $file) + { + $isrpm = preg_match("/\.rpm$/", $file[$NAM]); + $issig = preg_match("/\.sig$/", $file[$NAM]); + $isrel = $file[$NAM] == "ReleaseNotes"; + + if (!$issig && !$isrel && + $file[$VER] == $version && $file[$CAT] == $category) + { + // only output the table header if table won't be empty + if (!$header) + { + $header = true; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + } + + echo "\n"; + echo " \n"; + if ($isrpm) + echo " \n"; + else + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + + $color = ($color + 1) & 1; + } + } + + if ($header) + echo "
$catname Signature Size Release Date  Downloads 
$file[$NAM]N/Asig$file[$SIZ]$file[$DAT]$file[$DLS]

\n"; +} + +echo "\n"; +echo "\n"; +?> + + diff --git a/docs/images/Exchange.png b/docs/images/Exchange.png new file mode 100644 index 00000000..85f0ad49 Binary files /dev/null and b/docs/images/Exchange.png differ diff --git a/docs/images/Exchange1.png b/docs/images/Exchange1.png new file mode 100644 index 00000000..0d8e0d6b Binary files /dev/null and b/docs/images/Exchange1.png differ diff --git a/docs/images/Exchange2.png b/docs/images/Exchange2.png new file mode 100644 index 00000000..dc1a6ed0 Binary files /dev/null and b/docs/images/Exchange2.png differ diff --git a/docs/images/bacula-usage.png b/docs/images/bacula-usage.png new file mode 100644 index 00000000..5a3437e3 Binary files /dev/null and b/docs/images/bacula-usage.png differ diff --git a/docs/images/bat14.png b/docs/images/bat14.png new file mode 100644 index 00000000..88c98f98 Binary files /dev/null and b/docs/images/bat14.png differ diff --git a/docs/images/bat15.png b/docs/images/bat15.png new file mode 100644 index 00000000..c590fb5b Binary files /dev/null and b/docs/images/bat15.png differ diff --git a/docs/images/bat16.png b/docs/images/bat16.png new file mode 100644 index 00000000..6da47f6e Binary files /dev/null and b/docs/images/bat16.png differ diff --git a/docs/images/bweb1.png b/docs/images/bweb1.png new file mode 100644 index 00000000..343748e0 Binary files /dev/null and b/docs/images/bweb1.png differ diff --git a/docs/images/bweb2.png b/docs/images/bweb2.png new file mode 100644 index 00000000..5c566cc8 Binary files /dev/null and b/docs/images/bweb2.png differ diff --git a/docs/images/bweb3.png b/docs/images/bweb3.png new file mode 100644 index 00000000..82927f9c Binary files /dev/null and b/docs/images/bweb3.png differ diff --git a/docs/images/bweb4.png b/docs/images/bweb4.png new file mode 100644 index 00000000..82b39101 Binary files /dev/null and b/docs/images/bweb4.png differ diff --git a/docs/images/bweb5.png b/docs/images/bweb5.png new file mode 100644 index 00000000..a733f8e8 Binary files /dev/null and b/docs/images/bweb5.png differ diff --git a/docs/images/bweb6.png b/docs/images/bweb6.png new file mode 100644 index 00000000..2cd388b7 Binary files /dev/null and b/docs/images/bweb6.png differ