include_once "startpage_class.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs"> <head> <meta name="generator" content="PSPad editor, www.pspad.com" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link href="<?php echo BASE_URL; ?> /startpage.css" type="text/css" rel="stylesheet" /> <title><?php echo "Changelog " . str_replace(XMLLOGNAME, "", $changelogName); ?> </title> </head> <body> <div id="main"> <?php echo "<h1>Changelog " . str_replace(XMLLOGNAME, "", $changelogName) . "</h1>"; StartPage::changeLog($changelog, false); ?> <p class="foot"><?php echo "Generated:" . date(DATE_RFC822); ?> </p> </div> </body> </html>
/** * Lists of projects, in $root directory can used some mask * @param string $root * @return mixed */ public function listProject($root, $url) { echo "<p><strong>Working copies at {$root}</strong></p>"; echo "<table id='wc'>"; echo "<tr class='firstrow'><th>Name</th><th>SCM</th><th>Links</th>\n <th>Last record from history</th></tr>"; foreach (glob($root . PROJECT_FILTER, GLOB_ONLYDIR) as $dirs) { echo "<tr>"; echo "<td class='name' id='" . basename($dirs) . "'>\n <a href='" . $url . basename($dirs) . "'>" . basename($dirs) . "</a></td>"; // xmllog is name with path etc. /tmp/start_page_cheangelog.xml // build by hook post-commit script $xmllog = $dirs . XMLLOGNAME; echo "<td class='log'>"; if (file_exists($dirs . '/.svn')) { $output = shell_exec("svn info {$dirs} | grep 'URL' | awk '{print \$2}'"); echo "<a href='" . $output . "'>SVN</a>"; } if (file_exists($dirs . '/.git')) { echo "GIT"; } if (file_exists($dirs . '/.hg')) { if (file_exists($dirs . '/.hg/hgrc')) { $q = "cat " . $dirs . "/.hg/hgrc | egrep 'default =' | awk '{ print \$3 }'"; $hgrc = shell_exec($q); if (isset($hgrc)) { echo "<a href='" . $hgrc . "'>HG</a>"; } else { echo "HG"; } } else { echo "HG"; } } echo "</td>"; if (file_exists($xmllog)) { echo "<td class='log'>"; echo "<a href='" . BASE_URL . "changelog.php?file={$xmllog}'>Log</a> "; echo "<a href='" . WIKI_LINK . basename($dirs) . "'>Wiki</a>"; //echo "<a href='changelog.php?rep=".substr($dirs, strpos($dirs, "/")+1,strlen($dirs))."'>Log</a> echo "</td>"; } else { echo "<td></td>"; } // This part is for last revision (display rev and message) if (file_exists($xmllog)) { StartPage::changeLog($xmllog, true, basename($dirs)); } // echo "</tr>"; } echo "</table>"; }