summaryrefslogtreecommitdiffstats
path: root/site/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'site/functions.php')
-rw-r--r--site/functions.php29
1 files changed, 25 insertions, 4 deletions
diff --git a/site/functions.php b/site/functions.php
index 0e20d2b..fb023b9 100644
--- a/site/functions.php
+++ b/site/functions.php
@@ -16,15 +16,12 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-?>
-<?php
/* Functions */
/* Generic function for showing a list of URLs */
function mirrorList($arrayMirrors,$strNotFoundMessage,$forIndexStart,$forIndexbelow) {
-?>
-<?php
+
if (count($arrayMirrors)>0) {
for ($server=$forIndexStart; $server<$forIndexbelow; $server++) {
?>
@@ -36,7 +33,31 @@
<p><?php echo $strNotFoundMessage; ?></p>
<?php
}
+ }
+
+ /* List rsync mirroring instructions */
+ function rsyncList($arrayRsync,$strNotFoundMessage,$forIndexStart,$forIndexBelow) {
+ if (
+ count($arrayRsync)>0 && ($forIndexStart<=count($arrayRsync)-1)
+ && ($forIndexBelow<=count($arrayRsync)) && ($forIndexStart<=$forIndexBelow)) {
+
+ for ($server=$forIndexStart; $server<$forIndexBelow; $server++) {
+?>
+ <h2>
+ <?php echo $arrayRsync[$server][1]; ?>
+ </h2>
+ <p>
+ <b>rsync -avxP --delete --stats <?php echo $arrayRsync[$server][0]; ?> /path/to/docroot/libreboot/</b>
+ </p>
+<?php
+ }
+
+ } else {
?>
+ <p>
+ <?php echo $strNotFoundMessage; ?>
+ </p>
<?php
+ }
}
?>