BarryServer : Git

All the code for all my projects
// BarryServer : Git / barryserver-git / blob / acd7cb2eb50767cd855dccceb68da92a7fa8ee10 / index.php

// Related

barryserver-git

Barry Splitting into more pages + commit pages a6603d5 (2 years, 3 months ago)
<?php session_start(); ?>
<?php require_once $_SERVER["DOCUMENT_ROOT"]."/config.php"; ?>
<?php require_once $_SERVER["DOCUMENT_ROOT"]."/head.php"; ?>
<main>
	<h1>Repositories</h1>
<?php
	$repos = preg_grep("/(.git)$/", scandir(GIT_DIR));
	foreach ($repos as $repo) {
		$desc = file_get_contents(GIT_DIR."/".$repo."/description");
		if (substr($desc,0,7) !== "PRIVATE" || isset($_SESSION["username"])) { ?>
	<a href="/<?= substr($repo,0,-4) ?>" class="repo"><b><?= substr($repo,0,-4) ?></b> :: <?= $desc ?></a>
<?php }} ?>
</main>
<?php require_once $_SERVER["DOCUMENT_ROOT"]."/foot.php"; ?>