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.
27 lines
794 B
27 lines
794 B
<?php // Sponsor Page
|
|
header("Content-type: text/html");
|
|
//
|
|
// import database configuration and functions
|
|
require("config/db.config");
|
|
require("config/db.functions." . $dbserver);
|
|
//
|
|
// connect to the database
|
|
$connection = connect($host, $dbname);
|
|
if($connection) {
|
|
// import minipage functions
|
|
require("config/mini.functions");
|
|
// setup query value
|
|
$query = "select * from minisite where content = "sponsors" order by ord";
|
|
$result = query($connection, $query);
|
|
$count = numrows($result);
|
|
if($count) {
|
|
// dynamically call a function for each record
|
|
// based on the contents of its "type" field
|
|
for($row=0; $row < $count; $row++) {
|
|
$data = fetch_object($result, $row);
|
|
$function = $data->type;
|
|
$function($data);
|
|
}
|
|
|
|
include("html/tail.std");
|
|
?>
|