βŒˆβŒ‹ βŽ‡ branch:  freshcode


Artifact Content

  • File page_index.php — part of check-in [686e87487e] at 2015-03-24 18:23:10 on branch trunk — Updated stylesheet to use table-layout for #main/#sidebar split. Padding still needs work. (user: mario

Artifact 87f9cb777f00998619321fe80dbc2ef19ddbc280:


<?php
/**
 * type: page
 * title: Project release listing
 * description: Front page for listing recently submitted projects and their releases
 * version: 0.3
 * license: AGPL
 *
 * Frontpage.
 * Just shows the most recent projects and their released versions.
 *
 * Shows:
 *   β†’ Recent projects and their released versions.
 *   β†’ Visually trimmed descriptions and changelogs.
 *   β†’ Small boxed tags.
 * Sidebar:
 *   β†’ Newsfeeds (e.g. linux.com, /r/linux)
 * HTML:
 *   β†’ RSS/Atom links for update feed comprised of all projects.
 *
 */


$header_add = "<link rel=alternate type=application/rss+xml href=/projects.rss>\n<link rel=alternate type=application/atom+xml href=/projects.atom>";
include("template/header.php");
include("template/table_main.php");


// query projects
$page_no = $_GET->int->range…1…100["n"];
$releases = db("
    SELECT *
      FROM release_versions
     WHERE flag < 5
       AND NOT hidden
     LIMIT 40
    OFFSET 40*?
", $page_no - 1);


// Convert entries to HTML output
foreach ($releases as $entry) {
    prepare_output($entry);
    include("template/index_project.php");
}

// Add pseudo pagination for further pages.
pagination($page_no, "n");


include("template/index_sidebar.php");
include("template/table_end.php");
include("template/bottom.php");

?>