Example #1
0
		<tr class="<?php 
        echo $indx % 2 == 0 ? 'odd' : 'even';
        ?>
">
		<?php 
        if ($SID) {
            ?>
		<td><input type="checkbox" name="IDs[<?php 
            echo $row["PackageBaseID"];
            ?>
]" value="1" /></td>
		<?php 
        }
        ?>
		<td><a href="<?php 
        echo htmlspecialchars(get_pkg_uri($row["Name"]), ENT_QUOTES);
        ?>
"><?php 
        echo htmlspecialchars($row["Name"]);
        ?>
</a></td>
		<td<?php 
        if ($row["OutOfDateTS"]) {
            ?>
 class="flagged"<?php 
        }
        ?>
><?php 
        echo htmlspecialchars($row["Version"]);
        ?>
</td>
Example #2
0
File: rss.php Project: pyp22/aurweb
$rss->cssStyleSheet = false;
$rss->xslStyleSheet = false;
# Use UTF-8 (fixes FS#10706).
$rss->encoding = "UTF-8";
#All the general RSS setup
$rss->title = "AUR Newest Packages";
$rss->description = "The latest and greatest packages in the AUR";
$rss->link = "{$protocol}://{$host}";
$rss->syndicationURL = "{$protocol}://{$host}" . get_uri('/rss/');
$image = new FeedImage();
$image->title = "AUR";
$image->url = "{$protocol}://{$host}/images/AUR-logo-80.png";
$image->link = $rss->link;
$image->description = "AUR Newest Packages Feed";
$rss->image = $image;
#Get the latest packages and add items for them
$packages = latest_pkgs(20);
while (list($indx, $row) = each($packages)) {
    $item = new FeedItem();
    $item->title = $row["Name"];
    $item->link = "{$protocol}://{$host}" . get_pkg_uri($row["Name"]);
    $item->description = $row["Description"];
    $item->date = intval($row["SubmittedTS"]);
    $item->source = "{$protocol}://{$host}";
    $item->author = username_from_id($row["MaintainerUID"]);
    $rss->addItem($item);
}
#save it so that useCached() can find it
$feedContent = $rss->createFeed();
set_cache_value($feed_key, $feedContent, 1800);
echo $feedContent;
Example #3
0
	<div id="metadata">
		<div id="pkgs" class="listing">
			<h3><?php 
echo __('Packages') . " (" . count($pkgs) . ")";
?>
</h3>
<?php 
if (count($pkgs) > 0) {
    ?>
			<ul>
<?php 
    while (list($k, $pkg) = each($pkgs)) {
        ?>
	<li><a href="<?php 
        echo htmlspecialchars(get_pkg_uri($pkg), ENT_QUOTES);
        ?>
" title="<?php 
        echo __('View packages details for') . ' ' . htmlspecialchars($pkg);
        ?>
"><?php 
        echo htmlspecialchars($pkg);
        ?>
</a></li>
	<?php 
    }
    ?>
			</ul>
<?php 
}
?>
Example #4
0
            header('Location: ' . get_pkgbase_uri($pkgbase_name) . $fragment);
            exit;
        } else {
            /* Redirect back to package search page. */
            header('Location: ' . get_pkg_route());
            exit;
        }
    }
}
$pkgs = pkgbase_get_pkgnames($base_id);
if (!$output && count($pkgs) == 1) {
    /* Not a split package. Redirect to the package page. */
    if (empty($_SERVER['QUERY_STRING'])) {
        header('Location: ' . get_pkg_uri($pkgs[0]) . $fragment);
    } else {
        header('Location: ' . get_pkg_uri($pkgs[0]) . '?' . $_SERVER['QUERY_STRING'] . $fragment);
    }
}
$details = pkgbase_get_details($base_id);
html_header($title, $details);
?>

<?php 
if ($output) {
    if ($ret) {
        ?>
<p class="pkgoutput"><?php 
        echo htmlspecialchars($output);
        ?>
</p>
<?php 
Example #5
0
</h3>

<a href="<?php 
echo get_uri('/rss/');
?>
" title="Arch Package Updates RSS Feed" class="rss-icon"><img src="/images/feed-icon-14x14.png" alt="RSS Feed" /></a>

<table>
	<tbody>
		<?php 
foreach ($newest_packages->getIterator() as $row) {
    ?>
		<tr>
			<td class="pkg-name">
				<a href="<?php 
    echo get_pkg_uri($row["Name"]);
    ?>
" title="<?php 
    echo htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]);
    ?>
"><?php 
    echo htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]);
    ?>
</a>
			</td>
			<td class="pkg-new">
				<?php 
    if ($row["ModifiedTS"] - $row["SubmittedTS"] < 3600) {
        ?>
				<img src="images/new.png" alt="New!" />
				<?php 
Example #6
0
/**
 * Get the HTML code to display a package requirement link
 *
 * @param string $name The name of the requirement
 * @param string $depends The (literal) name of the dependency of $name
 * @param string $type The name of the dependency type
 * @param string $arch The package dependency architecture
 * @param string $pkgname The name of dependant package
 *
 * @return string The HTML code of the link to display
 */
function pkg_requiredby_link($name, $depends, $type, $arch, $pkgname)
{
    if ($type == 'optdepends' && strpos($name, ':') !== false) {
        $tokens = explode(':', $name, 2);
        $name = $tokens[0];
    }
    $link = '<a href="';
    $link .= htmlspecialchars(get_pkg_uri($name), ENT_QUOTES);
    $link .= '" title="' . __('View packages details for') . ' ' . htmlspecialchars($name) . '">';
    $link .= htmlspecialchars($name) . '</a>';
    if ($depends != $pkgname) {
        $depname = $depends;
        if (strpos($depends, ':') !== false) {
            $tokens = explode(':', $depname, 2);
            $depname = $tokens[0];
        }
        $link .= ' <span class="virtual-dep">(';
        $link .= __('requires %s', htmlspecialchars($depname));
        $link .= ')</span>';
    }
    return $link . pkg_deplink_annotation($type, $arch);
}