예제 #1
0
    			<div class="panel panel-default">
    				<div class="panel-heading text-center">Checkout Details</div>
    				<div class="panel-body text-center">
    					<p>
    					<?php 
printf("<strong>Checkout ID:</strong> %s<br /><br />", $checkout->getID());
printf("<strong>Description:</strong> %s<br /><br />", $checkout->getDescription());
if (!empty($checkout->getDRNumber())) {
    echo "<strong>DR:</strong> " . $checkout->getDRNumber() . "<br /><br />";
}
if (!empty($checkout->getLocation())) {
    echo "<strong>Location:</strong> " . $checkout->getLocation() . "<br /><br />";
}
$personName = getPersonName($checkout->getPerson());
printf("<strong>Person:</strong> %s<br /><br />", $personName);
$co_start = new DateTime($checkout->getStart());
$co_end = new DateTime($checkout->getEnd());
printf("<strong>Start Time:</strong> %s<br /><br />", $co_start->format('m-d-y g:iA'));
printf("<strong>End Time:</strong> %s<br /><br />", $co_end->format('m-d-y g:iA'));
if ($checkout->getReturned()) {
    $retDate = new DateTime($checkout->getReturned());
    echo "<strong>Returned:</strong> " . $retDate->format('m-d-y g:iA') . "<br /><br />";
}
if ($loggedInUser->checkPermission(array(2)) || $loggedInUser->user_id == $checkout->getPerson()) {
    echo "<form id='retForm' role='form' action='" . htmlspecialchars($_SERVER["PHP_SELF"]) . "' method='POST'>";
    echo "<input type='hidden' name='co_id' value='" . $co_id . "' />";
    echo "<input id='now' type='hidden' name='dateTime' />";
    //fill with JS on button click
    echo "</form>";
    echo "<a class='btn btn-success' href='edit-checkout.php?co_id=" . $co_id . "'>Edit</a> &nbsp;&nbsp;";
    echo "<a class='btn btn-danger' href='checkout.php?co_id=" . $co_id . "&delete=true'>Delete</a>";
예제 #2
0
     }
 } else {
     $location = $co->getLocation();
 }
 if ($co->getDRNumber() != $dr_number) {
     //DR change
     if ($validDR) {
         $co->setDRNumber($dr_number);
         $successes[] = "DR Number updated successfully";
     } else {
         $dr_number = $co->getDRNumber();
     }
 } else {
     $dr_number = $co->getDRNumber();
 }
 if (!empty($co_start) && $co->getStart() != $co_start) {
     //start change
     if ($validDates) {
         $co->setStart($co_start);
         $successes[] = "Start time/date updated successfully";
     } else {
         $co_start = $co->getStart();
     }
 } else {
     $co_start = $co->getStart();
 }
 if (!empty($co_end) && $co->getEnd() != $co_end) {
     // end change
     if ($validDates) {
         $co->setEnd($co_end);
         $successes[] = "End time/date updated successfully";