Ignore:
Timestamp:
06/17/17 17:45:15 (7 years ago)
Author:
Daniela Dorner
Message:
adapted to stricter server
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/dch/shifteval.php

    r18207 r18882  
    88<?php
    99
    10     echo (file_get_contents("../shifteval/header.html"));
     10    //echo (file_get_contents("../shifteval/header.html"));
    1111
    1212    if (!empty($_GET["startdate"]))
     
    113113        while ($rowshifters = mysql_fetch_row($resultshifters))
    114114        {
     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
    115128            $shifthours[$rowshifters[0]]+=$numhours/mysql_num_rows($resultshifters);
    116129            $totalhours[$rowshifters[0]]+=$numhours/mysql_num_rows($resultshifters);
     
    125138        while ($rowdebug = mysql_fetch_row($resultdebug))
    126139        {
     140            if(!isset($debughours[$rowdebug[0]]))
     141               $debughours[$rowdebug[0]]=0;
     142            if(!isset($totalhours[$rowdebug[0]]))
     143               $totalhours[$rowdebug[0]]=0;
     144
    127145            $debughours[$rowdebug[0]]+=$numhours*0.5;
    128146            $totalhours[$rowdebug[0]]+=$numhours*0.5;
     
    149167        while ($rowexperts = mysql_fetch_row($resultexperts))
    150168        {
     169            if (!isset($experthours[$rowexperts[0]]))
     170                $experthours[$rowexperts[0]]=0;
     171
    151172            $experthours[$rowexperts[0]]+=$numhours/mysql_num_rows($resultexperts)/$devide;
    152173            $totalhours[$rowexperts[0]]+=$numhours/mysql_num_rows($resultexperts)/$devide;
     
    174195        //if (!$institutetotalhours[$id])
    175196        //    continue;
     197
     198        if ($institutes2[$id]==0)
     199           continue;
     200
    176201        echo "<tr><td>";
    177202        echo $name;//."(".$id.")";
     
    188213    foreach ($users as $name=>$id)
    189214    {
    190         if (!$totalhours[$id])
     215        if (!isset($totalhours[$id]) || !$totalhours[$id])
    191216            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
    192225        echo "<tr><td>";
    193226        echo $name;//." (".$id.")";
Note: See TracChangeset for help on using the changeset viewer.