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


PHP Order::getOrderById方法代码示例

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


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

示例1: formMass

 public function formMass($idList)
 {
     $todW = date('W', strtotime('today'));
     $claimList = array();
     $orderList = array();
     foreach ($idList as $order) {
         //номер текущей недели
         $nweek = date('W', strtotime($order['plan'])) - $todW;
         $dweek = date('w', strtotime($order['plan']));
         $orderOne = Order::getOrderById($order['oid']);
         if (isset($orderOne['contract'])) {
             if (Datas::isRekl($orderOne['contract'])) {
                 if ($order['otgruz_end'] == 2 || $orderOne['sum'] >= 1000) {
                     $claimList[$nweek . '-' . $dweek][$order['oid']] = $orderOne;
                     $claimList[$nweek . '-' . $dweek][$order['oid']]['plan'] = $order['plan'];
                     $claimList[$nweek . '-' . $dweek][$order['oid']]['tech_end'] = $order['tech_end'];
                     $claimList[$nweek . '-' . $dweek][$order['oid']]['upak_end'] = $order['upak_end'];
                     $claimList[$nweek . '-' . $dweek][$order['oid']]['otgruz_end'] = $order['otgruz_end'];
                 }
             } else {
                 $orderList[$nweek . '-' . $dweek][$order['oid']] = $orderOne;
                 $orderList[$nweek . '-' . $dweek][$order['oid']]['plan'] = $order['plan'];
                 $orderList[$nweek . '-' . $dweek][$order['oid']]['tech_end'] = $order['tech_end'];
                 $orderList[$nweek . '-' . $dweek][$order['oid']]['upak_end'] = $order['upak_end'];
                 $orderList[$nweek . '-' . $dweek][$order['oid']]['otgruz_end'] = $order['otgruz_end'];
             }
         }
     }
     $this->order = $orderList;
     $this->claim = $claimList;
 }
开发者ID:kittiwake,项目名称:gm2,代码行数:31,代码来源:Controller_schedule.php

示例2: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $order = new Order();
     $orderDetail = $order->getOrderById($id);
     $msg = "Order Details are retrieved successfully.";
     return $this->successMessageWithVar($msg, $orderDetail, 'orderDetails');
 }
开发者ID:abhiyadav001,项目名称:Monkey,代码行数:13,代码来源:OrderController.php

示例3: actionClose

 function actionClose($oid)
 {
     $today = date('Y-m-d', strtotime('today'));
     //получить данные о рекламациях
     $con = Order::getOrderById($oid);
     $noer = 1;
     if (!Datas::isRekl($con['contract'])) {
         $allrekl = Order::getOrdersLikeParam('contract', $con['contract']);
         foreach ($allrekl as $order) {
             $rekl = Datas::isRekl($order['contract']);
             $stan = OrderStan::getOrdersByPole('oid', $order['id']);
             if ($stan[$order['id']]['sborka_end'] == 0 && $rekl == 1) {
                 $noer = 0;
             }
         }
     }
     if ($noer == 1) {
         $res1 = OrderStan::updateStanByParam('sborka_end_date', $today, $oid);
         $res2 = OrderStan::updateStanByParam('sborka_end', '2', $oid);
         echo $res1 && $res2;
         //           echo $noer;
     } else {
         echo $noer;
     }
     return true;
 }
开发者ID:kittiwake,项目名称:gm2,代码行数:26,代码来源:Controller_collector.php

示例4: actionView

 public function actionView($order_id)
 {
     self::checkAdmin();
     $order = Order::getOrderById($order_id);
     $productsQuantity = json_decode($order['products'], true);
     $productsIds = array_keys($productsQuantity);
     $products = Product::getProductByIds($productsIds);
     require_once ROOT . '/views/admin_order/view.php';
     return true;
 }
开发者ID:joe-lumarlin,项目名称:oleis_shop,代码行数:10,代码来源:AdminOrderController.php

示例5: actionView

 public function actionView($id)
 {
     self::validateAdmin();
     $order = Order::getOrderById($id);
     $productQuantity = json_decode($order['products'], true);
     $productId = array_keys($productQuantity);
     $products = Products::getProductlistById($productId);
     $totalPrice = Basket::getTotalPrice($products, $productQuantity);
     $total = array_sum($totalPrice);
     require_once ROOT . '/views/admin_order/view.php';
     return true;
 }
开发者ID:Evkazolinium,项目名称:Eshop_for_example,代码行数:12,代码来源:AdminOrderController.php

