"courseLog.php", "name" => get_lang('ToolName'), ); $nameTools = get_lang('TrafficDetails'); $htmlHeadXtra[] = " "; //@todo use Database library $TABLETRACK_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS); Display::display_header($nameTools, "Tracking"); // the variables for the days and the months // Defining the shorts for the days $DaysShort = api_get_week_days_short(); // Defining the days of the week to allow translation of the days $DaysLong = api_get_week_days_long(); // Defining the months of the year to allow translation of the months $MonthsLong = api_get_months_long(); $is_allowedToTrack = $is_courseAdmin; ?>
"; switch($period) { case "year" : echo date(" Y", $reqdate); break; case "month" : echo $MonthsLong[date("n", $reqdate)-1].date(" Y", $reqdate); break; // default == day default : $period = "day"; case "day" : echo $DaysLong[date("w" , $reqdate)].date(" d " , $reqdate).$MonthsLong[date("n", $reqdate)-1].date(" Y" , $reqdate); break; } echo " |
"; echo " ".get_lang('PeriodToDisplay')." : [".get_lang('PeriodYear')."] [".get_lang('PeriodMonth')."] [".get_lang('PeriodDay')."] || ".get_lang('DetailView')." : "; switch($period) { case "year" : //-- if period is "year" display can be by month, day or hour echo " [".get_lang('PeriodMonth')."]"; case "month" : //-- if period is "month" display can be by day or hour echo " [".get_lang('PeriodDay')."]"; case "day" : //-- if period is "day" display can only be by hour echo " [".get_lang('PeriodHour')."]"; break; } echo " || "; switch ($period) { case "year" : // previous and next date must be evaluated // 30 days should be a good approximation $previousReqDate = mktime(1,1,1,1,1,date("Y",$reqdate)-1); $nextReqDate = mktime(1,1,1,1,1,date("Y",$reqdate)+1); echo " [".get_lang('PreviousYear')."] [".get_lang('NextYear')."] "; break; case "month" : // previous and next date must be evaluated // 30 days should be a good approximation $previousReqDate = mktime(1,1,1,date("m",$reqdate)-1,1,date("Y",$reqdate)); $nextReqDate = mktime(1,1,1,date("m",$reqdate)+1,1,date("Y",$reqdate)); echo " [".get_lang('PreviousMonth')."] [".get_lang('NextMonth')."] "; break; case "day" : // previous and next date must be evaluated $previousReqDate = $reqdate - 86400; $nextReqDate = $reqdate + 86400; echo " [".get_lang('PreviousDay')."] [".get_lang('NextDay')."] "; break; } echo " |