2 /****************************************************************/
\r
4 /****************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or*/
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /****************************************************************/
\r
14 define('AT_INCLUDE_PATH', '../../../include/');
\r
15 require (AT_INCLUDE_PATH.'vitals.inc.php');
\r
16 require (AT_INCLUDE_PATH.'header.inc.php');
\r
19 $sql = "SELECT name, topic_id FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$_SESSION[course_id] ORDER BY name";
\r
20 $result = mysql_query($sql, $db);
\r
23 <?php if ($row = mysql_fetch_assoc($result)) : ?>
\r
24 <ul style="list-style: none;">
\r
26 <li style="font-weight: bold; margin-bottom: 10px;">
\r
27 <?php echo AT_print($row['name'], 'faqs.topic'); ?>
\r
29 $entry_sql = "SELECT * FROM ".TABLE_PREFIX."faq_entries WHERE topic_id=$row[topic_id] ORDER BY question";
\r
30 $entry_result = mysql_query($entry_sql, $db);
\r
31 if ($entry_row = mysql_fetch_assoc($entry_result)) {?>
\r
32 <ol start="<?php echo $counter; ?>">
\r
35 <li style="font-weight: normal">
\r
36 <h3><?php echo AT_print($entry_row['question'], 'faqs.question'); ?></h3>
\r
37 <p><?php echo AT_print($entry_row['answer'], 'faqs.answer');?></p>
\r
39 <?php $counter++; ?>
\r
40 <?php } while ($entry_row = mysql_fetch_assoc($entry_result)) ?>
\r
43 <p style="padding-left: 20px; padding-top:3px; font-weight:normal;"><?php echo _AT('no_questions'); ?></p>
\r
46 <?php } while($row = mysql_fetch_assoc($result)); ?>
\r
49 <?php echo _AT('none_found'); ?>
\r
52 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>