????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.144.226.114 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/appsrv.astacus.se/scanreport/ |
Upload File : |
<?php session_start(); $link = mysql_connect ("localhost", "root", "root123"); mysql_select_db ("vpa"); $TimeSpent_TOT = 0; $Waittime_TOT = 0; $Overtime_TOT= 0; $Extra_TOT = 0; $AdminSpent_TOT = 0; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>TIMRAPPORT</title> </head> <body style="font-family:Arial, Helvetica, sans-serif;font-size:12px"> <center> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="13%"><a href="report.php?month=<?php echo($_GET['month']);?>"><< Tillbaka</a></td> <td width="74%" align="center"><a href="?month=<?php echo($_GET['month']-1);?>&username=<?php echo($_GET['username']);?>"><< Föregående Månad</a> Aktuell period: <?php function lastday($month = '', $year = '') { if (empty($month)) { $month = date('m'); } if (empty($year)) { $year = date('Y'); } $result = strtotime("{$year}-{$month}-01"); $result = strtotime('-1 second', strtotime('+1 month', $result)); return date('d', $result); } if($_GET['month'] == ""){ $month = 0; }else{ $month = $_GET['month']; } $start = date("Y-m",strtotime("".$month." month"))."-01"; $end = date("Y-m",strtotime("".$month." month"))."-".lastday(date("m",strtotime("".$month." month")),date("Y")); echo($start." - ".$end); ?> <a href="?month=<?php echo($_GET['month']+1);?>&username=<?php echo($_GET['username']);?>">Nästa Månad >></a></td> <td width="13%"> </td> </tr> </table> <br /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><strong>Datum</strong></td> <td><strong>ProjektID</strong></td> <td><strong>Admintid</strong></td> <td><strong>Projekttid</strong></td> <td><strong>Väntetid</strong></td> <td><strong>Övertid</strong></td> <td><strong>Resor Etc</strong></td> <td><strong>Kommentar</strong></td> <td><strong>Traktamente (Natt)</strong></td> <td><strong>Traktamente (Dag)</strong></td> </tr> <?php $sql = "SELECT * FROM `ProjectTime` where EntryDate >= '".$start." 00:00:00' and EntryDate <= '".$end." 23:59:59' and Username = '".$_GET['username']."' order by EntryDate asc"; $result = mysql_query($sql); $x = 0; $TimeSpent_X = 0; $Waittime_X = 0; $Overtime_X = 0; $Extra_X = 0; $temp = ""; while ($row = mysql_fetch_assoc($result)){ $Username = $row['Username']; $ProjectId = $row['ProjectId']; $AdminSpent = $row['AdminSpent']; $AdminSpentMIN = $row['AdminSpentMIN']; $TimeSpent = $row['TimeSpent']; $TimeSpentMIN = $row['TimeSpentMIN']; $Waittime = $row['Waittime']; $WaittimeMIN = $row['WaittimeMIN']; $Overtime = $row['Overtime']; $OvertimeMIN = $row['OvertimeMIN']; $EntryDate = $row['EntryDate']; $Comment = $row['Comment']; $Extra = $row['Extra']; $ExtraMIN = $row['ExtraMIN']; $Traktamente = $row['Traktamente']; $TraktamenteDAG = $row['TraktamenteDAG']; $AdminSpent += floor($AdminSpentMIN / 60); $AdminSpentMIN = (($AdminSpentMIN % 60)/60); $AdminSpent = $AdminSpent + $AdminSpentMIN; $TimeSpent += floor($TimeSpentMIN / 60); $TimeSpentMIN = (($TimeSpentMIN % 60)/60); $TimeSpent = $TimeSpent + $TimeSpentMIN; $Waittime += floor($WaittimeMIN / 60); $WaittimeMIN = (($WaittimeMIN % 60)/60); $Waittime = $Waittime + $WaittimeMIN; $Overtime += floor($OvertimeMIN / 60); $OvertimeMIN = (($OvertimeMIN % 60)/60); $Overtime =$Overtime + $OvertimeMIN; $Extra += floor($ExtraMIN / 60); $ExtraMIN = (($ExtraMIN % 60)/60); $Extra = $Extra + $ExtraMIN; $TimeSpent_TOT += $TimeSpent; $Waittime_TOT += $Waittime; $Overtime_TOT+= $Overtime; $Extra_TOT += $Extra; $AdminSpent_TOT += $AdminSpent; if($temp == ""){ $temp = substr($EntryDate,0,10); $TimeSpent_X = 0; $Waittime_X = 0; $Overtime_X = 0; $Extra_X = 0; $AdminSpent_X = 0; } if($temp != substr($EntryDate,0,10)){ //$x=$x-1; echo(" <tr bgcolor='#999999'><td></td>"); echo("<td></td>"); echo("<td> ".round($AdminSpent_X,2)."</td>"); echo("<td> ".round($TimeSpent_X,2)."</td>"); echo("<td>$Waittime_X</td>"); echo("<td>$Overtime_X</td>"); echo("<td>$Extra_X</td>"); echo("<td>Tot: ".round($TOT,2)."</td>"); echo("<td><br><br></td>"); echo("<td> </td>"); echo("<td> </td></tr>"); $TimeSpent_X = 0; $Waittime_X = 0; $Overtime_X = 0; $Extra_X = 0; $AdminSpent_X = 0; } $temp = substr($EntryDate,0,10); ?> <tr> <td width="10%"><?php echo($EntryDate);?></td> <td width="10%"><?php echo($ProjectId);?></td> <td width="10%"><?php echo(round($AdminSpent,2));?></td> <td width="10%"><?php echo(round($TimeSpent,2));?></td> <td width="10%"><?php echo($Waittime);?></td> <td width="10%"><?php echo($Overtime);?></td> <td width="10%"><?php echo($Extra);?></td> <td width="10%"><?php echo($Comment);?></td> <td width="10%"><?php echo($Traktamente);?></td> <td width="10%"><?php echo($TraktamenteDAG);?></td> </tr> <?php $TimeSpent_X += $TimeSpent; $Waittime_X += $Waittime; $Overtime_X += $Overtime; $Extra_X += $Extra; $AdminSpent_X += $AdminSpent; $TOT = $TimeSpent_X + $Waittime_X + $Overtime_X + $Extra_X + $AdminSpent_X; } echo(" <tr bgcolor='#999999'><td></td>"); echo("<td></td>"); echo("<td> $AdminSpent_X</td>"); echo("<td> $TimeSpent_X</td>"); echo("<td>$Waittime_X</td>"); echo("<td>$Overtime_X</td>"); echo("<td>$Extra_X</td>"); echo("<td>Tot: $TOT</td>"); echo("<td><br><br></td>"); echo("<td> </td>"); echo("<td> </td></tr>"); echo(" <tr bgcolor='#afffba'><td></td>"); echo("<td></td>"); echo("<td> $AdminSpent_TOT</td>"); echo("<td> $TimeSpent_TOT</td>"); echo("<td>$Waittime_TOT</td>"); echo("<td>$Overtime_TOT</td>"); echo("<td>$Extra_TOT</td>"); echo("<td></td>"); echo("<td><br><br></td>"); echo("<td> </td>"); echo("<td> </td></tr>"); ?> ?> </table> <p> </p> <p> </p> <p> </p> <p> </p> </center> </body> </html>