function showCEO_page($option, &$lists, &$rows) { global $Itemid, $JLMS_CONFIG; ?> <table width="100%" cellpadding="0" cellspacing="3" border="0" class="jlms_table_no_borders"> <tr> <td align="right"><?php JLMS_showTopMenu_simple($option); ?> </td> </tr> <tr> <td> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php echo JLMSCSS::_('jlmslist'); ?> "> <tr> <<?php echo JLMSCSS::tableheadertag(); ?> class="<?php echo JLMSCSS::_('sectiontableheader'); ?> " width="16"> </<?php echo JLMSCSS::tableheadertag(); ?> > <<?php echo JLMSCSS::tableheadertag(); ?> class="<?php echo JLMSCSS::_('sectiontableheader'); ?> " width="16"> </<?php echo JLMSCSS::tableheadertag(); ?> > <<?php echo JLMSCSS::tableheadertag(); ?> class="<?php echo JLMSCSS::_('sectiontableheader'); ?> "><?php echo _JLMS_CEO_PAGE_LEARNER_COURSE_TITLE; ?> </<?php echo JLMSCSS::tableheadertag(); ?> > </tr> <?php $user_id = 0; $is_open = false; $i = 0; $k = 1; foreach ($rows as $row) { if ($row->user_id != $user_id) { echo '<tr class="' . $JLMS_CONFIG->get('visual_set_main_row_class', 'sectiotableentry' . $k) . '"><td colspan="3">' . $row->username . ', ' . $row->name . ' (' . $row->email . ')' . "</td></tr>\n"; $k = 3 - $k; $user_id = $row->user_id; } if ($row->course_id) { $sub_index = 2; if (isset($rows[$i + 1]) && $rows[$i + 1]->user_id == $row->user_id) { $sub_index = 1; } $completion_image = 'spacer'; if (isset($row->course_completion)) { if ($row->course_completion == 1) { $completion_image = 'toolbar/btn_accept'; } elseif ($row->course_completion == 2) { $completion_image = 'toolbar/btn_certificate'; } } echo '<tr class="' . $JLMS_CONFIG->get('visual_set_child_row_class', 'sectiotableentry' . $k) . '">'; echo '<td><img src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/treeview/sub' . $sub_index . '.png" width="16" height="16" border="0" alt="sub" /></td>'; echo '<td><img src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/' . $completion_image . '.png" width="16" height="16" border="0" alt="sub" /></td>'; echo '<td><a href="' . sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}&task=enter_ceo&course_id={$row->course_id}") . '">' . $row->course_name . '</a></td></tr>'; $k = 3 - $k; } $i++; } ?> </table> </td> </tr> </table> <?php }
function ShowHeader($head_pic, $head_title = '', $params = array(), $toolbar = array(), $gqp = false) { global $JLMS_CONFIG, $JLMS_SESSION, $option; // set default parameters values $with_sys_msg = true; $sys_msg = ''; $simple_menu = false; $show_menu = true; $toolbar_s = ''; $toolbar_pos = ''; $add_html_code = ''; $output_blank_sys_msg_container = true; //$JLMS_CONFIG->set('start_menu_new', true); $second_tb_header = ''; $add_html_tb_code = ''; $course_id = $JLMS_CONFIG->get('course_id'); // redefine parameters from $params variable. if (isset($params['with_sys_msg'])) { $with_sys_msg = $params['with_sys_msg']; } if (isset($params['sys_msg'])) { $sys_msg = $params['sys_msg']; } if (isset($params['toolbar_position'])) { $toolbar_pos = $params['toolbar_position']; } if (isset($params['show_menu'])) { $show_menu = $params['show_menu']; } if (isset($params['simple_menu'])) { $simple_menu = $params['simple_menu']; } if (isset($params['second_tb_header'])) { $second_tb_header = $params['second_tb_header']; } if (isset($params['toolbar'])) { $toolbar_s = $params['toolbar']; } if (isset($params['add_html_code'])) { $add_html_code = $params['add_html_code']; } if (isset($params['html_code_before_toolbar'])) { $add_html_tb_code = $params['html_code_before_toolbar']; } if (isset($params['output_blank_sys_msg_container'])) { $output_blank_sys_msg_container = $params['output_blank_sys_msg_container']; } if ($show_menu) { if (!$JLMS_CONFIG->get('lofe_show_top', true) && !$JLMS_CONFIG->get('lofe_show_course_box', true)) { $show_menu = 0; $simple_menu = 0; } } $skin = 'nopro'; //'standart'; //$skin = 'pro'; if ($simple_menu) { if (!$JLMS_CONFIG->get('lofe_show_top', true)) { $simple_menu = 0; $show_menu = 0; } } $is_nopro_toolbar_shown = false; if ($skin == 'pro') { /*if ($show_menu) { JLMS_TMPL::OpenTS('', ' width="100%"'); JLMS_showTopMenu( $course_id, $option ); JLMS_TMPL::CloseTS(); }*/ JLMS_TMPL::OpenTS('', ' width="100%"'); echo ' <table id="jlms_header_table" width="100%" cellpadding="0" cellspacing="0" border="0">' . "\r\n" . ' <tr>' . "\r\n" . ' <td width="48" valign="top" style="vertical-align:top">' . "\r\n" . JLMS_showHeadPicture($head_pic) . "\r\n" . ' </td>' . "\r\n"; if ($show_menu) { if ($simple_menu) { echo ' <td class="contentheading" width="100%" valign="middle" style="vertical-align:middle">' . "\r\n" . ' ' . ($head_title ? $JLMS_CONFIG->get('additional_heading_tag_open') . $head_title . $JLMS_CONFIG->get('additional_heading_tag_close') : '') . "\r\n" . ' </td>' . "\r\n"; $menus = $JLMS_CONFIG->get('jlms_menu'); echo ' <td align="right"' . ($add_html_code ? ' colspan="2"' : '') . ' valign="top"' . ($simple_menu ? ' nowrap="nowrap"' : '') . ' style="vertical-align:top ">' . "\r\n"; //JLMS_showTopMenu_simple($option); JLMS_TMPL::showTopMenu_simple($menus, $option, $skin); } else { echo ' <td align="right"' . ($add_html_code ? ' colspan="2"' : '') . ' valign="top"' . ($simple_menu ? ' nowrap="nowrap"' : '') . ' style="vertical-align:top ">' . "\r\n"; $menus = $JLMS_CONFIG->get('jlms_menu'); JLMS_TMPL::showTopMenu($menus, $course_id, $option, $skin); /*echo '<div style="width:100%; text-alignment: center;" class="jlms_controls_footer">'; JLMS_TMPL::showMenuToolTips(); echo '</div>';*/ } echo ' </td>' . "\r\n"; if (!$simple_menu) { echo '</tr><tr><td colspan="2" width="100%"><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>'; if (empty($toolbar)) { echo ' <td class="contentheading" width="100%" valign="middle" style="vertical-align:middle">' . "\r\n" . ' ' . ($head_title ? $JLMS_CONFIG->get('additional_heading_tag_open') . $head_title . $JLMS_CONFIG->get('additional_heading_tag_close') : '') . "\r\n" . ' </td>' . "\r\n"; } else { echo '<td> </td>'; } } if ($add_html_code) { echo ' <td align="right">' . "\r\n"; echo $add_html_code; echo ' </td>' . "\r\n"; } if (!$simple_menu) { if ($JLMS_CONFIG->get('lofe_show_course_box', true)) { echo '<td nowrap="nowrap" valign="top" align="right" style="vertical-align:top; text-align:right">'; if (false) { JLMS_TMPL::ShowSelectCourseSB($course_id); } else { JLMS_TMPL::ShowSelectCourseSB_form($course_id); } echo '</td>'; } } } else { $at_first_row = true; echo ' <td class="contentheading" width="100%" valign="middle" style="vertical-align:middle">' . "\r\n" . ' ' . ($head_title ? $JLMS_CONFIG->get('additional_heading_tag_open') . $head_title . $JLMS_CONFIG->get('additional_heading_tag_close') : '') . "\r\n" . ' </td>' . "\r\n"; if ($toolbar_s) { echo ' <td align="right"' . ($add_html_code ? ' colspan="2"' : '') . '>' . "\r\n"; echo JLMS_ShowToolbar($toolbar_s); echo ' </td>' . "\r\n"; } } if (!$simple_menu && $show_menu) { echo ' </tr></table></td></tr>' . "\r\n"; } else { echo ' </tr>' . "\r\n"; } echo ' </table>' . "\r\n"; } else { JLMS_TMPL::OpenTS('', ' width="100%"'); echo ' <table id="jlms_header_table" width="100%" cellpadding="0" cellspacing="0" border="0">' . "\r\n" . ' <tr>' . "\r\n" . ' <td width="48">' . "\r\n" . JLMS_showHeadPicture($head_pic) . "\r\n" . ' </td>' . "\r\n" . ' <td class="contentheading" width="100%" valign="middle" style="vertical-align:middle">' . "\r\n" . ' ' . ($head_title ? $JLMS_CONFIG->get('additional_heading_tag_open') . $head_title . $JLMS_CONFIG->get('additional_heading_tag_close') : '') . "\r\n" . ' </td>' . "\r\n"; if ($add_html_code) { echo ' <td align="right">' . "\r\n"; echo $add_html_code; echo ' </td>' . "\r\n"; } if ($show_menu) { echo ' <td align="right" valign="top"' . ($simple_menu ? ' nowrap="nowrap"' : '') . ' style="vertical-align:top ">' . "\r\n"; if ($simple_menu) { JLMS_showTopMenu_simple($option); } else { JLMS_showTopMenu($course_id, $option, false, '', '', $gqp); } echo ' </td>' . "\r\n"; } elseif ($toolbar_s) { echo ' <td align="right">' . "\r\n"; echo JLMS_ShowToolbar($toolbar_s); echo ' </td>' . "\r\n"; } elseif (!empty($toolbar) && $toolbar_pos != 'center') { echo ' <td align="right" nowrap="nowrap">' . "\r\n"; echo JLMS_ShowToolbar($toolbar); echo ' </td>' . "\r\n"; $is_nopro_toolbar_shown = true; /*JLMS_TMPL::ShowToolbar($toolbar, ($toolbar_pos?$toolbar_pos:'right'), true, $second_tb_header, 2 ); $is_nopro_toolbar_shown = true;*/ } echo ' </tr>' . "\r\n" . ' </table>' . "\r\n"; } if (!$simple_menu) { if ($show_menu) { JLMS_TMPL::ShowPlugins('star_menu'); } } JLMS_TMPL::CloseTS(); if ($with_sys_msg) { if (!$sys_msg) { $sys_msg = $JLMS_SESSION->get('joomlalms_sys_message'); } $JLMS_SESSION->clear('joomlalms_sys_message'); $tr_attrib = ' id="joomlalms_sys_message_container"'; if (!$sys_msg) { $tr_attrib .= ' style="visibility:hidden;display:none"'; } if ($sys_msg || $output_blank_sys_msg_container) { JLMS_TMPL::OpenTS($tr_attrib); echo ' <div class="' . $JLMS_CONFIG->get('system_message_css_class', 'joomlalms_sys_message') . '" id="joomlalms_sys_message" style="text-align:center">' . $sys_msg . '</div>' . "\r\n"; JLMS_TMPL::CloseTS(); } $task = strval(mosGetParam($_REQUEST, 'task', '')); if ($task) { $sys_msgs = $JLMS_CONFIG->get('system_messages', array()); if (!empty($sys_msgs)) { foreach ($sys_msgs as $sysmsg) { if (isset($sysmsg['message']) && $sysmsg['message'] && isset($sysmsg['task']) && $sysmsg['task'] == $task && (isset($sysmsg['course']) && $sysmsg['course'] == $JLMS_CONFIG->get('course_id') || empty($sysmsg['course']))) { JLMS_TMPL::OpenTS(); echo ' <div class="' . $JLMS_CONFIG->get('system_message_css_class', 'joomlalms_sys_message') . '"' . (isset($sysmsg['align']) && $sysmsg['align'] ? ' style="text-align:' . $sysmsg['align'] . '"' : '') . '>' . $sysmsg['message'] . '</div>' . "\r\n"; JLMS_TMPL::CloseTS(); } } /*$sysmsg_var = $task; if (isset($sys_msgs[$sysmsg_var]) && $sys_msgs[$sysmsg_var]) { JLMS_TMPL::OpenTS(); echo ' <span class="'.$JLMS_CONFIG->get('system_message_css_class', 'joomlalms_sys_message').'">'.$sys_msgs[$sysmsg_var].'</span>'."\r\n"; JLMS_TMPL::CloseTS(); }*/ } } } if ($add_html_tb_code) { JLMS_TMPL::OpenTS(); echo $add_html_tb_code; JLMS_TMPL::CloseTS(); } if (!empty($toolbar) && !$is_nopro_toolbar_shown) { if ($skin == 'pro') { $second_tb_header = $head_title ? $head_title : $second_tb_header; } JLMS_TMPL::ShowToolbar($toolbar, $toolbar_pos ? $toolbar_pos : 'right', true, $second_tb_header, 2); } }