From d6285afceabed728591a29aee48914741a95b668 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Fri, 25 Jun 2021 09:46:48 +0100 Subject: [PATCH] Update balance statement view --- .htaccess | 12 +- application/controllers/Gestion.php | 2 +- application/models/User_model.php | 46 +- .../config_wallet_ilink_hyp/etat_soldes.php | 10 +- application/views/game.php | 1 + application/views/gestion_campagne.php | 646 +++++++++--------- 6 files changed, 373 insertions(+), 344 deletions(-) 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 @@ lang->line('Telephone') ?> lang->line('code membre') ?> Agent + Parrain session->userdata('category') != 'super') { ?> Action @@ -116,6 +117,12 @@ result() as $row) { + $parrain = $row->parrain; + if($row->codeMembre == $row->codeParrain) + $parrain =''; + else if($row->codeParrain == $this->session->userdata('member_code')) + $parrain = $this->lang->line('Vous'); + $num++; echo " $num @@ -123,7 +130,8 @@ " . Money::of(round($row->balance_com, 2), $row->currency_code, $context)->formatTo('fr_FR') . " " . $row->transactionNumber . " " . $row->codeMembre . " - " . $row->lastname . ""; + " . $row->lastname . " + " . $parrain . ""; ?> session->userdata('category') != 'super') { ?> diff --git a/application/views/game.php b/application/views/game.php index 59c2de7a..5dd38a76 100755 --- a/application/views/game.php +++ b/application/views/game.php @@ -88,6 +88,7 @@
+
diff --git a/application/views/gestion_campagne.php b/application/views/gestion_campagne.php index a9f718c4..034d82bf 100755 --- a/application/views/gestion_campagne.php +++ b/application/views/gestion_campagne.php @@ -1,323 +1,323 @@ - - - - - -
- - -
- -

- lang->line('Géolocalisation'); ?> -

- -
- -

Erreur!

- -
- - -
- -

Success!

- -
- - -
- -
-
-
-
-
-
-
-
-
- num_rows(); - if ($numrows > 0) { ?> - - - lang->line('Aucun pays'); - } - ?> -
-
-
-
- -
-
- -
- -
-
-
-
-
- -
-
- -
- -
-
-
-
- -
-
-
-
-
-
-
-

Décompte

-
-
-
- -
-
-

".$agents[$i][0]."

-

".$agents[$i][2]." points physiques

-

".$geo_correct[$i][1]." contacts correctes

-

".$agents[$i][1]." points géolocalisés

-
-
- -
-
-
"; - } - ?> -
-
-
-

-

Points géolocalisés

-
-
- -
-
-
-
-
-
-

-

Points contact correct

-
-
- -
-
-
-
-
-
-

-

Points physiques

-
-
- -
-
-
-
-
-
-
-
-

Répartition par réseaux

-
-
-
- -
-
-

".$networks_compte[$i]."

-

".$networks_name[$i]."

-
-
- -
-
-
"; - } - ?> -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +
+ + +
+ +

+ lang->line('Campagne'); ?> +

+ +
+ +

Erreur!

+ +
+ + +
+ +

Success!

+ +
+ + +
+ +
+
+
+
+
+
+
+
+
+ num_rows(); + if ($numrows > 0) { ?> + + + lang->line('Aucun pays'); + } + ?> +
+
+
+
+ +
+
+ +
+ +
+
+
+
+
+ +
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+
+

Décompte

+
+
+
+ +
+
+

".$agents[$i][0]."

+

".$agents[$i][2]." points physiques

+

".$geo_correct[$i][1]." contacts correctes

+

".$agents[$i][1]." points géolocalisés

+
+
+ +
+
+
"; + } + ?> +
+
+
+

+

Points géolocalisés

+
+
+ +
+
+
+
+
+
+

+

Points contact correct

+
+
+ +
+
+
+
+
+
+

+

Points physiques

+
+
+ +
+
+
+
+
+
+
+
+

Répartition par réseaux

+
+
+
+ +
+
+

".$networks_compte[$i]."

+

".$networks_name[$i]."

+
+
+ +
+
+
"; + } + ?> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +