????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.190.207.156 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/icad.astacus.se/customerzon/ |
Upload File : |
<?php $projectId = $_GET['projectId']; $CompanyId = $_SESSION['ASTACUS_SSO_INFO'][4]; ?> <link href="../main.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="calendar.js"></script> <body onLoad="showClockSWE()"> <style type="text/css"> <!-- .style6 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } --> </style> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="90"> </td> <td width="820"><table width="820" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="5" valign="top"><span class="heading2">Dina uppgifter: </span><br> <table width="820" border="0" cellpadding="0" cellspacing="0"> <tr > <td width="76" class="text">Namn:</td> <td width="197" class="textthin"><?php echo($_SESSION['ASTACUS_SSO_INFO'][1]);?> (<?php echo($_SESSION['ASTACUS_SSO_INFO'][10]);?>) </td> <td class="text">Telefon:</td> <td class="textthin"><?php echo($_SESSION['ASTACUS_SSO_INFO'][6]);?></td> <td width="1" rowspan="4" bgcolor="#999999" class="textthin"></td> <td width="310" rowspan="4" valign="top" class="textthin"><table width="228" border="0" align="center" cellpadding="0" cellspacing="0"> <tr class="text"> <td width="89">Svensk tid: </td> <td width="71">Indisk tid: </td> </tr> <tr class="textthin"> <td width="89"><div id="showTextSWE"></div></td> <td> <div id="showTextIND"></div></td> </tr> </table></td> </tr> <tr > <td class="text">E-post:</td> <td class="textthin"><?php echo($_SESSION['ASTACUS_SSO_INFO'][2]);?></td> <td class="text">Adress:</td> <td class="textthin"><?php echo($_SESSION['ASTACUS_SSO_INFO'][7]);?></td> </tr> <tr > <td class="text">Postadress:</td> <td class="textthin"><?php echo($_SESSION['ASTACUS_SSO_INFO'][8]);?> <?php echo($_SESSION['ASTACUS_SSO_INFO'][9]);?></td> </tr> <tr class="text"> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> <hr width="820" size="1"> <span class="style6"><br> </span><span class="heading2">Avser perioden ( <?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); ?> ): </span><span class="text"><a href="?page=report&month=<?php echo($_GET['month']-1);?>&customerid=<?php echo($CompanyId);?>"><< Tidigare period</a> | <a href="?page=report&month=<?php echo($_GET['month']+1);?>&customerid=<?php echo($CompanyId);?>">Senare period >> </a></span><span class="style6"><br> </span> <table width="1015" border="0" cellpadding="0" cellspacing="0"> <tr class="text"> <td width="85">Projekt Id </td> <td width="253">Projektnamn</td> <td width="104">Märkning</td> <td width="75">Skapat </td> <td width="123">Skapat av </td> <td width="81">Leverans</td> <td width="97">Förbrukad tid </td> <td width="67">Extra tid</td> <td width="130">Inlagt</td> </tr> </table> <?php $link = mysql_connect ("localhost", "root", "root123"); mysql_select_db ("vpa"); $has100 = false; $sql = "SELECT * FROM ICADAccount, ICADType WHERE ICADAccount.ICADTypeID = ICADType.ICADTypeId and CustomerID = $CompanyId"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ if($row['Hours'] == 8){ // 8 = 100% $has100 = true; } } $max_time = 0; $sql = "SELECT * FROM ICADType where Type <= 3;"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $sql2 = "SELECT count(ICADTypeID) as Number, ICADTypeId, CustomerId, WorkDays, NextFlushDate FROM ICADAccount, ICADFlush where CustomerId = $CompanyId and ICADFlush.CompanyID = ICADAccount.CustomerId group by ICADTypeID "; $result2 = mysql_query($sql2); while ($row2 = mysql_fetch_assoc($result2)){ $daysleft = $row2['NextFlushDate']; if($row2['ICADTypeId'] == $row['ICADTypeId']){ if($has100 == true){ $max_time += $row['Hours']*$row2['Number']*($row2['WorkDays']); }else{ $max_time += $row['Hours']*$row2['Number']*($row2['WorkDays']*2); } } } } $sql = "SELECT * FROM ((SELECT Project.ProjectId,Name,createDate,iCADSpecialCompanyID,clientProjectManagerName,scheduledDeliveryToCustomer,sum(Hours) as Hours,sum(AdditionalHours) as AdditionalHours, ICADTime.TimeDate FROM Project, ProjectStatus, ICADTime WHERE ICADTime.ProjectId = Project.ProjectId and Project.ProjectStatusId = ProjectStatus.ProjectStatusId and Project.CompanyId = ".$CompanyId." and ICADTime.TimeDate >= '".$start." 00:00:00' and ICADTime.TimeDate <= '".$end." 23:59:59' group by ICADTime.ProjectId)) as TMP group by ProjectId"; $result = mysql_query($sql); $tot_time = 0; while ($row = mysql_fetch_assoc($result)){ $projectid = $row['ProjectId']; $name = $row['Name']; $createdate =substr($row['createDate'],0,10); $projectid = $row['ProjectId']; $clientProjectManagerName = $row['clientProjectManagerName']; $delivery = substr($row['scheduledDeliveryToCustomer'],0,10); $time = $row['Hours']; $tot_time += $time; $addtionaltime = $row['AdditionalHours']; $TimeDate = $row['TimeDate']; ?> <table width="1014" border="0" cellpadding="0" cellspacing="0"> <tr class="textthin"> <td width="85"><?php echo($projectid);?></td> <td width="253"><?php echo($name);?></td> <td width="103"><a href="?page=project&projectId=<?php echo($row['ProjectId']);?>" class="blacklinkthin"><?php echo($row['iCADSpecialCompanyID']);?></a></td> <td width="76"><?php echo($createdate);?></td> <td width="122"><?php echo($clientProjectManagerName);?></td> <td width="82"><?php echo($delivery);?></td> <td width="96"><?php $showHrs = true; if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"sydtotal") || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"dios") || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"imtech")){ if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"lan") === 0 || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"ekonomi") === 0) { $showHrs = true; }else{ $showHrs = false; } } if($showHrs){ echo($time); } ?></td> <td width="67"><?php $showHrs = true; if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"sydtotal") || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"dios") || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"imtech")){ if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"lan") === 0 || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"ekonomi") === 0) { $showHrs = true; }else{ $showHrs = false; } } if($showHrs){ echo($addtionaltime); } ?></td> <td width="130"><?php echo(substr($TimeDate,0,10));?></td> </tr> </table> <?php } ?> <span class="style6"> <?php $link = mysql_connect ("localhost", "root", "root123"); mysql_select_db ("vpa"); $CompanyId = $CompanyId; $has100 = false; $sql = "SELECT * FROM ICADAccount, ICADType WHERE ICADAccount.ICADTypeID = ICADType.ICADTypeId and CustomerID = $CompanyId"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ if($row['Hours'] == 8){ // 8 = 100% $has100 = true; } } $max_time = 0; $sql = "SELECT * FROM ICADType where Type <= 3;"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $sql2 = "SELECT count(ICADTypeID) as Number, ICADTypeId, CustomerId, WorkDays, NextFlushDate FROM ICADAccount, ICADFlush where CustomerId = $CompanyId and ICADFlush.CompanyID = ICADAccount.CustomerId group by ICADTypeID "; $result2 = mysql_query($sql2); while ($row2 = mysql_fetch_assoc($result2)){ $daysleft = $row2['NextFlushDate']; if($row2['ICADTypeId'] == $row['ICADTypeId']){ if($has100 == true){ $max_time += $row['Hours']*$row2['Number']*($row2['WorkDays']); }else{ $max_time += $row['Hours']*$row2['Number']*($row2['WorkDays']*2); } } } } $sql = "SELECT * FROM ((SELECT Project.ProjectId,Name,createDate,iCADSpecialCompanyID,clientProjectManagerName,scheduledDeliveryToCustomer,sum(Hours) as Hours,sum(AdditionalHours) as AdditionalHours, ICADTimeHistory.TimeDate FROM Project, ProjectStatus, ICADTimeHistory WHERE ICADTimeHistory.ProjectId = Project.ProjectId and Project.ProjectStatusId = ProjectStatus.ProjectStatusId and Project.CompanyId = ".$CompanyId." and ICADTimeHistory.TimeDate >= '".$start." 00:00:00' and ICADTimeHistory.TimeDate <= '".$end." 23:59:59' group by ICADTimeHistory.ProjectId)) as TMP group by ProjectId"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $projectid = $row['ProjectId']; $name = $row['Name']; $createdate =substr($row['createDate'],0,10); $projectid = $row['ProjectId']; $clientProjectManagerName = $row['clientProjectManagerName']; $delivery = substr($row['scheduledDeliveryToCustomer'],0,10); $time = $row['Hours']; $tot_time += $time; $addtionaltime = $row['AdditionalHours']; $TimeDate = $row['TimeDate']; ?> </span> <table width="1014" border="0" cellpadding="0" cellspacing="0"> <tr class="textthin"> <td width="85"><?php echo($projectid);?></td> <td width="254"><?php echo($name);?></td> <td width="101"><a href="?page=project&projectId=<?php echo($row['ProjectId']);?>" class="blacklinkthin"><?php echo($row['iCADSpecialCompanyID']);?></a></td> <td width="75"><?php echo($createdate);?></td> <td width="124"><?php echo($clientProjectManagerName);?></td> <td width="82"><?php echo($delivery);?></td> <td width="97"><?php $showHrs = true; if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"sydtotal") || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"dios")){ if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"lan") === 0) { $showHrs = true; }else{ $showHrs = false; } } if($showHrs){ echo($time); } ?></td> <td width="66"><?php $showHrs = true; if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"sydtotal") || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"dios")){ if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"lan") === 0) { $showHrs = true; }else{ $showHrs = false; } } if($showHrs){ echo($addtionaltime); } ?></td> <td width="130"><?php echo(substr($TimeDate,0,10));?></td> </tr> </table> <?php } ?> <span class="style6"> </span><span class="style6"><br> </span><span class="style6"> </span> <table width="936" border="0" cellpadding="0" cellspacing="0"> <tr class="text"> <td width="113"> </td> <td width="280"> </td> <td width="140"> </td> <td width="185"> </td> <td width="93"><?php $showHrs = true; if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"sydtotal") || strpos($_SESSION['ASTACUS_SSO_INFO'][2],"dios")){ if( strpos($_SESSION['ASTACUS_SSO_INFO'][2],"lan") === 0) { $showHrs = true; }else{ $showHrs = false; } } if($showHrs){ echo($tot_time); } ?></td> <td width="125"> <?php if ($max_time != 0){?> <?php echo($tot_time);?> av <?php echo($max_time);?>h (<?php echo(Round(100*($tot_time/$max_time)));?>%) <?php }?> </td> </tr> </table> <span class="style6"><span class="text">Kostnad SMS-notifieringar: </span> <?php $sql = "SELECT * FROM Project, ICADSMS, Company WHERE Project.ProjectId = ICADSMS.ProjectId and Company.CompanyId = Project.CompanyId and Company.CompanyId = $CompanyId and ICADSMS.TimeDate > '".$start." 00:00:00' and ICADSMS.TimeDate < '".$end." 00:00:00'"; $result = mysql_query($sql); $x = 0; while ($row = mysql_fetch_assoc($result)){ $x++; } echo($x*1.5." kr"); ?> </span><span class="style6"><br> </span> <hr width="820" size="1"> <p class="style6"> </p> <p class="style6"><span class="heading1"><a href="/customerzon/"><img src="../images/Back-Arrow.jpg" alt="" width="37" height="36" border="0" align="absmiddle"></a> <a href="/customerzon/" class="blacklinkhuge">Till startsidan</a></span> </p></td> </tr> </table> </td> <td width="90"> </td> </tr> <tr> <td colspan="3"> </td> </tr> </table>