function show_agenda_items($id, $option, $rows, $date, $lists, $agenda) { $JLMS_CONFIG =& JLMSFactory::getConfig(); $Itemid = $JLMS_CONFIG->get('Itemid'); $JLMS_ACL =& JLMSFactory::getACL(); //JLMS_loadCalendar(); JLMS_dateLoadJSFrameWork(true); $k = $exp = 0; $m = count($agenda); /*<script type="text/javascript" src="<?php echo $JLMS_CONFIG->get('live_site');?>/includes/js/joomla.javascript.js "></script>*/ ?> <script language="javascript" type="text/javascript"> <!-- function quick_date(){ document.forms.jlms_agenda_form_day.submit(); } var test = 'month_num<?php echo $exp; ?> '; function JLMS_expandMonth( monthId ) { if (test == monthId){ getObj(monthId).style.display = 'none'; test = ''; } else{ JLMS_collapseAllMonth(); getObj(monthId).style.display = ''; test = monthId; } } function JLMS_collapseAllMonth() { for (i=0; i<=<?php echo $m; ?> ; i++){ if (getObj('month_num'+i)){ getObj('month_num'+i).style.display = 'none'; } } } //--> </script> <form name="jlms_filter" action="<?php echo sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}&task=agenda&id={$id}"); ?> " method="post" > <table class="jlms_table_no_borders" width='100%' cellpadding="0" cellspacing="0" border="0"> <tr> <td align="right" style="text-align:right; height:30px; " valign="top"> <?php echo _JLMS_ORDERING . " " . $lists['order']; ?> <?php echo _JLMS_FILTER . " " . $lists['filter']; ?> <input type="submit" value="<?php echo _JLMS_AGENDA_GO; ?> " class="button" name="<?php echo _JLMS_AGENDA_GO; ?> " /> </td> </tr> </table> </form> <?php if (!empty($agenda)) { echo "<table cellpadding='0' cellspacing='0' width='100%' style='width:100%'>"; } else { echo '<div class="joomlalms_user_message">' . _JLMS_AGENDA_NO_ITEMS . '</div>'; } $a_id_date = ''; $selected_id = 0; if (isset($_REQUEST['agenda_id'])) { $selected_id = $_REQUEST['agenda_id']; } $i = 0; $k = 0; $ste = 2; //kolichestvo mesiacev $j = 1; $new_exp = 0; for ($i = 0; $i < count($agenda); $i++) { $b_bot = ''; $border = ''; $none = "style='display:none'"; if ($agenda[$i]->a_y . '-' . $agenda[$i]->a_m == date('Y-m') || count($agenda) == 1) { $none = ''; $new_exp = $i; } if (isset($selected_id) && $agenda[$i]->a_y . '-' . $agenda[$i]->a_m == mosGetParam($_REQUEST, 'cal_date', '')) { $none = ''; $new_exp = $i; } echo "<tr onclick='JLMS_expandMonth(\"month_num" . $i . "\")' style='cursor:pointer'><td class='month_header' " . $b_bot . " title='" . _JLMS_AGENDA_CLICK_HERE . "'>" . month_lang(strftime('%m %Y', strtotime($agenda[$i]->a_y . '-' . $agenda[$i]->a_m . '-1')), 0, 2) . "</td></tr>"; echo "<tr {$none} id='month_num" . $i . "'><td valign='top' style='padding:3px;' >"; if (count($agenda[$i]->items)) { echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' class='jlms_table_no_borders'>"; } for ($j = 0; $j < count($agenda[$i]->items); $j++) { $border = ''; if ($selected_id == $agenda[$i]->items[$j]->agenda_id && $agenda[$i]->a_y . '-' . $agenda[$i]->a_m == mosGetParam($_REQUEST, 'cal_date', '')) { $border = 'background:#F2E3D4;'; } echo "<tr><td valign='top' style='{$border};' ><a name='anc" . $agenda[$i]->items[$j]->agenda_id . '-' . $agenda[$i]->a_y . '-' . $agenda[$i]->a_m . "'></a>"; //print Image v zavisimosti ot tipa (proshedshee sobitie) if ($agenda[$i]->items[$j]->start_date > date('Y-m-d')) { echo "<img src=\"" . $JLMS_CONFIG->get('live_site') . "/components/com_joomla_lms/lms_images/agenda/ag_upcoming.png\" alt='" . _JLMS_AGENDA_UPCOMING . "' title='" . _JLMS_AGENDA_UPCOMING . "' align='left' border='0' width='16' height='16' class='JLMS_png' /> "; } elseif ($agenda[$i]->items[$j]->end_date >= date('Y-m-d') && $agenda[$i]->items[$j]->start_date <= date('Y-m-d')) { echo "<img src=\"" . $JLMS_CONFIG->get('live_site') . "/components/com_joomla_lms/lms_images/agenda/ag_today.png\" alt='" . _JLMS_AGENDA_TODAY . "' title='" . _JLMS_AGENDA_TODAY . "' align='left' border='0' width='16' height='16' class='JLMS_png' /> "; } else { echo "<img src=\"" . $JLMS_CONFIG->get('live_site') . "/components/com_joomla_lms/lms_images/agenda/ag_last.png\" alt='" . _JLMS_AGENDATB_THELAST . "' title='" . _JLMS_AGENDATB_THELAST . "' align='left' border='0' width='16' height='16' class='JLMS_png' /> "; } //print title + description echo "<b>" . $agenda[$i]->items[$j]->title . "</b></td></tr>"; echo "<tr><td class='createdate' style='{$border};'><font color='#585A5C'>" . _JLMS_START_DATE . "</font> " . day_month_lang(date('w m d, Y', strtotime($agenda[$i]->items[$j]->start_date)), 0, 1, 2, 2) . " <font color='#585A5C'> " . _JLMS_END_DATE . "</font> " . day_month_lang(date('w m d, Y', strtotime($agenda[$i]->items[$j]->end_date)), 0, 1, 2, 2) . ""; echo "</td></tr>"; if ($JLMS_ACL->CheckPermissions('announce', 'manage') && isset($agenda[$i]->items[$j]->is_time_related) && $agenda[$i]->items[$j]->is_time_related) { $released_info_txt = _JLMS_WILL_BE_RELEASED_IN; $showperiod = $agenda[$i]->items[$j]->show_period; $ost1 = $showperiod % (24 * 60); $sp_days = ($showperiod - $ost1) / (24 * 60); $ost2 = $showperiod % 60; $sp_hours = ($ost1 - $ost2) / 60; $sp_mins = $ost2; $released_info_time = false; if ($sp_days) { $released_info_txt .= ' ' . $sp_days . ' ' . _JLMS_RELEASED_IN_DAYS; $released_info_time = true; } if ($sp_hours) { $released_info_txt .= ' ' . $sp_hours . ' ' . _JLMS_RELEASED_IN_HOURS; $released_info_time = true; } if ($sp_mins) { $released_info_txt .= ' ' . $sp_mins . ' ' . _JLMS_RELEASED_IN_MINUTES; $released_info_time = true; } if ($released_info_time) { $released_info_txt .= ' ' . _JLMS_RELEASED_AFTER_ENROLLMENT; } echo "<tr><td class='small' style='{$border};'>" . $released_info_txt . "</td></tr>"; } echo "<tr><td width='100%' align='left' style='{$border};'>"; echo $agenda[$i]->items[$j]->content; echo "</td></tr>"; //redaktirovanie zapisei dlia teachera kotorii ego sozdal ili super admina if ($JLMS_ACL->CheckPermissions('announce', 'manage')) { echo "<tr>\n\t\t\t\t\t\t\t<td align='right' style='{$border} text-align:right' >\n\t\t\t\t\t\t\t\t<a href='" . sefRelToabs("index.php?option={$option}&Itemid={$Itemid}&task=agenda&mode=edit&id={$id}&agenda_id=" . $agenda[$i]->items[$j]->agenda_id) . "' ><img src=\"" . $JLMS_CONFIG->get('live_site') . "/components/com_joomla_lms/lms_images/toolbar/btn_edit.png\" alt='" . _JLMS_EDIT . "' title='" . _JLMS_EDIT . "' align='top' border='0' width='16' height='16' class='JLMS_png' /></a>\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t<a href='" . sefRelToabs("index.php?option={$option}&Itemid={$Itemid}&task=agenda&mode=delete&id={$id}&agenda_id=" . $agenda[$i]->items[$j]->agenda_id) . "' ><img src=\"" . $JLMS_CONFIG->get('live_site') . "/components/com_joomla_lms/lms_images/toolbar/btn_delete.png\" alt='" . _JLMS_DELETE . "' title='" . _JLMS_DELETE . "' align='top' border='0' width='16' height='16' class='JLMS_png' /></a> \n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>"; } } if (count($agenda[$i]->items)) { echo "</table>"; } echo "</td></tr>"; } if (!empty($agenda)) { echo "</table>"; } //zakrivaem <table> po okonchaniu mesiaca //echo "</td></tr>"; ?> <?php if (isset($new_exp) && $new_exp) { ?> <script language="javascript" type="text/javascript"> <!-- var test = 'month_num<?php echo $new_exp; ?> '; //--> </script> <?php } ?> <!--tr> <td--> <div class="joomlalms_info_legend"> * - <?php echo _JLMS_AGENDA_CLICK_MONTH_TITLE; ?> <br /><br /> <b><?php echo _JLMS_AGENDA_COMMENT; ?> </b><br /><br /> <img src="<?php echo $JLMS_CONFIG->get('live_site'); ?> /components/com_joomla_lms/lms_images/agenda/ag_last.png" align="top" alt='<?php echo _JLMS_AGENDATB_THELAST; ?> ' title='<?php echo _JLMS_AGENDATB_THELAST; ?> ' border='0' width='16' height='16' class='JLMS_png' /> - <?php echo _JLMS_AGENDA_DESC_LAST; ?> <br /> <img src="<?php echo $JLMS_CONFIG->get('live_site'); ?> /components/com_joomla_lms/lms_images/agenda/ag_today.png" align="top" alt='<?php echo _JLMS_AGENDA_TODAY; ?> ' title='<?php echo _JLMS_AGENDA_TODAY; ?> ' border='0' width='16' height='16' class='JLMS_png' /> - <?php echo _JLMS_AGENDA_DESC_TOD; ?> <br /> <img src="<?php echo $JLMS_CONFIG->get('live_site'); ?> /components/com_joomla_lms/lms_images/agenda/ag_upcoming.png" align="top" alt='<?php echo _JLMS_AGENDA_UPCOMING; ?> ' title='<?php echo _JLMS_AGENDA_UPCOMING; ?> ' border='0' width='16' height='16' class='JLMS_png' /> - <?php echo _JLMS_AGENDA_DESC_UPC; ?> </div> <!--/td> </tr> </table--> <?php }
function showMainPage_front($option, &$lists, &$my_courses, &$my_dropbox, &$my_homework, &$my_announcements, &$my_mailbox, &$my_certificates, &$latest_forum_posts) { global $Itemid, $JLMS_CONFIG; $JLMS_ACL =& JLMSFactory::getACL(); ?> <table width="100%" cellpadding="0" cellspacing="3" border="0" id="jlms_mainarea" style="border-collapse: separate"> <?php if ($JLMS_CONFIG->get('lofe_show_top', true)) { ?> <tr> <td colspan="2" align="right"><?php JLMS_showTopMenu_simple($option); ?> </td> </tr> <?php } ?> <tr> <td colspan="2" align="left"> <?php echo JLMS_ShowText_WithFeatures($lists['homepage_text']); ?> <br /><br /> </td> </tr> <?php global $JLMS_DB, $my; if (class_exists('Jfactory')) { $user = JLMSFactory::getUser(); $my->id = $user->id; } $is_ceo = $JLMS_ACL->isStaff(); $JLMS_ACL =& JLMSFactory::getACL(); if ($JLMS_CONFIG->get('show_statistics_reports')) { if ($JLMS_ACL->isTeacher()) { // user is a teacher - he can see reports module } else { if ($is_ceo) { $JLMS_CONFIG->set('show_statistics_reports', true); } else { $JLMS_CONFIG->set('show_statistics_reports', false); } } } $on_modules = false; if ($JLMS_CONFIG->get('frontpage_announcements') || $JLMS_CONFIG->get('frontpage_dropbox') || $JLMS_CONFIG->get('frontpage_homework') || $JLMS_CONFIG->get('frontpage_mailbox') || $JLMS_CONFIG->get('frontpage_certificates') || $JLMS_CONFIG->get('plugin_forum') || $JLMS_CONFIG->get('show_statistics_reports') || $JLMS_CONFIG->get('frontpage_notices_teacher')) { $on_modules = true; } $td_width = "100%"; $colspan = ' colspan="2"'; if ($on_modules) { $td_width = "50%"; $colspan = ''; } ?> <tr> <td width="<?php echo $td_width; ?> " valign="top"<?php echo $colspan; ?> > <?php if ($JLMS_CONFIG->get('frontpage_courses_tree', 1) && $JLMS_CONFIG->get('frontpage_courses')) { joomla_lms_html::echoMyCourses_tree($option, $Itemid, $my_courses, $lists); } elseif ($JLMS_CONFIG->get('frontpage_courses')) { joomla_lms_html::echoMyCourses($option, $Itemid, $my_courses); } else { echo ' '; } echo '<br />'; if ($JLMS_CONFIG->get('frontpage_allcourses', 1)) { ?> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php echo JLMSCSS::_('jlmslist', 'jlms_homepage_list'); ?> "> <tr><<?php echo JLMSCSS::tableheadertag(); ?> class="<?php echo JLMSCSS::_('sectiontableheader'); ?> " align="center"><?php echo _JLMS_HOME_COURSES_LIST; ?> </<?php echo JLMSCSS::tableheadertag(); ?> ></tr> <tr class='<?php echo JLMSCSS::_('sectiontableentry1'); ?> '><td><a href="<?php echo sefRelToabs("index.php?option=" . $option . "&Itemid=" . $Itemid . "&task=courses"); ?> " title="<?php echo _JLMS_HOME_COURSES_LIST_HREF; ?> "><?php echo _JLMS_HOME_COURSES_LIST_HREF; ?> </a></td></tr> </table> <?php } ?> </td> <?php if ($on_modules) { ?> <td width="50%" valign="top"> <?php if ($JLMS_CONFIG->get('frontpage_announcements')) { joomla_lms_html::echoMyAgenda($option, $Itemid, $my_announcements); echo '<br />'; } if ($JLMS_CONFIG->get('frontpage_dropbox')) { joomla_lms_html::echoMyDropBox($option, $Itemid, $my_dropbox, $lists); echo '<br />'; } if ($JLMS_CONFIG->get('frontpage_homework')) { joomla_lms_html::echoMyHomeWork($option, $Itemid, $my_homework); echo '<br />'; } if ($JLMS_CONFIG->get('frontpage_mailbox')) { joomla_lms_html::echoMyMailBox($option, $Itemid, $my_mailbox, $lists); echo '<br />'; } if ($JLMS_CONFIG->get('frontpage_certificates')) { joomla_lms_html::echoMyCertificates($option, $Itemid, $my_certificates, $lists); echo '<br />'; } if ($JLMS_CONFIG->get('plugin_forum') && $JLMS_CONFIG->get('frontpage_latest_forum_posts')) { joomla_lms_html::echoLatestForumPosts($option, $Itemid, $latest_forum_posts, $lists); echo '<br />'; } if ($JLMS_CONFIG->get('show_statistics_reports')) { joomla_lms_html::echoMyReports($option, $Itemid); echo '<br />'; } if ($JLMS_CONFIG->get('frontpage_notices_teacher')) { joomla_lms_html::echoMyNotices($option, $Itemid, $lists['my_notices']); } ?> </td> <?php } ?> </tr> </table> <?php }