Olive Branch MS Chamber of Commerce (circa Oct 1999)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

30 lines
927 B

  1. <?php // Generate the banner page
  2. // import database configuration and functions
  3. require("db.php3");
  4. // connect to the database
  5. $connection = connect($host, $dbname);
  6. if($connection) {
  7. // import minipage functions
  8. require("html.php3");
  9. // setup query value
  10. $query = "select * from page where content = \"banner\"";
  11. $result = query($connection, $query);
  12. if($result) {
  13. $page = fetch_object($result,0);
  14. $pid = start($page);
  15. // query for page items
  16. $query = "select * from item where pid=\"$pid\" order by ord";
  17. $result = query($connection, $query);
  18. if($result) {
  19. $item = fetch_object($result,0);
  20. $image = $item->dat;
  21. $size = getimagesize($image);
  22. print("<div class=$item->class>\n<a href=\"$item->url\">\n");
  23. print("<img src=\"$image\" $size[3]\n");
  24. print(" alt=\"$item->alt\" ");
  25. print("border=0></a>\n</div>\n</body>\n</html>");
  26. }
  27. }
  28. }
  29. ?>