} else {
    echo "No recent transactions";
}
?>
</table>


<h4>Previous Invoices</h4>
<table>
<?php 
if ($invoices) {
    foreach ($invoices as $invoice) {
        ?>
<tr>
        <td class="date"><?php 
        echo Date_Difference::getString(new DateTime(date("m/d/Y H:i:s", $invoice->date)));
        ?>
</td>
        <td class="status">&nbsp;</td>
        <td class="amount"><?php 
        echo format_money($invoice->total_in_cents);
        ?>
</td>
        <td class="invoice"><a href="<?php 
        echo g_url('billing/account/getinvoice/' . $invoice->account_code . '/' . $invoice->id);
        ?>
"><?php 
        echo $invoice->invoice_number == "" ? "Not yet invoiced" : $invoice->invoice_number;
        ?>
</a></td>
      </tr>
Пример #2
0
  <table width="100%">
    <?php 
foreach ($issues as $issue) {
    ?>
      <tr>
        <td class="issue_type"><?php 
    echo $issue->type;
    ?>
</td>
        <td class="user_name"><?php 
    echo $issue->user_name;
    ?>
</td>
        <td class="message"><?php 
    echo $issue->message;
    ?>
</td>
        <td class="date"><?php 
    echo Date_Difference::getString(new DateTime($issue->date));
    ?>
</td>
      </tr>
    <?php 
}
?>
  </table>
  <p class="see-all"><b><?php 
echo g_anchor("/admin/issuesmanagement/index", "See All");
?>
</b></p>
Пример #3
0
 function getFormattedDate($strdate, $format = 'd m Y')
 {
     jimport('joomla.utilities.date');
     $user =& JFactory::getUser();
     if ($user->get('id')) {
         $tz = $user->getParam('timezone');
     } else {
         $conf =& JFactory::getConfig();
         $tz = $conf->getValue('config.offset');
     }
     // Given time
     $jdate = new JDate($strdate);
     $jdate->setOffset($tz);
     $date = $jdate->toISO8601();
     return Date_Difference::getStringResolved($date);
 }
  <h2>Check-Ins for <?php 
echo $user->first_name . " " . $user->last_name;
?>
</span></h2>
  <table width="100%">
      <tr>
        <th class="date">Date</th>
        <th class="name">Name</th>
        <th class="description">Location</th>
      </tr>
    <?php 
foreach ($checkIns as $checkIn) {
    ?>
      <tr>
        <td class="date"><?php 
    echo Date_Difference::getString(new DateTime($checkin->sign_in));
    ?>
</td>
        <td class="name"><?php 
    echo g_anchor("/admin/usermanagement/user/" . $checkIn->id, $checkIn->last_name . ", " . $checkIn->first_name);
    if ($checkIn->company != "") {
        echo ", <span class=\"company\">" . $checkIn->company . "</span>";
    }
    ?>
</td>
        <td class="location"><?php 
    echo $checkIn->location_name;
    ?>
</td>
      </tr>
    <?php