本文整理汇总了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);
}
示例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));
}
示例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));
}
示例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));
}
示例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);
}
示例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));
}
示例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>
示例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>
示例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';
示例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";
示例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>
示例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}'))));