示例6: actionView

 /**
  * Action для страницы "Просмотр заказа"
  */
 public function actionView($id)
 {
     $order = Order::getOrderById($id);
     // Получаем массив с идентификаторами и количеством товаров
     $productsQuantity = json_decode($order['products'], true);
     // Получаем массив с индентификаторами товаров
     $productsIds = array_keys($productsQuantity);
     // Получаем список товаров в заказе
     $products = Product::getProdustsByIds($productsIds);
     // Подключаем вид
     require_once ROOT . '/views/admin_order/view.php';
     return true;
 }
开发者ID:KazakovVS,项目名称:Store,代码行数:16,代码来源:AdminOrderController.php

示例7: actionUpdate

 public function actionUpdate($id)
 {
     $order = Order::getOrderById($id, false);
     if (isset($order) && !empty($order)) {
         $id = $order['id'];
         $status = $order['status'];
     }
     $orderParams = (include ROOT . '/config/order-params.php');
     if (!$orderParams) {
         $orderParams = array();
     }
     if (isset($_POST['submit'])) {
         $status = FunctionLibrary::clearInt($_POST['status']);
         if ($status) {
             Order::editOrder($id, $status);
             FunctionLibrary::redirectTo('/admin/order');
         }
     }
     require_once ROOT . '/views/admin-order/update.php';
     return true;
 }
开发者ID:php-user,项目名称:shop.local,代码行数:21,代码来源:AdminOrderController.php

示例8: Order

<?php

session_start();
require_once "class.Order.php";
require_once "class.Customer.php";
require_once "../../../deny/connector.php";
$ord = new Order();
$cus = new Customer();
$cusid = $_SESSION['user_id'];
print_r($ord->getOrderById(32));
echo $cusid . "<br>";
print_r($cus->getCustomerbyId(14));
开发者ID:meghv999,项目名称:cdshop-php,代码行数:12,代码来源:test.php

示例9: Customer

