mxml/www/index.php

107 lines
3.3 KiB
PHP
Raw Normal View History

2004-05-17 02:14:54 +00:00
<?php
//
2004-11-13 18:26:38 +00:00
// "$Id: index.php,v 1.9 2004/11/13 18:26:32 mike Exp $"
2004-05-17 02:14:54 +00:00
//
// Mini-XML home page...
//
include_once "phplib/html.php";
2004-05-19 01:39:04 +00:00
include_once "phplib/common.php";
2004-05-20 03:38:42 +00:00
include_once "phplib/poll.php";
2004-05-17 02:14:54 +00:00
html_header();
2004-05-19 01:39:04 +00:00
print("<h1 align='center'>Mini-XML Home Page</h1>");
print("<p><table width='100%' height='100%' border='0' cellpadding='0' "
."cellspacing='0'>\n"
2004-05-20 15:45:55 +00:00
."<tr><td valign='top' width='30%'>");
2004-05-19 01:39:04 +00:00
html_start_table(array("Quick Info"), "100%", "100%");
html_start_row();
print("<td>"
2004-05-20 03:38:42 +00:00
."<p align='center'>"
2004-11-13 18:26:38 +00:00
."Stable Release: <a href='software.php?2.0'>v2.1</a><br />"
."<!--Test Release: <a href='software.php?2.2rc1'>v2.2rc1</a>--></p>\n"
2004-05-19 01:39:04 +00:00
."<small><p>Mini-XML is a small XML parsing library that you can use to "
."read XML and XML-like data files in your application without "
."requiring large non-standard libraries. Mini-XML only requires "
."an ANSI C compatible compiler (GCC works, as do most vendors' "
."ANSI C compilers) and a 'make' program.</p>\n"
2004-05-21 02:59:52 +00:00
."<p>Mini-XML provides the following functionality:</p>\n"
2004-05-19 01:39:04 +00:00
."<ul>\n"
."<li>Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded "
."XML files and strings.</li>\n"
."<li>Data is stored in a linked-list tree structure, "
."preserving the XML data hierarchy.</li>\n"
."<li>Supports arbitrary element names, attributes, and "
."attribute values with no preset limits, just available "
."memory.</li>\n"
."<li>Supports integer, real, opaque (\"cdata\"), and text "
."data types in \"leaf\" nodes.</li>\n"
."<li>Functions for creating, indexing, and managing trees of data.</li>\n"
."<li>\"Find\" and \"walk\" functions for easily locating and "
."navigating trees of data.</li>\n"
2004-05-21 02:59:52 +00:00
."</ul></small>\n"
2004-05-19 01:39:04 +00:00
."</td>");
html_end_row();
html_end_table();
2004-05-21 02:59:52 +00:00
$poll = get_recent_poll();
if ($poll > 0)
{
html_start_table(array("Current Poll [&nbsp;<a href='poll.php'>"
."Show&nbsp;All</a>&nbsp;]"));
html_start_row();
print("<td>");
show_poll($poll);
print("</td>");
html_end_row();
html_end_table();
}
2004-05-20 15:45:55 +00:00
2004-05-19 01:39:04 +00:00
print("</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td>"
2004-05-20 15:45:55 +00:00
."<td valign='top' width='70%'>"
2004-05-20 03:38:42 +00:00
."<h2>Recent Articles [&nbsp;<a href='articles.php'>Show&nbsp;All</a>"
."&nbsp;]</h2>\n");
2004-05-19 01:39:04 +00:00
$result = db_query("SELECT * FROM article WHERE is_published = 1 "
2004-05-20 15:45:55 +00:00
."ORDER BY modify_date DESC LIMIT 8");
2004-05-19 01:39:04 +00:00
$count = db_count($result);
if ($count == 0)
print("<p>No articles found.</p>\n");
else
2004-05-17 02:14:54 +00:00
{
2004-05-19 01:39:04 +00:00
while ($row = db_next($result))
{
$id = $row['id'];
$title = htmlspecialchars($row['title'], ENT_QUOTES);
$abstract = htmlspecialchars($row['abstract'], ENT_QUOTES);
$create_user = sanitize_email($row['create_user']);
$date = date("H:i M d, Y", $row['modify_date']);
$count = count_comments("articles.php_L$id");
2004-05-19 01:39:04 +00:00
if ($count == 1)
$count .= " comment";
else
$count .= " comments";
print("<h3><a href='articles.php?L$id'>$title</a></h3>\n"
."<p><i>$date by $create_user, $count</i><br />$abstract [&nbsp;"
2004-05-19 01:39:04 +00:00
."<a href='articles.php?L$id'>Read</a>&nbsp;]</p>\n");
}
2004-05-17 02:14:54 +00:00
}
2004-05-19 01:39:04 +00:00
db_free($result);
2004-05-17 02:14:54 +00:00
2004-05-19 01:39:04 +00:00
print("</td></tr>\n"
."</table></p>\n");
2004-05-17 02:14:54 +00:00
html_footer();
//
2004-11-13 18:26:38 +00:00
// End of "$Id: index.php,v 1.9 2004/11/13 18:26:32 mike Exp $".
2004-05-17 02:14:54 +00:00
//
?>