Пример #1
0
                        print " <img src='" . $this->request->getThemeUrlPath() . "/graphics/icons/envelope.gif' border='0'>";
                    }
                    print "<br/>";
                }
                print "</div>";
                print "</div>";
            } else {
                print caNavLink($this->request, _t("Lightbox"), "", "", "Sets", "Index");
                if ($vb_client_services && is_array($va_message_set_ids) && sizeof($va_message_set_ids)) {
                    print " <img src='" . $this->request->getThemeUrlPath() . "/graphics/icons/envelope.gif' border='0'>";
                }
            }
        }
        if ($vb_client_services && (bool) $o_client_services_config->get('enable_my_account')) {
            $t_order = new ca_commerce_orders();
            if ($vn_num_open_orders = sizeof($va_orders = $t_order->getOrders(array('user_id' => $this->request->getUserID(), 'order_status' => array('OPEN', 'SUBMITTED', 'IN_PROCESSING', 'REOPENED'))))) {
                print "<span style='color: #cc0000; font-weight: bold;'>" . caNavLink($this->request, _t("My Account (%1)", $vn_num_open_orders), "", "", "Account", "Index") . "</span>";
            } else {
                print caNavLink($this->request, _t("My Account"), "", "", "Account", "Index");
            }
        }
        if ($this->request->config->get('enable_bookmarks')) {
            print caNavLink($this->request, _t("My Bookmarks"), "", "", "Bookmarks", "Index");
        }
        print caNavLink($this->request, _t("Logout"), "", "", "LoginReg", "logout");
    } else {
        print caNavLink($this->request, _t("Login/Register"), "", "", "LoginReg", "form");
    }
}
# Locale selection
global $g_ui_locale;
Пример #2
0
 /**
  *
  */
 public function isOnLoan()
 {
     if (!$this->getPrimaryKey()) {
         return null;
     }
     $t_order = new ca_commerce_orders();
     if (is_array($va_orders = $t_order->getOrders(array('object_id' => $this->getPrimaryKey(), 'type' => 'L'))) && sizeof($va_orders)) {
         $va_order = array_shift($va_orders);
         $t_order_item = new ca_commerce_order_items();
         if ($t_order_item->load(array('order_id' => $va_order['order_id'], 'object_id' => $this->getPrimaryKey()))) {
             if (!$t_order_item->get('loan_return_date', array('GET_DIRECT_DATE' => true))) {
                 return array('loan_checkout_date' => $t_order_item->get('loan_checkout_date'), 'loan_checkout_date_raw' => $t_order_item->get('loan_checkout_date', array('GET_DIRECT_DATE' => true)), 'loan_due_date' => $t_order_item->get('loan_due_date'), 'loan_due_date_raw' => $t_order_item->get('loan_due_date', array('GET_DIRECT_DATE' => true)), 'client' => $va_order['billing_fname'] . ' ' . $va_order['billing_lname'] . " (" . $va_order['billing_email'] . ")", 'billing_fname' => $va_order['billing_fname'], 'billing_lname' => $va_order['billing_lname'], 'billing_email' => $va_order['billing_email'], 'order_id' => $va_order['order_id']);
             }
         }
     }
     return false;
 }
 /**
  * 
  */
 public function Info($pa_options = null)
 {
     $t_order = new ca_commerce_orders();
     $this->view->setVar('order_list', $va_order_list = $t_order->getOrders($pa_options));
     return $this->render('widget_checkin_info_html.php', true);
 }
 * This program is free software; you may redistribute it and/or modify it under
 * the terms of the provided license as published by Whirl-i-Gig
 *
 * CollectiveAccess is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
 *
 * This source code is free and modifiable under the terms of 
 * GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See
 * the "license.txt" file for details, or visit the CollectiveAccess web site at
 * http://www.CollectiveAccess.org
 *
 * ----------------------------------------------------------------------
 */
?>
 	<h3><?php 
print _t('Client check-out');
?>
:
	<div><?php 
$t_order = new ca_commerce_orders();
$va_outstanding_loans = $t_order->getOrders(array('type' => 'L', 'is_outstanding' => true));
$vn_num_outstanding_loans = sizeof($va_outstanding_loans);
$va_overdue_loans = $t_order->getOrders(array('type' => 'L', 'is_overdue' => true));
$vn_num_overdue_loans = sizeof($va_overdue_loans);
print $vn_num_outstanding_loans == 1 ? _t('%1 outstanding loan', $vn_num_outstanding_loans) : _t('%1 outstanding loans', $vn_num_outstanding_loans);
print "<br/>\n";
print $vn_num_overdue_loans == 1 ? _t('%1 overdue loan', $vn_num_overdue_loans) : _t('%1 overdue loans', $vn_num_overdue_loans);
?>
</div>
	</h3>
Пример #5
0
 /**
  * 
  */
 public function Info()
 {
     $t_order = new ca_commerce_orders();
     $this->view->setVar('order_list', $va_order_list = $t_order->getOrders(array('type' => 'O')));
     return $this->render('widget_orders_info_html.php', true);
 }