Here's a quick solution I created.
Create a new file called archive.php (like you did). The only code you need is:
<?php include("admin/system/engine.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250" />
<title><?php echo $website; ?></title>
</head>
<body>
<h1 id="header"><?php echo $website; ?>: Archive</h1>
<ul>
<?php archivePage(); ?>
</ul>
</body>
</html>
That gives you a bare-bones page with your archive. Now, for the archivePage function to work, you'll need to add the following function in /system/functions.php:
function archivePage($title="---Archive---", $output="<li>%</li>",$type="title",$dtype="d/m/Y")
{
//Put this in your page to create a list.
global $total,$arow,$prefix,$p,$settings,$PHP_SELF;
if ($settings['archive'] != "0") { $limit = " LIMIT ".$settings['archive']; }
$result = mysql_query("SELECT * FROM ".$prefix."comics WHERE status = '1' ORDER BY id DESC$limit");
while($row=mysql_fetch_object($result)) {
$more = "<a href='/?p=".$row->id."&c=1'>".strtolower(debbcode($row->title))."</a>";
$info=eregi_replace("\%",$more,$output);
echo $info;
}
if (!$result) echo "empty";
}
You can see a working copy here:
http://sctest.mostpopularcomic.com/archive.php