<td><strong>' . JText::_('GURU_DAYS_NAME') . '</strong></td> <td><strong>' . JText::_('GURU_PROGRAM_DETAILS_POINTS') . '</strong></td> <td><strong>' . JText::_('GURU_PROGRAM_DETAILS_TIME_MINUTES') . '</strong></td> <td><strong>' . JText::_('GURU_PROGRAM_DETAILS_STATUS') . '</strong></td> </tr>' . $row_tasks . '<tr bgcolor="#ffffff" valign="top"> <td></td> <td></td> <td></td> <td>' . $total_points . '</td> <td>' . $total_time . '</td> <td></td> </tr> </table>'; $daylayout = str_replace('{tasks}', $layouttasks, $daylayout); // now parsing the DAY variables - begin $returned = guruModelguruDays::parse_day_finnish_content($day->id); $returned = explode('$$$$$', $returned); $tasks_to_parse = $returned[0]; $time_to_parse = $returned[1]; $points_to_parse = $returned[2]; $day_to_parse = JText::_('GURU_TASKS_DAY') . ' ' . $day->ordering; $name_to_parse = $my->name; $daylayout = str_replace('{day}', $day_to_parse, $daylayout); $daylayout = str_replace('{tasks_list}', $tasks_to_parse, $daylayout); $daylayout = str_replace('{points}', $points_to_parse, $daylayout); $daylayout = str_replace('{time}', $time_to_parse, $daylayout); $daylayout = str_replace('{name}', $name_to_parse, $daylayout); //$parsed_page_content = str_replace('{last_name}', $name_to_parse, $parsed_page_content); echo $daylayout; ?> <link rel="stylesheet" href="/ijoomlatrainer/components/com_guru/css/trainer_style.css" type="text/css" />
function find_link_text_for_day_resume_button($day_array, $task_array, $status) { //$day_array = $status_line->days; $day_array = explode(';', $day_array); $how_many_days = count($day_array) - 1; $day_id_to_get_started_array = explode(',', $day_array[0]); //$task_array = $status_line->tasks; $task_array = explode(';', $task_array); $task_id_array = explode('-', $task_array[0]); $task_id_to_get_started_array = explode(',', $task_id_array[0]); // we find the id for the first day who isn't completed if ($status == '1') { $first_day_uncompleted = guruModelguruDays::find_id_for_first_uncompleted_day($day_array); $first_day_uncompleted = explode(',', $first_day_uncompleted); $id_for_first_day_uncompleted = $first_day_uncompleted[0]; $ordering_for_first_day_uncompleted = $first_day_uncompleted[1]; $first_task_uncompleted = guruModelguruDays::find_id_for_first_uncompleted_task(explode('-', $task_array[$ordering_for_first_day_uncompleted - 1])); $first_task_uncompleted = explode(',', $first_task_uncompleted); $id_for_first_task_uncompleted = $first_task_uncompleted[0]; $ordering_for_first_task_uncompleted = $first_task_uncompleted[1]; } if ($status == '0' && isset($task_id_to_get_started_array[0]) && $task_id_to_get_started_array[0] > 0 && isset($day_id_to_get_started_array[0]) && $day_id_to_get_started_array[0] > 0) { $link_for_resume = 'index.php?option=com_guru&view=guruTasks&task=view&cid=1&pid=' . $day_id_to_get_started_array[0]; $text_for_resume = JText::_('GURU_MYPROGRAMS_ACTION_GETSTARTED'); } if ($status == '1' && isset($id_for_first_task_uncompleted) && $id_for_first_task_uncompleted > 0 && isset($id_for_first_day_uncompleted) && $id_for_first_day_uncompleted > 0) { $link_for_resume = 'index.php?option=com_guru&view=guruTasks&task=view&cid=' . $ordering_for_first_task_uncompleted . '&pid=' . $id_for_first_day_uncompleted; $text_for_resume = JText::_('GURU_DAYS_RESUME_BUTTON'); } if ($status == '2' && isset($task_id_to_get_started_array[0]) && $task_id_to_get_started_array[0] > 0 && isset($day_id_to_get_started_array[0]) && $day_id_to_get_started_array[0] > 0) { $link_for_resume = 'index.php?option=com_guru&view=guruTasks&task=view&cid=1&pid=' . $day_id_to_get_started_array[0] . '&s=0'; $text_for_resume = JText::_('GURU_MYPROGRAMS_ACTION_STARTAGAIN'); } if ($status == '-1') { $the_day_id = $day_id_to_get_started_array[0]; $db = JFactory::getDBO(); $sql = "SELECT pid FROM #__guru_days \r\n\t\t\t\tWHERE id = " . $the_day_id; $db->setQuery($sql); $result = $db->loadResult(); $link_for_resume = 'index.php?option=com_guru&view=guruProfile&task=buy&cid=' . $result; $text_for_resume = JText::_('GURU_MYPROGRAMS_ACTION_BUYAGAIN'); } return $link_for_resume . '$$$$$' . $text_for_resume; }
<?php /*------------------------------------------------------------------------ # com_guru # ------------------------------------------------------------------------ # author iJoomla # copyright Copyright (C) 2013 ijoomla.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.ijoomla.com # Technical Support: Forum - http://www.ijoomla.com.com/forum/index/ -------------------------------------------------------------------------*/ defined('_JEXEC') or die('Restricted access'); $configs = guruModelguruDays::getConfigs(); $the_media = guruModelguruDays::getMedia(intval($_GET['cid'])); $the_media->code = stripslashes($the_media->code); //// ------- previewing - begin ///// $no_plugin_for_code = 0; $aheight = 0; $awidth = 0; $vheight = 0; $vwidth = 0; //if($main_media->type=='video') if ($the_media->type == 'video') { if ($the_media->source == 'url' || $the_media->source == 'local') { if ($the_media->width == 0 || $the_media->height == 0) { $vheight = 300; $vwidth = 400; } else { $vheight = $the_media->height; $vwidth = $the_media->width; }