Пример #1
0
    <div class="container">
        <div class="row">
            <div class="col-sm-8 col-sm-offset-2">
            <?php 
echo "<a href='inventory.php'><span class='glyphicon glyphicon-chevron-left'></span>&nbsp;&nbsp;Back to Inventory</a>";
?>
            <br /><br />
                <div class="panel panel-default">
                    <div class="panel-heading text-center">Gear Details</div>
                    <div class="panel-body text-center">
                        <p>
                        <?php 
echo "<strong>Gear ID:</strong> " . $gear_id . "<br /><br />";
echo "<strong>Name:</strong> " . $gearObject->getName() . "<br /><br />";
echo "<strong>Type:</strong> " . gearTypeWithID($gearObject->getType()) . "<br /><br />";
echo "<strong>Quantity:</strong> " . $gearObject->getQty() . "<br /><br />";
if (!$gearObject->isDisabled()) {
    echo "<strong>Enabled </strong><span class='glyphicon glyphicon-ok color-green'></span><br /><br />";
    echo "<strong>Status:</strong> " . $gearObject->status(date('Y-m-d h:m:s')) . "<br /><br />";
} else {
    echo "<strong>Disabled </strong><span class='glyphicon glyphicon-remove color-red'></span><br /><br />";
}
if (!empty($gearObject->getNotes())) {
    echo "<strong>Notes:</strong> <pre>" . $gearObject->getNotes() . "</pre><br />";
}
//only show to admins
if ($loggedInUser->checkPermission(array(2))) {
    echo "<a class='btn btn-primary' href='edit-gear.php?gear_id=" . $gear_id . "'>Edit</a> &nbsp;&nbsp;";
    echo "<a class='btn btn-danger' href='gear-item.php?gear_id=" . $gear_id . "&deleteGearItem=" . $gear_id . "'>Delete</a>";
}
Пример #2
0
 if ($i % 2 == 0) {
     //start row
     echo "<div class='row'>";
     echo "<div class='col-sm-4 col-sm-offset-2'>";
 } else {
     echo "<div class='col-sm-4'>";
 }
 echo "<div class='panel panel-default'>";
 echo "<div class='panel-heading text-center'>" . $gearType . "</div>";
 echo "<div class='panel-body text-center'>";
 echo "<p>";
 foreach ($gearList as $gear) {
     $gearObject = new Gear();
     $gearObject->fetch($gear[0]);
     $qty = $gear[1];
     $type = gearTypeWithID($gearObject->getType());
     //gearTypeWithID(getGearType($gear[0]));
     if ($type == $gearType) {
         if ($qty > 1) {
             echo $gearObject->getName() . " ({$qty})<br />";
         } else {
             echo $gearObject->getName() . "<br />";
         }
     }
 }
 echo "</p>";
 echo "</div></div></div>";
 //panel-body //panel //col
 //if second col on row or last col, end the row
 if ($i % 2 == 1 || $i == count($gearTypes) - 1) {
     echo "</div>";
Пример #3
0
    foreach ($gearTypes as $gearType) {
        if ($i % 2 == 0) {
            //start row
            echo "<div class='row'>";
            echo "<div class='col-sm-4 col-sm-offset-2'>";
        } else {
            echo "<div class='col-sm-4'>";
        }
        echo "<div class='panel panel-default'>";
        echo "<div class='panel-heading text-center'>" . $gearType . "</div>";
        echo "<div class='panel-body text-center'>";
        echo "<p>";
        foreach ($gearList as $gear) {
            $gearObject = new Gear();
            $gearObject->fetch($gear);
            if (gearTypeWithID($gearObject->getType()) == $gearType) {
                echo $gearObject->getName() . "<br />";
            }
        }
        echo "</p>";
        echo "</div></div></div>";
        //panel-body //panel //col
        //if second col on row or last col, end the row
        if ($i % 2 == 1 || $i == count($gearTypes) - 1) {
            echo "</div>";
            //end row
        }
        $i++;
    }
}
?>