<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');


include('aur.inc');
include('config.inc');

include_once 'geshi.php'; 

$pkgbuild = urlencode($_GET['p']);
$file = file_get_contents(URL_DIR . $pkgbuild . "/PKGBUILD/PKGBUILD"; 
$language = 'bash';

html_header();


echo "<div class='pgbox'>";
	echo "<div class='pgboxbody'>";
		if ($file != "") {
			$geshi = new GeSHi($file, $language);
			$geshi->set_header_type(GESHI_HEADER_DIV);
			echo "<span class='f4'>" . $geshi->parse_code()."</span>";
		} else {
			echo "<span class='f4'>". print __("Sorry, this file does not appears to be a valid pkgbuild") . "</span>";
	echo "</div>";
echo "</div>";

html_footer(AUR_VERSION);
?>