+ Distinction of outgoing credit requests from incoming requests
This commit is contained in:
parent
a299394c77
commit
43dae70858
|
@ -196,51 +196,40 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['message'] = "Login first!";
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
if ($this->input->get("u") !== null) {
|
||||
$super = $this->input->get("u");
|
||||
$this->session->set_userdata("current_super_demande", $super);
|
||||
|
||||
$debut = "";
|
||||
$fin = "";
|
||||
if ($this->input->get("d") !== null) {
|
||||
$debut = $this->input->get("d");
|
||||
$fin = $this->input->get("f");
|
||||
} else {
|
||||
$fin = date('Y-m-d');
|
||||
$debut = Date('Y-m-d', strtotime("-5 days"));
|
||||
}
|
||||
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d';
|
||||
$data['debut'] = $debut ? date($format, strtotime($debut)) : null;
|
||||
$data['fin'] = $fin ? date($format, strtotime($fin)) : null;
|
||||
$fin = Date('Y-m-d', strtotime($fin . "+1 day"));
|
||||
$debut = $this->input->get("d");
|
||||
$fin = $this->input->get("f");
|
||||
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d';
|
||||
$data['debut'] = $debut ? date($format, strtotime($debut)) : null;
|
||||
$data['fin'] = $fin ? date($format, strtotime($fin)) : null;
|
||||
$fin = Date('Y-m-d', strtotime($fin . "+1 day"));
|
||||
|
||||
$ville = $this->session->userdata('ville');
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = 'incoming';
|
||||
$data['demand_type'] = 'credit';
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesByNetwork($debut, $fin, $this->session->userdata('member_code'), $this->session->userdata('current_demande_ville'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesByNetwork($debut, $fin, $this->session->userdata('member_code'), $this->session->userdata('current_demande_ville'));
|
||||
$data['list'] = $this->user_model->getDemandesBySuper($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenByVille($this->session->userdata('member_code'), $this->session->userdata('network'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('demande_credit');
|
||||
$this->load->view('footer');
|
||||
|
||||
$ville = $this->session->userdata('ville');
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = $this->lang->line('crédits');
|
||||
$data['demand_type'] = 'credit';
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesByNetwork($debut, $fin, $this->session->userdata('member_code'), $this->session->userdata('current_demande_ville'), $super);
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesByNetwork($debut, $fin, $this->session->userdata('member_code'), $this->session->userdata('current_demande_ville'), $super);
|
||||
$data['list'] = $this->user_model->getDemandesBySuper($this->session->userdata('member_code'), $super);
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenByVille($this->session->userdata('member_code'), $super, $this->session->userdata('network'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$data['nameOfcurentGeolocatedUser'] = $this->user_model->nameOfCurrentGeolocatedUser_forSuper($super);
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('demande_credit');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,48 +117,49 @@ class Superviseur_dash extends CI_Controller
|
|||
$data['message'] = "Login first!";
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
$type = $this->input->get("type");
|
||||
$data['type'] = $type;
|
||||
|
||||
if($this->input->get("u") !== null){
|
||||
$debut = $this->input->get("d");
|
||||
$fin = $this->input->get("f");
|
||||
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d';
|
||||
$data['debut'] = $debut ? date($format, strtotime($debut)) : null;
|
||||
$data['fin'] = $fin ? date($format, strtotime($fin)) : null;
|
||||
$fin = Date('Y-m-d', strtotime($fin . "+1 day")); // Increment date because SQL BETWEEN
|
||||
|
||||
$user_geo = $this->input->get("u");
|
||||
$debut = $this->input->get("d");
|
||||
$fin = $this->input->get("f");
|
||||
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d' ;
|
||||
$data['debut'] = $debut ? date($format, strtotime($debut)) : null ;
|
||||
$data['fin'] = $fin ?date($format, strtotime($fin)): null ;
|
||||
$fin = Date('Y-m-d', strtotime($fin."+1 day")); // Increment date because SQL BETWEEN
|
||||
$network = $this->session->userdata('network');
|
||||
// $data['type'] = $this->lang->line('crédits');
|
||||
$data['demand_type'] = 'credit';
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
if ($type == 'incoming') {
|
||||
$data['active'] = "demandes_credits_entrantes";
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandes($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandes($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyen($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesForSuper($debut, $fin, $this->session->userdata('member_code'));
|
||||
|
||||
$network = $this->session->userdata('network');
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = $this->lang->line('crédits');
|
||||
$data['demand_type'] = 'credit';
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandes($user_geo,$debut,$fin,$this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande_s'] = $this->user_model->getRangeASCDemandesOut($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandes($user_geo,$debut,$fin,$this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande_s'] = $this->user_model->getRangeDESCDemandesOut($this->session->userdata('member_code'));
|
||||
$data['mydem'] = $this->user_model->getDemandesHyperForSuper($this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyen($user_geo,$debut,$fin,$this->session->userdata('member_code'));
|
||||
} else if ($type = 'outgoing') {
|
||||
$data['active'] = "demandes_credits_sortantes";
|
||||
$data['tab_fastDemande_s'] = $this->user_model->getRangeASCDemandesOut($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande_s'] = $this->user_model->getRangeDESCDemandesOut($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['mydem'] = $this->user_model->getDemandesHyperForSuper($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['temp_moyen_mine'] = $this->user_model->getTempsMoyenDemandeSup($this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesForSuper($user_geo,$debut,$fin,$this->session->userdata('member_code'));
|
||||
$data['geolocated_user'] = $this->user_model->getSuperNameAndCodeForSup($this->session->userdata('member_code'));
|
||||
$data['nameOfcurentGeolocatedUser'] = $this->user_model->nameOfCurrentGeolocatedUser_forSuper($user_geo);
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('demande_credit');
|
||||
$this->load->view('footer');
|
||||
}else{
|
||||
|
||||
}
|
||||
$data['geolocated_user'] = $this->user_model->getSuperNameAndCodeForSup($this->session->userdata('member_code'));
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('demande_credit');
|
||||
$this->load->view('footer');
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -440,4 +440,8 @@ $lang ['remaining_amount'] = 'Remaining amount';
|
|||
$lang ['amount_greater_than_balance'] = 'Amount greater than the compensation balance';
|
||||
$lang['no_refund'] = 'No refund';
|
||||
$lang['final_currency'] = 'Currency of the country of arrival';
|
||||
$lang['incoming_requests'] = 'Incoming requests';
|
||||
$lang['outgoing_requests'] = 'Outgoing requests';
|
||||
$lang['incoming_credits_requests'] = 'Incoming credit requests';
|
||||
$lang['outgoing_credits_requests'] = 'Outgoing credit requests';
|
||||
?>
|
||||
|
|
|
@ -452,5 +452,9 @@ $lang['remaining_amount'] = 'Montant restant';
|
|||
$lang['amount_greater_than_balance'] = 'Montant supérieur au solde de compensation';
|
||||
$lang['no_refund'] = 'Aucun remboursement';
|
||||
$lang['final_currency'] = 'Monnaie du pays d\'arrivée';
|
||||
$lang['incoming_requests'] = 'Demandes entrantes';
|
||||
$lang['outgoing_requests'] = 'Demandes sortantes';
|
||||
$lang['incoming_credits_requests'] = 'Demandes de crédits entrantes';
|
||||
$lang['outgoing_credits_requests'] = 'Demandes de crédits sortantes';
|
||||
|
||||
?>
|
||||
|
|
|
@ -272,46 +272,48 @@ class User_model extends CI_Model
|
|||
FROM info_demandeCredits AS d
|
||||
WHERE d.codeParrain='".$code_membre."' AND d.ville='".$ville."'
|
||||
ORDER BY dateAjout");
|
||||
}
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getDemandesForSuper($user_geo, $debut, $fin, $member_code){
|
||||
|
||||
$query = $this->db->query("SELECT *
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE d.codeParrain='".$member_code."'
|
||||
AND d.codeMembre='".$user_geo."'AND d.dateAjout BETWEEN '".$debut."' AND '".$fin."'
|
||||
ORDER BY dateAjout");
|
||||
|
||||
if($query->num_rows()>0){
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
}else{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getDemandesHyperForSuper($member_code){
|
||||
public function getDemandesForSuper($debut, $fin, $member_code)
|
||||
{
|
||||
|
||||
$query = $this->db->query("SELECT *
|
||||
$query = $this->db->query("SELECT *
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE d.codeMembre='".$member_code."'
|
||||
WHERE d.codeParrain='" . $member_code . "'
|
||||
AND d.dateAjout BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY dateAjout");
|
||||
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getDemandesHyperForSuper($debut, $fin, $member_code)
|
||||
{
|
||||
|
||||
$query = $this->db->query("SELECT *
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE d.codeMembre='" . $member_code . "' AND d.dateAjout BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY dateAjout DESC");
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandesAdForSuper($debut , $fin , $member_code){
|
||||
$chain = $debut ? "AND d.date_creation BETWEEN '".$debut."' AND '".$fin."'" : "";
|
||||
|
@ -476,20 +478,21 @@ class User_model extends CI_Model
|
|||
$this->db->from('demande_credit');
|
||||
$this->db->where('code',$codeParrain);
|
||||
$this->db->where('Statut',$statut);
|
||||
$query=$this->db->get();
|
||||
}
|
||||
$query = $this->db->get();
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query->row()->c;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query->row()->c;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public function getRangeASCDemandes($user_geo, $debut, $fin, $codeParrain){
|
||||
public function getRangeASCDemandes($debut, $fin, $codeParrain)
|
||||
{
|
||||
|
||||
if($codeParrain=='all'){
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
if ($codeParrain == 'all') {
|
||||
$query = $this->db->query("SELECT d.agent , d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
(SELECT TIMESTAMPDIFF(SECOND,dateAjout,dateModif)
|
||||
FROM demande_credit AS req_im
|
||||
WHERE req_im.statut='1' AND req_im.id=d.id) AS temps
|
||||
|
@ -497,54 +500,57 @@ class User_model extends CI_Model
|
|||
WHERE statut='1'
|
||||
ORDER BY temps
|
||||
LIMIT 5");
|
||||
}else{
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
} else {
|
||||
$query = $this->db->query("SELECT d.agent, d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE statut='1' AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$user_geo."'
|
||||
AND d.dateAjout BETWEEN '".$debut."' AND '".$fin."'
|
||||
WHERE statut='1' AND d.codeParrain='" . $codeParrain . "'
|
||||
AND d.dateAjout BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY temps
|
||||
LIMIT 5");
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
}else{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getRangeASCDemandesOut($codeParrain){
|
||||
public function getRangeASCDemandesOut($debut, $fin, $codeParrain)
|
||||
{
|
||||
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE statut='1' AND d.codeMembre='".$codeParrain."'
|
||||
WHERE statut='1' AND d.codeMembre='" . $codeParrain . "'
|
||||
AND d.dateAjout BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY temps
|
||||
LIMIT 5");
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getRangeASCDemandesByNetwork($debut, $fin, $codeParrain, $ville, $super){
|
||||
public function getRangeASCDemandesByNetwork($debut, $fin, $codeParrain, $ville)
|
||||
{
|
||||
|
||||
if($codeParrain=='all'){
|
||||
if ($codeParrain == 'all') {
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
(SELECT TIMESTAMPDIFF(SECOND,dateAjout,dateModif)
|
||||
FROM demande_credit AS req_im
|
||||
WHERE req_im.statut='1' AND req_im.id=d.id) AS temps
|
||||
FROM demande_credit AS d
|
||||
WHERE statut='1' AND d.reseau='".$ville."' AND date_creation BETWEEN '".$debut."' AND '".$fin."'
|
||||
WHERE statut='1' AND d.reseau='" . $ville . "' AND date_creation BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY temps
|
||||
LIMIT 5");
|
||||
}else{
|
||||
} else {
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE statut='1' AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$super."'
|
||||
WHERE statut='1' AND d.codeParrain='" . $codeParrain . "'
|
||||
AND dateAjout BETWEEN '".$debut."' AND '".$fin."'
|
||||
ORDER BY temps
|
||||
LIMIT 5");
|
||||
|
@ -580,20 +586,21 @@ class User_model extends CI_Model
|
|||
WHERE etat=1 AND d.code_membre='".$codeParrain."'". $chain
|
||||
."ORDER BY temps
|
||||
LIMIT 5");
|
||||
}
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getRangeDESCDemandes($user_geo, $debut, $fin, $codeParrain){
|
||||
public function getRangeDESCDemandes($debut, $fin, $codeParrain)
|
||||
{
|
||||
|
||||
if($codeParrain=='all'){
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
if ($codeParrain == 'all') {
|
||||
$query = $this->db->query("SELECT d.agent, d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
(SELECT TIMESTAMPDIFF(SECOND,dateAjout,dateModif)
|
||||
FROM demande_credit AS req_im
|
||||
WHERE req_im.statut='1' AND req_im.id=d.id) AS temps
|
||||
|
@ -601,54 +608,57 @@ class User_model extends CI_Model
|
|||
WHERE statut='1'
|
||||
ORDER BY temps DESC
|
||||
LIMIT 5");
|
||||
}else{
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
} else {
|
||||
$query = $this->db->query("SELECT d.agent, d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE statut='1' AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$user_geo."'
|
||||
AND d.dateAjout BETWEEN '".$debut."' AND '".$fin."'
|
||||
WHERE statut='1' AND d.codeParrain='" . $codeParrain . "'
|
||||
AND d.dateAjout BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY temps DESC
|
||||
LIMIT 5");
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
}else{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getRangeDESCDemandesOut($codeParrain){
|
||||
public function getRangeDESCDemandesOut($debut, $fin, $codeParrain)
|
||||
{
|
||||
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE statut='1' AND d.codeMembre='".$codeParrain."'
|
||||
WHERE statut='1' AND d.codeMembre='" . $codeParrain . "'
|
||||
AND d.dateAjout BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY temps DESC
|
||||
LIMIT 5");
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getRangeDESCDemandesBynetwork($debut, $fin, $codeParrain, $ville, $super){
|
||||
public function getRangeDESCDemandesBynetwork($debut, $fin, $codeParrain, $ville)
|
||||
{
|
||||
|
||||
if($codeParrain=='all'){
|
||||
if ($codeParrain == 'all') {
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
(SELECT TIMESTAMPDIFF(SECOND,dateAjout,dateModif)
|
||||
FROM demande_credit AS req_im
|
||||
WHERE req_im.statut='1' AND req_im.id=d.id) AS temps
|
||||
FROM demande_credit AS d
|
||||
WHERE statut='1' AND d.reseau='".$ville."' AND date_creation BETWEEN '".$debut."' AND '".$fin."'
|
||||
WHERE statut='1' AND d.reseau='" . $ville . "' AND date_creation BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY temps DESC
|
||||
LIMIT 5");
|
||||
}else{
|
||||
} else {
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE statut='1' AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$super."'
|
||||
WHERE statut='1' AND d.codeParrain='" . $codeParrain . "'
|
||||
AND dateAjout BETWEEN '".$debut."' AND '".$fin."'
|
||||
ORDER BY temps DESC
|
||||
LIMIT 5");
|
||||
|
@ -684,29 +694,29 @@ class User_model extends CI_Model
|
|||
WHERE etat=1 AND d.code_membre='".$codeParrain."'".$chain.
|
||||
"ORDER BY temps DESC
|
||||
LIMIT 5");
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getTempsMoyen($user_geo, $debut, $fin, $codeParrain){
|
||||
|
||||
if($codeParrain=='all'){
|
||||
$query = $this->db->query("SELECT AVG(TIMESTAMPDIFF(SECOND,dateAjout,dateModif)) AS temps FROM demande_credit WHERE statut='1'");
|
||||
}else{
|
||||
$query = $this->db->query("SELECT AVG(temps) AS temps
|
||||
FROM info_demandeCredits
|
||||
WHERE statut= '1' AND codeParrain='".$codeParrain."'
|
||||
AND codeMembre='".$user_geo."'
|
||||
AND dateAjout BETWEEN '".$debut."' AND '".$fin."'");
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getTempsMoyen($debut, $fin, $codeParrain)
|
||||
{
|
||||
|
||||
if ($codeParrain == 'all') {
|
||||
$query = $this->db->query("SELECT AVG(TIMESTAMPDIFF(SECOND,dateAjout,dateModif)) AS temps FROM demande_credit WHERE statut='1'");
|
||||
} else {
|
||||
$query = $this->db->query("SELECT AVG(temps) AS temps
|
||||
FROM info_demandeCredits
|
||||
WHERE statut= '1' AND codeParrain='" . $codeParrain . "'
|
||||
AND dateAjout BETWEEN '" . $debut . "' AND '" . $fin . "'");
|
||||
}
|
||||
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query->row()->temps;
|
||||
}else{
|
||||
return false;
|
||||
|
@ -720,31 +730,32 @@ class User_model extends CI_Model
|
|||
$query = $this->db->query("SELECT AVG(TIMESTAMPDIFF(SECOND,dateAjout,dateModif)) AS temps FROM demande_credit WHERE statut='1'");
|
||||
}else{
|
||||
$query = $this->db->query("SELECT AVG(temps) AS temps FROM info_demandeCredits WHERE statut='1' AND codeMembre='".$codeParrain."'");
|
||||
}
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query->row()->temps;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query->row()->temps;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getTempsMoyenByVille($codeParrain,$super){
|
||||
public function getTempsMoyenByVille($codeParrain, $network)
|
||||
{
|
||||
|
||||
if($codeParrain=='all'){
|
||||
$query = $this->db->query("SELECT AVG(TIMESTAMPDIFF(SECOND,dateAjout,dateModif)) AS temps FROM demande_credit WHERE statut='1'AND reseau='".$network."' ");
|
||||
}else{
|
||||
$query = $this->db->query("SELECT AVG(temps) AS temps FROM info_demandeCredits WHERE statut='1' AND codeParrain='".$codeParrain."' AND codeMembre='".$super."' ");
|
||||
}
|
||||
if ($codeParrain == 'all') {
|
||||
$query = $this->db->query("SELECT AVG(TIMESTAMPDIFF(SECOND,dateAjout,dateModif)) AS temps FROM demande_credit WHERE statut='1'AND reseau='" . $network . "' ");
|
||||
} else {
|
||||
$query = $this->db->query("SELECT AVG(temps) AS temps FROM info_demandeCredits WHERE statut='1' AND codeParrain='" . $codeParrain . "' ");
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query->row()->temps;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query->row()->temps;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getTempsMoyenAd($debut, $fin, $codeParrain){
|
||||
|
||||
|
@ -1690,30 +1701,31 @@ class User_model extends CI_Model
|
|||
FROM super_infos AS child
|
||||
INNER JOIN hyper_infos AS dad
|
||||
ON child.code_parrain='".$codeHyp."'
|
||||
WHERE child.category='super' AND dad.category='hyper' AND dad.code_membre='".$codeHyp."'
|
||||
WHERE child.category='super' AND dad.category='hyper' AND dad.code_membre='" . $codeHyp . "'
|
||||
");
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandesBySuper($code_parrain, $code_membre){
|
||||
public function getDemandesBySuper($debut, $fin, $code_parrain)
|
||||
{
|
||||
|
||||
$query = $this->db->query("SELECT *
|
||||
$query = $this->db->query("SELECT *
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE d.codeParrain='".$code_parrain."' AND d.codeMembre='".$code_membre."'
|
||||
WHERE d.codeParrain='" . $code_parrain . "' AND d.dateAjout BETWEEN '" . $debut . "' AND '" . $fin . "'
|
||||
ORDER BY dateAjout");
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if ($query->num_rows() > 0) {
|
||||
return $query;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getGameCountry(){
|
||||
$query = $this->db->query("SELECT countries.id,countries.name
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -120,31 +120,40 @@
|
|||
</li>
|
||||
|
||||
<li class="<?php if($active=="geolocated"){echo "active ";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-default">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></span>
|
||||
</a>
|
||||
<a href="#" data-toggle="modal" data-target="#modal-default">
|
||||
<i class="fa fa-users"></i>
|
||||
<span><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="super"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getAllSupervisor') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Superviseur'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if ($active == "super") {
|
||||
echo "active ";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getAllSupervisor') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Superviseur'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="demandes"){echo "active ";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-default2">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes de crédits'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if ($active == "demandes") {
|
||||
echo "active ";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getDemandes') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes de crédits'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="demandesAd"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getDemandesAd') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes adhésion'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if($hasWallet){
|
||||
?>
|
||||
<li class="<?php if($active=="wallet"){echo "active";} ?>">
|
||||
</li>
|
||||
<li class="<?php if ($active == "demandesAd") {
|
||||
echo "active ";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getDemandesAd') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes adhésion'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($hasWallet) {
|
||||
?>
|
||||
<li class="<?php if ($active == "wallet") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/wallet') ?>">
|
||||
<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet<?php //echo $this->lang->line('Game'); ?></span>
|
||||
</a>
|
||||
|
@ -211,64 +220,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modal-default2">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="#" method="post" id="getDemandes">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('Utilisateurs_géolocalisés'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$result=$superviseurs;;
|
||||
if($result){
|
||||
$numrows=$result->num_rows();
|
||||
|
||||
if ($numrows > 0) { ?>
|
||||
<label for="selected-super"><?php echo $this->lang->line('Superviseur'); ?></label>
|
||||
<select class="form-control input-lg" name="geo_user" id="selected-super" required>
|
||||
<?php foreach($result->result() as $row) {
|
||||
|
||||
echo "<option value='".$row->member_code."'>".$row->lastname." - ".$row->member_code."</option>";
|
||||
} ?>
|
||||
</select>
|
||||
<?php }else{
|
||||
echo $this->lang->line('no_supervisor');
|
||||
}
|
||||
?>
|
||||
<?php } else {
|
||||
echo $this->lang->line('no_supervisor');
|
||||
} ?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Période </span>
|
||||
<span class="info-box-number">
|
||||
<div id="reportrange" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<?php if($result){ ?>
|
||||
<button type="button" id="send-getDemandes" class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal -->
|
||||
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
|
||||
|
@ -311,11 +263,4 @@
|
|||
cb(start, end);
|
||||
|
||||
});
|
||||
|
||||
$('#send-getDemandes').click(function(){
|
||||
var debut = startDate.format('YYYY-MM-DD');
|
||||
var fin = endDate.format('YYYY-MM-DD');
|
||||
var user_geo = $('#selected-super').find(":selected").val();
|
||||
window.location.replace("<?php echo base_url('index.php/Hyperviseur_dash/getDemandes')?>"+"?d="+debut+"&f="+fin+"&u="+user_geo);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -102,30 +102,60 @@
|
|||
<section class="sidebar">
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
<li class="<?php if($active=="dash"){echo "active ";} ?>">
|
||||
<li class="<?php if ($active == "dash") {
|
||||
echo "active ";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash') ?>">
|
||||
<i class="fa fa-dashboard"></i> <span><?php echo $this->lang->line('Tableau de bord'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="geolocated"){echo "active ";} ?>">
|
||||
<li class="<?php if ($active == "geolocated") {
|
||||
echo "active ";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getAllUser_g') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></span>
|
||||
<i class="fa fa-users"></i>
|
||||
<span><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="demandes"){echo "active ";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-choix-geo-user">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes de crédits'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- <li class="--><?php // if($active=="demandesAd"){echo "active ";} ?><!--">-->
|
||||
<!-- <a href="--><?php // echo base_url('index.php/Superviseur_dash/getDemandesAd') ?><!--">-->
|
||||
<!-- <i class="fa fa-users"></i> <span> --><?php //echo $this->lang->line('Demandes adhésion'); ?><!--</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </li>-->
|
||||
<?php if($hasWallet){
|
||||
<li class="<?= "treeview " . ((strpos($active, "demandes_credits") !== false) ? "active menu-open" : "") ?>"
|
||||
style="height: auto;">
|
||||
<a href="#">
|
||||
<i class="fa fa-users"></i>
|
||||
<span><?php echo $this->lang->line('Demandes de crédits'); ?></span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu"
|
||||
style="<?= (strpos($active, "demandes_credits") !== false) ? "" : "display: none;" ?>">
|
||||
<li class="<?php if ($active == "demandes_credits_entrantes") {
|
||||
echo "active ";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes?type=incoming') ?>"><i
|
||||
class="fa fa-arrow-down"></i><?php echo $this->lang->line('incoming_requests'); ?>
|
||||
</a></li>
|
||||
<li class="<?php if ($active == "demandes_credits_sortantes") {
|
||||
echo "active ";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes?type=outgoing') ?>"><i
|
||||
class="fa fa-arrow-up"></i><?php echo $this->lang->line('outgoing_requests'); ?>
|
||||
</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- <li class="--><?php // if($active=="demandesAd"){echo "active ";} ?><!--">-->
|
||||
<!-- <a href="-->
|
||||
<?php // echo base_url('index.php/Superviseur_dash/getDemandesAd') ?><!--">-->
|
||||
<!-- <i class="fa fa-users"></i> <span> -->
|
||||
<?php //echo $this->lang->line('Demandes adhésion'); ?><!--</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </li>-->
|
||||
<?php if ($hasWallet) {
|
||||
?>
|
||||
<li class="<?php if($active=="wallet"){echo "active";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/wallet') ?>">
|
||||
<li class="<?php if ($active == "wallet") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/wallet') ?>">
|
||||
<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet<?php //echo $this->lang->line('Game'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -135,63 +165,6 @@
|
|||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
<div class="modal fade" id="modal-choix-geo-user">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="#" method="post" id="getDemandes">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('Utilisateurs_géolocalisés'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$result=$geolocated_user;
|
||||
if($result){
|
||||
$numrows=$result->num_rows();
|
||||
|
||||
if ($numrows > 0) { ?>
|
||||
<label for="selected-geo-user"><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></label>
|
||||
<select class="form-control input-lg" name="geo_user" id="selected-geo-user" required>
|
||||
<?php foreach($result->result() as $row) {
|
||||
|
||||
echo "<option value='".$row->member_code."'>".$row->lastname." - ".$row->member_code."</option>";
|
||||
} ?>
|
||||
</select>
|
||||
<?php }else{
|
||||
echo $this->lang->line('no_geolocated_agent');
|
||||
}
|
||||
?>
|
||||
<?php }else {
|
||||
echo $this->lang->line('no_geolocated_agent');
|
||||
}?>
|
||||
|
||||
</div>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Période </span>
|
||||
<span class="info-box-number">
|
||||
<div id="reportrange" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span></span> <i class="fa fa-caret-down"></i>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<?php if($result){ ?>
|
||||
<button type="button" id="send-getDemandes" class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal -->
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
|
||||
|
@ -233,10 +206,4 @@
|
|||
|
||||
});
|
||||
|
||||
$('#send-getDemandes').click(function(){
|
||||
var debut = startDate.format('YYYY-MM-DD');
|
||||
var fin = endDate.format('YYYY-MM-DD');
|
||||
var user_geo = $('#selected-geo-user').find(":selected").val();
|
||||
window.location.replace("<?php echo base_url('index.php/Superviseur_dash/getDemandes')?>"+"?d="+debut+"&f="+fin+"&u="+user_geo);
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue