<?php
include_once("includes.php");

//  let's make a connection and select the db
mysql_connect($DBserver$DBuser$DBpass) or die(mysql_error());
@
mysql_select_db("knigga5_news") or die(mysql_error());

//  now we'll query the db and output to an array
$sqlstring "SELECT id, creator FROM banners ORDER BY id;";
$sqlqueryresult mysql_query($sqlstring) or die(mysql_error());
$resultarray = array();
while (
$row mysql_fetch_array($sqlqueryresult)) {
       
$resultarray[] = $row;
};

//  find out how many records there are
$number mysql_num_rows($sqlqueryresult);

//  we're done with you, mr. database connection.  bye bye.
mysql_close();

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<?php include("meta.html"); ?>
<title> www.KNIGGA.com - make me a banner </title>
</head>
<body>
<p ALIGN="center">
<font SIZE="5">www.KNIGGA.com - make me a banner</font>
</p>
<hr NOSHADE WIDTH="80%">
<?php include("header.html"); ?>
<table ALIGN="center" CELLPADDING="4" width="80%">
 <tr ALIGN="left" VALIGN="bottom">
  <td>
  <p>
   ok, i have a thing for banners.  i currently have a few, all of which are shown below.  if you want to make a banner for my page follow the these guidelines and e-mail it to me.  if i like it i'll post it on this page and put it in my banner rotator on the main page.
  </p>
  </td>
 </tr>
 <tr ALIGN="left" VALIGN="bottom">
  <td>
   the banner should...
   <ul>
    <li>be around 640x100</li>
    <li>be less than 20kb</li>
    <li>be a jpeg, gif, or png</li>
    <li>be based on the text "www.KNIGGA.com"</li>
    <li>be clean; no profanity or questionable pictures</li>
   </ul>
  </td>
 </tr>
 <tr ALIGN="center" VALIGN="middle">
  <td>
<?php
for ($i 0$i $number$i++) {
?>
   <p>
   <img src="/bannerpicture.php?id=<?php echo $resultarray[$i]['id']; ?>" alt="by <?php echo $resultarray[$i]['creator']; ?>"><br>
   by <?php echo $resultarray[$i]['creator']; ?>
   </p>
<?php ?>
  </td>
 </tr>
</table>
<?php include("footer.html"); ?>
</body>
</html>