예제 #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Perfil::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'fechaNacimiento' => $this->fechaNacimiento, 'renumeracionActual' => $this->renumeracionActual, 'renumeracionIdeal' => $this->renumeracionIdeal]);
     $query->andFilterWhere(['like', 'apellidos', $this->apellidos])->andFilterWhere(['like', 'nombres', $this->nombres])->andFilterWhere(['like', 'genero', $this->genero])->andFilterWhere(['like', 'correo', $this->correo])->andFilterWhere(['like', 'valorAgregado', $this->valorAgregado])->andFilterWhere(['like', 'telefono', $this->telefono])->andFilterWhere(['like', 'celular', $this->celular])->andFilterWhere(['like', 'licenciaConducir', $this->licenciaConducir])->andFilterWhere(['like', 'rutaCV', $this->rutaCV])->andFilterWhere(['like', 'estado', $this->estado]);
     return $dataProvider;
 }
예제 #2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Perfil::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     // grid filtering conditions
     $query->andFilterWhere(['id' => $this->id]);
     $query->andFilterWhere(['like', 'nombre_apellido', $this->nombre_apellido])->andFilterWhere(['like', 'Pais', $this->Pais])->andFilterWhere(['like', 'email', $this->email]);
     return $dataProvider;
 }
예제 #3
0
 public function actionGetrank()
 {
     $rankLista = array();
     $rankUser = array();
     $modelAposta = User::find()->orderby('id')->all();
     $total = 0;
     $id_user = 0;
     foreach ($modelAposta as $item) {
         $perfil = Perfil::find()->where(['=', 'id', $item->id])->one();
         if ($perfil != null) {
             $rankUser = array("acertos" => Rank::GetAcertos($item->id), "nome" => $perfil->nome, "pontos" => Rank::actionGetTotal($item->id), "foto" => $perfil->foto, "resultados" => Rank::GetResultados($item->id));
             array_push($rankLista, $rankUser);
         }
     }
     $rankLista = Rank::ordenarRank($rankLista, 'pontos', 'acertos');
     return $this->render('getrank', ['dataProvider' => $rankLista]);
 }
예제 #4
0
파일: main.php 프로젝트: dieos2/bolaoyyi2

                    </li>
                    <li class="dropdown hidden-xs">


                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <span class="thumb-sm avatar pull-left">
                            <img src="/images/<?php 
echo Perfil::find($modelUsers->id)->where(['=', 'id', $modelUsers->id])->one()->foto;
?>
">
                            </span><?php 
echo Perfil::find()->where(['=', 'id', $modelUsers->id])->one()->nome;
?>
                          
                               
                        </a>
                        <ul class="dropdown-menu animated fadeInRight">
                            <span class="arrow top"></span>
                            <li> <a href="#">Settings</a> 
                            </li>
                            <li>
                                <a href="/perfil/trocasenha">Trocar Senha</a>
                            </li>
                            <li>
                                <a href="#">
                                    <span class="badge bg-danger pull-right">3</span> Notifications</a>
                            </li>
예제 #5
0
파일: Rank.php 프로젝트: dieos2/bolaoyyi2
 public static function GetPosicao($id)
 {
     $rankLista = array();
     $rankUser = array();
     $modelAposta = User::find()->orderby('id')->all();
     $total = 0;
     $id_user = 0;
     foreach ($modelAposta as $item) {
         $perfil = Perfil::find()->where(['=', 'id', $item->id])->one();
         if ($perfil != null) {
             $rankUser = array("acertos" => Rank::GetAcertos($item->id), "nome" => $perfil->nome, "id" => $item->id, "pontos" => Rank::actionGetTotal($item->id), "foto" => $perfil->foto, "resultados" => Rank::GetResultados($item->id));
             array_push($rankLista, $rankUser);
         }
     }
     $rankLista = Rank::ordenarRank($rankLista, 'pontos', 'acertos');
     $key = array_search($id, array_column($rankLista, 'id'));
     return $key + 1;
 }
예제 #6
0
파일: index.php 프로젝트: dieos2/bolaoyyi2
<?php 
use app\models\User;
use app\models\Rank;
use app\models\Perfil;
$modelUsers = User::findByUsername(Yii::$app->user->identity->username);
$perfil = Perfil::find()->where(['=', 'id', $modelUsers->id])->one();
?>
<section class="vbox">
                        <header class="header bg-white b-b b-light">
                            <p>Extrato de Pontos <small>(de jogos realizados)</small></p>
                        </header>
                        <section class="scrollable wrapper">
                            <div class="row">
                                <div class="col-lg-8">
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <section class="panel panel-default">
                                                <header class="panel-heading bg-danger lt no-border">
                                                    <div class="clearfix"><a href="#" class="pull-left thumb avatar b-3x m-r">
                                                        <img src='/images/<?php 
echo $perfil->foto;
?>
' class="img-circle">
                                                    </a>
                                                        <div class="clear">
                                                            <div class="h3 m-t-xs m-b-xs text-white"><?php 
$perfil->nome;
?>
 <i class="fa fa-circle text-white pull-right text-xs m-t-sm"></i></div>
                                                            <small class="text-muted"></small> </div>