Update balance statement view
This commit is contained in:
parent
ed8ee1c477
commit
d6285afcea
|
@ -1,5 +1,7 @@
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond $1 !^(index\.php|assets/|robots\.txt)
|
RewriteCond $1 !^(index\.php|assets/|robots\.txt)
|
||||||
RewriteRule ^(.*)$ index.php/$1 [L]
|
RewriteRule ^(.*)$ index.php/$1 [L]
|
||||||
|
</IfModule>
|
||||||
|
|
|
@ -1024,12 +1024,12 @@ class Gestion extends CI_Controller
|
||||||
$max = 999999;
|
$max = 999999;
|
||||||
$data['paliers'] = $this->user_model->getPaliers();
|
$data['paliers'] = $this->user_model->getPaliers();
|
||||||
$data['pays'] = $this->user_model->getAllGameCountries();
|
$data['pays'] = $this->user_model->getAllGameCountries();
|
||||||
$data['list'] = $this->user_model->getMembers($pays);
|
|
||||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||||
$data['q1'] = $this->user_model->getQuota(1);
|
$data['q1'] = $this->user_model->getQuota(1);
|
||||||
$data['q2'] = $this->user_model->getQuota(2);
|
$data['q2'] = $this->user_model->getQuota(2);
|
||||||
$data['q3'] = $this->user_model->getQuota(3);
|
$data['q3'] = $this->user_model->getQuota(3);
|
||||||
$data['q4'] = $this->user_model->getQuota(4);
|
$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['quota1'] = $this->user_model->getCoutForQuota($pays, $data['q1'], $data['q2']);
|
||||||
$data['quota2'] = $this->user_model->getCoutForQuota($pays, $data['q2'], $data['q3']);
|
$data['quota2'] = $this->user_model->getCoutForQuota($pays, $data['q2'], $data['q3']);
|
||||||
$data['quota3'] = $this->user_model->getCoutForQuota($pays, $data['q3'], $data['q4']);
|
$data['quota3'] = $this->user_model->getCoutForQuota($pays, $data['q3'], $data['q4']);
|
||||||
|
|
|
@ -1694,9 +1694,28 @@ class User_model extends CI_Model
|
||||||
return ($query->num_rows() > 0) ? $query : false;
|
return ($query->num_rows() > 0) ? $query : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
|
||||||
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");
|
$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");
|
||||||
|
|
||||||
if($query->num_rows()>0){
|
if($query->num_rows()>0){
|
||||||
return $query->row()->c;
|
return $query->row()->c;
|
||||||
|
@ -1704,12 +1723,11 @@ class User_model extends CI_Model
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public function getMembers($pays,$minQuota){
|
||||||
public function getMembers($pays){
|
|
||||||
$query = $this->db->query("SELECT t.lastname,t.phone,t.email,t.total
|
$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
|
FROM (SELECT ag.lastname, ag.phone, ag.email,COUNT(*) AS total FROM agents_game g
|
||||||
INNER JOIN users ON game.id_parrain=users.id
|
INNER JOIN agent_plus ag ON g.id_parrain = ag.id
|
||||||
WHERE `id_pays`=".$pays." GROUP BY `id_parrain` HAVING COUNT(*) >= 20) AS t");
|
WHERE `id_pays`=".$pays." GROUP BY `id_parrain` HAVING COUNT(*) >= $minQuota) AS t");
|
||||||
return ($query->num_rows() > 0) ? $query : false;
|
return ($query->num_rows() > 0) ? $query : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@
|
||||||
<th><?= $this->lang->line('Telephone') ?></th>
|
<th><?= $this->lang->line('Telephone') ?></th>
|
||||||
<th><?= $this->lang->line('code membre') ?></th>
|
<th><?= $this->lang->line('code membre') ?></th>
|
||||||
<th>Agent</th>
|
<th>Agent</th>
|
||||||
|
<th>Parrain</th>
|
||||||
<?php if ($this->session->userdata('category') != 'super') { ?>
|
<?php if ($this->session->userdata('category') != 'super') { ?>
|
||||||
<th align='center'>Action</th>
|
<th align='center'>Action</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
@ -116,6 +117,12 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
foreach ($wallets->result() as $row) {
|
foreach ($wallets->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++;
|
$num++;
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
<td align='center' >$num</td>
|
<td align='center' >$num</td>
|
||||||
|
@ -123,7 +130,8 @@
|
||||||
<td>" . Money::of(round($row->balance_com, 2), $row->currency_code, $context)->formatTo('fr_FR') . "</td>
|
<td>" . Money::of(round($row->balance_com, 2), $row->currency_code, $context)->formatTo('fr_FR') . "</td>
|
||||||
<td>" . $row->transactionNumber . "</td>
|
<td>" . $row->transactionNumber . "</td>
|
||||||
<td>" . $row->codeMembre . "</td>
|
<td>" . $row->codeMembre . "</td>
|
||||||
<td>" . $row->lastname . "</td>";
|
<td>" . $row->lastname . "</td>
|
||||||
|
<td>" . $parrain . "</td>";
|
||||||
?>
|
?>
|
||||||
<?php if ($this->session->userdata('category') != 'super') { ?>
|
<?php if ($this->session->userdata('category') != 'super') { ?>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
<label><?php echo $row->libelle; ?>:</label>
|
<label><?php echo $row->libelle; ?>:</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
|
<i class="fa fa-flag-checkered"></i>
|
||||||
</div>
|
</div>
|
||||||
<input type="number" id="palier<?php echo $i; ?>" value="<?php echo $row->valeur; ?>" class="form-control">
|
<input type="number" id="palier<?php echo $i; ?>" value="<?php echo $row->valeur; ?>" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
||||||
<h1>
|
<h1>
|
||||||
<?php echo $this->lang->line('Géolocalisation'); ?>
|
<?php echo $this->lang->line('Campagne'); ?>
|
||||||
</h1>
|
</h1>
|
||||||
<?php
|
<?php
|
||||||
$site_url = base_url();
|
$site_url = base_url();
|
||||||
|
|
Loading…
Reference in New Issue