Skip to content

Commit

Permalink
add fellowsTable
Browse files Browse the repository at this point in the history
  • Loading branch information
benthemonkey committed May 1, 2014
1 parent 756588b commit 546a462
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ajax/PointsCenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function getFellows ()
$fellows = array();
try {
$statement = self::$dbConn->prepare(
"SELECT full_name,photo
"SELECT full_name,position,department,photo
FROM fellows
WHERE qtr_final IS NULL");
$statement->execute();
Expand Down
34 changes: 34 additions & 0 deletions fellowsTable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
header('Content-type: text/html; charset=utf-8');
require_once "./ajax/PointsCenter.php";
$points_center = new PointsCenter();
$fellows = $points_center->getFellows();
?>
<html>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="10pt">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Department</th>
<th>Photo</th>
</tr>
</thead>
<tbody>
<?php
for ($ii = 0; $ii < count($fellows); $ii++)
{?>
<tr>
<td><?= $fellows[$ii]["full_name"] ?></td>
<td><?= $fellows[$ii]["position"] ?></td>
<td><?= $fellows[$ii]["department"] ?></td>
<td><img src="./img/slivkans/<?= $fellows[$ii]["photo"] ?>.jpg" width="100px" /></td>
</tr>
<?php
}
?>
</tbody>
</table>
</body>
</html>

0 comments on commit 546a462

Please sign in to comment.