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


PHP Orders::find方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     $auth = $this->session->get('auth');
     $id = $auth[uid];
     $orders = Orders::find(array("conditions" => "u_id = :uid:", "bind" => array("uid" => $id), "order" => "o_id DESC"));
     $this->view->orders = $orders;
 }
开发者ID:redefiningcuriosity,项目名称:rms,代码行数:7,代码来源:CordersController.php

示例2: indexAction

 public function indexAction()
 {
     $undeliveredorders = Orders::find(array("o_delivery = 0", "order" => "o_id"));
     $this->view->undelivered = $undeliveredorders;
     $deliveredorders = Orders::find(array("o_delivery = 1", "order" => "o_id"));
     $this->view->delivered = $deliveredorders;
 }
开发者ID:redefiningcuriosity,项目名称:rms,代码行数:7,代码来源:OrdersController.php

示例3: getSend

 public function getSend($id)
 {
     date_default_timezone_set('Asia/Shanghai');
     $date = date('Y-m-d H:i:s');
     $order = Orders::find($id);
     $order->status = 'sent';
     $order->SendDate = $date;
     $order->save();
     return Redirect::to(URL::route('incomplete'));
 }
开发者ID:xuzhaoyu,项目名称:Medical,代码行数:10,代码来源:SupplierController.php

示例4: indexAction

 public function indexAction()
 {
     $auth = $this->session->get('auth');
     $this->view->name = $auth[name];
     $date = date('Y-m-d');
     echo $date;
     $orders = Orders::find("o_delivery = 0");
     $nosorders = count($orders);
     $contact = Contact::find("co_status = 0");
     $noscontact = count($contact);
     $users = Userdetails::find();
     $nosusers = count($users);
     $result = Orders::sum(array('column' => 'o_price', "conditions" => "o_date = :date:", "bind" => array("date" => $date)));
     /*$phql="SELECT SUM(o_price) AS costs FROM Orders where o_date='2015-12-11'";
     	$result = $this->modelsManager->executeQuery($phql);*/
     $this->view->nosorders = $nosorders;
     $this->view->noscontact = $noscontact;
     $this->view->nosusers = $nosusers;
     $this->view->nossale = $result;
 }
开发者ID:redefiningcuriosity,项目名称:rms,代码行数:20,代码来源:AdminController.php

示例5: addDomain

 /**
  * Attach a hosting service to a domain name
  * 
  * 
  * @param integer $orderID
  * @param integer $domainID
  */
 public static function addDomain($orderID, $domainID)
 {
     if (is_numeric($orderID) && is_numeric($domainID)) {
         $order = Orders::find($orderID);
         if (!empty($order)) {
             foreach ($order->OrdersItems as $detail) {
                 // 	    			if ($detail->Products['type'] == "hosting") {
                 #if(FALSE === self::check_domains_in_order($orderID, $domainID)){
                 $domain = new OrdersItemsDomains();
                 $domain['domain_id'] = $domainID;
                 $domain['order_id'] = $orderID;
                 $domain['orderitem_id'] = $detail['detail_id'];
                 $domain->save();
                 #}
                 // 	    			}
             }
             return true;
         }
     }
     return false;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:28,代码来源:OrdersItemsDomains.php

示例6: postFaxOrders

 public function postFaxOrders()
 {
     $pid = Session::get('pid');
     if (Session::get('job_id') == FALSE) {
         $job_id = '';
     } else {
         $job_id = Session::get('job_id');
     }
     $orders_id = Input::get('orders_id');
     $html = $this->page_orders($orders_id)->render();
     $filename = __DIR__ . "/../../public/temp/orders_" . time() . "_" . Session::get('user_id') . ".pdf";
     $this->generate_pdf($html, $filename);
     while (!file_exists($filename)) {
         sleep(2);
     }
     $row1 = Orders::find($orders_id);
     if ($row1->orders_labs != '') {
         $file_original = "Laboratory Order";
     }
     if ($row1->orders_radiology != '') {
         $file_original = "Imaging Order";
     }
     if ($row1->orders_cp != '') {
         $file_original = "Cardiopulmonary Order";
     }
     if ($row1->orders_referrals != '') {
         $file_original = "Referral Order";
     }
     $row2 = Addressbook::find($row1->address_id);
     $result_message = $this->fax_document($pid, $file_original, 'yes', $filename, $file_original, $row2->fax, $row2->displayname, $job_id, 'yes');
     Session::forget('job_id');
     unlink($filename);
     echo $result_message;
 }
开发者ID:carlosqueiroz,项目名称:nosh-core,代码行数:34,代码来源:AjaxChartController.php

示例7: cancelOrder

 public function cancelOrder($id)
 {
     $response = array();
     $output = array();
     try {
         /**
          * TODO: include user id to ensure validation before cancelling the order.
          */
         // Update the order in the database
         $order = Orders::find($id);
         $order->status = AppConstants::$avialable_status['cancelled'];
         $order->save();
         $response['response_code'] = ResponseCodes::$response_code['success']['code'];
         $response['response_message'] = ResponseCodes::$response_code['success']['response_message'];
         $response['output'] = $output;
         echo json_encode($response);
     } catch (Exception $e) {
         Log::error($e->getMessage());
         $response['response_code'] = ResponseCodes::$response_code['internal_server_error']['code'];
         $response['response_message'] = ResponseCodes::$response_code['internal_server_error']['response_message'];
         $response['output'] = $output;
         echo json_encode($response);
     }
 }
开发者ID:anil477,项目名称:Fab,代码行数:24,代码来源:OrdersController.php

示例8: createOrder

 /**
  * Create a new Order
  *
  * @return boolean
  */
 public function createOrder()
 {
     if (!$this->getOrderid()) {
         $theOrder = Orders::create($this->getCustomerId(), Statuses::id('tobepaid', 'orders'), null);
         // For each item in the cart
         foreach ($this->getItems() as $item) {
             $item = Orders::addOrderItem($item);
         }
         $this->setOrderid($theOrder['order_id']);
         // Send the email to confirm the order
         Orders::sendOrder($theOrder['order_id']);
         return Orders::getOrder();
     } else {
         return Orders::find($this->getOrderid());
     }
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:21,代码来源:Cart.php

示例9: sendInvoice

 public function sendInvoice($uuid, $order_uuid = null, $service_uuid = null, $urlemail)
 {
     $this->authenticate();
     $customers = Customers::findWithUuid($uuid);
     if (empty($customers)) {
         throw new Shineisp_Api_Exceptions(400007, ":: 'uuid' not valid");
         exit;
     }
     $id = $customers['customer_id'];
     if ($order_uuid == null && $service_uuid == null) {
         throw new Shineisp_Api_Exceptions(400007, ":: 'order_uuid' not valid and 'service_uuid' not valid");
     }
     #TODO get order from $order_uuid
     if ($service_uuid != null) {
         $objService = OrdersItems::findByUUID($service_uuid);
         if ($objService == false) {
             return false;
         }
         $service = $objService->toArray();
         $orderid = $service['order_id'];
         $order = Orders::find($orderid);
         $fastlink = Invoices::sendInvoice($order->invoice_id, $urlemail);
     }
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:24,代码来源:Orders.php


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