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


PHP Order::search方法代码示例

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


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

示例1: search

 public function search()
 {
     $objOrder = new Order();
     $objOrder->setPatientIdentification(request_var("identification"));
     $objOrder->setTurn(request_var("turn"));
     $objOrder->setPatientLastname(request_var("lastname"));
     $objOrder->setPatientFirstname(request_var("firstname"));
     $objOrder->setInitDate(request_var("initDate"));
     $objOrder->setEndDate(request_var("endDate"));
     $objOrder->setHallId(request_var("hall"));
     $objOrder->setOfficeId(request_var("office"));
     $_response = $objOrder->search();
     $arrResult = array();
     $_response = $_response["ConsultarOrdenWebSigLabResult"];
     if (is_array($_response) && count($_response)) {
         foreach ($_response as $_order) {
             foreach ($_order as $_value) {
                 if (is_array($_value)) {
                     $ordId = $_value["EmpId"] . "@" . $_value["OficinaId"] . "@" . $_value["OrdId"];
                     $arrResult[] = array("Id" => "<a href='#' onclick='viewResult(\"{$ordId}\");'><img src='../img/search.png' /></a>", "PacIdentificacion" => $_value["PacIdentificacion"], "PacApellido" => utf8_encode($_value["PacApellido"] . " " . $_value["PacNombre"]), "OrdTurno" => $_value["OrdTurno"], "OrdFecha" => Util::formatDBWEB(substr($_value["OrdFecha"], 0, 10)), "TipoOrdenDescripcion" => $_value["TipoOrdenDescripcion"], "MedApellido" => utf8_encode($_value["MedApellido"] . " " . $_value["MedNombre"]), "SalaHosp" => $_value["SalaHospDescripcion"]);
                 } else {
                     $ordId = $_order["EmpId"] . "@" . $_order["OficinaId"] . "@" . $_order["OrdId"];
                     $arrResult[] = array("Id" => "<a href='#' onclick='viewResult(\"{$ordId}\");'><img src='../img/search.png' /></a>", "PacIdentificacion" => $_order["PacIdentificacion"], "PacApellido" => utf8_encode($_order["PacApellido"] . " " . $_order["PacNombre"]), "OrdTurno" => $_order["OrdTurno"], "OrdFecha" => Util::formatDBWEB(substr($_order["OrdFecha"], 0, 10)), "TipoOrdenDescripcion" => $_value["TipoOrdenDescripcion"], "MedApellido" => utf8_encode($_order["MedApellido"] . " " . $_order["MedNombre"]), "SalaHosp" => $_order["SalaHospDescripcion"]);
                     break;
                 }
             }
         }
     }
     echo json_encode($arrResult);
 }
开发者ID:atoledov,项目名称:siglab,代码行数:30,代码来源:controlOrder.php

示例2: actionIndex

 /**
  * Lists all models
  */
 public function actionIndex()
 {
     $model = new Order('search');
     $model->unsetAttributes();
     if (isset($_GET['Order'])) {
         $model->attributes = $_GET['Order'];
     }
     $this->render('index', array('dataProvider' => $model->search(), 'model' => $model));
 }
开发者ID:ever4vr,项目名称:maestro,代码行数:12,代码来源:OrderController.php

示例3: actionIndex

 /**
  * Display orders methods list
  */
 public function actionIndex()
 {
     $model = new Order('search');
     if (!empty($_GET['Order'])) {
         $model->attributes = $_GET['Order'];
     }
     $dataProvider = $model->search();
     $dataProvider->pagination->pageSize = Yii::app()->settings->get('core', 'productsPerPageAdmin');
     $this->render('index', array('model' => $model, 'dataProvider' => $dataProvider));
 }
开发者ID:kolbensky,项目名称:rybolove,代码行数:13,代码来源:OrdersController.php

