1 <?php require(AT_INCLUDE_PATH.'header.inc.php'); ?>
3 <div id="my_courses_container">
4 <table class="data" style="width:100%;">
6 <th><?php echo _AT('course'); ?></th>
7 <th><?php echo _AT('instructor'); ?></th>
8 <th><?php echo _AT('status'); ?></th>
9 <th><?php echo _AT('shortcuts'); ?></th>
11 <?php foreach ($this->courses as $row):
16 <tr class="<?php if ($counter %2) { echo 'odd'; } else { echo 'even'; } ?>">
18 <?php if ($row['icon'] == ''): ?>
19 <img src="images/clr.gif" class="icon" border="1" width="79" height="79" alt="<?php echo htmlentities_utf8($row['title']); ?>" />
23 $sql2="SELECT icon from ".TABLE_PREFIX."courses WHERE course_id='$row[course_id]'";
24 $result2 = mysql_query($sql2, $db);
26 while($row2=mysql_fetch_assoc($result2)){
27 $filename = $row2['icon'];
30 $path = AT_CONTENT_DIR .$row['course_id'].'/custom_icons/'.$filename;
32 if (file_exists($path)) {
33 if (defined('AT_FORCE_GET_FILE')) {
34 $dir = 'get_course_icon.php?id='.$row['course_id'];
36 $dir = 'content/' . $_SESSION['course_id'] . '/'.$row['icon'];
39 $dir = "images/courses/".$row['icon'];
42 <img src="<?php echo $dir; ?>" class="icon" border="0" alt="<?php echo htmlentities_utf8($row['title']); ?>" />
49 <td><?php echo '<a href="'.url_rewrite('bounce.php?course=' . $row['course_id']) . '"> '.htmlentities_utf8($row['title']).'</a>' ?>
50 <br /><small><?php echo _AT('category'); ?>: <?php echo get_category_name($row['cat_id']); ?></small>
52 <td><small><?php echo '<a href="'.AT_BASE_HREF.'inbox/send_message.php?id='.$row['member_id'].'">'. get_display_name($row['member_id']).'<a/>'; ?></small></td>
56 if ($_SESSION['member_id'] == $row['member_id']) {
58 echo _AT('instructor');
59 } else if ($row['approved'] == 'a') {
62 } else if ($row['approved'] == 'n') {
64 echo _AT('pending_approval');
67 //if no role and enrolled
76 <?php if ($row['member_id'] != $_SESSION['member_id'] && $_config['allow_unenroll'] == 1): ?>
77 <li><a href="users/remove_course.php?course=<?php echo $row['course_id']; ?>"><?php echo _AT('unenroll_me'); ?></a></li>
79 <?php if ($row['tests']): ?>
80 <?php foreach ($row['tests'] as $test): ?>
81 <li><a href="bounce.php?course=<?php echo $row['course_id'].SEP.'p='.urlencode('mods/_standard/tests/test_intro.php?tid='.$test['test_id']); ?>"><span title="<?php echo _AT('tests'); ?>:<?php echo $test['title']; ?>"><?php echo $test['title']; ?></span></a> </li>
85 <?php if ($row['last_cid']): ?>
86 <div class="shortcuts" style="float:right;">
87 <a href="bounce.php?course=<?php echo $row['course_id'].SEP.'p='.urlencode('content.php?cid='.$row['last_cid']); ?>"><img src="<?php echo $_base_href; ?>themes/default/images/resume.png" border="" alt="<?php echo _AT('resume'); ?>" title="<?php echo _AT('resume'); ?>" class="img1616"/></a>
98 <div class="current_box">
99 <div class="current_head"> <h3><?php echo _AT('things_current'); ?></h3></div>
102 //display current news
107 $p = intval($_GET['p']);
109 if($_GET['p'] == "all"){
110 $perpage = count($this->all_news);
115 $newscount = count($this->all_news);
116 $num_pages = ($perpage==0)?0:(ceil($newscount/$perpage));
117 $start = ($p-1)*$perpage;
118 $end = ($p*$perpage);
120 print_paginator($page, $num_pages, '', 1);
121 for($i=$start;$i<=$end; $i++){
123 if (isset($this->all_news)) {
124 echo '<ul class="current_list">';
125 if(isset($this->all_news[$i]['thumb'])){
126 echo '<li><img src="'.$this->all_news[$i]['thumb'].'" alt="'.$this->all_news[$i]['alt'].'" title="'.$this->all_news[$i]['alt'].'" class="img1616"/> ' . $this->all_news[$i]['link'] .' <br />';
127 if($this->all_news[$i]['object']['course_id']){
128 echo '<small>(<a href="bounce.php?course='.$this->all_news[$i]['object']['course_id'].'">'.$this->all_news[$i]['course'].'</a>)|';
130 echo '('.AT_DATE('%F %j, %g:%i',$this->all_news[$i]['time']).')</small><hr style=""/></li>';
135 if($perpage == count($this->all_news)){ ?>
136 <a href="<?php echo $_SERVER['PHP_SELF']; ?>?p=1"><?php echo _AT('show_pages'); ?></a>
137 <?php }else if($newscount > 0){ ?>
138 <a href="<?php echo $_SERVER['PHP_SELF']; ?>?p=all"><?php echo _AT('show_all'); ?></a>
140 echo _AT('none_found');
145 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>