2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2008 */
6 /* Written by Greg Gay, Joel Kronenberg & Chris Ridpath */
7 /* Inclusive Design Institute */
10 /* This program is free software. You can redistribute it and/or*/
11 /* modify it under the terms of the GNU General Public License */
12 /* as published by the Free Software Foundation. */
13 /****************************************************************/
15 define('AT_INCLUDE_PATH', '../../../include/');
16 require (AT_INCLUDE_PATH.'vitals.inc.php');
18 require(AT_INCLUDE_PATH.'header.inc.php');
20 $sql = "SELECT * FROM ".TABLE_PREFIX."reading_list WHERE course_id=$_SESSION[course_id] ORDER BY date_start";
21 $resultReadings = mysql_query($sql, $db);
24 <?php if (($resultReadings != 0) && ($rowReadings = mysql_fetch_assoc($resultReadings))) : ?>
27 <?php $id = $rowReadings['resource_id'];
30 $sql = "SELECT * FROM ".TABLE_PREFIX."external_resources WHERE course_id=$_SESSION[course_id] AND resource_id=$id";
31 $result = mysql_query($sql, $db);
32 if ($row = mysql_fetch_assoc($result)){
33 $row['type'] = intval($row['type']);
34 $row['title'] = AT_print($row['title'], 'input.text');
35 $row['author'] = AT_print($row['author'], 'input.text');
36 $row['publisher'] = AT_print($row['publisher'], 'input.text');
37 $row['date'] = AT_print($row['date'], 'input.text');
38 $row['comments'] = AT_print($row['comments'], 'input.text');
40 if ($row['type'] == RL_TYPE_BOOK): ?>
41 <div class="input-form">
42 <p><?php echo _AT('title'). ": <strong>". $row['title']. "</strong>"; ?><br/>
43 <?php echo _AT('rl_type_of_resource'). ": ". _AT($_rl_types[$row['type']]); ?><br/>
44 <?php echo _AT('author'). ": ". $row['author']; ?><br/>
45 <?php echo _AT('rl_publisher'). ": ". $row['publisher']; ?><br/>
46 <?php echo _AT('date'). ": ". $row['date']; ?><br/>
47 <?php echo _AT('rl_isbn_number'). ": ". $row['id']; ?><br/>
48 <?php echo _AT('comment'). ": ". $row['comments']; ?>
51 <?php elseif ($row['type'] == RL_TYPE_URL): ?>
52 <div class="input-form">
53 <p><?php echo _AT('title'). ": <strong>". $row['title']. "</strong>"; ?><br/>
54 <?php echo _AT('rl_type_of_resource'). ": ". _AT($_rl_types[$row['type']]); ?><br/>
55 <?php echo _AT('location'). ": " ?><a href="<?php echo $row['url']?>"><?php echo $row['url']; ?></a><br/>
56 <?php echo _AT('author'). ": ". $row['author']; ?><br/>
57 <?php echo _AT('comment'). ": ". $row['comments']; ?>
60 <?php elseif ($row['type'] == RL_TYPE_HANDOUT): ?>
61 <div class="input-form">
62 <p><?php echo _AT('title'). ": <strong>". $row['title']. "</strong>"; ?><br/>
63 <?php echo _AT('rl_type_of_resource'). ": ". _AT($_rl_types[$row['type']]); ?><br/>
64 <?php echo _AT('author'). ": ". $row['author']; ?><br/>
65 <?php echo _AT('date'). ": ". $row['date']; ?><br/>
66 <?php echo _AT('comment'). ": ". $row['comments']; ?>
69 <?php elseif ($row['type'] == RL_TYPE_AV): ?>
70 <div class="input-form">
71 <p><?php echo _AT('title'). ": <strong>". $row['title']. "</strong>" ; ?><br/>
72 <?php echo _AT('rl_type_of_resource'). ": ". _AT($_rl_types[$row['type']]); ?><br/>
73 <?php echo _AT('author'). ": ". $row['author']; ?><br />
74 <?php echo _AT('date'). ": ". $row['date']; ?><br/>
75 <?php echo _AT('comment'). ": ". $row['comments']; ?>
78 <?php elseif ($row['type'] == RL_TYPE_FILE): ?>
79 <div class="input-form">
80 <p><?php echo _AT('title'). ": <strong>". $row['title']. "</strong>"; ?><br/>
81 <?php echo _AT('rl_type_of_resource'). ": ". _AT($_rl_types[$row['type']]); ?><br/>
82 <?php echo _AT('author'). ": ". $row['author']; ?><br/>
83 <?php echo _AT('rl_publisher'). ": ". $row['publisher']; ?><br/>
84 <?php echo _AT('date'). ": ". $row['date']; ?><br/>
85 <?php echo _AT('id'). ": ". $row['id']; ?><br/>
86 <?php echo _AT('comment'). ": ". $row['comments']; ?>
92 <?php } while($rowReadings = mysql_fetch_assoc($resultReadings)); ?>
94 <table class="data" style="width: 95%;"><tr>
95 <td colspan="3"><strong><?php echo _AT('none_found'); ?></strong></td>
99 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>