Example #1
0
 public function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if (!$filter) {
         return parent::_filter($filter);
     }
     if (array_key_exists('rel_id', $filter)) {
         $obj_order_bills = $this->app->model('archive_order_bills');
         $bill_filter = array('rel_id|has' => $filter['rel_id'], 'bill_type' => 'refunds');
         $row_order_bills = $obj_order_bills->getList('bill_id', $bill_filter);
         $arr_member_id = array();
         if ($row_order_bills) {
             $arr_order_bills = array();
             foreach ($row_order_bills as $arr) {
                 $arr_order_bills[] = $arr['bill_id'];
             }
             $filter['refund_id|in'] = $arr_order_bills;
         } else {
             $filter['refund_id'] = 'a';
         }
         unset($filter['rel_id']);
     }
     $filter = parent::_filter($filter);
     return $filter;
 }
Example #2
0
<?php

/**
 * Template Name: Archive Page
 *
 * @package Inkness
 */
?>

<?php 
include_once "ArchiveBolo/archive_model.php";
include_once "ArchiveBolo/archive_view.php";
$model = new archive_model();
$agencies = $model->get_agencies();
$view = new archive_view();
//get the bolos for the desired agency (default value = 'Show ALL')
$result = $model->get_data($_POST['agency'], $_POST['offset'] + 0);
//update the view with the new data
$view->update_view($result, $data, $agencies, $_POST['agency'], $_POST['offset'] + 0);
?>

<script type="text/javascript">
    document.getElementById("myButton").onclick = function () {
        location.href = "?page_id=6";
    };
</script>
Example #3
0
 function _filter($filter, $tableAlias = null, $baseWhere = null)
 {
     if (isset($filter) && $filter && is_array($filter) && array_key_exists('member_login_name', $filter)) {
         $obj_pam_account = app::get('pam')->model('account');
         $pam_filter = array('login_name|has' => $filter['member_login_name']);
         $row_pam = $obj_pam_account->getList('*', $pam_filter);
         $arr_member_id = array();
         if ($row_pam) {
             foreach ($row_pam as $str_pam) {
                 $arr_member_id[] = $str_pam['account_id'];
             }
             $filter['member_id|in'] = $arr_member_id;
         } else {
             if ($filter['member_login_name'] == app::get('b2c')->_('非会员顾客')) {
                 $filter['member_id'] = 0;
             }
         }
         unset($filter['member_login_name']);
     }
     foreach (kernel::servicelist('b2c_mdl_orders.filter') as $k => $obj_filter) {
         if (method_exists($obj_filter, 'extend_filter')) {
             $obj_filter->extend_filter($filter);
         }
     }
     $info_object = kernel::service('sensitive_information');
     if (is_object($info_object)) {
         $info_object->opinfo($filter, 'b2c_mdl_orders', __FUNCTION__);
     }
     $filter = parent::_filter($filter);
     return $filter;
 }