Changeset 18882
- Timestamp:
- 06/17/17 17:45:15 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/dch/shifteval.php
r18207 r18882 8 8 <?php 9 9 10 echo (file_get_contents("../shifteval/header.html"));10 //echo (file_get_contents("../shifteval/header.html")); 11 11 12 12 if (!empty($_GET["startdate"])) … … 113 113 while ($rowshifters = mysql_fetch_row($resultshifters)) 114 114 { 115 if(!isset($shifthours[$rowshifters[0]])) 116 $shifthours[$rowshifters[0]]=0; 117 if(!isset($totalhours[$rowshifters[0]])) 118 $totalhours[$rowshifters[0]]=0; 119 if (!isset($affiliation[$rowshifters[0]])) 120 { 121 $affiliation[$rowshifters[0]] = $rowshifters[0]; 122 $institutes2[$rowshifters[0]] = 0; 123 $institutenames[$rowshifters[0]] = $rowshifters[0]; 124 $institutetotalhours[$rowshifters[0]] = 0; 125 $instituteshifthours[$rowshifters[0]] = 0; 126 } 127 115 128 $shifthours[$rowshifters[0]]+=$numhours/mysql_num_rows($resultshifters); 116 129 $totalhours[$rowshifters[0]]+=$numhours/mysql_num_rows($resultshifters); … … 125 138 while ($rowdebug = mysql_fetch_row($resultdebug)) 126 139 { 140 if(!isset($debughours[$rowdebug[0]])) 141 $debughours[$rowdebug[0]]=0; 142 if(!isset($totalhours[$rowdebug[0]])) 143 $totalhours[$rowdebug[0]]=0; 144 127 145 $debughours[$rowdebug[0]]+=$numhours*0.5; 128 146 $totalhours[$rowdebug[0]]+=$numhours*0.5; … … 149 167 while ($rowexperts = mysql_fetch_row($resultexperts)) 150 168 { 169 if (!isset($experthours[$rowexperts[0]])) 170 $experthours[$rowexperts[0]]=0; 171 151 172 $experthours[$rowexperts[0]]+=$numhours/mysql_num_rows($resultexperts)/$devide; 152 173 $totalhours[$rowexperts[0]]+=$numhours/mysql_num_rows($resultexperts)/$devide; … … 174 195 //if (!$institutetotalhours[$id]) 175 196 // continue; 197 198 if ($institutes2[$id]==0) 199 continue; 200 176 201 echo "<tr><td>"; 177 202 echo $name;//."(".$id.")"; … … 188 213 foreach ($users as $name=>$id) 189 214 { 190 if (! $totalhours[$id])215 if (!isset($totalhours[$id]) || !$totalhours[$id]) 191 216 continue; 217 218 if(!isset($totalhours[$id])) 219 $totalhours[$id]=0; 220 if(!isset($debughours[$id])) 221 $debughours[$id]=0; 222 if(!isset($experthours[$id])) 223 $experthours[$id]=0; 224 192 225 echo "<tr><td>"; 193 226 echo $name;//." (".$id.")";
Note:
See TracChangeset
for help on using the changeset viewer.