session_start();
require_once "includes/checkPermission.php";
require_once "process/class/class.Customer.php";
require_once "process/class/class.Order.php";
require_once "../deny/connector.php";
$cus = new Customer();
$ord = new Order();
$orderid = $_GET['orderID'];
$cusid = $_GET['uId'];
//echo $orderid."<br>".$cusid;
$customer = array();
$listitem = array();
$order = array();
$customer = $cus->getCustomerbyId($cusid);
$order = $ord->getOrderById($orderid);
//echo mysql_error();
$listitem = $ord->getListItemInOrder($orderid);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hoá Đơn thanh toán</title>
<style>
	#wrapper
	{
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
	width:600px;
	margin-left:auto;
开发者ID:meghv999,项目名称:cdshop-php,代码行数:30,代码来源:orderDetail.php

示例10: actionPlan

 function actionPlan()
 {
     $ri = $_COOKIE['ri'];
     $log = $_COOKIE['login'];
     if (!isset($ri)) {
         header('Location: /' . SITE_DIR . '/auth/showAuth');
     }
     //список сборщиков
     $userList = User_post::getUsersByPost(17);
     $sborList = array();
     foreach ($userList as $uid) {
         $datasb = Users::getUserById($uid['uid']);
         if ($datasb['operative'] == 1) {
             $abr = Datas::nameAbr($datasb['name']);
             $sborList[$datasb['id']] = $abr;
         }
     }
     //поставить в план
     $in_plan = array();
     //незакрытые
     $in_process = array();
     //тетрадь сборок
     $ass_list = array();
     $ass = OrderStan::getOrdersByPole('sborka_end', '0');
     foreach ($ass as $key => $value) {
         $moun = Mounting::getMountByPole('oid', $key);
         $orders = Order::getOrderById($key);
         if (!$moun && $orders) {
             $in_plan[$key] = array('con' => $orders['contract']);
         }
         foreach ($moun as $mont) {
             if ($mont['uid'] != '0') {
                 $sbname = $sborList[$mont['uid']];
             } else {
                 $sbname = '';
             }
             if ($mont['m_date'] == '0000-00-00') {
                 $in_plan[$key] = array('con' => $orders['contract'], 'sbname' => $sbname);
             } else {
                 $ass_list[$mont['m_date']][] = array('oid' => $key, 'con' => $orders['contract'], 'adress' => $orders['adress'], 'sbname' => $sbname);
                 //список сборщиков выходных
                 $coll_hol[$mont['m_date']] = Freemen::getFreemen($mont['m_date']);
             }
         }
         $last_mount = Mounting::getMountingLast($key);
         if ($last_mount) {
             $in_process[$key] = array('con' => $orders['contract'], 'sbname' => $last_mount['uid']);
         }
     }
     ksort($ass_list);
     //список выходных с сегодняшнего дня
     $free = Freemen::getFreeDays();
     foreach ($free as $i => $one) {
         $free[$i]['name'] = $sborList[$one['uid']];
         $free[$i]['cpdate'] = date('d.m', strtotime($one['date']));
     }
     $page = SITE_PATH . 'views/mounting.php';
     //        $page = SITE_PATH.'views/assembly.php';
     include SITE_PATH . 'views/layout.php';
     return true;
 }
开发者ID:kittiwake,项目名称:gm2,代码行数:61,代码来源:Controller_assembly.php

示例11: actionAssembly

 function actionAssembly()
 {
     $ri = $_COOKIE['ri'];
     $log = $_COOKIE['login'];
     if (!isset($ri)) {
         header('Location: /' . SITE_DIR . '/auth/showAuth');
     }
     $begin = '';
     $end = '';
     if (isset($_POST['submit'])) {
         if (isset($_POST['begin']) && isset($_POST['end'])) {
             $begin = Datas::dateToDb($_POST['begin']);
             $end = Datas::dateToDb($_POST['end']);
             $odderList = array();
             //закрытые заказы
             $beznal = array();
             $coll = array();
             $rekl = array();
             $dillerskie = array();
             $dontclose = array();
             //список диллерских инициалов
             $dil = Dillers::getAllDillers();
             $list = OrderStan::getOrdersByPeriod($begin, $end, 'sborka_end_date');
             foreach ($list as $one) {
                 $order = Order::getOrderById($one['oid']);
                 if ($order) {
                     $order['sborka_end_date'] = $one['sborka_end_date'];
                     //выделить безнал и рекламации
                     if ($order['beznal'] == 1 || $order['rassr'] == 1) {
                         $beznal[$order['collector']][] = $order;
                     } elseif (Datas::isRekl($order['contract'])) {
                         $rekl[$order['collector']][] = $order;
                     } else {
                         $d = false;
                         foreach ($dil as $onedil) {
                             //найти подстроку в номере договора
                             $pos = strpos($order['contract'], $onedil['flag']);
                             if ($pos !== false && $pos == 0) {
                                 $d = true;
                             }
                         }
                         if ($d) {
                             $dillerskie[$order['collector']][] = $order;
                         } else {
                             $odderList[$order['collector']][] = $order;
                         }
                     }
                 }
             }
         }
     }
     //список всех сборщиков
     $coll = array();
     $idusers = User_post::getUsersByPost(17);
     foreach ($idusers as $id) {
         $user = Users::getUsersByParam('id', $id['uid']);
         $coll[$user[0]['id']] = $user[0]['name'];
         //незакрытые заказы
         $dontclose[$id['uid']] = OrderStan::getNeSobr($id['uid']);
     }
     $page = SITE_PATH . 'views/repsb.php';
     include SITE_PATH . 'views/layout.php';
     return true;
 }
开发者ID:kittiwake,项目名称:gm2,代码行数:64,代码来源:Controller_report.php

示例12: actionIndex

 function actionIndex($oid)
 {
     $ri = $_COOKIE['ri'];
     $log = $_COOKIE['login'];
     if (!isset($ri)) {
         header('Location: /' . SITE_DIR . '/auth/showAuth');
     }
     $zagol = array('Просчет', 'Материал', 'Распил', 'ЧПУ', 'Кромка', 'Присадка', 'Гнутье', 'Эмаль', 'ПВХ', 'Фотопечать', 'Пескоструй', 'Витраж', 'oracal', 'Фасады', 'Упакован', 'Отгружен');
     $db = array("tech_end", "mater", "raspil", "cpu", "kromka", "pris_end", "gnutje", "emal", "pvh", "photo", "pesok", "vitrag", "oracal", "fas", "upak_end", "otgruz_end");
     $order = Order::getOrderById($oid);
     $order_stan = OrderStan::getOrdersByPole('oid', $oid);
     $stan = $order_stan[$oid];
     $us_dis = Users::getUserById($order['designer']);
     $dis = $us_dis['name'];
     $us_tech = Users::getUserById($order['technologist']);
     $tech = $us_tech['name'];
     //сборщик
     $mount = Mounting::getMountingLast($oid);
     if (!$mount) {
         $coll = '';
         $date_mount = '';
         $m_phone = '';
     } else {
         $coll_id = $mount['uid'];
         $user = Users::getUserById($coll_id);
         $coll = $user['name'];
         $m_phone = $user['tel'];
         $date_mount = date("d.m.y", strtotime($mount['m_date']));
     }
     //шаблоны смс
     $sample = Sms::getSamples();
     $search = array('%name%', '%con%', '%date%', '%m_date%', '%collector%', '%phone%');
     $replace = array($order['name'], $order['contract'], date("d.m.y", strtotime($stan['plan'])), $date_mount, $coll, $m_phone);
     foreach ($sample as $key => $sampleone) {
         $str = $sampleone['text_sms'];
         $newstr = str_replace($search, $replace, $str);
         $sample[$key]['text_sms'] = $newstr;
     }
     $notes = Notes::getNotesByOid($oid);
     if (isset($_POST['sendsms'])) {
         $phone = $_POST['phone'];
         $message = $_POST['message'];
         $sms = Sms::send($phone, $message);
         $errorsms = array();
         switch ($sms) {
             case 100:
                 $errorsms[] = 'Сообщение отправлено';
                 Sms::save($oid, $message);
                 break;
             case 201:
                 $errorsms[] = 'Не хватает средств на лицевом счету';
                 break;
             case 202:
                 $errorsms[] = 'Неправильно указан получатель';
                 break;
             case 203:
                 $errorsms[] = 'Нет текста сообщения';
                 break;
             case 205:
                 $errorsms[] = 'Сообщение слишком длинное (превышает 8 СМС)';
                 break;
             case 206:
                 $errorsms[] = 'Будет превышен или уже превышен дневной лимит на отправку сообщений';
                 break;
             case 207:
                 $errorsms[] = 'На этот номер (или один из номеров) нельзя отправлять сообщения';
                 break;
             case 220:
                 $errorsms[] = 'Сервис временно недоступен, попробуйте чуть позже';
                 break;
             default:
                 $errorsms[] = 'Сообщение не отправлено, обратитесь к администратору';
         }
     }
     $page = SITE_PATH . 'views/order.php';
     include SITE_PATH . 'views/layout.php';
     return true;
 }
开发者ID:kittiwake,项目名称:gm2,代码行数:78,代码来源:Controller_order.php

示例13: actionCeh

 function actionCeh($date = null)
 {
     $ri = $_COOKIE['ri'];
     $log = $_COOKIE['login'];
     if (!isset($ri)) {
         header('Location: /' . SITE_DIR . '/auth/showAuth');
     } elseif ($ri != 3 && $ri != 1) {
         header('Location: /' . SITE_DIR . '/schedule/orders');
     }
     if ($date == null) {
         $date = strtotime('today');
     }
     $userdate = date('d.m.Y', $date);
     $today = strtotime('today');
     $orders = Order::getOrdersFromToday();
     //готовый массив [дата][0]=>{[oid]=>oid, [con]=>контракт}
     $stan_gotov = array();
     foreach ($orders as $list) {
         foreach ($list as $order) {
             $stan_gotov[$order['oid']] = OrderStan::getStanString($order['oid']);
         }
     }
     $graf = array();
     $graf_y = array();
     $arr_stan_date = $this->arr_stan_date;
     $arr_stan = $this->arr_stan;
     foreach ($arr_stan_date as $stan_date) {
         $graf[$stan_date] = array();
         $graf_y[$stan_date] = array();
     }
     $shablon = $this->shablon;
     foreach ($arr_stan_date as $key => $stan) {
         $orders_gr = OrderStan::getOrdersByPole($stan, date('Y-m-d', $date));
         $orders_yesterday = OrderStan::getNeVipoln($stan, $arr_stan[$key]);
         foreach ($orders_gr as $oid => $arr) {
             $aboutord = Order::getOrderById($oid);
             if (!empty($aboutord)) {
                 $graf[$stan][$oid] = $arr + $aboutord;
             }
         }
         if (!$orders_gr) {
             $graf[$stan] = array();
         }
         foreach ($orders_yesterday as $oid => $arr) {
             $aboutord = Order::getOrderById($oid);
             if (!empty($aboutord)) {
                 $graf_y[$stan][$oid] = $arr + $aboutord;
             }
         }
         if (!$orders_yesterday) {
             $graf_y[$stan] = array();
         }
     }
     $page = SITE_PATH . 'views/planceh.php';
     include SITE_PATH . 'views/layout.php';
     return true;
 }
开发者ID:kittiwake,项目名称:gm2,代码行数:57,代码来源:Controller_plan.php


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