????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.222.48.95 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/sales/ |
Upload File : |
<!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=windows-1252" /> <title>ASTACUS SALES</title> <link href="table.css" rel="stylesheet" type="text/css"> <style type="text/css"> .rubrik { font-family: Verdana, Geneva, sans-serif; text-align: left; } .text { font-family: Verdana, Geneva, sans-serif; } .text { font-size: 14px; } #form1 { } .bold { font-weight: bold; } .bold { font-family: Verdana, Geneva, sans-serif; } .bold { font-size: 14px; } </style> <script> function MM_openBrWindow2(theURL,winName) { //v2.0 window.open(theURL,winName,'status=yes, resizable=yes','width='+screen.width,'height='+screen.height); } function MM_openBrWindow2(theURL,winName,extra) { //v2.0 window.open(theURL,winName,extra); } </script> </head> <?php $y = "20".date("y"); $d = date("W"); $d = $d + $_GET['week']; function getStartAndEndDate($week, $year) { $dto = new DateTime(); $dto->setISODate($year, $week); $ret['week_start'] = $dto->format('Y-m-d'); $dto->modify('+6 days'); $ret['week_end'] = $dto->format('Y-m-d'); return $ret; } $week_array = getStartAndEndDate($d,$y); ?> <body> <h1 class="rubrik">Astacus Registration Statistics <br /> <span class="rubrik"><br /> <a href="?week=<?php echo($_GET['week']-1);?>"><< Previous week </a> This week (<?php echo($y."-".$d);?>) <a href="?week=<?php echo($_GET['week']+1);?>">Next week >></a></span> <br /> <br /> </h1> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-mc-light-blue"> <tr class="bold"> <td width="302">Project</td> <td width="285">Status</td> <td width="165">Scans</td> <td width="176">Subs</td> <td width="215">Slams</td> <td width="103">Uploaded</td> <td width="24"> </td> </tr> </table> <?php session_start(); $link = mysql_connect ("localhost", "root", "root123"); mysql_select_db ("vpa"); $sql = "SELECT sum(ScanStatistics.Scans) as Scans, sum(ScanStatistics.Subs) as Subs, sum(ScanStatistics.Slams) as Slams, Project.Name as Name, Company.CompanyId as CompanyId, Project.ProjectId as ProjectId, ProjectStatus.ProjectStatusDisplayValue as ProjectStatusDisplayValue, Project.NbrScans as NbrScans FROM Project, ScanStatistics, Company, ProjectStatus where ProjectStatus.ProjectStatusId = Project.ProjectStatusId and ScanStatistics.ProjectId = Project.ProjectId and Company.CompanyId = Project.CompanyId and ScanStatistics.Datum >= '".$week_array["week_start"] ."' and ScanStatistics.Datum <= '".$week_array["week_end"] ."' group by ScanStatistics.ProjectId"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ //$Output +=$row["Output"]; $Total1 +=$row["Scans"]; $Total2 +=$row["Subs"]; $Total3 +=$row["Slams"]; ?> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-mc-light-blue"> <tr class="text"> <td width="306"><?php echo($row["CompanyId"]);?>_<?php echo($row["Name"]);?> (<?php echo($row["ProjectId"]);?>)</td> <td width="283"><?php echo($row["ProjectStatusDisplayValue"]);?></td> <td width="163"><?php echo($row["Scans"]);?></td> <td width="175"><?php echo($row["Subs"]);?></td> <td width="227"><?php echo($row["Slams"]);?></td> <td width="97"><?php echo($row["NbrScans"]);?></td> <td width="19"> </td> </tr> </table> <?php $X++; }?> <br /> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-mc-light-blue"> <tr class="text"> <td width="571"></td> <td width="171"><?php echo($Total1);?></td> <td width="172"><?php echo($Total2);?></td> <td width="231"><?php echo($Total3);?></td> <td width="125"> </td> </tr> </table> <p> <?php $sql = " SELECT (sum(Scans)+sum(Subs)+sum(Slams)) as Scans FROM ScanStatistics where Datum LIKE '".$week_array["week_start"] ."%' "; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $Day1 = $row['Scans']; } $sql = " SELECT (sum(Scans)+sum(Subs)+sum(Slams)) as Scans FROM ScanStatistics where Datum LIKE '".date('Y-m-d', strtotime('+1 day', strtotime($week_array["week_start"]))) ."%' "; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $Day2 = $row['Scans']; } $sql = " SELECT (sum(Scans)+sum(Subs)+sum(Slams)) as Scans FROM ScanStatistics where Datum LIKE '".date('Y-m-d', strtotime('+2 day', strtotime($week_array["week_start"]))) ."%' "; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $Day3 = $row['Scans']; } $sql = " SELECT (sum(Scans)+sum(Subs)+sum(Slams)) as Scans FROM ScanStatistics where Datum LIKE '".date('Y-m-d', strtotime('+3 day', strtotime($week_array["week_start"]))) ."%' "; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $Day4 = $row['Scans']; } $sql = " SELECT (sum(Scans)+sum(Subs)+sum(Slams)) as Scans FROM ScanStatistics where Datum LIKE '".date('Y-m-d', strtotime('+4 day', strtotime($week_array["week_start"]))) ."%' "; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $Day5 = $row['Scans']; } $sql = " SELECT (sum(Scans)+sum(Subs)+sum(Slams)) as Scans FROM ScanStatistics where Datum LIKE '".date('Y-m-d', strtotime('+5 day', strtotime($week_array["week_start"]))) ."%' "; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $Day6 = $row['Scans']; } $sql = " SELECT (sum(Scans)+sum(Subs)+sum(Slams)) as Scans FROM ScanStatistics where Datum LIKE '".date('Y-m-d', strtotime('+6 day', strtotime($week_array["week_start"]))) ."%' "; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $Day7 = $row['Scans']; } ?> </p> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-mc-light-blue"> <tr class="bold"> <td width="14%">Monday</td> <td width="14%">Tuseday</td> <td width="14%">Wednesday</td> <td width="14%">Thursday</td> <td width="14%">Friday</td> <td width="14%">Saturday</td> <td width="14%">Sunday</td> </tr> <tr class="bold"> <td> <?php echo($Day1); if(date("N") == 1) { $sql = " SELECT * FROM KeyStatValues where Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $X = 1; } if($X == 0){ $sql = "INSERT INTO KeyStatValues VALUES(null,'RegistartionOutput', '".date("Y-m-d")."','".$Day1."')"; }else{ $sql = "UPDATE KeyStatValues SET Value = '".$Day1."' WHERE Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; } mysql_query($sql); } ?></td> <td width="14%"><?php echo($Day2); if(date("N") == 2) { $sql = " SELECT * FROM KeyStatValues where Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $X = 1; } if($X == 0){ $sql = "INSERT INTO KeyStatValues VALUES(null,'RegistartionOutput', '".date("Y-m-d")."','".$Day2."')"; }else{ $sql = "UPDATE KeyStatValues SET Value = '".$Day2."' WHERE Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; } mysql_query($sql); } ?></td> <td width="14%"><?php echo($Day3); if(date("N") == 3) { $sql = " SELECT * FROM KeyStatValues where Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $X = 1; } if($X == 0){ $sql = "INSERT INTO KeyStatValues VALUES(null,'RegistartionOutput', '".date("Y-m-d")."','".$Day3."')"; }else{ $sql = "UPDATE KeyStatValues SET Value = '".$Day3."' WHERE Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; } mysql_query($sql); }?></td> <td width="14%"><?php echo($Day4); if(date("N") == 4) { $sql = " SELECT * FROM KeyStatValues where Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $X = 1; } if($X == 0){ $sql = "INSERT INTO KeyStatValues VALUES(null,'RegistartionOutput', '".date("Y-m-d")."','".$Day4."')"; }else{ $sql = "UPDATE KeyStatValues SET Value = '".$Day4."' WHERE Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; } mysql_query($sql); }?></td> <td width="14%"><?php echo($Day5); if(date("N") == 5) { $sql = " SELECT * FROM KeyStatValues where Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $X = 1; } if($X == 0){ $sql = "INSERT INTO KeyStatValues VALUES(null,'RegistartionOutput', '".date("Y-m-d")."','".$Day5."')"; }else{ $sql = "UPDATE KeyStatValues SET Value = '".$Day5."' WHERE Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; } mysql_query($sql); }?></td> <td width="14%"><?php echo($Day6); if(date("N") == 6) { $sql = " SELECT * FROM KeyStatValues where Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $X = 1; } if($X == 0){ $sql = "INSERT INTO KeyStatValues VALUES(null,'RegistartionOutput', '".date("Y-m-d")."','".$Day6."')"; }else{ $sql = "UPDATE KeyStatValues SET Value = '".$Day6."' WHERE Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; } mysql_query($sql); }?></td> <td width="14%"><?php echo($Day7); if(date("N") == 7) { $sql = " SELECT * FROM KeyStatValues where Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $X = 1; } if($X == 0){ $sql = "INSERT INTO KeyStatValues VALUES(null,'RegistartionOutput', '".date("Y-m-d")."','".$Day7."')"; }else{ $sql = "UPDATE KeyStatValues SET Value = '".$Day7."' WHERE Datestamp = '".date("Y-m-d")."' and StatType = 'RegistartionOutput'"; } mysql_query($sql); }?></td> </tr> </table> <h1 class="rubrik"> <br /> </h1> <p><h1 class="rubrik">Missing Scans</h1> <h1 class="rubrik"> <?php $sql = "SELECT Project.Name as Name, Company.CompanyId as CompanyId, Project.ProjectId as ProjectId, ProjectStatus.ProjectStatusDisplayValue as ProjectStatusDisplayValue FROM Project, Company, ProjectStatus where ProjectStatus.ProjectStatusId = Project.ProjectStatusId and Company.CompanyId = Project.CompanyId and Project.ProjectStatusId = 30 group by Project.ProjectId"; $X = 0; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $sql = " SELECT sum(Scans) as Scans FROM ScanStatistics where ProjectId = ".$row["ProjectId"]; $X = 0; $result2 = mysql_query($sql); while ($row2 = mysql_fetch_assoc($result2)){ $Scansisar = $row2['Scans']; } if($Scansisar == "") { //$Output +=$row["Output"]; $Total +=$row["Scans"]; ?> </h1> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-mc-light-blue" <?php if($Scansisar == ""){echo("bgcolor='#FF0004'");}?> > <tr class="text"> <td width="504" <?php if($Scansisar == ""){echo("bgcolor='#FF0004'");}?>><?php echo($row["CompanyId"]);?>_<?php echo($row["Name"]);?> (<?php echo($row["ProjectId"]);?>) </td> <td width="334" <?php if($Scansisar == ""){echo("bgcolor='#FF0004'");}?>><?php echo($row["ProjectStatusDisplayValue"]);?></td> <td width="181" <?php if($Scansisar == ""){echo("bgcolor='#FF0004'");}?>><?php echo($row["Scans"]);?></td> <td width="218" <?php if($Scansisar == ""){echo("bgcolor='#FF0004'");}?>> </td> <td width="132" <?php if($Scansisar == ""){echo("bgcolor='#FF0004'");}?>> </td> </tr> </table> <h1 class="rubrik"> <?php $X++; } }?> <br /> </h1> <h1 class="rubrik"><br /> </h1> <p> </p> </body> </html>