当前位置: 首页>>代码示例>>PHP>>正文


PHP Checkout::getEnd方法代码示例

本文整理汇总了PHP中Checkout::getEnd方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::getEnd方法的具体用法?PHP Checkout::getEnd怎么用?PHP Checkout::getEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Checkout的用法示例。


在下文中一共展示了Checkout::getEnd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getPersonName

    				<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>";
}
开发者ID:JakeDawkins,项目名称:Checkout,代码行数:31,代码来源:checkout.php

示例2:

         }
     } 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";
         } else {
             $co_end = $co->getEnd();
         }
     } else {
         $co_end = $co->getEnd();
     }
 } else {
     if ($step == 2) {
         //need to process gear list
         //collect vars from step 1
         $co_id = test_input($_POST['co_id']);
开发者ID:JakeDawkins,项目名称:Checkout,代码行数:31,代码来源:edit-checkout.php


注:本文中的Checkout::getEnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。