function blogs_news() { global $db, $enrolled_courses, $system_courses; $news = array(); if ($enrolled_courses == '') { return $news; } $sql = "SELECT G.group_id, G.title, G.modules, T.course_id FROM " . TABLE_PREFIX . "groups G INNER JOIN " . TABLE_PREFIX . "groups_types T USING (type_id) WHERE T.course_id IN {$enrolled_courses} ORDER BY G.title"; $result = mysql_query($sql, $db); if ($result) { if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { if (strpos($row['modules'], '_standard/blogs') !== FALSE) { // retrieve the last posted date/time from this blog $sql = "SELECT MAX(date) AS date FROM " . TABLE_PREFIX . "blog_posts WHERE owner_type=" . BLOGS_GROUP . " AND owner_id={$row['group_id']}"; $date_result = mysql_query($sql, $db); $row2 = mysql_fetch_assoc($date_result); $last_updated = ' - ' . _AT('last_updated', AT_date(_AT('forum_date_format'), $row2['date'], AT_DATE_MYSQL_DATETIME)); $link_title = $row['title']; $news[] = array('time' => $row2['date'], 'object' => $row, 'alt' => _AT('blogs'), 'course' => $system_courses[$row['course_id']]['title'], 'thumb' => 'images/home-blogs_sm.png', 'link' => '<a href="bounce.php?course=' . $row['course_id'] . SEP . 'p=' . urlencode('mods/_standard/blogs/view.php?ot=' . BLOGS_GROUP . SEP . 'oid=' . $row['group_id']) . '"' . (strlen($link_title) > SUBLINK_TEXT_LEN ? ' title="' . AT_print($link_title, 'blog_posts.title') . '"' : '') . '>' . AT_print(validate_length($link_title, SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY), 'blog_posts.title') . '</a>'); } } } } return $news; }
function blogs_news() { global $db, $enrolled_courses, $system_courses; $news = array(); if ($enrolled_courses == '') { return $news; } $sql = "SELECT G.group_id, G.title, G.modules, T.course_id FROM %sgroups G INNER JOIN %sgroups_types T USING (type_id) WHERE T.course_id IN %s ORDER BY G.title"; $rows_enrolled = queryDB($sql, array(TABLE_PREFIX, TABLE_PREFIX, $enrolled_courses)); if (count($rows_enrolled) > 0) { foreach ($rows_enrolled as $row) { if (strpos($row['modules'], '_standard/blogs') !== FALSE) { // check for group membership before showing news. $sql = "SELECT member_id FROM %sgroups_members WHERE member_id=%d AND group_id= %d"; $row_group_member = queryDB($sql, array(TABLE_PREFIX, $_SESSION['member_id'], $row['group_id']), TRUE); // check for course instructor, show blog news if so $sql = "SELECT member_id from %scourses WHERE member_id =%d"; $row_instructor = queryDB($sql, array(TABLE_PREFIX, $_SESSION['member_id'])); if (count($row_group_member) > 0 || count($row_instructor) > 0) { // retrieve the last posted date/time from this blog $sql = "SELECT MAX(date) AS date FROM %sblog_posts WHERE owner_type=%d AND owner_id=%d"; $row2 = queryDB($sql, array(TABLE_PREFIX, BLOGS_GROUP, $row['group_id']), TRUE); $last_updated = ' - ' . _AT('last_updated', AT_date(_AT('forum_date_format'), $row2['date'], AT_DATE_MYSQL_DATETIME)); $link_title = $row['title']; $news[] = array('time' => $row2['date'], 'object' => $row, 'alt' => _AT('blogs'), 'course' => $system_courses[$row['course_id']]['title'], 'thumb' => 'images/home-blogs_sm.png', 'link' => '<a href="bounce.php?course=' . $row['course_id'] . SEP . 'p=' . urlencode('mods/_standard/blogs/view.php?ot=' . BLOGS_GROUP . SEP . 'oid=' . $row['group_id']) . '"' . (strlen($link_title) > SUBLINK_TEXT_LEN ? ' title="' . AT_print($link_title, 'blog_posts.title') . '"' : '') . '>' . AT_print(validate_length($link_title, SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY), 'blog_posts.title') . '</a>'); } } } } return $news; }
function print_entry2($row) { global $page, $system_courses, $forum_info; static $counter; $counter++; $reply_link = '<a href="forum/view.php?fid=' . $row['forum_id'] . SEP . 'pid='; if ($row['parent_id'] == 0) { $reply_link .= $row['post_id']; } else { $reply_link .= $row['parent_id']; } $reply_link .= SEP . 'reply=' . $row['post_id'] . SEP . 'page=' . $page . '#post" >' . _AT('reply') . '</a>'; ?> <li class="<?php if ($counter % 2) { echo 'odd'; } else { echo 'even'; } ?> "> <a name="<?php echo $row['post_id']; ?> "></a> <div class="forum-post-author"> <label class="title"><?php echo htmlspecialchars(get_display_name($row['member_id'])); ?> </label><br /> </div> <div class="forum-post-content"> <div class="date"> <p><?php echo AT_date(_AT('forum_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME); ?> </p> </div> <div class="postheader"><h3><?php echo AT_Print($row['subject'], 'forums_threads.subject'); ?> </h3></div> <div class="body"> <p><?php echo AT_print($row['body'], 'forums_threads.body'); ?> </p> </div> </div> </li> <?php }
$list = $Backup->getAvailableList(); echo '<tr><th colspan="4">' . $course['title'] . '</th></tr>'; if (empty($list)) { ?> <tr> <td colspan="4"><?php echo _AT('none_found'); ?> </td> </tr><?php $num_backups++; } else { foreach ($list as $row) { echo '<tr onmousedown="document.form1[\'c' . $row['backup_id'] . '_' . $row['course_id'] . '\'].checked = true; rowselect(this);" id="r_' . $row['backup_id'] . '"><td><input type="radio" value="' . $row['backup_id'] . '_' . $row['course_id'] . '" name="backup_id" id="c' . $row['backup_id'] . '_' . $row['course_id'] . '" />'; echo '<label for="c' . $row['backup_id'] . '_' . $row['course_id'] . '">' . $row['file_name'] . '</label></td>'; echo '<td>' . AT_date(_AT('filemanager_date_format'), $row['date_timestamp'], AT_DATE_UNIX_TIMESTAMP) . '</td>'; echo '<td align="right" class="hidecol480">' . get_human_size($row['file_size']) . '</td>'; echo '<td class="hidecol480">' . AT_print($row['description'], 'backups.description') . '</td>'; echo '</tr>'; $num_backups++; } } } if (!$num_backups) { ?> <tr> <td colspan="4"><?php echo _AT('none_found'); ?> </td> </tr>
<input type="submit" name="edit_cancel" value="<?php echo _AT('cancel'); ?> " /> </div> </form> <?php } else { ?> <div class="row"> <h4><?php echo get_display_name($row['member_id']); ?> - <?php echo AT_date(_AT('filemanager_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME); ?> </h4> <p><?php echo nl2br(htmlspecialchars($row['comment'])); ?> </p> <?php if ($row['member_id'] == $_SESSION['member_id'] || $current_file['member_id'] == $_SESSION['member_id']) { ?> <div style="text-align:right; font-size: smaller"> <a href="<?php echo url_rewrite('mods/_standard/file_storage/comments.php' . $owner_arg_prefix . 'id=' . $id . SEP . 'comment_id=' . $row['comment_id'] . '#c' . $row['comment_id']); ?> "><?php echo _AT('edit');
}else{ // if less than PHP version 5, read a text file to generate the menu $timezone_names = file("timezones.txt"); } echo '<select name="time_zone">'; foreach($timezone_names as $timezone_name){ if($timezone_name == $_config{'time_zone'}){ $selected = ' selected="selected"'; } echo '<option'.$selected.'>'.$timezone_name.'</option>'; $selected = ''; } echo '</select>'; */ echo AT_date(_AT('server_date_format'), '', AT_DATE_MYSQL_DATETIME); ?> </div> <?php // disable this setting on ATutorSpaces if (!$this->service_installed) { ?> <div class="row"> <?php $timeout_arr = array(10, 15, 20, 30, 60, 120, 1440); ?> <label for="session_timeout"><?php echo _AT('session_timeout'); ?> </label> (<?php echo _AT('default');
echo '<strong>' . _AT('ongoing') . '</strong>'; } else { if ($row['ue'] < time()) { echo '<strong>' . _AT('expired') . '</strong>'; } else { if ($row['us'] > time()) { echo '<strong>' . _AT('pending') . '</strong>'; } } } ?> </td> <td><?php $startend_date_format = _AT('startend_date_format'); echo AT_date($startend_date_format, $row['start_date'], AT_DATE_MYSQL_DATETIME) . ' ' . _AT('to_2') . ' '; echo AT_date($startend_date_format, $row['end_date'], AT_DATE_MYSQL_DATETIME); ?> </td> <td class="hidecol700"><?php if ($row['result_release'] == AT_RELEASE_IMMEDIATE) { echo _AT('release_immediate'); } else { if ($row['result_release'] == AT_RELEASE_MARKED) { echo _AT('release_marked'); } else { if ($row['result_release'] == AT_RELEASE_NEVER) { echo _AT('release_never'); } } }
echo '<td align="left" valign="middle">'; if ($_GET['view'] != $row['message_id']) { echo $name; } else { echo '<strong>' . $name . '</strong>'; } echo '</td>'; echo '<td><label for="m' . $row['message_id'] . '">'; if ($_GET['view'] != $row['message_id']) { echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $row['message_id'] . '">' . AT_print($row['subject'], 'messages.subject') . '</a>'; } else { echo '<strong>' . AT_print($row['subject'], 'messages.subject') . '</strong>'; } echo '</label></td>'; echo '<td valign="middle" align="left" nowrap="nowrap">'; echo AT_date(_AT('inbox_date_format'), $row['date_sent'], AT_DATE_MYSQL_DATETIME); echo '</td>'; echo '</tr>'; } } else { ?> <tr> <td colspan="5"><?php echo _AT('none_found'); ?> </td> </tr> <?php } ?> </tbody>
$trans_count++; if ($trans_count > 15) { exit; // INF loop safety thing.. } } } $translated_file_names[$list[$i]['index']] = $path_parts['dirname'] . $trans_name; if ($path_parts['dirname'] . $trans_name != $filename) { $files[strtolower($filename)] .= ' => ' . $trans_name; } } $files[strtolower($filename)] .= '</td>'; $files[strtolower($filename)] .= '<td align="right">' . get_human_size($list[$i]['size']) . ' </td>'; $files[strtolower($filename)] .= '<td> '; $files[strtolower($filename)] .= AT_date(_AT('filemanager_date_format'), $list[$i]['mtime'], AT_DATE_UNIX_TIMESTAMP); $files[strtolower($filename)] .= '</td>'; $files[strtolower($filename)] .= '</tr>'; } } $sql = "SELECT max_quota, max_file_size FROM %scourses WHERE course_id=%d"; $row = queryDB($sql, array(TABLE_PREFIX, $_SESSION['course_id']), TRUE); $my_MaxCourseSize = $row['max_quota']; $my_MaxFileSize = $row['max_file_size']; $course_total = dirsize($path); if ($my_MaxCourseSize == AT_COURSESIZE_UNLIMITED) { $total_after = 1; } else { if ($my_MaxCourseSize == AT_COURSESIZE_DEFAULT) { $my_MaxCourseSize = $MaxCourseSize; $total_after = get_human_size($my_MaxCourseSize - $course_total - $totalBytes);
<?php echo _AT('never'); ?> <?php } else { ?> <?php //echo AT_date('%d/%m/%y - %H:%i', $row['last_login'], AT_DATE_MYSQL_TIMESTAMP_14); echo AT_date($startend_date_longs_format, $row['last_login'], AT_DATE_MYSQL_TIMESTAMP_14); ?> <?php } ?> </td> <td><?php echo AT_date($startend_date_longs_format, $row['creation_date'], AT_DATE_MYSQL_DATETIME); ?> </td> </tr> <?php } ?> </tbody> <?php } else { ?> <tr> <td colspan="<?php echo 9 + $col_counts; ?> "><?php
echo $row['news_id']; ?> " id="n<?php echo $row['news_id']; ?> " /></td> <td><label for="n<?php echo $row['news_id']; ?> "><?php echo AT_print($row['title'], 'news.title'); ?> </label></td> <td><?php echo AT_date(_AT('announcement_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME); ?> </td> </tr> <?php } while ($row = mysql_fetch_assoc($this->result)); ?> <?php } else { ?> <tr> <td colspan="3"><?php echo _AT('none_found'); ?> </td> </tr>
<?php $sql = "SELECT content_id, COUNT(*) AS unique_hits, \n\t SUM(counter) AS total_hits, \n\t SEC_TO_TIME(SUM(duration)/SUM(counter)) AS average_duration, \n\t SEC_TO_TIME(SUM(duration)) AS total_duration, last_accessed \n\t FROM %smember_track \n\t WHERE course_id=%d AND member_id=%d GROUP BY content_id ORDER BY total_hits DESC"; $rows_hits = queryDB($sql, array(TABLE_PREFIX, $_SESSION['course_id'], $_SESSION['member_id'])); if (count($rows_hits) > 0) { foreach ($rows_hits as $row) { if ($row['total'] == '') { $row['total'] = _AT('na'); } echo '<tr>'; echo '<td><a href=' . AT_BASE_HREF . url_rewrite('content.php?cid=' . $row['content_id']) . '>' . $contentManager->_menu_info[$row['content_id']]['title'] . '</a></td>'; echo '<td>' . $row['total_hits'] . '</td>'; echo '<td>' . $row['total_duration'] . '</td>'; if ($row['last_accessed'] == '') { echo '<td>' . _AT('na') . '</td>'; } else { echo '<td>' . AT_date(_AT('forum_date_format'), $row['last_accessed'], AT_DATE_MYSQL_DATETIME) . '</td>'; } echo '</tr>'; } //end while echo '</tbody>'; } else { if ($_SESSION['is_admin'] == 1) { $msg->printInfos('TRACKING_NO'); } echo '<tr><td colspan="4">' . _AT('none_found') . '</td></tr>'; echo '</tbody>'; } ?> </tbody> </table>
" class="button"/></td> </tr> </tfoot> <tbody> <?php if (!$this->list) { ?> <tr> <td colspan="4"><?php echo _AT('none_found'); ?> </td> </tr> <?php } else { foreach ($this->list as $row) { echo '<tr onmousedown="document.form[\'b' . $row['backup_id'] . '\'].checked = true; rowselect(this);" id="r_' . $row['backup_id'] . '">'; echo '<td class="row1"><label><input type="radio" value="' . $row['backup_id'] . '" name="backup_id" id="b' . $row['backup_id'] . '" />'; echo $row['file_name'] . '</label></td>'; echo '<td>' . AT_date(_AT('filemanager_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME) . '</td>'; echo '<td align="right">' . get_human_size($row['file_size']) . '</td>'; echo '<td>' . AT_print($row['description'], 'backups.description') . '</td>'; echo '</tr>'; } ?> <?php } ?> </tbody> </table> </form>
$module_content = $obj->getContent($cid); if (!empty($module_content)) { $module_contents .= '<div id="' . str_replace('/', '-', $key) . '" class="content-from-module">' . $module_content . '</div>'; } } if ($module_contents != '') { $savant->assign('module_contents', $module_contents); } } } } else { $infos = array('NOT_RELEASED', AT_date(_AT('announcement_date_format'), $released_status, AT_DATE_UNIX_TIMESTAMP)); $msg->addInfo($infos); unset($infos); } $savant->assign('content_info', _AT('page_info', AT_date(_AT('inbox_date_format'), $content_row['last_modified'], AT_DATE_MYSQL_DATETIME), $content_row['revision'], AT_date(_AT('inbox_date_format'), $content_row['release_date'], AT_DATE_MYSQL_DATETIME))); require AT_INCLUDE_PATH . 'header.inc.php'; // // Mauro Donadio // $fp = @file_get_contents($content_row['text']); // just for AContent content if (strstr($fp, 'AContentXX')) { //$fp = str_ireplace('<head>','<MAURO>',$fp); //<base href="http://www.w3schools.com/images/" target="_blank" /> // a new dom object $dom = new DomDocument(); libxml_use_internal_errors(TRUE); // load the html into the object $dom->loadHTML($fp); libxml_use_internal_errors(FALSE);
function print_entry($row) { global $page, $system_courses, $forum_info; static $counter; $counter++; $reply_link = '<a href="mods/_standard/forums/forum/view.php?fid='.$row['forum_id'].SEP.'pid='; if ($row['parent_id'] == 0) { $reply_link .= $row['post_id']; } else { $reply_link .= $row['parent_id']; } $reply_link .= SEP.'reply='.$row['post_id'].SEP.'page='.$page.'#post" >'._AT('reply').'</a>'; ?> <li class="<?php if ($counter %2) { echo 'odd'; } else { echo 'even'; } ?>"> <a name="<?php echo $row['post_id']; ?>"></a> <div class="forum-post-author"> <a href="profile.php?id=<?php echo $row['member_id']; ?>" class="title"><?php echo htmlspecialchars(get_display_name($row['member_id'])); ?></a><br /> <?php print_profile_img($row['member_id']); ?> </div> <div class="forum-post-content"> <h3><?php echo AT_print($row['subject'], 'forums_threads.subject'); ?></h3> <div> <div class="forum-post-ctrl"> <?php if (authenticate(AT_PRIV_FORUMS, AT_PRIV_RETURN)): ?> <?php echo $reply_link; ?> | <a href="mods/_standard/forums/edit_post.php?fid=<?php echo $row['forum_id'].SEP.'pid='.$row['post_id']; ?>"><?php echo _AT('edit'); ?></a> | <a href="mods/_standard/forums/forum/delete_thread.php?fid=<?php echo $row['forum_id'].SEP.'pid='.$row['post_id'].SEP.'ppid='.$row['parent_id'].SEP; ?>nest=1"><?php echo _AT('delete'); ?></a> <?php elseif (($row['member_id'] == $_SESSION['member_id']) && (($row['udate'] + $forum_info['mins_to_edit'] * 60) > time())): ?> <?php echo $reply_link; ?> | <a href="mods/_standard/forums/edit_post.php?fid=<?php echo $row['forum_id'].SEP.'pid='.$row['post_id']; ?>"><?php echo _AT('edit'); ?></a> <span>(<?php echo _AT('edit_for_minutes', round((($row['udate'] + $forum_info['mins_to_edit'] * 60) - time())/60)); ?>)</span> <?php elseif ($_SESSION['valid_user']): ?> <?php echo $reply_link; ?> <?php endif; ?> </div> <p class="date"> <?php echo AT_date(_AT('forum_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME); ?></p> </div> <div class="body"> <p><?php echo AT_print($row['body'], 'forums_threads.body'); ?></p> </div> </div> </li> <?php }
$results[$i]['test_id'] = $row['test_id']; $results[$i]['title'] = $row['title']; if ($row['us'] <= time() && $row['ue'] >= time()) { $results[$i]['status'] = '<strong>' . _AT('ongoing') . '</strong>'; } else { if ($row['ue'] < time()) { $results[$i]['status'] = '<strong>' . _AT('expired') . '</strong>'; } else { if ($row['us'] > time()) { $results[$i]['status'] = '<strong>' . _AT('pending') . '</strong>'; } } } $startend_date_format = _AT('startend_date_format'); $results[$i]['availability'] = AT_date($startend_date_format, $row['start_date'], AT_DATE_MYSQL_DATETIME) . ' ' . _AT('to_2') . ' '; $results[$i]['availability'] .= AT_date($startend_date_format, $row['end_date'], AT_DATE_MYSQL_DATETIME); // get result release if ($row['result_release'] == AT_RELEASE_IMMEDIATE) { $results[$i]['result_release'] = _AT('release_immediate'); } else { if ($row['result_release'] == AT_RELEASE_MARKED) { $results[$i]['result_release'] = _AT('release_marked'); } else { if ($row['result_release'] == AT_RELEASE_NEVER) { $results[$i]['result_release'] = _AT('release_never'); } } } //get # marked submissions $sql_sub = "SELECT COUNT(*) AS sub_cnt FROM %stests_results WHERE status=1 AND test_id=%d"; $row_sub = queryDB($sql_sub, array(TABLE_PREFIX, $row['test_id']), TRUE);
function print_entry($row) { global $page, $system_courses, $forum_info; static $counter; $counter++; ?> <script type="text/javascript"> /* // script to control popin reply/edit boxs, disabled for now due to ID conflicts jQuery(document).ready( function () { $("a#reply-<?php echo $row['post_id']; ?> ").click(function() { $("div#reply-<?php echo $row['post_id']; ?> ").toggle('slow'); return false; }); $("a#reply-<?php echo $row['post_id']; ?> ").keypress(function(e) { var code = e.keyCode || e.which; if(code == 13 || code == 32) { $("div#reply-<?php echo $row['post_id']; ?> ").toggle('slow'); $("div#reply-<?php echo $row['post_id']; ?> #subject" ).focus(); return false; } }); $("a#edit-<?php echo $row['post_id']; ?> ").click(function() { $("div#edit-<?php echo $row['post_id']; ?> ").toggle('slow'); return false; }); $("a#edit-<?php echo $row['post_id']; ?> ").keypress(function(e) { var code = e.keyCode || e.which; if(code == 13 || code == 32) { $("div#edit-<?php echo $row['post_id']; ?> ").toggle('slow'); $("div#edit-<?php echo $row['post_id']; ?> #subject" ).focus(); return false; } }); }); */ </script> <?php $reply_link = '<a href="#" id="reply-' . $row['post_id'] . '">'; $reply_link = '<a href="mods/_standard/forums/forum/view.php?fid=' . $row['forum_id'] . SEP . 'pid='; if ($row['parent_id'] == 0) { $reply_link .= $row['post_id']; } else { $reply_link .= $row['parent_id']; } //$reply_link .= SEP.'reply='.$row['post_id'].SEP.'page='.$page.'#post" >'; $reply_link .= '#post" onClick="javascript:document.getElementById(\'subject\').value = \'Re: ' . $row['subject'] . '\'; " >'; $reply_link .= '<img src="images/forum/forum_reply.png" alt="' . _AT('reply') . '" title="' . _AT('reply') . '"/></a>'; ?> <li class="<?php if ($counter % 2) { echo 'odd'; } else { echo 'even'; } ?> "> <a name="<?php echo $row['post_id']; ?> "></a> <div class="forum-post-author"> <a href="profile.php?id=<?php echo $row['member_id']; ?> " class="title"><?php echo htmlspecialchars(get_display_name($row['member_id'])); ?> </a><br /> <?php print_profile_img($row['member_id']); ?> </div> <div class="forum-post-content"> <h3><?php echo AT_print($row['subject'], 'forums_threads.subject'); ?> </h3> <div> <div class="forum-post-ctrl"> <?php if (authenticate(AT_PRIV_FORUMS, AT_PRIV_RETURN)) { ?> <?php echo $reply_link; ?> <a href="mods/_standard/forums/edit_post.php?fid=<?php echo $row['forum_id'] . SEP . 'pid=' . $row['post_id']; ?> "><img src="images/forum/forum_edit.png" alt="<?php echo _AT('edit'); ?> " title="<?php echo _AT('edit'); ?> "/></a> <a href="mods/_standard/forums/forum/delete_thread.php?fid=<?php echo $row['forum_id'] . SEP . 'pid=' . $row['post_id'] . SEP . 'ppid=' . $row['parent_id'] . SEP; ?> nest=1"><img src="images/forum/forum_delete.png" alt="<?php echo _AT('delete'); ?> " title="<?php echo _AT('delete'); ?> "/></a> <!-- <?php echo $reply_link; ?> <a href="#" id="edit-<?php echo $row['post_id']; ?> "><img src="images/forum/forum_edit.png" alt="<?php echo _AT('edit'); ?> " title="<?php echo _AT('edit'); ?> "/></a> <a href="mods/_standard/forums/forum/delete_thread.php?fid=<?php echo $row['forum_id'] . SEP . 'pid=' . $row['post_id'] . SEP . 'ppid=' . $row['parent_id'] . SEP; ?> nest=1"><img src="images/forum/forum_delete.png" alt="<?php echo _AT('delete'); ?> " title="<?php echo _AT('delete'); ?> "/></a> --> <?php } elseif ($row['member_id'] == $_SESSION['member_id'] && $row['udate'] + $forum_info['mins_to_edit'] * 60 > time()) { ?> <?php echo $reply_link; ?> <a href="mods/_standard/forums/edit_post.php?fid=<?php echo $row['forum_id'] . SEP . 'pid=' . $row['post_id']; ?> "><img src="images/forum/forum_edit.png" alt="<?php echo _AT('edit'); ?> " title="<?php echo _AT('edit'); ?> "></a> <span>(<?php echo _AT('edit_for_minutes', round(($row['udate'] + $forum_info['mins_to_edit'] * 60 - time()) / 60)); ?> )</span> <!-- <?php echo $reply_link; ?> <a href="#" id="edit-<?php echo $row['post_id']; ?> "><img src="images/forum/forum_edit.png" alt="<?php echo _AT('edit'); ?> " title="<?php echo _AT('edit'); ?> "></a> <span>(<?php echo _AT('edit_for_minutes', round(($row['udate'] + $forum_info['mins_to_edit'] * 60 - time()) / 60)); ?> )</span> --> <?php } elseif ($_SESSION['valid_user'] == true) { ?> <?php echo $reply_link; ?> <?php } ?> </div> <p class="date"> <?php echo AT_date(_AT('forum_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME); ?> </p> </div> <div class="body"> <p><?php echo apply_customized_format(AT_print($row['body'], 'forums_threads.body')); ?> </p> </div> </div> <?php // popin edit/reply forms / disabled until ID conflict issue can be resolved //echo '<div class="forum_reply" id="reply-'.$row['post_id'].'">'; //require(AT_INCLUDE_PATH.'../mods/_standard/forums/html/new_thread.inc.php'); //echo '</div>'; //echo '<div class="forum_edit" id="edit-'.$row['post_id'].'">'; //require(AT_INCLUDE_PATH.'../mods/_standard/forums/edit_post.php'); //echo '</div>'; ?> </li> <?php }
$num_posts_per_page = 20; $start = ($page - 1) * $num_posts_per_page; $count = 0; $sql = "SELECT post_id, member_id, private, num_comments, date, title, body FROM ".TABLE_PREFIX."blog_posts WHERE $auth owner_type=".BLOGS_GROUP." AND owner_id=$_REQUEST[oid] ORDER BY date DESC LIMIT $start, " . ($num_posts_per_page+1); $result = mysql_query($sql, $db); ?> <?php if (mysql_num_rows($result)): ?> <?php while (($row = mysql_fetch_assoc($result)) && ($count < $num_posts_per_page)): $count++; ?> <div class="entry"> <h2><a href="<?php echo url_rewrite('mods/_standard/blogs/post.php?ot='.BLOGS_GROUP.SEP.'oid='.$_REQUEST['oid'].SEP.'id='.$row['post_id']); ?>"><?php echo AT_print($row['title'], 'blog_posts.title'); ?></a> <?php if ($row['private']): ?> - <?php echo _AT('private'); ?> <?php endif; ?></h2> <h3 class="date"><?php echo get_display_name($row['member_id']); ?> - <?php echo AT_date(_AT('forum_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME); ?></h3> <p><?php echo AT_print($row['body'], 'blog_posts.body'); ?></p> <p><a href="<?php echo url_rewrite('mods/_standard/blogs/post.php?ot='.BLOGS_GROUP.SEP.'oid='.$_REQUEST['oid'].SEP.'id='.$row['post_id']); ?>#comments"><?php echo _AT('comments_num', $row['num_comments']); ?></a></p> <hr /> </div> <?php endwhile; ?> <?php if (mysql_num_rows($result) > $num_posts_per_page) { echo '<a href="'.url_rewrite('mods/_standard/blogs/view.php?ot='.$owner_type.SEP.'oid='.$owner_id.SEP.'p='.(++$page)).'">'._AT('previous_posts').'</a>'; } ?> <?php else: ?> <p><?php echo _AT('none_found'); ?></p>
"><?php echo $file; ?> </a></td> <td> <?php if ($file . '.html' == $admin['tranFile'] && $admin['produceTran']) { echo _AT('chat_currently_active'); } else { echo _AT('chat_inactive'); } ?> </td> <td><?php //echo $date; $startend_date_longs_format = _AT('startend_date_longs_format'); echo AT_date($startend_date_longs_format, $date, AT_DATE_UNIX_TIMESTAMP); ?> </td> </tr> <?php } ?> </tbody> </table> </form> <?php } require AT_INCLUDE_PATH . 'footer.inc.php';
</table> </td> </tr> </table> <?php endif;?> <?php if ($this->mobile_device_type != IPAD_DEVICE): ?> <table style="width: 100%" cellspacing="1" cellpadding="1" border="0" class="bodyline" summary="course statistics" align="center" frame="box" > <tr> <th colspan="2" class="cyan"><small class="bigspacer"><?php echo '<a href="'.$_SERVER['PHP_SELF'].'?month='.($this->last_month).SEP.'year='.$this->last_year.'">'; echo ' '.AT_date('%F', $this->last_month, AT_DATE_INDEX_VALUE ); ?></a> |</small> <?php echo AT_date('%F', $this->month, AT_DATE_INDEX_VALUE ); ?> <small class="bigspacer">| <?php echo '<a href="'.$_SERVER['PHP_SELF'].'?month='.$this->next_month.SEP.'year='.$this->next_year.'">'; echo AT_date('%F', $this->next_month, AT_DATE_INDEX_VALUE); ?> </a></small></th> </tr> <?php if (($this->num_days == 0) || ($this->empty)) { echo '<tr>'; echo '<td class="row1" colspan="2">'._AT('no_month_data').'</td>'; echo '</tr>'; echo '</table>'; require(AT_INCLUDE_PATH.'footer.inc.php'); exit; } ?> <tr> <td class="row1" valign="top" align="right"><strong><?php echo _AT('total'); ?>:</strong></td> <td class="row1"><?php echo $this->total_logins; ?></td> </tr>
?> <form method="post" action="<?php echo $_SERVER['PHP_SELF'].$owner_arg_prefix; ?>"> <input type="hidden" name="folder" value="<?php echo abs($_GET['folder']); ?>" /> <?php foreach ($_GET['files'] as $key => $file): ?> <?php $_GET['files'][$key] = $file = abs($file); ?> <input type="hidden" name="files[]" value="<?php echo $file; ?>" /> <?php endforeach; ?> <div class="input-form"> <div class="row"> <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="name"><?php echo _AT('assignment'); ?></label><br /> <select name="assignment" size="<?php echo min(5, count($assignments)); ?>"> <?php foreach ($assignments as $assignment): ?> <?php if ($assignment['date_due'] != '0000-00-00 00:00:00'): ?> <option value="<?php echo $assignment['assignment_id']; ?>"><?php echo $assignment['title']; ?> - <?php echo _AT('due') . ': ' . AT_date(_AT('filemanager_date_format'), $assignment['date_due'], AT_DATE_MYSQL_DATETIME); ?></option> <?php else: ?> <option value="<?php echo $assignment['assignment_id']; ?>"><?php echo $assignment['title']; ?> - <?php echo _AT('no_due_date'); ?></option> <?php endif; ?> <?php endforeach; ?> </select> </div> <div class="row"> <?php echo _AT('files'); ?> <ul style="list-style: none; margin: 0px; padding: 0px 10px;"> <?php $file_list = implode(',', $_GET['files']); $sql = "SELECT file_name FROM ".TABLE_PREFIX."files WHERE file_id IN ($file_list) AND owner_type=$owner_type AND owner_id=$owner_id ORDER BY file_name"; $result = mysql_query($sql, $db); ?>
echo _AT('start_date'); ?> </td> <td><?php echo AT_date(_AT('startend_date_long_format'), $test_row['start_date'], AT_DATE_MYSQL_DATETIME); ?> </td> </tr> <tr> <td><?php echo _AT('end_date'); ?> </td> <td><?php echo AT_date(_AT('startend_date_long_format'), $test_row['end_date'], AT_DATE_MYSQL_DATETIME); ?> </td> </tr> <tr> <td><?php echo _AT('anonymous'); ?> </td> <td><?php echo $test_row['anonymous'] ? _AT('yes') : _AT('no'); ?> </td> </tr>
<a name="comments"></a><h2><?php echo _AT('comments'); ?> </h2> <?php $sql = "SELECT comment_id, member_id, date, comment FROM %sblog_posts_comments WHERE post_id=%d ORDER BY date"; $rows_comments = queryDB($sql, array(TABLE_PREFIX, $id)); foreach ($rows_comments as $row) { ?> <div class="input-form"> <div class="row"> <h4 class="date"><?php echo get_display_name($row['member_id']); ?> - <?php echo AT_date(_AT('forum_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME); ?> </h4> <p><?php echo AT_print($row['comment'], 'blog_posts_comments.comment'); ?> </p> <?php if (query_bit($owner_status, BLOGS_AUTH_WRITE)) { ?> <div style="text-align: right; font-size: smaller;"> <a href="mods/_standard/blogs/delete_comment.php?ot=<?php echo $owner_type . SEP . 'oid=' . $owner_id . SEP . 'id=' . $id . SEP . 'delete_id=' . $row['comment_id']; ?>
if ($this->mobile_device_type != IPAD_DEVICE) { ?> <table style="width: 100%" cellspacing="1" cellpadding="1" border="0" class="bodyline" summary="course statistics" align="center" frame="box" > <tr> <th colspan="2" class="cyan"><small class="bigspacer"><?php echo '<a href="' . $_SERVER['PHP_SELF'] . '?month=' . $this->last_month . SEP . 'year=' . $this->last_year . '">'; echo ' ' . AT_date('%F', $this->last_month, AT_DATE_INDEX_VALUE); ?> </a> |</small> <?php echo AT_date('%F', $this->month, AT_DATE_INDEX_VALUE); ?> <small class="bigspacer">| <?php echo '<a href="' . $_SERVER['PHP_SELF'] . '?month=' . $this->next_month . SEP . 'year=' . $this->next_year . '">'; echo AT_date('%F', $this->next_month, AT_DATE_INDEX_VALUE); ?> </a></small></th> </tr> <?php if ($this->num_days == 0 || $this->empty) { echo sprintf('<tr><td class="row1" colspan="2">%s</td></tr>', _AT('no_month_data')); echo '</table>'; } else { ?> <tr> <td class="row1" valign="top" align="right"><strong><?php echo _AT('total'); ?> :</strong></td> <td class="row1"><?php
?> "><strong><?php echo AT_print(get_display_name($comment_array['member_id']), 'members.full_name'); ?> </a></strong> <?php echo htmlentities_utf8($comment_array['comment'], true); ?> </div> <?php } ?> <div class="comment_actions"> <!-- TODO: if author, add in-line "edit" --> <?php echo AT_date(_AT('forum_date_format'), $comment_array['created_date'], AT_DATE_MYSQL_DATETIME); ?> <?php if ($this->action_permission || $comment_array['member_id'] == $_SESSION['member_id']) { ?> <a href="<?php echo AT_PA_BASENAME . 'delete_comment.php?aid=' . $this->album_info['id'] . SEP . 'comment_id=' . $comment_array['id']; ?> "><?php echo _AT('delete'); ?> </a> <?php } ?> </div>
require (AT_INCLUDE_PATH.'header.inc.php'); $sql = "SELECT G.group_id, G.title, G.modules FROM ".TABLE_PREFIX."groups G INNER JOIN ".TABLE_PREFIX."groups_types T USING (type_id) WHERE T.course_id=$_SESSION[course_id] ORDER BY G.title"; $result = mysql_query($sql, $db); echo '<ol id="tools">'; $blogs = false; while ($row = mysql_fetch_assoc($result)) { if (strpos($row['modules'], '_standard/blogs') !== FALSE) { // retrieve the last posted date/time from this blog $sql = "SELECT MAX(date) AS date FROM ".TABLE_PREFIX."blog_posts WHERE owner_type=".BLOGS_GROUP." AND owner_id={$row['group_id']}"; $date_result = mysql_query($sql, $db); if (($date_row = mysql_fetch_assoc($date_result)) && $date_row['date']) { $last_updated = ' - ' . _AT('last_updated', AT_date(_AT('forum_date_format'), $date_row['date'], AT_DATE_MYSQL_DATETIME)); } else { $last_updated = ''; } echo '<li class="top-tool" style="position:relative;"><a href="'.url_rewrite('mods/_standard/blogs/view.php?ot='.BLOGS_GROUP. SEP .'oid='.$row['group_id']).'">'.AT_print($row['title'], 'blog_posts.title').$last_updated.'</a>'; // Check if subscribed and make appropriate button if ($sub->is_subscribed('blog',$_SESSION['member_id'],$row['group_id'])){ echo '<a style="float:right;clear:right;padding-right:20px;" href="'.$_SERVER['PHP_SELF'].'?group_id='.$row['group_id']. SEP .'subscribe=unset"><img border="0" src="'.AT_BASE_HREF.'images/unsubscribe-envelope.png" alt="" /> '._AT('blog_unsubscribe').'</a>'; } else { echo '<a style="float:right;clear:right;padding-right:20px;" href="'.$_SERVER['PHP_SELF'].'?group_id='.$row['group_id']. SEP .'subscribe=set"><img border="0" src="'.AT_BASE_HREF.'images/subscribe-envelope.png" alt="" /> '._AT('blog_subscribe').'</a>'; } echo '</li>'; $blogs = true; }
$news = array(); } else { $sql = "SELECT COUNT(*) AS cnt FROM " . TABLE_PREFIX . "news WHERE course_id={$course_id}"; $result = mysql_query($sql, $db); } if ($result && ($row = mysql_fetch_assoc($result))) { $num_results = $row['cnt']; $results_per_page = NUM_ANNOUNCEMENTS; $num_pages = ceil($num_results / $results_per_page); $count = ($page - 1) * $results_per_page + 1; $offset = ($page - 1) * $results_per_page; $sql = "SELECT N.*, DATE_FORMAT(N.date, '%Y-%m-%d %H:%i:%s') AS date, first_name, last_name \n\t FROM " . TABLE_PREFIX . "news N, " . TABLE_PREFIX . "members M \n\t WHERE N.course_id={$course_id} \n\t AND N.member_id = M.member_id\n\t ORDER BY date DESC LIMIT {$offset}, {$results_per_page}"; $result = mysql_query($sql, $db); while ($row = mysql_fetch_assoc($result)) { /* this can't be cached because it called _AT */ $news[$row['news_id']] = array('date' => AT_date(_AT('announcement_date_format'), $row['date'], AT_DATE_MYSQL_DATETIME), 'author' => $row['first_name'] . ' ' . $row['last_name'], 'title' => AT_print($row['title'], 'news.title'), 'body' => format_content($row['body'], $row['formatting'], $glossary)); } } $sql = "SELECT banner FROM " . TABLE_PREFIX . "courses WHERE course_id={$course_id}"; $result = mysql_query($sql, $db); if ($row = mysql_fetch_assoc($result)) { $savant->assign('banner', AT_print($row['banner'], 'courses.banner')); } else { $savant->assign('banner', ''); } $savant->assign('view_mode', $home_view); $savant->assign('announcements', $news); $savant->assign('num_pages', $num_pages); $savant->assign('current_page', $page); $savant->display('index.tmpl.php'); require AT_INCLUDE_PATH . 'footer.inc.php';
echo $row['course_id']; ?> "><?php echo AT_print($row['title'], 'courses.title'); ?> </label></td> <td><?php echo AT_print($row['login'], 'members.login'); ?> </td> <td class="hidecol700"><?php echo _AT($row['access']); ?> </td> <td class="hidecol700"><?php echo AT_date(_AT('startend_date_longs_format'), $row['created_date']); ?> </td> <td class="hidecol700"><?php echo $row['cat_name'] ? $row['cat_name'] : '-'; ?> </td> <td class="hidecol700"><?php echo $this->enrolled[$row['course_id']]['y'] ? $this->enrolled[$row['course_id']]['y'] : 0; ?> </td> <td class="hidecol700"><?php echo $this->enrolled[$row['course_id']]['a'] ? $this->enrolled[$row['course_id']]['a'] : 0; ?> </td> </tr>
function print_search_pages($result) { global $count; foreach ($result as $items) { uasort($result, 'score_cmp'); echo '<h5>' . $count . '. '; if (isset($items['forum_title'])) { //Forum if ($_SESSION['course_id'] != $items['course_id']) { echo '<a href="bounce.php?course=' . $items['course_id'] . SEP . 'p=' . urlencode('forum/view.php?fid=' . $items['forum_id'] . SEP . 'pid=' . $items['post_id'] . SEP . 'words=' . $_GET['words']) . '">' . $items['forum_title'] . ' - ' . $items['subject'] . '</a> '; } else { echo '<a href="' . url_rewrite('mods/_standard/forums/forum/view.php?fid=' . $items['forum_id'] . SEP . 'pid=' . $items['post_id'] . SEP . 'words=' . $_GET['words']) . '">' . $items['forum_title'] . ' - ' . $items['subject'] . '</a> '; } echo '</h5>' . "\n"; echo '<p><small>' . $items['body']; } else { //Content if ($_SESSION['course_id'] != $items['course_id']) { echo '<a href="bounce.php?course=' . $items['course_id'] . SEP . 'p=' . urlencode('content.php?cid=' . $items['content_id'] . SEP . 'words=' . $_GET['words']) . '">' . $items['title'] . '</a> '; } else { echo '<a href="' . url_rewrite('content.php?cid=' . $items['content_id'] . SEP . 'words=' . $_GET['words']) . '">' . $items['title'] . '</a> '; } echo '</h5>' . "\n"; echo '<p><small>' . $items['text']; } echo '<br /><small class="search-info">[<strong>' . _AT('keywords') . ':</strong> '; if (isset($items['keywords'])) { echo $items['keywords']; } else { echo '<strong>' . _AT('none') . '</strong>'; } echo '. <strong>' . _AT('author') . ':</strong> '; if (isset($items['member_id'])) { echo AT_print(get_display_name($items['member_id']), 'members.login'); } else { echo '<strong>' . _AT('none') . '</strong>'; } echo '. <strong>' . _AT('updated') . ':</strong> '; echo AT_date(_AT('inbox_date_format'), isset($items['last_modified']) && $items['last_modified'] != '' ? $items['last_modified'] : $items['last_comment'], AT_DATE_MYSQL_DATETIME); echo ']</small>'; echo '</small></p>' . "\n"; $count++; } }
<th><?php echo _AT('pa_album_type'); ?></th> <th><?php echo _AT('pa_album_description'); ?></th> <th><?php echo _AT('created_by'); ?></th> <th><?php echo _AT('pa_last_updated'); ?></th> </tr> </thead> <tbody> <?php if(!empty($this->albums)): ?> <?php foreach ($this->albums as $aid=>$row): ?> <tr id="r_<?php echo $aid; ?>" onmousedown="jQuery('#album_<?php echo $aid; ?>').attr('checked', true); rowselect(this);"> <td><input type="radio" id="album_<?php echo $aid; ?>" name="aid" value="<?php echo $aid; ?>" /></td> <td><a href="<?php echo AT_PA_BASENAME."admin/edit_photos.php?aid=$aid"; ?>"><?php echo AT_print($row['name'], 'input.text'); ?></a></td> <td><?php echo $pa->getAlbumTypeName($row['type_id']); ?></td> <td><?php echo AT_print($row['description'], 'photo_albums.description'); ?></td> <td><?php echo AT_print(get_display_name($row['member_id']), 'members.full_name'); ?></td> <td><?php echo AT_date(_AT('forum_date_format'), $row['last_updated'], AT_DATE_MYSQL_DATETIME); ?></td> </tr> <?php endforeach; ?> <?php endif; ?> </tbody> <tfoot> <tr> <td colspan="6"> <input type="submit" value="<?php echo _AT('edit'); ?>" name="edit" /> <input type="submit" value="<?php echo _AT('delete'); ?>" name="delete" /> </td> </tr> </tfoot> </table> </form> </div>