diff --git a/.htaccess b/.htaccess
index b9b45efc..c179f1f0 100755
--- a/.htaccess
+++ b/.htaccess
@@ -1,5 +1,7 @@
-RewriteEngine On
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteCond $1 !^(index\.php|assets/|robots\.txt)
-RewriteRule ^(.*)$ index.php/$1 [L]
\ No newline at end of file
+
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond $1 !^(index\.php|assets/|robots\.txt)
+ RewriteRule ^(.*)$ index.php/$1 [L]
+
diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php
index 57363415..f1503c87 100755
--- a/application/controllers/Gestion.php
+++ b/application/controllers/Gestion.php
@@ -1024,12 +1024,12 @@ class Gestion extends CI_Controller
$max = 999999;
$data['paliers'] = $this->user_model->getPaliers();
$data['pays'] = $this->user_model->getAllGameCountries();
- $data['list'] = $this->user_model->getMembers($pays);
$data['game_pays'] = $this->user_model->getGameCountry();
$data['q1'] = $this->user_model->getQuota(1);
$data['q2'] = $this->user_model->getQuota(2);
$data['q3'] = $this->user_model->getQuota(3);
$data['q4'] = $this->user_model->getQuota(4);
+ $data['list'] = $this->user_model->getMembers($pays,$data['q1']);
$data['quota1'] = $this->user_model->getCoutForQuota($pays, $data['q1'], $data['q2']);
$data['quota2'] = $this->user_model->getCoutForQuota($pays, $data['q2'], $data['q3']);
$data['quota3'] = $this->user_model->getCoutForQuota($pays, $data['q3'], $data['q4']);
diff --git a/application/models/User_model.php b/application/models/User_model.php
index 06aa6852..b9689136 100755
--- a/application/models/User_model.php
+++ b/application/models/User_model.php
@@ -1694,24 +1694,42 @@ class User_model extends CI_Model
return ($query->num_rows() > 0) ? $query : false;
}
- public function getCoutForQuota($pays,$quota_inf,$quota_sup){
+// public function getCoutForQuota($pays,$quota_inf,$quota_sup){
+//
+// $query = $this->db->query("SELECT COUNT(*) AS c FROM (SELECT * FROM game WHERE `id_pays`=".$pays." GROUP BY `id_parrain` HAVING COUNT(*) >= ".$quota_inf." AND COUNT(*) < ".$quota_sup." ) AS t");
+//
+// if($query->num_rows()>0){
+// return $query->row()->c;
+// }else{
+// return false;
+// }
+// }
+//
+// public function getMembers($pays,$minQuota){
+// $query = $this->db->query("SELECT t.lastname,t.phone,t.email,t.total
+// FROM (SELECT users.lastname,users.phone,users.email,COUNT(*) AS total FROM game
+// INNER JOIN users ON game.id_parrain=users.id
+// WHERE `id_pays`=".$pays." GROUP BY `id_parrain` HAVING COUNT(*) >= $minQuota) AS t");
+// return ($query->num_rows() > 0) ? $query : false;
+// }
- $query = $this->db->query("SELECT COUNT(*) AS c FROM (SELECT * FROM game WHERE `id_pays`=".$pays." GROUP BY `id_parrain` HAVING COUNT(*) >= ".$quota_inf." AND COUNT(*) < ".$quota_sup." ) AS t");
+ public function getCoutForQuota($pays,$quota_inf,$quota_sup){
- if($query->num_rows()>0){
- return $query->row()->c;
- }else{
- return false;
- }
- }
+ $query = $this->db->query("SELECT COUNT(*) AS c FROM (SELECT * FROM agents_game WHERE `id_pays`=".$pays." GROUP BY `id_parrain` HAVING COUNT(*) >= ".$quota_inf." AND COUNT(*) < ".$quota_sup." ) AS t");
- public function getMembers($pays){
- $query = $this->db->query("SELECT t.lastname,t.phone,t.email,t.total
- FROM (SELECT users.lastname,users.phone,users.email,COUNT(*) AS total FROM game
- INNER JOIN users ON game.id_parrain=users.id
- WHERE `id_pays`=".$pays." GROUP BY `id_parrain` HAVING COUNT(*) >= 20) AS t");
+ if($query->num_rows()>0){
+ return $query->row()->c;
+ }else{
+ return false;
+ }
+ }
+ public function getMembers($pays,$minQuota){
+ $query = $this->db->query("SELECT t.lastname,t.phone,t.email,t.total
+ FROM (SELECT ag.lastname, ag.phone, ag.email,COUNT(*) AS total FROM agents_game g
+ INNER JOIN agent_plus ag ON g.id_parrain = ag.id
+ WHERE `id_pays`=".$pays." GROUP BY `id_parrain` HAVING COUNT(*) >= $minQuota) AS t");
return ($query->num_rows() > 0) ? $query : false;
- }
+ }
public function test($pays,$hyper,$ville){
diff --git a/application/views/config_wallet_ilink_hyp/etat_soldes.php b/application/views/config_wallet_ilink_hyp/etat_soldes.php
index b06cf76d..e030e6f3 100755
--- a/application/views/config_wallet_ilink_hyp/etat_soldes.php
+++ b/application/views/config_wallet_ilink_hyp/etat_soldes.php
@@ -107,6 +107,7 @@