From: Kern Sibbald Date: Tue, 6 Mar 2012 17:03:14 +0000 (+0100) Subject: Add some updates X-Git-Tag: Release-5.2.13~36 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7278ec895364b93820f55ef08ed0b7aff55300ba;p=bacula%2Fdocs Add some updates --- diff --git a/docs/home-page/en/pages/old-donations.txt b/docs/home-page/en/pages/old-donations.txt new file mode 100644 index 00000000..f03c6ec4 --- /dev/null +++ b/docs/home-page/en/pages/old-donations.txt @@ -0,0 +1,64 @@ + + + + + + +
+ Donations Received +
+ + + + +
+ + 0 && $news_counter < $max_news) { + // next line + $line = array_pop($lines); + + // start of news + if(eregi("^[a-z0-9]+;;;", $line)) { + // news header + list($author,$date,$time) = explode(";;;",$line); + + // news subject + $subject = array_pop($lines); + printf('', $subject); + printf(''); + printf(''); + printf('', $date, $time, $author); + printf(''); + printf(''); + $news_counter++; + continue; + } + + // news content + printf('%s', $line); +} +?> +
%s
');
+
+                continue;
+        }
+
+        // end of news
+        if(eregi("^;;;", $line)) {
+                printf('
%s - %s, %s
+
+ diff --git a/docs/home-page/es/pages/dl.php b/docs/home-page/es/pages/dl.php new file mode 100644 index 00000000..573743c7 --- /dev/null +++ b/docs/home-page/es/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/home-page/images/footer.php b/docs/home-page/images/footer.php new file mode 100644 index 00000000..7ccbd8e0 --- /dev/null +++ b/docs/home-page/images/footer.php @@ -0,0 +1,10 @@ +

+ spacer
+ +
+ + + diff --git a/docs/home-page/images/header.php b/docs/home-page/images/header.php new file mode 100644 index 00000000..7061da54 --- /dev/null +++ b/docs/home-page/images/header.php @@ -0,0 +1,204 @@ + + + + + + Bacula, the Open Source, Enterprise ready, Network Backup Tool for Linux, Unix, and Windows + + + + + + + + + + + + + + + + + '); + printf('Welcome %s, logout here.', $_SESSION['user']); + printf(''); + } + ?> + + + + +
+ It comes by night and sucks the vital essence from your computers. +
+ +
diff --git a/docs/home-page/images/index.php b/docs/home-page/images/index.php new file mode 100644 index 00000000..804203d8 --- /dev/null +++ b/docs/home-page/images/index.php @@ -0,0 +1,32 @@ +ERROR occurred:
+

+ The page %s isn\'t available. +

', $page); +} + + +/** + * load footer + * + */ +require_once("inc/footer.php"); + +?>