示例4: actionIndex

 /**
  * Display orders methods list
  */
 public function actionIndex()
 {
     $this->pageName = Yii::t('CartModule.admin', 'ORDER', 0);
     $this->breadcrumbs = array($this->pageName);
     $model = new Order('search');
     if (!empty($_GET['Order'])) {
         $model->attributes = $_GET['Order'];
     }
     $dataProvider = $model->search();
     $this->render('index', array('model' => $model, 'dataProvider' => $dataProvider));
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:14,代码来源:DefaultController.php

示例5: actionIndex

 public function actionIndex()
 {
     //$this->render('index');
     //new \Error(1);
     $this->prepareUser();
     $order = new \Order();
     $this->prepareTempOrder();
     $order->TempOrder = $this->tempOrder;
     $order->ID_user = $this->tiUser->ID;
     $order_provider = $order->search();
     $arr_order = $order_provider->getData();
     foreach ($arr_order as $value) {
         try {
             $value->delete();
         } catch (Exception $e) {
             new \Error(5, null, $e->getMessage());
         }
     }
     new \Error(1);
 }
开发者ID:Yougmark,项目名称:TiCheck_Server,代码行数:20,代码来源:DeleteController.php

示例6: actionIndex

 public function actionIndex()
 {
     //$this->render('index');
     $this->prepareUser();
     $order = new \Order();
     if (isset($_POST['TempOrder'])) {
         $this->prepareTempOrder();
         $order->TempOrder = $this->tempOrder;
     }
     $order->ID_user = $this->tiUser->ID;
     $order_provider = $order->search();
     $arr_order = $order_provider->getData();
     $arr_data_return = null;
     foreach ($arr_order as $value) {
         $arr_data_return[] = $value->attributes;
     }
     if ($arr_data_return == null) {
         echo json_encode(array('Code' => 1, 'Message' => 'Succeed', 'Data' => 'null'));
         exit;
     }
     echo json_encode(array('Code' => 1, 'Message' => 'Succeed', 'Data' => $arr_data_return));
 }
开发者ID:Yougmark,项目名称:TiCheck_Server,代码行数:22,代码来源:InfoController.php

示例7: Order

$this->widget('bootstrap.widgets.TbButton', ['buttonType' => 'submit', 'context' => 'primary', 'label' => $model->getIsNewRecord() ? Yii::t('CouponModule.coupon', 'Add coupon and continue') : Yii::t('CouponModule.coupon', 'Save coupon and continue')]);
?>

        <?php 
$this->widget('bootstrap.widgets.TbButton', ['buttonType' => 'submit', 'htmlOptions' => ['name' => 'submit-type', 'value' => 'index'], 'label' => $model->getIsNewRecord() ? Yii::t('CouponModule.coupon', 'Add coupon and close') : Yii::t('CouponModule.coupon', 'Save coupon and close')]);
?>

        <?php 
$this->endWidget();
?>
    </div>

    <?php 
if (!$model->getIsNewRecord()) {
    ?>
    <div class="tab-pane panel-body" id="history">

        <?php 
    Yii::app()->getModule('order');
    $order = new Order('search');
    $order->unsetAttributes();
    $this->widget('yupe\\widgets\\CustomGridView', ['id' => 'order-grid', 'type' => 'condensed', 'dataProvider' => $order->search($model->id), 'filter' => $order, 'rowCssClassExpression' => '$data->paid == Order::PAID_STATUS_PAID ? "alert-success" : ""', 'ajaxUrl' => Yii::app()->createUrl('/order/orderBackend/index'), 'actionsButtons' => false, 'bulkActions' => [false], 'columns' => [['name' => 'id', 'htmlOptions' => ['width' => '90px'], 'type' => 'raw', 'value' => 'CHtml::link(Yii::t("CouponModule.coupon", "Order #").$data->id, array("/order/orderBackend/update", "id" => $data->id))'], ['name' => 'name', 'type' => 'raw', 'value' => '$data->name . ($data->note ? "<br><div class=\\"note\\">$data->note</div>" : "")', 'htmlOptions' => ['width' => '400px']], 'total_price', ['name' => 'paid', 'value' => '$data->getPaidStatus()', 'filter' => $order->getPaidStatusList()], ['name' => 'date'], ['name' => 'status', 'type' => 'raw', 'value' => function ($data) {
        return $data->status->getTitle();
    }, 'filter' => OrderStatus::model()->getList()]]]);
    ?>
    </div>
    <?php 
}
?>
</div>
开发者ID:alextravin,项目名称:yupe,代码行数:30,代码来源:_form.php

示例8: Order

        <?php 
$this->endWidget();
?>
    </div>

    <?php 
if (!$model->getIsNewRecord()) {
    ?>
        <div class="tab-pane panel-body" id="history">

            <?php 
    Yii::app()->getModule('order');
    $order = new Order('search');
    $order->unsetAttributes();
    $order->couponId = $model->id;
    $this->widget('yupe\\widgets\\CustomGridView', ['id' => 'order-grid', 'type' => 'condensed', 'dataProvider' => $order->search(), 'filter' => $order, 'rowCssClassExpression' => '$data->paid == Order::PAID_STATUS_PAID ? "alert-success" : ""', 'ajaxUrl' => Yii::app()->createUrl('/order/orderBackend/index'), 'actionsButtons' => false, 'bulkActions' => [false], 'columns' => [['name' => 'id', 'htmlOptions' => ['width' => '90px'], 'type' => 'raw', 'value' => function (Order $data) {
        return CHtml::link(Yii::t('CouponModule.coupon', 'Order #') . $data->id, ['/order/orderBackend/update', 'id' => $data->id]);
    }], ['name' => 'name', 'type' => 'raw', 'value' => function (Order $data) {
        $result = $data->name;
        if ($data->note) {
            $result .= CHtml::tag('br');
            $result .= CHtml::tag('small', [], $data->note);
        }
        return $result;
    }, 'htmlOptions' => ['width' => '400px']], 'total_price', ['name' => 'paid', 'value' => function (Order $data) {
        return $data->getPaidStatus();
    }, 'filter' => $order->getPaidStatusList()], ['name' => 'date'], ['name' => 'status_id', 'type' => 'raw', 'value' => function (Order $data) {
        return $data->status->getTitle();
    }, 'filter' => CHtml::listData(OrderStatus::model()->findAll(), 'id', 'name')]]]);
    ?>
        </div>
开发者ID:yupe,项目名称:yupe,代码行数:31,代码来源:_form.php

示例9: stdClass

 * Results are formatted and put in $result
 * which is then json encoded and returned as a json file response
 */
$result = new stdClass();
/**
 * Process the search request
 */
if (isset($_POST['form']) && $_POST['form'] == "search") {
    if (isset($_POST['search_term']) && isset($_POST['search_type'])) {
        $search_term = $_POST['search_term'];
        $search_type = $_POST['search_type'];
        $result = "";
        $filters = $_POST['filters'];
        require_once APPLICATION_PATH . MODEL_DIR . '/Order.php';
        $order = new Order();
        $result = $order->search($search_term, $filters, $search_type);
    }
}
/**
 * Once a search result has been selected, this gets the rest of the selected user's info
 */
if (isset($_POST['form']) && $_POST['form'] == "get_order_info") {
    require_once APPLICATION_PATH . MODEL_DIR . '/Order.php';
    require_once APPLICATION_PATH . MODEL_DIR . '/Ajax.php';
    $order = new Order();
    if (!empty($_POST['shipment_id'])) {
        $param = $_POST['shipment_id'];
        $method = 'shipment_id';
    } elseif (!empty($_POST['order_id'])) {
        $param = $_POST['order_id'];
        $method = 'order_id';
开发者ID:kameshwariv,项目名称:testexample,代码行数:31,代码来源:searchOrders.php

示例10: Database

<?php

// core configuration
include_once "../config/core.php";
// check if logged in as admin
include_once "login_checker.php";
// include classes
include_once '../config/database.php';
include_once '../objects/category.php';
include_once '../objects/order.php';
// get database connection
$database = new Database();
$db = $database->getConnection();
// initialize objects
$order = new Order($db);
$category = new Category($db);
// get search term
$search_term = isset($_GET['s']) ? $_GET['s'] : '';
// set page title
$page_title = "Order Search Results";
// include page header HTML
include_once "layout_head.php";
// search order based on search term
$stmt = $order->search($search_term, $from_record_num, $records_per_page);
// count number of products returned
$num = $stmt->rowCount();
// include orders table HTML template
include_once "read_orders_template.php";
// include page footer HTML
include_once "layout_foot.php";
开发者ID:marwyre,项目名称:e-commerce,代码行数:30,代码来源:search_orders.php

示例11: set_msg

<?php

include 'inc.php';
if (!$user->is_admin()) {
    set_msg("You do not have enough permission.");
    header("Location: index.php");
    exit;
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $orders = Order::search($_POST);
} else {
    $orders = Order::search(array());
}
include 'header.php';
include 'menu.php';
?>
<div id="content">
  <div id="ajax-popup" style="display: none;">
    <div id="ajax-close"><a onclick="close_ajax()">Close</a></div>
    <div id="ajax-title">Product Details for Order ID <span id="ajax-id"> </span></div>
    <div id="ajax-loading">
      <p>Loading...</p>
      <img src="images/ajax-loader.gif" width="220" height="19" alt="Loading" />
    </div>
    <div id="ajax-body" style=""> </div>
  </div>
  <div id="admin-menu">
    <h2>Admin Panel</h2>
    <div class="admin-menu-item"><a href="admin_orders.php">Search Orders</a></div>
    <div class="admin-menu-item"><a href="admin_cusproducts.php">Search Customized Products</a></div>
  </div>
开发者ID:bensonby,项目名称:csc2720,代码行数:31,代码来源:admin_orders.php

示例12: array

<?php

$this->breadcrumbs = array('Orders' => array('index'), Yii::t('ShopModule.shop', 'Manage'));
$model = new Order();
$this->widget('zii.widgets.grid.CGridView', array('id' => 'order-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('order_id', 'customer.address.firstname', 'customer.address.lastname', array('name' => 'ordering_date', 'value' => 'date("M j, Y", $data->ordering_date)'), array('class' => 'CButtonColumn', 'template' => '{view}'))));
开发者ID:huynhchanhuy,项目名称:yii_shopping,代码行数:5,代码来源:admin.php


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