Location: PHPKode > scripts > Lightning Notes > ln_distro/ln_distro/archive.php
<?php
$idx = $_GET['entry'];
if (isset($idx) && (!empty($idx))) {
    $idx = strip_tags($idx);
    $id = escapeshellcmd($idx);
}
$idz = $_GET['day'];
if (isset($idz) && (!empty($idz))) {
    $idz = strip_tags($idz);
    $day = escapeshellcmd($idz);
}
$idy = $_GET['month'];
if (isset($idy) && (!empty($idy))) {
    $idy = strip_tags($idy);
    $month = escapeshellcmd($idy);
}
require_once ("admin/config.php");
require_once ("$DOCUMENT_ROOT/".$CFGglobal['root']."/admin/notesfnc.php");
$tree = GetXMLTree("$DOCUMENT_ROOT/".$CFGglobal['root']."/admin/entries.xml");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$CFGglobal['lang'].'" lang="'.$CFGglobal['lang'].'">'."\n";
echo '<head>'."\n";
echo '<title>'.$CFGglobal['title'].entrytitlebyid ($tree, $id).'</title>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />'."\n";
echo '<meta name="content-language" content="'.$CFGglobal['lang'].'" />'."\n";
echo '<link rel="stylesheet" media="screen" href="/'.$CFGglobal['root'].'/c/screen.css" type="text/css" />'."\n";
echo '<link rel="alternate stylesheet" media="screen" href="/'.$CFGglobal['root'].'/c/clean.css" type="text/css" title="clean" />'."\n";
#echo '<link rel="alternate stylesheet" media="screen" href="/'.$CFGglobal['root'].'/c/large.css" type="text/css" title="large" />'."\n";
echo '<link rel="stylesheet" media="print" href="/'.$CFGglobal['root'].'/c/print.css" type="text/css" />'."\n";
echo '<script type="text/javascript" src="/'.$CFGglobal['root'].'/j/styleswitcher.js"></script>'."\n";
echo '<link rel="start" title="Home page" href="'.$CFGglobal['domain'].'/'.$CFGglobal['root'].'/" />'."\n";
echo '<link rel="contents" title="Categories" href="categories.php" />'."\n";
echo '<link rel="search" title="Search this site" href="search.php" />'."\n";
echo '<link rel="help" title="Access features of this site" href="'.$CFGglobal['domain'].'/'.$CFGglobal['root'].'/archive.php?entry=20030729accessibility_statement" />'."\n";
echo '<link rel="author" title="Send feedback to the author" href="mailto:'.$CFGauthor['email'].'" />'."\n";
echo '<link rel="up" title="Index" href="/'.$CFGglobal['root'].'/" />'."\n";
include_once("$DOCUMENT_ROOT/".$CFGglobal['root']."/admin/analytics.php");
?>
</head>
<body id="arc">

<div id="masthead">
<?php
echo '<h1><a href="/'.$CFGglobal['root'].'/"><span>'.$CFGglobal['title'].'</span></a></h1>'."\n";
?>
</div>
<p class="skip"><a href="#nav">Navigation</a> &#187;</p>
<div id="recent">
<?php
echo '<p>'.$CFGglobal['abouthome'].'</p>'."\n";
echo '<p class="auth">&#8212;'.$CFGauthor['name'].'</p>'."\n";
echo '<h2>Recent Entries</h2>'."\n";
echo entrieslist ($tree, $id, $category = '', $entries = '5', $showdate = '0');
if (!isset($entry)) {
    echo arclist ($tree, $range = '1');
}
?>
</div>

<div id="content">
<?php
if (isset($entry) && (!empty($entry))) {
    echo entrybyid ($tree, $id, $dir = '1', $showdate = '1', $showcat = '1', &$category, $query);
    echo '<h3>Related Entries | <a href="archive.php">Archive</a> &#187;</h3>'."\n";
    echo entrieslist ($tree, $id, $category, $entries = '2', $showdate = '0');
} elseif (isset($day)) {
    echo dayarc ($tree, $day);
    #echo arclist ($tree, $range = '1');
} elseif (isset($month)) {
    #echo arclist ($tree, $range = '1');
    echo montharc ($tree, $month);
} else {
    echo '<h2>Archive</h2>'."\n";
    echo entries ($tree, $entries = '', $showcat = '1', $showsubcat = '1', $body = '0');
}
?>
</div>

<div id="nav">
<?php
include("$DOCUMENT_ROOT/".$CFGglobal['root']."/admin/nav.inc");
?>
</div>

</body>
</html>
Return current item: Lightning Notes