/**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Workers('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Workers'])) {
         $model->attributes = $_GET['Workers'];
     }
     $dataProvider = new CActiveDataProvider('Workers', array('criteria' => array('condition' => "providers_id in (select providers_id from workers where users_id=" . Yii::app()->user->id . ")", 'order' => 'id'), 'pagination' => array('pageSize' => 10)));
     $this->render('admin', array('model' => $model, 'dataProvider' => $dataProvider));
 }