|
@@ -5,12 +5,13 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php echo $this->spanDays ?>
|
|
<?php echo $this->spanDays ?>
|
|
- <div class="row full">
|
|
|
|
|
|
+ <div class="row">
|
|
<div class="small-12 columns full">
|
|
<div class="small-12 columns full">
|
|
<style>
|
|
<style>
|
|
table {
|
|
table {
|
|
border:1px solid #ccc;
|
|
border:1px solid #ccc;
|
|
}
|
|
}
|
|
|
|
+
|
|
th {
|
|
th {
|
|
border:1px solid #ccc;
|
|
border:1px solid #ccc;
|
|
padding:0px;
|
|
padding:0px;
|
|
@@ -24,71 +25,73 @@
|
|
margin:0px;
|
|
margin:0px;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .scroll {
|
|
|
|
+ overflow-x:scroll;
|
|
|
|
+ overflow-y:visible;
|
|
|
|
+ }
|
|
|
|
+
|
|
</style>
|
|
</style>
|
|
- <table>
|
|
|
|
- <thead>
|
|
|
|
- <tr>
|
|
|
|
- <th style="width:150px;"></th>
|
|
|
|
- <?php
|
|
|
|
|
|
+ <div class="scroll">
|
|
|
|
+ <table>
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th style="width:150px;"></th>
|
|
|
|
+ <?php
|
|
|
|
|
|
- $date3 = new DateTime();
|
|
|
|
- $date3->setDate($this->year,$this->previousMonth,26);
|
|
|
|
- for($i=1;$i<=$this->span;$i++)
|
|
|
|
- {
|
|
|
|
- if($date3->format('d') >= 26)
|
|
|
|
- {
|
|
|
|
- echo "<th style='background-color:#fff;border-bottom:1px solid #ccc; '>".$date3->format('D')."<br>".$date3->format('n')."/".$date3->format('j')."</th>";
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
|
|
+ $date = new DateTime();
|
|
|
|
+ $date->setDate($this->year,$this->previousMonth,26);
|
|
|
|
+
|
|
|
|
+ for($i=1;$i<=$this->span;$i++)
|
|
{
|
|
{
|
|
- echo "<th style='border-bottom:1px solid #ccc;'>".$date3->format('D')."<br>".$date3->format('n')."/".$date3->format('j')."</th>";
|
|
|
|
|
|
+ if($date->format('d') >= 26)
|
|
|
|
+ {
|
|
|
|
+ echo "<th style='background-color:#fff;border-bottom:1px solid #ccc; '>".$date->format('D')."<br>".$date->format('n')."/".$date->format('j')."</th>";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ echo "<th style='border-bottom:1px solid #ccc;'>".$date->format('D')."<br>".$date->format('n')."/".$date->format('j')."</th>";
|
|
|
|
+ }
|
|
|
|
+ $date->modify('+1 day');
|
|
}
|
|
}
|
|
- $date3->modify('+1 day');
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
- </tr>
|
|
|
|
- </thead>
|
|
|
|
- <tbody>
|
|
|
|
- <?php
|
|
|
|
-
|
|
|
|
- foreach($this->report as $user=>$dates)
|
|
|
|
- {
|
|
|
|
- $totalTime = array_sum($dates);
|
|
|
|
- echo "<tr>";
|
|
|
|
- echo "<td style='border-bottom:1px solid #ccc;'><b>$user</b><br>Total: $totalTime</td>";
|
|
|
|
|
|
+ ?>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ <?php
|
|
|
|
|
|
- $date = new DateTime();
|
|
|
|
- $date->setDate($this->year,$this->previousMonth,26);
|
|
|
|
- for($j=1;$j<=$this->span;$j++)
|
|
|
|
|
|
+ foreach($this->report as $user=>$dates)
|
|
{
|
|
{
|
|
- foreach ($dates as $entryDate => $total)
|
|
|
|
|
|
+ $totalTime = array_sum($dates);
|
|
|
|
+ echo "<tr>";
|
|
|
|
+ echo "<td style='border-bottom:1px solid #ccc;'><b>$user</b><br>Total: $totalTime</td>";
|
|
|
|
+
|
|
|
|
+ $date = new DateTime();
|
|
|
|
+ $date->setDate($this->year,$this->previousMonth,26);
|
|
|
|
+ for($j=1;$j<=$this->span;$j++)
|
|
{
|
|
{
|
|
- $newDate = explode("-", $entryDate);
|
|
|
|
- $dayOfMonth = $newDate[2];
|
|
|
|
- if($dayOfMonth == $date->format('d'))
|
|
|
|
|
|
+ echo "<td class='text-center' style='border-bottom:1px solid #ccc;'>";
|
|
|
|
+ $value = "-";
|
|
|
|
+ foreach ($dates as $entryDate => $total)
|
|
{
|
|
{
|
|
- echo "<td class='text-center' style='border-bottom:1px solid #ccc;'>$total</td>";
|
|
|
|
- $j++;
|
|
|
|
|
|
+ $newDate = explode("-", $entryDate);
|
|
|
|
+ $dayOfMonth = $newDate[2];
|
|
|
|
+
|
|
|
|
+ if($dayOfMonth == $date->format('d'))
|
|
|
|
+ {
|
|
|
|
+ $value = $total;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ echo $value;
|
|
|
|
+ echo "</td>";
|
|
|
|
+
|
|
|
|
+ $date->modify('+1 day');
|
|
}
|
|
}
|
|
- echo "<td class='text-center'>-</td>";
|
|
|
|
- $date->modify('+1 day');
|
|
|
|
|
|
+ echo "</tr>";
|
|
}
|
|
}
|
|
- echo "</tr>";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- ?>
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
|
|
+ ?>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
-</div>
|
|
|
|
-<pre>
|
|
|
|
-
|
|
|
|
- <?php
|
|
|
|
- print_r($this->report);
|
|
|
|
- ?>
|
|
|
|
-
|
|
|
|
-</pre>
|
|
|
|
|
|
+</div>
|