本文整理汇总了PHP中Order::getOrderList方法的典型用法代码示例。如果您正苦于以下问题:PHP Order::getOrderList方法的具体用法?PHP Order::getOrderList怎么用?PHP Order::getOrderList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Order
的用法示例。
在下文中一共展示了Order::getOrderList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
/**
* Action для страницы "Управление заказами"
*/
public function actionIndex()
{
// Получаем список заказов
$orders = Order::getOrderList();
// Подключаем вид
require_once ROOT . '/views/admin_order/index.php';
return true;
}
示例2: run
public function run()
{
$order_model = Order::getOrderList();
$nurser = NurseUser::getNOList();
//print_r($order_model);die;
$vars = array('order_model' => $order_model);
$this->controller->render('index', $vars);
}
示例3: Paging
<?php
require_once '../common/config/config.inc.php';
require_once SOURCE_ROOT . 'classes/class.paging.php';
require_once SOURCE_ROOT . 'classes/class.sort.php';
require_once SOURCE_ROOT . 'classes/class.order.php';
// CREATING OBJECTS------------------------
$objPaging = new Paging();
$objOrder = new Order();
// GETTING PAGE RECORD LOMIT.
$varPageStart = $objPaging->getPageStartLimit($_GET['page'], ADMIN_PAGE_RECORD_SIZE);
$varLimit = $varPageStart . ',' . ADMIN_PAGE_RECORD_SIZE;
// BLANK WHERE CONDITION TO GET ALL RECORDS WITH LIMIT.
$varWhereCondition = $objOrder->getOrderSearchKeyWhere($_GET);
$arrCol = array('orders.pkOrderID', 'orders.OrderUniqueCode', 'orders.OrderFinalPrice', 'orders.OrderStatus', 'orders.OrderDateAdded', 'orders.OrderPaymentStatus');
$arrResult = $objOrder->getOrderList($_REQUEST, TABLE_ORDER, $arrCol, $varWhereCondition, $varLimit);
// GETTING ALL RECORDS WITHOUT LIMIT.
$objRecords = $objOrder->getOrderList($_REQUEST, TABLE_ORDER, $arrCol, $varWhereCondition, '');
// GETTING NUMBER OF PAGES.
if ($objRecords) {
$varNumberofRows = count($objRecords);
}
$varNumberPages = $objPaging->calculateNumberofPages($varNumberofRows, ADMIN_PAGE_RECORD_SIZE);
$_SESSION['sessOrders'] = '';
if ($_SERVER['QUERY_STRING'] != '') {
$_SESSION['sessOrders'] = basename($_SERVER['PHP_SELF']) . "?" . $_SERVER['QUERY_STRING'];
} else {
$_SESSION['sessOrders'] = basename($_SERVER['PHP_SELF']);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
示例4: header
//customer session is checked whether it is valid or not
if (!$objCustomerLogin->checkCustomerSession()) {
header('location:login.php');
die;
}
// CREATING OBJECTS------------------------
$objPaging = new Paging();
$objOrder = new Order();
// GETTING PAGE RECORD LOMIT.
$varPageStart = $objPaging->getPageStartLimit($_GET['page'], SITE_RECORD_LIMIT);
$varLimit = $varPageStart . ',' . SITE_RECORD_LIMIT;
// BLANK WHERE CONDITION TO GET ALL RECORDS WITH LIMIT.
$arrCol = array('orders.pkOrderID', 'orders.OrderUniqueCode', 'customers.CustomerEmailID', 'orders.OrderFinalPrice', 'orders.OrderStatus', 'orders.OrderDateAdded', 'orders.OrderPaymentStatus');
$varTable = TABLE_CUSTOMERS . ' INNER JOIN ' . TABLE_ORDER . ' ON ' . TABLE_CUSTOMERS . '.pkCustomerID = ' . TABLE_ORDER . '.fkUserID';
$varWhere = ' AND pkCustomerID = \'' . $_SESSION['sessCustomerID'] . '\'';
$arrResult = $objOrder->getOrderList($_GET, $varTable, $arrCol, $varWhere, $varLimit);
// GETTING ALL RECORDS WITHOUT LIMIT.
$arrRecords = $objOrder->getOrderList($_GET, $varTable, $arrCol, $varWhere, '');
// GETTING NUMBER OF PAGES.
if ($arrRecords) {
$varNumberofRows = count($arrRecords);
}
$varNumberPages = $objPaging->calculateNumberofPages($varNumberofRows, SITE_RECORD_LIMIT);
$_SESSION['sessOrders'] = '';
if ($_SERVER['QUERY_STRING'] != '') {
$_SESSION['sessOrders'] = basename($_SERVER['PHP_SELF']) . "?" . $_SERVER['QUERY_STRING'];
} else {
$_SESSION['sessOrders'] = basename($_SERVER['PHP_SELF']);
}
?>
示例5: Order
<?php
require_once '../common/config/config.inc.php';
require_once SOURCE_ROOT . 'classes/class.sort.php';
require_once SOURCE_ROOT . 'classes/class.paging.php';
require_once SOURCE_ROOT . 'classes/class.order.php';
$objOrder = new Order();
$objPaging = new Paging();
$fileName = "reports/order_report.xls";
if (isset($_REQUEST['frmSearchPressed']) && $_REQUEST['frmSearchPressed'] == 'Yes') {
$varSearchWhere = $objOrderr->getOrderSearchKeyWhere($_GET);
}
$arrOrderFlds = array('orders.pkOrderID', 'orders.OrderUniqueCode', 'orders.OrderFinalPrice', 'orders.OrderStatus', 'orders.OrderDateAdded', 'orders.OrderPaymentStatus');
$arrOrderList = $objOrder->getOrderList('', TABLE_ORDER, $arrOrderFlds, $varSearchWhere, '');
$sep = "\t";
$arr_headers = array('OrderID', 'Amount', 'Payment Status', 'Order Status', 'Added Date');
foreach ($arr_headers as $header) {
$str .= $header . $sep;
}
$str .= "\r\n";
if (is_array($arrOrderList)) {
foreach ($arrOrderList as $varKey => $varValue) {
$str .= $varValue['OrderUniqueCode'] . $sep;
$str .= $objCore->setPriceFormat($varValue['OrderFinalPrice']) . $sep;
$str .= $varValue['OrderPaymentStatus'] . $sep;
$str .= $varValue['OrderStatus'] . $sep;
$str .= $objCore->datetime_format($varValue['OrderDateAdded']) . $sep;
$str .= "\r\n";
}
$fp = fopen($fileName, "w");
fwrite($fp, $str);
示例6: Order
<?php
//error_reporting(E_ALL);
require 'class.db.php';
require 'class.order.php';
error_reporting(0);
// константы для подключени к БД
define('HOST', 'localhost');
//сервер
define('USER', 'admin');
//пользователь
define('PASSWORD', '1234');
//пароль
define('NAME_BD', 'db_example');
//база
DB::getInstance();
// инициализация экземпляра класса дл работы с БД
//свободное использование класса
//вывод таблицы продуктов
$result = DB::query("SELECT products_id,title FROM `product`");
echo '<h2>Products:</h2> <table border="1">';
while ($obj = DB::fetch_object($result)) {
echo '<tr><td>' . $obj->id . '</td><td>' . $obj->title . '</td><tr>';
}
echo '</table>';
$order = new Order();
echo $order->getOrderList();
//попробуем создать новый экземпляр DB
echo "<span style='color:red'>";