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.

93 lines
2.3 KiB

  1. <?php // html function definitions
  2. function start($page) {
  3. header("Content-type: text/html");
  4. print("<html>\n<head>\n<title>$page->title</title>\n");
  5. print("<base target=\"$page->target\">\n");
  6. print("<link rel=stylesheet href=/styles/$page->style ");
  7. print("type=text/css>\n</head>\n<body");
  8. if($page->bgimage) print(" background=\"$page->bgimage\"");
  9. print(">\n");
  10. return($page->id);
  11. }
  12. function finish($page) {
  13. $prev = $page->prev;
  14. $next = $page->next;
  15. print("<br clear=all>\n<div class=\"footer\">\n");
  16. if($page->content == "home")
  17. print("<img src=\"counter.php3\">\n");
  18. print("<hr>\n");
  19. if($prev) {
  20. print("<a href=\"page.php3?content=$prev\">");
  21. print("<img src=\"nav.php3?label=PREV\" ");
  22. print("alt=prev border=0 align=left></a>\n");
  23. }
  24. if($next) {
  25. print("<a href=\"page.php3?content=$next\">");
  26. print("<img src=\"nav.php3?label=NEXT\" ");
  27. print("alt=next border=0 align=right></a>\n");
  28. }
  29. include("$page->footer");
  30. print("</body>\n</html>");
  31. }
  32. function clear($item) {
  33. if($item->clear) {
  34. print("<br");
  35. if($item->clear != "br") print(" clear=$item->clear");
  36. print(">\n");
  37. }
  38. }
  39. function text($item) {
  40. if($item->class && $item->class != "float") {
  41. print("<div");
  42. print(" class=\"$item->class\"");
  43. print(">\n");
  44. }
  45. print("$item->dat\n");
  46. if($item->class == "title") print("<hr>\n");
  47. if($item->class && $item->class != "float") print("</div>\n");
  48. clear($item);
  49. }
  50. function image($item) {
  51. $image = $item->dat;
  52. $size = getimagesize($image);
  53. if($item->url) {
  54. $href = "<a href=\"$item->url\">\n";
  55. $cap = "</a>";
  56. }
  57. if($item->class) {
  58. if($item->class == "center" || $item->class == "banner") {
  59. $div = "<div class=\"$item->class\">\n";
  60. } else {
  61. $div = "<div>\n";
  62. $float = "align=\"$item->class\"";
  63. }
  64. }
  65. print("$div");
  66. print("$href");
  67. print("<img src=\"$image\" ");
  68. if($size) print("$size[3]\n ");
  69. print("alt=\"$item->alt\" ");
  70. print("$float border=0>$cap\n");
  71. clear($item);
  72. }
  73. function insert($item) {
  74. if($item->class) print("<div class=\"$item->class\">\n");
  75. include($item->dat);
  76. if($item->class) print("</div>\n");
  77. }
  78. function lookup($item) {
  79. $result = fopen("$item->dat","r");
  80. print("<div");
  81. if($item->class) print(" class=\"$item->class\"");
  82. print(">\n");
  83. fpassthru($result);
  84. print("</div>\n");
  85. clear($item);
  86. }