本文整理汇总了PHP中getOrders函数的典型用法代码示例。如果您正苦于以下问题:PHP getOrders函数的具体用法?PHP getOrders怎么用?PHP getOrders使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getOrders函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: array
//создаем второй массив 2го уровня вложености в первый
$orderinfo = array();
//перебираем массив с данными из файла и этими данными заполняем массив 2го уровня вложености
foreach ($info_from_file as $item) {
//каждую строку разделяем на переменные
list($n, $e, $t, $a, $c, $dt) = explode('|', $item);
//и каждую переменную вкладываем в отдельную ячейку 2го массива
$orderinfo['name'] = $n;
$orderinfo['mail'] = $e;
$orderinfo['tel'] = $t;
$orderinfo['addr'] = $a;
$orderinfo['cust'] = $c;
$orderinfo['datetime'] = $dt;
$sql = "SELECT * FROM orders WHERE datetime = '{$orderinfo['datetime']}' AND customer = '{$orderinfo['cust']}'";
$res = mysql_query($sql) or die(mysql_error());
$orderinfo['tovari_v_zakaze'] = convertData($res);
//после заполнения массива orderinfo данными покупателя из файла -
//вкладываем масиив $orderinfo в ячейку $allorders[] и идем перебирать следующую строку из файла
$allorders[] = $orderinfo;
}
return $allorders;
}
$test = getOrders();
echo '<pre>';
print_r($test);
echo '</pre>';
/*
foreach ($test as $v){
echo $v.'<br>';
}
*/
开发者ID:bz4work,项目名称:eshop-spec2,代码行数:31,代码来源:test2.php
示例2: getOrders
<thead>
<tr>
<th class="text-center">Empresa</th>
<th class="text-center">Pedido</th>
<th class="text-center">Descrição</th>
<th class="text-center">Qtd.</th>
<th class="text-center">Preço</th>
<th class="text-center">Status</th>
<th class="text-center">Avaliação</th>
<th class="text-center">Endereço de entrega</th>
<th class="text-center">Opções</th>
</tr>
</thead>
<tbody>
<?php
getOrders($_SESSION['id']);
?>
</tbody>
</table>
</div>
<?php
function getOrders($userID)
{
global $conn;
if ($stmtOrders = $conn->prepare("SELECT o.`orde_id`, o.`Companies_comp_id`, o.`orde_price`, o.`orde_status`, o.`orde_stars`, o.`orde_address`, ohp.`Products_prod_id`, p.`prod_description`, p.`prod_price`, c.`comp_name` FROM orders o, orders_has_products ohp, products p, companies c WHERE o.`Users_user_id`=? AND ohp.`Orders_orde_id`=o.`orde_id` AND p.`prod_id`=ohp.`Products_prod_id` AND c.`comp_id`=o.`Companies_comp_id` ORDER BY o.`orde_id` DESC")) {
$stmtOrders->bind_param("i", $userID);
$stmtOrders->execute();
$stmtOrders->bind_result($orderID, $orderCompanyID, $orderPrice, $orderStatus, $orderStars, $orderAddress, $productID, $productDescription, $productPrice, $compName);
$stmtOrders->store_result();
while ($stmtOrders->fetch()) {
$showReceiveOption = $orderStatus;
开发者ID:Hernior,项目名称:20152,代码行数:31,代码来源:orders.php
示例3: _e
<?php
_e("<h1>Chi Tiết Hóa Đơn</h1>");
$ordersDetail = getOrdersDetails($orderID);
$order = getOrders($orderID);
foreach ($order as $info) {
$user_info = get_userdata($info->userID);
$total = get_total_from_db($info->ID);
$infor_user = explode('-', $info->name);
_e('Hóa đơn lập lúc: ' . date('h:i d-m-Y', $info->datetime) . "<br/>");
_e('Khách hàng: <strong>' . $infor_user[0] . "</strong><br/>");
_e('Email: <strong>' . $user_info->user_email . "</strong><br/>");
_e('Điện Thoai: <strong>' . $infor_user[1] . "</strong><br/>");
_e('Địa Chỉ: <strong>' . $infor_user[2] . "</strong>");
}
$num = 0;
?>
<table id="insured_list" class="tablesorter center">
<thead>
<tr class="center">
<th> STT </th>
<th> Tên Sản phẩm </th>
<th style="width: 150px;"> Đơn giá (VND)</th>
<th style="width: 100px;"> Giảm giá (%)</th>
<th style="width: 150px;"> Số lượng (cái)</th>
<th style="width: 150px;"> Thành tiền (VND) </th>
</tr>
</thead>
<tbody>
<?php
foreach ($ordersDetail as $detail) {
开发者ID:binhdarkcu,项目名称:shoping_quan,代码行数:31,代码来源:ordersDetail.php
示例4: ini_set
<?php
ini_set('display_errors', 1);
include 'connection.php';
if ($_POST['method'] == "getOrders") {
getOrders($_POST['json']);
//call getOrders method
} elseif ($_POST['method'] == "addOrder") {
addOrder($_POST['json']);
} elseif ($_POST['method'] == "searchItems") {
searchItems($_POST['json']);
}
function getOrders($json)
{
global $mysqli;
//get params from json object
$jsonObj = json_decode($json);
$date = $jsonObj->{'date'};
$style = $jsonObj->{'style'};
$undate = strtotime($date);
$year = date('Y', $undate);
$month = date('m', $undate);
$day = date('d', $undate);
if ($style === "YEAR") {
$strQuery = "SELECT * FROM orders WHERE (DATE Like '" . $year . "-%')";
getSalesByQuery($strQuery);
} elseif ($style === "MONTH") {
$strQuery = "SELECT * FROM orders WHERE (DATE Like '" . $year . "-" . $month . "-%')";
getSalesByQuery($strQuery);
} elseif ($style === "DAY") {
$strQuery = "SELECT * FROM orders WHERE (DATE = '" . $date . "' )";
开发者ID:AhmedAli7O1,项目名称:TPS,代码行数:31,代码来源:sales.php
示例5: set_time_limit
<?php
set_time_limit(1500);
//increase time-out to 25 mins as downloading and parsing the tree may take a while
//SiteID must also be set in the Request's XML
//SiteID = 0 (US) - UK = 3, Canada = 2, Australia = 15, ....
//SiteID Indicates the eBay site to associate the call with
$siteID = 77;
//Get the online version number
$responseXml = getOrders($devID, $appID, $certID, $compatabilityLevel, $siteID, $userToken, $serverUrl);
//Xml string is parsed and creates a DOM Document object
$responseDoc = new DomDocument();
$responseDoc->loadXML($responseXml);
$Orders = $responseDoc->getElementsByTagName('Order');
//print_r($responseXml);
function getOrders($devID, $appID, $certID, $compatabilityLevel, $siteID, $userToken, $serverUrl)
{
//Build the request Xml string
$requestXmlBody = '<?xml version="1.0" encoding="utf-8" ?>';
$requestXmlBody .= '<GetOrdersRequest xmlns="urn:ebay:apis:eBLBaseComponents">';
$requestXmlBody .= "<RequesterCredentials><eBayAuthToken>{$userToken}</eBayAuthToken></RequesterCredentials>";
$requestXmlBody .= "<CreateTimeFrom>2011-12-19T20:34:44.000Z</CreateTimeFrom>";
$requestXmlBody .= "<CreateTimeTo>2012-01-01T20:34:44.000Z</CreateTimeTo>";
$requestXmlBody .= '<OrderRole>Seller</OrderRole>';
$requestXmlBody .= '<OrderStatus>All</OrderStatus>';
$requestXmlBody .= '</GetOrdersRequest>';
//Create a new eBay session with all details pulled in from included keys.php
$session = new eBaySession($userToken, $devID, $appID, $certID, $serverUrl, $compatabilityLevel, $siteID, 'GetOrders');
//send the request
$responseXml = $session->sendHttpRequest($requestXmlBody);
if (stristr($responseXml, 'HTTP 404') || $responseXml == '') {
开发者ID:dewawi,项目名称:dewawi,代码行数:31,代码来源:GetOrders.php
示例6: session_start
<?php
/*
* Order listing page. We rely on the local database
* to retrieve the order history of this buyer.
*/
require_once __DIR__ . '/../bootstrap.php';
if (!isset($_SESSION)) {
session_start();
}
if (!isSignedIn()) {
header('Location: ../user/sign_in.php');
exit;
}
try {
$orders = getOrders(getSignedInUser());
} catch (Exception $ex) {
// Don't overwrite any message that was already set
if (!isset($message)) {
$message = $ex->getMessage();
$messageType = "error";
}
$orders = array();
}
?>
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta content='IE=Edge,chrome=1' http-equiv='X-UA-Compatible'>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
开发者ID:shankarbtn,项目名称:rest-api-sample-app-php,代码行数:31,代码来源:orders.php
示例7: getOrders
</th>
<th>
Пользователь
</th>
<th>
Компания
</th>
<th>
Комментарий
</th>
<th width="200">
Сумма
</th>
</tr>
<?php
$users = getOrders();
while ($do = mysql_fetch_array($users)) {
?>
<tr orderID="<?php
echo $do["id"];
?>
">
<td align="right">
<?php
echo $do['id'];
?>
</td>
<td align="right">
<?php
echo $do['orderdate'];
?>
开发者ID:anton-kol,项目名称:buelo,代码行数:31,代码来源:orders.php
示例8: session_start
//header ('Content-type: text/html; charset=utf-8');
// запуск сессии
session_start();
// подключение библиотек
require "eshop_db.inc.php";
require "eshop_lib.inc.php";
?>
<html>
<head>
<meta charset="utf-8">
<title>Поступившие заказы</title>
</head>
<body>
<h2>Поступившие заказы:</h2>
<?php
$allorders = getOrders();
foreach ($allorders as $item) {
?>
<hr>
<p><b>Заказчик</b>: <?php
echo $item['name'];
?>
</p>
<p><b>Email</b>: <?php
echo $item['mail'];
?>
</p>
<p><b>Телефон</b>: <?php
echo $item['tel'];
?>
</p>
开发者ID:bz4work,项目名称:eshop-spec2,代码行数:31,代码来源:orders.php
示例9: getOrders
<?php
include 'connectToDatabase.php';
include 'eshopLib.php';
$result = getOrders($connection, $userId);
$cartCountNumber = cartCount($userId, $connection);
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Get Your Cover | Orders</title>
<script src="includes/jquery-2.2.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="includes/style.css">
<link href='https://fonts.googleapis.com/css?family=Amaranth' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Arimo' rel='stylesheet' type='text/css'>
<script src="includes/script.js"></script>
</head>
<body>
<header>
<section id="DevicesNav">
<a id="burger"></a>
<ul id="mobileNav">
<li><a href="eshop.php">eShop</a></li>
<li><a href="#">Logoff</a></li>
</ul>
</section>
<a id="logo" href="eshop.php"></a>
<section id="mobileUser"><span></span><span>Maya Lis</span></section>
</header>
<div id="wrapper">
开发者ID:lizagilman,项目名称:MakeCoverProj,代码行数:31,代码来源:orders.php
示例10: order_product_from_bbcw
}
}
// ###########################################################################
function order_product_from_bbcw($product_id, $amount, $address_book_entry)
{
$generator = new BBCW_OrderGenerator();
if (!$generator->login()) {
print "Login failed";
exit;
}
if (!$generator->add_product_to_cart($product_id, $amount)) {
print "Adding product to cart failed";
exit;
}
if (!$generator->checkout_product($address_book_entry)) {
print "Adding product to cart failed";
exit;
}
if (!$generator->place_order()) {
print "Placing order failed";
exit;
}
}
$address_book_entry = ['usertype' => 'C', 'anonymous' => '', 'email' => '[email protected]', 'ship2diff' => 'Y', 'existing_address' => ['S' => '2170'], 'address_book' => ['S' => ['id' => '2170', 'firstname' => 'Ibis1', 'lastname' => 'Arrastia', 'address' => '7625 Parkview Way', 'address_2' => '', 'city' => 'Coral Springs', 'state' => 'FL', 'country' => 'US', 'zipcode' => '33065', 'phone' => '9542052615', 'fax' => '', 'no_address' => '']], 'firstname' => 'Ibis', 'lastname' => 'Arrastia', 'company' => 'Avila Stores LLC', 'additional_values' => ['2' => 'Residential']];
$product_id = "26194";
$amount = 1;
// Order product once
//order_product_from_bbcw($product_id, $amount, $address_book_entry);
//syslog(LOG_INFO, "hello world");
getOrders();
开发者ID:AvilaStores,项目名称:orderprocessing,代码行数:30,代码来源:app.php
示例11: session_start
<?php
session_start();
require 'controller/define.php';
require "controller/indexControl.php";
$login = false;
if (isset($_COOKIE['user']) || isset($_SESSION['user'])) {
if (!isset($_SESSION['user'])) {
$_SESSION['user'] = $_COOKIE['user'];
}
$login = true;
$orderID = $_GET['order'];
$login = true;
$row = getOrders($orderID);
} elseif (!$login) {
header('Location: ' . SERVER . '/404');
}
?>
<!DOCTYPE HTML>
<html>
<head>
<?php
require_once 'includes/head.php';
?>
<link href="<?php
echo SERVER;
?>
/assets/css/bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet"/>
<link href="<?php
echo SERVER;
?>
开发者ID:salehOyon,项目名称:Convention-Hall,代码行数:31,代码来源:detailsBooking.php
示例12: decrypt
<?php
$order_id = decrypt($_GET['orderID']);
$ordersDetail = getOrdersDetails($order_id);
$order = getOrders($order_id);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hóa Đơn</title>
<style type="text/css">
*{
margin:0;
padding:0;
font-size:12px;
font-family:Arial, Helvetica, sans-serif;
}
ul {
list-style:none;
}
#container {
width:593px;
height:840px;
margin:0px auto;
border:1px solid #000;
}
#header {
overflow:hidden;
开发者ID:binhdarkcu,项目名称:shoping_quan,代码行数:31,代码来源:page-chi-tiet-hoa-don.php
示例13: db_connect
<?php
// Get list of all users or one in particualr if the id is given
include_once '../include/headers.php';
include_once '../include/dbutils.php';
include_once '../include/main.php';
include_once 'domain/orders.php';
db_connect();
$expand = isset($_GET['expand']) ? $_GET['expand'] : null;
$status = isset($_GET['status']) ? $_GET['status'] : null;
if (isset($_GET['id'])) {
$value = getOrder($_GET['id']);
} else {
$value = getOrders($status, $_GET['providerId'], $expand);
}
//return JSON array
exit(json_encode($value));
开发者ID:eznibe,项目名称:north-telas,代码行数:17,代码来源:orders_GET.php
示例14: trim
// This will produce a fatel error if there is an error on products.php or database crashes
require 'orders.php';
/**
* A Resoruce List for Products to include HTTP Verbs
* Switch Statement used for HTTP Verbs (GET, POST, DELETE, and PATCH)
* Server Request_Method is an array which contains information of paths and locations
* Routing for Products Starts Here
*/
// Remove white space (trim) and check if variable is set and not empty(isset)
$pathParts = trim(isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/', '/');
$pathParts = explode('/', $pathParts);
switch ($_SERVER['REQUEST_METHOD']) {
// Gets List of all products or single product using GET Method
case 'GET':
if (empty($pathParts[1])) {
echo getOrders();
} else {
echo getOrder($pathParts[1]);
}
break;
// Create product on database using POST and view it using GET Method
// Create product on database using POST and view it using GET Method
case 'POST':
postOrders(json_decode(file_get_contents('php://input')));
break;
// Delete requrested product from database using DELETE Method
// Delete requrested product from database using DELETE Method
case 'DELETE':
if (empty($pathParts[1])) {
echo "you can delete everthing!!";
} else {
开发者ID:Zain-Ali,项目名称:Capture-Cart,代码行数:31,代码来源:index.php
示例15: printOrders
function printOrders()
{
$orders = getOrders();
$result = '<table class="table table-hover">
<tr>
<th>No.</th>
<th>Nama Pemesan</th>
<th>Email</th>
<th>Tanggal Pemesanan</th>
<th>Jumlah Barang</th>
<th>Total Harga</th>
<th colspan="3"> </th>
</tr>';
$index = 1;
foreach ($orders as $order) {
$datearray = strtotime($order->date);
$date = date('d F Y', $datearray);
$result .= '<tr>';
$result .= '<td>' . (string) $index . '</td>';
$result .= '<td>' . $order->custname . '</td>';
$result .= '<td>' . $order->email . '</td>';
$result .= '<td>' . $date . '</td>';
$result .= '<td>' . $order->orderedproducts . '</td>';
$result .= '<td>' . money_format('%i', $order->totalprice) . '</td>';
$result .= "<td><button type=\"button\" class=\"btn btn-primary\" onclick=\"detailOrder(" . (string) $order->id . ")\">Detail</button></td>";
if ($order->isprocessed === true) {
$result .= "<td><button type=\"button\" class=\"btn btn-primary\" disabled><span class=\"glyphicon glyphicon-ok\"> </span>Sudah Selesai</button></td>";
} else {
$result .= "<td><button type=\"button\" onclick=\"markFinished(" . (string) $order->id . ")\" class=\"btn btn-success\"><span class=\"glyphicon glyphicon-ok\"> </span>Tandai Selesai</button></td>";
}
$result .= "<td><button onclick=\"removeOrder(" . (string) $order->id . ",'" . $order->custname . "')\" type=\"button\" class=\"btn btn-danger\">X</button></td>";
$result .= '</tr>';
$index++;
}
$result .= '</table>';
return $result;
}
开发者ID:theodorusyoga,项目名称:Cupumanik,代码行数:39,代码来源:functions.php
示例16: count
echo $_SERVER['PHP_SELF'];
?>
" method="post">
<!--<input type="submit" name="update" value="Update" /><input type="submit" name="delete" value="Delete" />-->
<table id="tablesorter-demo" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
<thead>
<tr class="table-header">
<th>Room_no</th>
<th>Date </th>
<th>Amount </th>
<th>Actions</th></tr>
</thead>
<tbody>
<?php
$numrows = count(getOrders());
// number of rows to show per page
// find out total pages
$totalpages = ceil($numrows / $rowsperpage);
// get the current page or set a default
if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) {
// cast var as int
$currentpage = (int) $_GET['currentpage'];
} else {
// default page num
$currentpage = 1;
}
// end if
// if current page is greater than total pages...
if ($currentpage > $totalpages) {
// set current page to last page
开发者ID:benkip,项目名称:Reservation-system,代码行数:31,代码来源:orders.php
示例17: switch
}
/*############ START ############*/
/*Switch between each query allowed and sent by NetReviews*/
$to_reply = '';
switch ($post_data['query']) {
case 'isActiveModule':
$to_reply = isActiveModule($post_data);
break;
case 'setModuleConfiguration':
$to_reply = setModuleConfiguration($post_data);
break;
case 'getModuleAndSiteConfiguration':
$to_reply = getModuleAndSiteConfiguration($post_data);
break;
case 'getOrders':
$to_reply = getOrders($post_data);
break;
case 'setProductsReviews':
$to_reply = setProductsReviews($post_data);
break;
case 'truncateTables':
$to_reply = truncateTables($post_data);
break;
case 'getUrlProducts':
$to_reply = getUrlProducts($post_data);
break;
case 'getOrderHistoryOn':
$to_reply = getOrderHistoryOn($post_data);
break;
case 'getCountOrder':
$to_reply = getCountOrder($post_data);
开发者ID:mcdado,项目名称:netreviews,代码行数:31,代码来源:netreviewsApi.php
示例18: getOrders
<?php
require "secure/session.inc.php";
require "../inc/lib.inc.php";
require "../inc/db.inc.php";
?>
<html>
<head>
<title>Поступившие заказы</title>
</head>
<body>
<h1>Поступившие заказы:</h1>
<?php
$orders = getOrders();
foreach($orders as $order){
?>
<hr>
<h2>Заказ номер:<?=$order['orderid'] ?></h2>
<p><b>Заказчик</b>:<?=$order['name'] ?> </p>
<p><b>Email</b>:<?=$order['email'] ?> </p>
<p><b>Телефон</b>:<?=$order['phone'] ?> </p>
<p><b>Адрес доставки</b>:<?=$order['address'] ?> </p>
<p><b>Дата размещения заказа</b>:<?=date('d-m-Y H:i:s' , $order['dt']) ?></p>
<h3>Купленные товары:</h3>
<table border="1" cellpadding="5" cellspacing="0" width="90%">
<tr>
<th>N п/п</th>
<th>Название</th>
<th>Автор</th>
开发者ID:rasfur,项目名称:php2,代码行数:31,代码来源:orders.php
示例19: set_time_limit
$where[] = "oed.express_delivery_id>0";
break;
case -2:
$where[] = "oed.express_delivery_id IS NULL";
break;
default:
$where[] = "oed.express_delivery_id=" . (int) $_POST['express_id'];
break;
}
}
if (isset($_POST['export'])) {
require DIR_FS_ADMIN . 'includes/phpexcel/PHPExcel.php';
set_time_limit(0);
$is_doc = $_POST['export'] == '导出筛选结果' ? false : true;
$i = 0;
$orders = getOrders(implode(' AND ', $where));
if (count($orders) == 0) {
exit('没有订单');
}
switch ($_POST['export']) {
case '导出筛选结果':
$excel = new PHPExcel();
$excel->getProperties()->setCreated('订单')->setLastModifiedBy('Jun QQ46231996')->setTitle(sprintf('%s Orders', date('Y-m-d')))->setDescription('Creater by QQ46231996');
$excel->setActiveSheetIndex(0);
$sheet = $excel->getActiveSheet();
$sheet->setTitle(date('Y-m-d'));
setExcelHeader1($sheet);
$row = 2;
$offset_x = 0;
$offset_y = 0;
$width = 40;
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:order_man.php
注:本文中的getOrders函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论