Added discussion feature to site.
[Assignment-Trapper.git] / classes.php
blob85834f252adc23fe23506a06cc2cb2ad0cc486ec
1 <?php
3 include_once("auth.php");
4 include_once("header.php");
6 $html = "";
8 $user_id = mysql_real_escape_string($user_id);
10 $sql = 'select distinct class.class_id, class_name, class_section, class_location, class_instructor from enrollment, class, users where (users.user_id = enrollment.user_id) and (enrollment.class_id = class.class_id) and enrollment.user_id = '.$user_id;
12 $result = mysql_query($sql);
14 if (!$result) { die("SQL ERROR"); }
16 while($row = mysql_fetch_row($result))
18 //$html .= '<tr><td><a href=assignment.php?class='.$row[0].'>'.$row[1].'</a></td><td>'.$row[2].'</td>';
19 //$html .= '<td>'.$row[3].'</td><td>'.$row[4].'</td></tr>';
21 $html .= '<div class="class_block">';
22 //$html .= '<table><tr><td><img src=gfx/house.png></td><td><h3><a href=assignment.php?class='.$row[0].'>'.$row[1].'</a></h3></td></tr>';
24 $html .= '<table>
25 <tr><td><img src="gfx/house.png"></td><td class="link_header"><a href=assignment.php?class='.$row[0].'>'.$row[1].'</a></td></tr></table><br>';
28 $html .= '<table><tr><td>Section:</td><td>'.$row[2].'</td></tr>';
29 $html .= '<tr><td>Location:</td><td>'.$row[3].'</td></tr>';
30 $html .= '<tr><td>Instructor:</td><td>'.$row[4].'</td></tr>';
31 $html .= '</table></div>';
34 echo $html;