Exemple #1
0
        ?>
</td>
											<td><?php 
        echo $request[10];
        ?>
</td>
											
											
											<td align="center"><button href="#" class="btn btn-sm btn-success" onclick="bidData(<?php 
        echo $request[0];
        ?>
)" <?php 
        echo enableBid($driver_id, $request[1]);
        ?>
 data-toggle="modal" data-target="#basicModal2"> <?php 
        echo getBid($driver_id, $request[1]);
        ?>
</button></td>
											<td><a href="#" class="btn btn-sm btn-success" onclick="sendData(<?php 
        echo $request[3];
        ?>
,<?php 
        echo $request[2];
        ?>
,<?php 
        echo $request[5];
        ?>
,<?php 
        echo $request[4];
        ?>
);setTimeout(initialize, 500);" data-toggle="modal" data-target="#basicModal">Map</a></td>
function listPendingHours($data)
{
    global $hourSize;
    global $area;
    global $netID;
    //This will need to be changed so we can allow trades to be taken as someone other than the logged in individual
    $time = date('H:i:s', strtotime($data['startTime']));
    $returnMe = "";
    //Get hour color for the trade
    $color = getHourColor($data['hourType']);
    while ($time != $data['endTime']) {
        $printTime = date('g:i A', strtotime($time));
        $returnMe .= "<tr><td style='background-color:" . $color . ";' >" . $printTime . "</td>";
        if (bidforHour($time, $data['ID'])) {
            //This checks if there is actually a bid for this hour
            $bid = getBid($time, $data['ID']);
            //If so, get that bid from the DB
            $totalHours = weeklyHourTotal($bid['employee'], $data['startDate']);
            //Check the total hours of the employee for the given week
            $returnMe .= "<td style='text-align: center; background-color:#FFFFFF'><a target=_blank href='../newSchedule/index.php?employee=" . $bid['employee'] . "' >" . nameByNetID($bid['employee']) . "</a>";
            $returnMe .= " (" . $totalHours . "+" . computeTotalHoursAddedByTrade($bid['employee'], $data['ID']) . ")";
            $returnMe .= "</td><td style='background-color:#FFFFFF'>";
            $returnMe .= "<input type='button' id='remove' name='remove' value='Remove Person' onclick='deleteBid(\"" . $bid['employee'] . "_" . $bid['tradeID'] . "_" . $bid['hour'] . "\")'/>";
            $returnMe .= "</td></tr>";
        } else {
            //This prints a blank row so the person approving can see that the hours are continuous
            $returnMe .= "<td style='text-align: center'>Up for Grabs</td><td style='text-align: center'>-</td></tr>";
        }
        //update Hour for next pass through
        $timestamp = strtotime($time) + 60 * (60 * $hourSize);
        $time = date('H:i:s', $timestamp);
    }
    return $returnMe;
}