Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.85 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5. <meta charset="UTF-8">
  6. <title>Brisk</title>
  7.  
  8. <link href='http://fonts.googleapis.com/css?family=Oswald:300,400,400italic,700,700italic' rel='stylesheet' type='text/css' />
  9. <link href='{{asset("css/style.css")}}' rel='stylesheet' type='text/css' />
  10. <link href='{{asset("css/demo_table.css")}}' rel='stylesheet' type='text/css' />
  11.  
  12. <script type="text/javascript" language="javascript" src='{{asset("js/jquery.js")}}'></script>
  13. <script type="text/javascript" language="javascript" src='{{asset("js/jquery.dataTables.js")}}'></script>
  14. <script type="text/javascript" charset="utf-8" language="javascript" scr='{{asset("js/pointer_events.js")}}'>
  15. </script>
  16. </head>
  17.  
  18. <body>
  19. <header id="main-header">
  20. <img class="logo" src='{{asset("images/logo.png")}}' />
  21. </header>
  22. <div id="page">
  23. <h3>summary</h3>
  24. <h1>all projects: summary</h1>
  25. <section id="main-section">
  26.  
  27. <footer>
  28. showing data for: last
  29. <?=$interval?><br />
  30. <?=date('d.m.Y', strtotime('-1'.$interval))?> to
  31. <?=date('d.m.Y')?>
  32. </footer>
  33.  
  34. <form method="get">
  35. <select name="interval">
  36. <option value="day" <?=$interval == 'day' ? 'selected' : ''?>>Last day</option>
  37. <option value="week" <?=$interval == 'week' ? 'selected' : ''?>>Last week</option>
  38. <option value="month" <?=$interval == 'month' ? 'selected' : ''?>>Last month</option>
  39. </select>
  40. </form>
  41.  
  42. <table id="dashboard-table" class="dashboard-table">
  43. <thead>
  44. <tr>
  45. <th>#</th>
  46. <th>project ID</th>
  47. @foreach ($fields as $field)
  48. <th>
  49. {{$field}}
  50. </th>
  51. @endforeach
  52. </tr>
  53. </thead>
  54. <tbody>
  55. <?php
  56. foreach($instances as $i => $instance){
  57. if(!isset($instance_stats[$instance['ID']])){
  58. continue;
  59. }
  60. ?>
  61. <tr class='line'>
  62. <td class="id">
  63. <?=($instance['ID'])?>
  64. </td>
  65. <td class="title">
  66. <?=($instance['Domain'])?>
  67. </td>
  68. <?php
  69. if(!isset($instance_stats[$instance['ID']])){
  70. echo '<td class="stat" colspan="'.count($fields).'">-</td>';
  71. }else{
  72. $instance_data = (array) $instance_stats[$instance['ID']];
  73. foreach($fields as $f => $field){
  74. $total = (int) $instance_data[$field];
  75. $position = (int) $instance_data[$field.'_position'];
  76. $lastperiod = (int) $instance_data[$field.'_before'];
  77. $homologue = (int) $instance_data[$field.'_lastyear'];
  78. $best_ever = (int) $instance_data[$field.'_rank'];
  79. $best_year = (int) $instance_data[$field.'_rankyear'];
  80.  
  81. if($homologue != '-'){
  82. $homologue .= '%';
  83. }
  84. if($lastperiod != '-'){
  85. $lastperiod .= '%';
  86. }
  87.  
  88. $lastperiod_class = $total_class = $homologue_class = '';
  89. if($total > 10){
  90. if($lastperiod > 20){
  91. $lastperiod_class = 'green';
  92. }
  93. if($lastperiod < -20){
  94. $lastperiod_class = 'red';
  95. }
  96. if($homologue > 20){
  97. $homologue_class = 'green';
  98. }
  99. if($homologue < -20){
  100. $homologue_class = 'red';
  101. }
  102.  
  103. if($lastperiod > 50){
  104. $total_class = 'green';
  105. }elseif($lastperiod < -50){
  106. $total_class = 'red';
  107. }elseif($homologue > 50){
  108. $total_class = 'green';
  109. }elseif($homologue < -50){
  110. $total_class = 'red';
  111. }
  112. }
  113.  
  114. echo '<td class="stat stat-'.$field.'" data-col="stat-'.$field.'">';
  115. echo '<span title="'.$position.'">';
  116. echo '<div class="wrapper">';
  117. echo '<span class="total '.$total_class.'">'.$total.'</span>';
  118. echo '<span class="lastperiod '.$lastperiod_class.'">'.$lastperiod.'</span>';
  119. echo '<span class="homologue '.$homologue_class.'">'.$homologue.'</span>';
  120. echo '<span class="pos">'.($position).'</span>';
  121. if($total > 10){
  122. if($best_ever && $best_ever && $best_ever <= 5) {
  123. echo '<span class="best-ever">'.($best_ever ? $best_ever : '').'</span>';
  124. }
  125. if($best_year != $best_ever && $best_year && $best_year <= 3) {
  126. echo '<span class="best-year">'.($best_year ? $best_year : '').'</span>';
  127. }
  128. }
  129. echo '</div>';
  130. echo '</span>';
  131. echo '</td>';
  132. }
  133. }
  134.  
  135. echo '</tr>';
  136.  
  137.  
  138. }?>
  139. </tbody>
  140. </table>
  141.  
  142. </section>
  143. </div>
  144. </body>
  145.  
  146. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement