dc8f6b3437a2fd8feb6e4a6e5b9da7d13c6c18b1
[dylansserver.git] / model / index.php
1 <?php
2
3 class index extends model {
4
5 public function display() {
6 require_once("view/index.php");
7 }
8
9 public function display_exhibits() {
10 echo "<div id='exhibit'>";
11 $sql = "SELECT text FROM projects ORDER BY rank";
12 $result = $this->db->query($sql);
13 while ($entry = $result->fetch_object()) {
14 echo $entry->text;
15 }
16 echo "</div>";
17 }
18
19 public function list_projects() {
20 $sql = "SELECT title FROM projects ORDER BY rank";
21 $result = $this->db->query($sql);
22 while ($entry = $result->fetch_object()) {
23 echo "<li><a class='tab' href='$entry->title'>$entry->title</a></li>";
24 }
25 }
26
27 }
28
29 ?>