From dabdfd1fea6316d434bc90ef6897eb4b2cf2ce1c Mon Sep 17 00:00:00 2001 From: DJERY-TOM Date: Sat, 2 May 2020 11:49:34 +0100 Subject: [PATCH] + Fix transate and demande credit and adhesion bug --- application/controllers/Gestion.php | 1 + application/controllers/Hyperviseur_dash.php | 6 +- application/controllers/LanguageSwitcher.php | 32 +- application/controllers/Superviseur_dash.php | 7 +- application/controllers/Users.php | 5 +- application/hooks/LanguageLoader.php | 453 +++--- application/language/english/message_lang.php | 6 + application/language/french/message_lang.php | 7 +- application/models/User_model.php | 44 +- application/views/demande.php | 61 +- application/views/demande_adhesion.php | 605 ++++++++ application/views/demande_credit.php | 1290 +++++++++++++++++ application/views/gestion_wallet.php | 14 +- application/views/gestion_wallet_sup.php | 19 +- application/views/historique_transactions.php | 37 +- application/views/login.php | 4 +- 16 files changed, 2274 insertions(+), 317 deletions(-) create mode 100644 application/views/demande_adhesion.php create mode 100644 application/views/demande_credit.php diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php index 21027673..5fe4f807 100644 --- a/application/controllers/Gestion.php +++ b/application/controllers/Gestion.php @@ -1715,6 +1715,7 @@ class Gestion extends CI_Controller private function historique($network_id ,$startDate ,$endDate) { + $format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d' ; $data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null ; $data['endDate'] = $endDate ?date($format, strtotime($endDate)): null ; diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 36e4d0ab..adb3af50 100644 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -224,12 +224,12 @@ class Hyperviseur_dash extends CI_Controller $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($debut,$fin,$this->session->userdata('member_code'),$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')); $this->load->view('header_hyp', $data); - $this->load->view('demande'); + $this->load->view('demande_credit'); $this->load->view('footer'); } } @@ -289,7 +289,7 @@ class Hyperviseur_dash extends CI_Controller $data['type'] = $this->lang->line('Adhésion'); $data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id')); $this->load->view('header_hyp', $data); - $this->load->view('demande'); + $this->load->view('demande_adhesion'); $this->load->view('footer'); } } diff --git a/application/controllers/LanguageSwitcher.php b/application/controllers/LanguageSwitcher.php index 698d0c48..c720b6f2 100644 --- a/application/controllers/LanguageSwitcher.php +++ b/application/controllers/LanguageSwitcher.php @@ -1,16 +1,16 @@ -session->set_userdata('site_lang', $language); - - redirect($_SERVER['HTTP_REFERER']); - - } -} \ No newline at end of file +session->set_userdata('site_lang', $language); + + redirect($_SERVER['HTTP_REFERER']); + + } +} diff --git a/application/controllers/Superviseur_dash.php b/application/controllers/Superviseur_dash.php index 114cecfe..58be8fef 100644 --- a/application/controllers/Superviseur_dash.php +++ b/application/controllers/Superviseur_dash.php @@ -149,7 +149,7 @@ class Superviseur_dash extends CI_Controller $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'); + $this->load->view('demande_credit'); $this->load->view('footer'); }else{ @@ -196,7 +196,7 @@ class Superviseur_dash extends CI_Controller $data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id')); $data['geolocated_user'] = $this->user_model->getSuperNameAndCodeForSup($this->session->userdata('member_code')); $this->load->view('header_sup', $data); - $this->load->view('demande'); + $this->load->view('demande_adhesion'); $this->load->view('footer'); } } @@ -235,7 +235,6 @@ class Superviseur_dash extends CI_Controller //Fetch all transactions of any geolocated agent of the network $data["transactions"] = array(); - $totalCommissionBanque = 0; if($agents_g){ foreach($agents_g->result() AS $row){ $wallet = $this->user_model->getWallet($row->agent_id); @@ -243,7 +242,6 @@ class Superviseur_dash extends CI_Controller $transactions = $this->user_model->getAgentTransactions($wallet->first_row()->wallet_id); if($transactions){ foreach($transactions->result() AS $trans){ - $totalCommissionBanque += $trans->commission_banque; $trans->agent_id = $row->agent_id ; // Add agent id to transaction array_push( $data['transactions'], $trans); } @@ -251,7 +249,6 @@ class Superviseur_dash extends CI_Controller } } } - $data["totalCommissionBanque"] = $totalCommissionBanque; }else{ $data["commission"] = "N/A"; $data["principal"] = "N/A"; diff --git a/application/controllers/Users.php b/application/controllers/Users.php index 11748100..5c931543 100644 --- a/application/controllers/Users.php +++ b/application/controllers/Users.php @@ -217,8 +217,9 @@ { $this->session->sess_destroy(); $data['alert'] = 'You have been disconnected'; - //redirect('index.php/Users/index', $data); - $this->load->view('login', $data); + $this->session->set_flashdata('error','You have been disconnected' ); + redirect('index.php/Users', $data); +// $this->load->view('login', $data); } public function forgot_password(){ diff --git a/application/hooks/LanguageLoader.php b/application/hooks/LanguageLoader.php index ccbcf950..e11bf068 100644 --- a/application/hooks/LanguageLoader.php +++ b/application/hooks/LanguageLoader.php @@ -1,227 +1,226 @@ -load->helper('language'); - - if($ci->session->userdata('connected')){ - - $siteLang = $ci->session->userdata('site_lang'); - if ($siteLang) { - $ci->session->set_userdata('site_lang',$siteLang); - $ci->lang->load('message',$siteLang); - } else { - $ci->lang->load('message','english'); - } - - }else{ - - $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); - $acceptLang = ['fr', 'en']; - $lang = in_array($lang, $acceptLang) ? $lang : 'en'; - $langTranscript = $this->getLocaleCodeForDisplayLanguage($lang); - $current_lang_lowerCase = strtolower($langTranscript); - - - if ($current_lang_lowerCase) { - $ci->session->set_userdata('site_lang',$current_lang_lowerCase); - $ci->session->set_userdata('connected','true'); - $ci->lang->load('message',$current_lang_lowerCase); - } else { - $ci->lang->load('message','english'); - } - - } - } - - function getLocaleCodeForDisplayLanguage($name){ - $languageCodes = array( - "aa" => "Afar", - "ab" => "Abkhazian", - "ae" => "Avestan", - "af" => "Afrikaans", - "ak" => "Akan", - "am" => "Amharic", - "an" => "Aragonese", - "ar" => "Arabic", - "as" => "Assamese", - "av" => "Avaric", - "ay" => "Aymara", - "az" => "Azerbaijani", - "ba" => "Bashkir", - "be" => "Belarusian", - "bg" => "Bulgarian", - "bh" => "Bihari", - "bi" => "Bislama", - "bm" => "Bambara", - "bn" => "Bengali", - "bo" => "Tibetan", - "br" => "Breton", - "bs" => "Bosnian", - "ca" => "Catalan", - "ce" => "Chechen", - "ch" => "Chamorro", - "co" => "Corsican", - "cr" => "Cree", - "cs" => "Czech", - "cu" => "Church Slavic", - "cv" => "Chuvash", - "cy" => "Welsh", - "da" => "Danish", - "de" => "German", - "dv" => "Divehi", - "dz" => "Dzongkha", - "ee" => "Ewe", - "el" => "Greek", - "en" => "English", - "eo" => "Esperanto", - "es" => "Spanish", - "et" => "Estonian", - "eu" => "Basque", - "fa" => "Persian", - "ff" => "Fulah", - "fi" => "Finnish", - "fj" => "Fijian", - "fo" => "Faroese", - "fr" => "French", - "fy" => "Western Frisian", - "ga" => "Irish", - "gd" => "Scottish Gaelic", - "gl" => "Galician", - "gn" => "Guarani", - "gu" => "Gujarati", - "gv" => "Manx", - "ha" => "Hausa", - "he" => "Hebrew", - "hi" => "Hindi", - "ho" => "Hiri Motu", - "hr" => "Croatian", - "ht" => "Haitian", - "hu" => "Hungarian", - "hy" => "Armenian", - "hz" => "Herero", - "ia" => "Interlingua (International Auxiliary Language Association)", - "id" => "Indonesian", - "ie" => "Interlingue", - "ig" => "Igbo", - "ii" => "Sichuan Yi", - "ik" => "Inupiaq", - "io" => "Ido", - "is" => "Icelandic", - "it" => "Italian", - "iu" => "Inuktitut", - "ja" => "Japanese", - "jv" => "Javanese", - "ka" => "Georgian", - "kg" => "Kongo", - "ki" => "Kikuyu", - "kj" => "Kwanyama", - "kk" => "Kazakh", - "kl" => "Kalaallisut", - "km" => "Khmer", - "kn" => "Kannada", - "ko" => "Korean", - "kr" => "Kanuri", - "ks" => "Kashmiri", - "ku" => "Kurdish", - "kv" => "Komi", - "kw" => "Cornish", - "ky" => "Kirghiz", - "la" => "Latin", - "lb" => "Luxembourgish", - "lg" => "Ganda", - "li" => "Limburgish", - "ln" => "Lingala", - "lo" => "Lao", - "lt" => "Lithuanian", - "lu" => "Luba-Katanga", - "lv" => "Latvian", - "mg" => "Malagasy", - "mh" => "Marshallese", - "mi" => "Maori", - "mk" => "Macedonian", - "ml" => "Malayalam", - "mn" => "Mongolian", - "mr" => "Marathi", - "ms" => "Malay", - "mt" => "Maltese", - "my" => "Burmese", - "na" => "Nauru", - "nb" => "Norwegian Bokmal", - "nd" => "North Ndebele", - "ne" => "Nepali", - "ng" => "Ndonga", - "nl" => "Dutch", - "nn" => "Norwegian Nynorsk", - "no" => "Norwegian", - "nr" => "South Ndebele", - "nv" => "Navajo", - "ny" => "Chichewa", - "oc" => "Occitan", - "oj" => "Ojibwa", - "om" => "Oromo", - "or" => "Oriya", - "os" => "Ossetian", - "pa" => "Panjabi", - "pi" => "Pali", - "pl" => "Polish", - "ps" => "Pashto", - "pt" => "Portuguese", - "qu" => "Quechua", - "rm" => "Raeto-Romance", - "rn" => "Kirundi", - "ro" => "Romanian", - "ru" => "Russian", - "rw" => "Kinyarwanda", - "sa" => "Sanskrit", - "sc" => "Sardinian", - "sd" => "Sindhi", - "se" => "Northern Sami", - "sg" => "Sango", - "si" => "Sinhala", - "sk" => "Slovak", - "sl" => "Slovenian", - "sm" => "Samoan", - "sn" => "Shona", - "so" => "Somali", - "sq" => "Albanian", - "sr" => "Serbian", - "ss" => "Swati", - "st" => "Southern Sotho", - "su" => "Sundanese", - "sv" => "Swedish", - "sw" => "Swahili", - "ta" => "Tamil", - "te" => "Telugu", - "tg" => "Tajik", - "th" => "Thai", - "ti" => "Tigrinya", - "tk" => "Turkmen", - "tl" => "Tagalog", - "tn" => "Tswana", - "to" => "Tonga", - "tr" => "Turkish", - "ts" => "Tsonga", - "tt" => "Tatar", - "tw" => "Twi", - "ty" => "Tahitian", - "ug" => "Uighur", - "uk" => "Ukrainian", - "ur" => "Urdu", - "uz" => "Uzbek", - "ve" => "Venda", - "vi" => "Vietnamese", - "vo" => "Volapuk", - "wa" => "Walloon", - "wo" => "Wolof", - "xh" => "Xhosa", - "yi" => "Yiddish", - "yo" => "Yoruba", - "za" => "Zhuang", - "zh" => "Chinese", - "zu" => "Zulu" - ); - return $languageCodes[$name]; - } -} \ No newline at end of file +load->helper('language'); + + if($ci->session->userdata('connected')){ + $siteLang = $ci->session->userdata('site_lang'); + if ($siteLang) { + $ci->session->set_userdata('site_lang',$siteLang); + $ci->lang->load('message',$siteLang); + } else { + $ci->lang->load('message','english'); + } + + }else{ + + $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); + $acceptLang = ['fr', 'en']; + $lang = in_array($lang, $acceptLang) ? $lang : 'en'; + $langTranscript = $this->getLocaleCodeForDisplayLanguage($lang); + $current_lang_lowerCase = strtolower($langTranscript); + + + if ($current_lang_lowerCase) { + $ci->session->set_userdata('site_lang',$current_lang_lowerCase); + $ci->session->set_userdata('connected','true'); + $ci->lang->load('message',$current_lang_lowerCase); + } else { + $ci->lang->load('message','english'); + } + + } + } + + function getLocaleCodeForDisplayLanguage($name){ + $languageCodes = array( + "aa" => "Afar", + "ab" => "Abkhazian", + "ae" => "Avestan", + "af" => "Afrikaans", + "ak" => "Akan", + "am" => "Amharic", + "an" => "Aragonese", + "ar" => "Arabic", + "as" => "Assamese", + "av" => "Avaric", + "ay" => "Aymara", + "az" => "Azerbaijani", + "ba" => "Bashkir", + "be" => "Belarusian", + "bg" => "Bulgarian", + "bh" => "Bihari", + "bi" => "Bislama", + "bm" => "Bambara", + "bn" => "Bengali", + "bo" => "Tibetan", + "br" => "Breton", + "bs" => "Bosnian", + "ca" => "Catalan", + "ce" => "Chechen", + "ch" => "Chamorro", + "co" => "Corsican", + "cr" => "Cree", + "cs" => "Czech", + "cu" => "Church Slavic", + "cv" => "Chuvash", + "cy" => "Welsh", + "da" => "Danish", + "de" => "German", + "dv" => "Divehi", + "dz" => "Dzongkha", + "ee" => "Ewe", + "el" => "Greek", + "en" => "English", + "eo" => "Esperanto", + "es" => "Spanish", + "et" => "Estonian", + "eu" => "Basque", + "fa" => "Persian", + "ff" => "Fulah", + "fi" => "Finnish", + "fj" => "Fijian", + "fo" => "Faroese", + "fr" => "French", + "fy" => "Western Frisian", + "ga" => "Irish", + "gd" => "Scottish Gaelic", + "gl" => "Galician", + "gn" => "Guarani", + "gu" => "Gujarati", + "gv" => "Manx", + "ha" => "Hausa", + "he" => "Hebrew", + "hi" => "Hindi", + "ho" => "Hiri Motu", + "hr" => "Croatian", + "ht" => "Haitian", + "hu" => "Hungarian", + "hy" => "Armenian", + "hz" => "Herero", + "ia" => "Interlingua (International Auxiliary Language Association)", + "id" => "Indonesian", + "ie" => "Interlingue", + "ig" => "Igbo", + "ii" => "Sichuan Yi", + "ik" => "Inupiaq", + "io" => "Ido", + "is" => "Icelandic", + "it" => "Italian", + "iu" => "Inuktitut", + "ja" => "Japanese", + "jv" => "Javanese", + "ka" => "Georgian", + "kg" => "Kongo", + "ki" => "Kikuyu", + "kj" => "Kwanyama", + "kk" => "Kazakh", + "kl" => "Kalaallisut", + "km" => "Khmer", + "kn" => "Kannada", + "ko" => "Korean", + "kr" => "Kanuri", + "ks" => "Kashmiri", + "ku" => "Kurdish", + "kv" => "Komi", + "kw" => "Cornish", + "ky" => "Kirghiz", + "la" => "Latin", + "lb" => "Luxembourgish", + "lg" => "Ganda", + "li" => "Limburgish", + "ln" => "Lingala", + "lo" => "Lao", + "lt" => "Lithuanian", + "lu" => "Luba-Katanga", + "lv" => "Latvian", + "mg" => "Malagasy", + "mh" => "Marshallese", + "mi" => "Maori", + "mk" => "Macedonian", + "ml" => "Malayalam", + "mn" => "Mongolian", + "mr" => "Marathi", + "ms" => "Malay", + "mt" => "Maltese", + "my" => "Burmese", + "na" => "Nauru", + "nb" => "Norwegian Bokmal", + "nd" => "North Ndebele", + "ne" => "Nepali", + "ng" => "Ndonga", + "nl" => "Dutch", + "nn" => "Norwegian Nynorsk", + "no" => "Norwegian", + "nr" => "South Ndebele", + "nv" => "Navajo", + "ny" => "Chichewa", + "oc" => "Occitan", + "oj" => "Ojibwa", + "om" => "Oromo", + "or" => "Oriya", + "os" => "Ossetian", + "pa" => "Panjabi", + "pi" => "Pali", + "pl" => "Polish", + "ps" => "Pashto", + "pt" => "Portuguese", + "qu" => "Quechua", + "rm" => "Raeto-Romance", + "rn" => "Kirundi", + "ro" => "Romanian", + "ru" => "Russian", + "rw" => "Kinyarwanda", + "sa" => "Sanskrit", + "sc" => "Sardinian", + "sd" => "Sindhi", + "se" => "Northern Sami", + "sg" => "Sango", + "si" => "Sinhala", + "sk" => "Slovak", + "sl" => "Slovenian", + "sm" => "Samoan", + "sn" => "Shona", + "so" => "Somali", + "sq" => "Albanian", + "sr" => "Serbian", + "ss" => "Swati", + "st" => "Southern Sotho", + "su" => "Sundanese", + "sv" => "Swedish", + "sw" => "Swahili", + "ta" => "Tamil", + "te" => "Telugu", + "tg" => "Tajik", + "th" => "Thai", + "ti" => "Tigrinya", + "tk" => "Turkmen", + "tl" => "Tagalog", + "tn" => "Tswana", + "to" => "Tonga", + "tr" => "Turkish", + "ts" => "Tsonga", + "tt" => "Tatar", + "tw" => "Twi", + "ty" => "Tahitian", + "ug" => "Uighur", + "uk" => "Ukrainian", + "ur" => "Urdu", + "uz" => "Uzbek", + "ve" => "Venda", + "vi" => "Vietnamese", + "vo" => "Volapuk", + "wa" => "Walloon", + "wo" => "Wolof", + "xh" => "Xhosa", + "yi" => "Yiddish", + "yo" => "Yoruba", + "za" => "Zhuang", + "zh" => "Chinese", + "zu" => "Zulu" + ); + return $languageCodes[$name]; + } +} diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index d136c425..bdc85667 100644 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -245,7 +245,13 @@ $lang['Commission Hyperviseur'] = 'Hypervisor Commission'; $lang['Parts dépots & retraits'] = 'Deposit & withdrawal shares'; $lang['Historique des transactions'] = 'Transaction history'; $lang['Période'] = 'Period'; +$lang['Commission de la banque'] = 'Bank commission'; +$lang['Commission de l\'hyperviseur'] = 'Hypervisor commission'; +$lang['Commission du superviseur'] = 'Supervisor\'s Commission'; +$lang['Commission de l\'agent'] = 'Agent\'s commission'; $lang['Aucune demande'] = 'No transactions'; $lang['Acceptée'] = 'Accepted'; $lang['Annulée'] = 'Canceled'; +$lang['RETRAIT'] = 'WITHDRAWAL'; +$lang['DEPOT'] = 'DEPOSIT'; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index f7d6644b..fad41907 100644 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -259,7 +259,12 @@ $lang['Historique des transactions'] = 'Historique des transactions'; $lang['Période'] = 'Période'; $lang['Parts dépots & retraits'] = 'Parts dépots & retraits'; - + $lang['Commission de la banque'] = 'Commission de la banque'; + $lang['Commission de l\'hyperviseur'] = 'Commission de l\'hyperviseur'; + $lang['Commission du superviseur'] = 'Commission du superviseur'; + $lang['Commission de l\'agent'] = 'Commission de l\'agent'; + $lang['RETRAIT'] = 'RETRAIT'; + $lang['DEPOT'] = 'DEPOT'; $lang['Aucune transaction'] = 'Aucune transaction'; $lang['Acceptée'] = 'Acceptée'; $lang['Annulée'] = 'Annulée'; diff --git a/application/models/User_model.php b/application/models/User_model.php index 69e1fc1a..b9ca5eab 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -492,15 +492,15 @@ class User_model extends CI_Model $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 + WHERE req_im.statut='1' AND req_im.id=d.id) AS temps FROM demande_credit AS d - WHERE statut=1 + 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 FROM info_demandeCredits AS d - WHERE statut=1 AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$user_geo."' + WHERE statut='1' AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$user_geo."' AND d.dateAjout BETWEEN '".$debut."' AND '".$fin."' ORDER BY temps LIMIT 5"); @@ -518,7 +518,7 @@ class User_model extends CI_Model $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."' ORDER BY temps LIMIT 5"); @@ -536,15 +536,15 @@ class User_model extends CI_Model $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 + 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{ $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 d.codeMembre='".$super."' AND dateAjout BETWEEN '".$debut."' AND '".$fin."' ORDER BY temps LIMIT 5"); @@ -596,15 +596,15 @@ class User_model extends CI_Model $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 + WHERE req_im.statut='1' AND req_im.id=d.id) AS temps FROM demande_credit AS d - WHERE statut=1 + 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 FROM info_demandeCredits AS d - WHERE statut=1 AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$user_geo."' + WHERE statut='1' AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$user_geo."' AND d.dateAjout BETWEEN '".$debut."' AND '".$fin."' ORDER BY temps DESC LIMIT 5"); @@ -622,7 +622,7 @@ class User_model extends CI_Model $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."' ORDER BY temps DESC LIMIT 5"); @@ -640,15 +640,15 @@ class User_model extends CI_Model $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 + 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{ $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 d.codeMembre='".$super."' AND dateAjout BETWEEN '".$debut."' AND '".$fin."' ORDER BY temps DESC LIMIT 5"); @@ -697,11 +697,11 @@ class User_model extends CI_Model 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"); + $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."' + WHERE statut= '1' AND codeParrain='".$codeParrain."' AND codeMembre='".$user_geo."' AND dateAjout BETWEEN '".$debut."' AND '".$fin."'"); } @@ -717,9 +717,9 @@ class User_model extends CI_Model public function getTempsMoyenDemandeSup($codeParrain){ if($codeParrain=='all'){ - $query = $this->db->query("SELECT AVG(TIMESTAMPDIFF(SECOND,dateAjout,dateModif)) AS temps FROM demande_credit WHERE statut=1"); + $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."'"); + $query = $this->db->query("SELECT AVG(temps) AS temps FROM info_demandeCredits WHERE statut='1' AND codeMembre='".$codeParrain."'"); } if($query->num_rows()>0){ @@ -733,7 +733,7 @@ class User_model extends CI_Model public function getTempsMoyenByVille($codeParrain,$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."' "); + $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."' "); } @@ -834,7 +834,7 @@ class User_model extends CI_Model $query = $this->db->query("SELECT AVG(TIMESTAMPDIFF(SECOND,dateAjout,dateModif)) AS temps FROM info_demandeCredits WHERE pays='".$pays."' - AND statut=1 + AND statut='1' AND ville='".$ville."' AND (codeParrain='".$codeHyper."' OR codeParrain IN (SELECT code_membre FROM super_infos WHERE code_parrain='".$codeHyper."' AND category ='super'))"); @@ -852,7 +852,7 @@ class User_model extends CI_Model $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 pays='".$pays."' - AND statut=1 + AND statut='1' AND ville='".$ville."' AND (codeParrain='".$codeHyper."' OR codeParrain IN (SELECT code_membre FROM super_infos WHERE code_parrain='".$codeHyper."' AND category ='super')) @@ -872,7 +872,7 @@ class User_model extends CI_Model $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 pays='".$pays."' - AND statut=1 + AND statut='1' AND ville='".$ville."' AND (codeParrain='".$codeHyper."' OR codeParrain IN (SELECT code_membre FROM super_infos WHERE code_parrain='".$codeHyper."' AND category ='super')) diff --git a/application/views/demande.php b/application/views/demande.php index bb0a531c..5685cc6b 100644 --- a/application/views/demande.php +++ b/application/views/demande.php @@ -1384,20 +1384,55 @@ - - + + + + diff --git a/application/views/demande_adhesion.php b/application/views/demande_adhesion.php new file mode 100644 index 00000000..df1f410d --- /dev/null +++ b/application/views/demande_adhesion.php @@ -0,0 +1,605 @@ + + + + +
+ + 86400, + "h" => 3600, + "m" => 60, + "s" => 1); + $result = ""; + + foreach($tabTemps as $uniteTemps => $nombreSecondesDansUnite) { + + $$uniteTemps = floor($time/$nombreSecondesDansUnite); + + $time = $time%$nombreSecondesDansUnite; + + if($$uniteTemps > 0 || !empty($result)){ + + $result .= $$uniteTemps." $uniteTemps "; + } + } + + return $result; + + } + + function dateDiff($date1, $date2){ + $diff = abs($date1 - $date2); // abs pour avoir la valeur absolute, ainsi éviter d'avoir une différence négative + $retour = array(); + + $tmp = $diff; + $second = $tmp % 60; + + $tmp = floor( ($tmp - $second) /60 ); + $minute = $tmp % 60; + + $tmp = floor( ($tmp - $minute)/60 ); + $heure = $tmp % 24; + + $tmp = floor( ($tmp - $heure) /24 ); + $jour = $tmp; + + return 'Depuis '.$jour.' jours '.$heure.' heures '.$minute.' minutes '.$second.' secondes'; + } + + function traitementTemps($time,$dateAjout){ + if($time==null){ + $now = time(); + $date2 = strtotime($dateAjout); + + return dateDiff($now, $date2); + } + else{ + return duree($time); + } + } + ?> + +
+
+
+
+ + +
+ lang->line('Temps moyen de traitement entrant'); ?> + + lang->line('Aucune demande traitée'); + } + ?> + +
+
+
+
+
+ +
+ session->userdata('category') == "super"){ + if(isset($nameOfcurentGeolocatedUser)) + echo "".$nameOfcurentGeolocatedUser.""; + } + ?> + lang->line('Période') ?> + + + + Format : session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day'?> +
+
+
+ + +
+
+
+
+
+

lang->line('Demandes'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + + "; + ?> + + + result() as $row) { + $num++; + + $etat = $this->lang->line("Non traitée"); + if($row->etat==1){ + $etat = $this->lang->line("traitée"); + } + $code = $row->code_membre; + if($row->code_membre==$this->session->userdata('member_code')){ + $code = $this->lang->line('Vous'); + } + echo " + + + + + + + + + + "; + + } + ?> + + + lang->line('Aucune demande'); + } + }else{ + echo $this->lang->line('Aucune demande'); + } + + ?> + +
".$this->lang->line('Téléphone utilisateur')."".$this->lang->line('Catégorie')."".$this->lang->line('Parrain')."".$this->lang->line('Date de la demande')."".$this->lang->line('Date de traitement')."".$this->lang->line('Statut')."".$this->lang->line('Délai de traitement')."
$row->phone Super $row->code_membre$row->date_creation $row->date_modified$etat".traitementTemps($row->temps,$row->date_creation)."
+ + +
+
+
+
+
+
+

lang->line('Demandes'); ?> lang->line('les plus rapidement traitées'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + "; + ?> + + + + result() as $row) { + $num++; + $superviseur = $row->superviseur; + if($row->superviseur==$this->session->userdata('member_code')){ + $superviseur = $this->lang->line('Vous'); + } + echo " + + + + + + + + + "; + } + ?> + + + + lang->line('Aucune demande'); + } + }else{ + echo $this->lang->line('Aucune demande'); + } + + ?> + +
".$this->lang->line('Téléphone utilisateur')."".$this->lang->line('Parrain')."".$this->lang->line('Date de la demande')."".$this->lang->line('Date de traitement')."".$this->lang->line('Délai de traitement')."
$num$row->emetteur$superviseur$row->dateA$row->dateM".duree($row->temps)."
+ + +
+
+
+
+
+ +
+

lang->line('Demandes'); ?> lang->line('les plus tardivement traitées'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + "; + ?> + + + result() as $row) { + $num++; + $superviseur = $row->superviseur; + if($row->superviseur==$this->session->userdata('member_code')){ + $superviseur = $this->lang->line('Vous'); + } + if($type==$this->lang->line('Adhésion')){ + echo " + + + + + + + + + ";}else{ + echo " + + + + + + + + + + "; + } + } + ?> + + + + lang->line('Aucune demande'); + } + }else{ + echo $this->lang->line('Aucune demande'); + } + ?> + +
".$this->lang->line('Contact')."".$this->lang->line('Parrain')."".$this->lang->line('Date de la demande')."".$this->lang->line('Date de traitement')."".$this->lang->line('Délai de traitement')."
$num$row->emetteur$superviseur$row->dateA$row->dateM".duree($row->temps)."
$num$row->emetteur$superviseur$row->montant$row->dateA$row->dateM".duree($row->temps)."
+ + +
+
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/demande_credit.php b/application/views/demande_credit.php new file mode 100644 index 00000000..9c5ae970 --- /dev/null +++ b/application/views/demande_credit.php @@ -0,0 +1,1290 @@ + + + +
+ + 86400, + "h" => 3600, + "m" => 60, + "s" => 1); + $result = ""; + + foreach ($tabTemps as $uniteTemps => $nombreSecondesDansUnite) { + + $$uniteTemps = floor($time / $nombreSecondesDansUnite); + + $time = $time % $nombreSecondesDansUnite; + + if ($$uniteTemps > 0 || !empty($result)) { + + $result .= $$uniteTemps . " $uniteTemps "; + } + } + + return $result; + + } + + function dateDiff($date1, $date2) + { + $diff = abs($date1 - $date2); // abs pour avoir la valeur absolute, ainsi éviter d'avoir une différence négative + $retour = array(); + + $tmp = $diff; + $second = $tmp % 60; + + $tmp = floor(($tmp - $second) / 60); + $minute = $tmp % 60; + + $tmp = floor(($tmp - $minute) / 60); + $heure = $tmp % 24; + + $tmp = floor(($tmp - $heure) / 24); + $jour = $tmp; + + return 'Depuis ' . $jour . ' jours ' . $heure . ' heures ' . $minute . ' minutes ' . $second . ' secondes'; + } + + function traitementTemps($time, $dateAjout) + { + if ($time == null) { + $now = time(); + $date2 = strtotime($dateAjout); + + return dateDiff($now, $date2); + } else { + return duree($time); + } + } + + ?> + +
+ +

+ lang->line('Demandes de crédits'); ?> +

+ +
+ +

Erreur!

+ +
+ + +
+ +

Success!

+ +
+ + + +
+
+
+
+
+ + +
+ lang->line('Temps moyen de traitement entrant'); ?> + + lang->line('Aucune demande traitée'); + } + ?> + +
+
+
+
+
+ +
+ session->userdata('category') == "super") { + if (isset($nameOfcurentGeolocatedUser)) + echo "" . $nameOfcurentGeolocatedUser . ""; + } + ?> + lang->line('Période') ?> + + + + Format : session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day' ?> +
+
+
+ session->userdata('category') == 'super') { ?> +
+
+ + +
+ lang->line('Temps moyen de traitement sortant'); ?> + + lang->line('Aucune demande traitée'); + } + ?> + +
+
+
+ +
+ session->userdata('category') == 'super') { ?> +
+
+
+
+

lang->line('Demandes'); ?> lang->line('entrantes'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + + "; + + ?> + + + + + result() as $row) { + $num++; + if ($type == $this->lang->line('Adhésion')) { + $etat = $this->lang->line("Non traitée"); + if ($row->etat == 1) { + $etat = $this->lang->line("traitée"); + } + $code = $row->code_membre; + if ($row->code_membre == $this->session->userdata('member_code')) { + $code = $this->lang->line('Vous'); + } + echo " + + + + + + + + + "; + } else { + $etat = $this->lang->line("Non traitée"); + if ($row->statut == 1) { + $etat = $this->lang->line("Acceptée"); + } else if ($row->statut == 2) { + $etat = $this->lang->line("Annulée"); + } + $origin = $row->codeMembre; + $destination = $row->codeParrain; + if ($row->codeMembre == $this->session->userdata('member_code')) { + $origin = $this->lang->line('Vous'); + } + if ($row->codeParrain == $this->session->userdata('member_code')) { + $destination = $this->lang->line('Vous'); + } + echo " + + + + + + + + + + "; + } + } + ?> + + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + + + ?> + +
" . $this->lang->line('Telephone') . "" . $this->lang->line('Emetteur') . "" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Statut') . "" . $this->lang->line('Délai de traitement') . "
$row->phone $code$row->dateAjout $row->dateModif$etat" . traitementTemps($row->temps, $row->dateAjout) . "
$row->phone$origin $row->montant$row->dateAjout $row->dateModif$etat" . traitementTemps($row->temps, $row->dateAjout) . "
+ + +
+
+
+
+
+
+

lang->line('Demandes'); ?> lang->line('Sortantes'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + "; + + ?> + + + + + result() as $row) { + $num++; + if ($type == $this->lang->line('Adhésion')) { + $etat = $this->lang->line("Non traitée"); + if ($row->etat == 1) { + $etat = $this->lang->line("traitée"); + } + $code = $row->code; + if ($row->code == $this->session->userdata('member_code')) { + $code = $this->lang->line('Vous'); + } + echo " + + + + + + + + + + "; + } else { + $etat = $this->lang->line("Non traitée"); + if ($row->statut == 1) { + $etat = $this->lang->line("Acceptée"); + } else if ($row->statut == 2) { + $etat = $this->lang->line("Annulée"); + } + $origin = $row->codeMembre; + $destination = $row->codeParrain; + if ($row->codeMembre == $this->session->userdata('member_code')) { + $origin = $this->lang->line('Vous'); + } + if ($row->codeParrain == $this->session->userdata('member_code')) { + $destination = $this->lang->line('Vous'); + } + echo " + + + + + + + + "; + } + } + ?> + + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + ?> + +
" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Statut') . "" . $this->lang->line('Délai de traitement') . "
$row->phone $row->categorie $code$row->dateAjout $row->dateModif$etat" . traitementTemps($row->temps, $row->dateAjout) . "
$row->montant$row->dateAjout $row->dateModif$etat" . traitementTemps($row->temps, $row->dateAjout) . "
+ + +
+
+
+
+
+
+
+ +
+

lang->line('Demandes'); ?> lang->line('entrantes'); ?>lang->line('les plus rapidement traitées'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + + "; + + ?> + + + + + result() as $row) { + $num++; + $superviseur = $row->superviseur; + if ($row->superviseur == $this->session->userdata('member_code')) { + $superviseur = $this->lang->line('Vous'); + } + if ($type == $this->lang->line('Adhésion')) { + $etat = $this->lang->line("Non traitée"); + if ($row->etat == 1) { + $etat = $this->lang->line("traitée"); + } + + echo " + + + + + + + + + "; + } else { + echo " + + + + + + + + + + "; + } + } + ?> + + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + + ?> + +
" . $this->lang->line('Membre') . "" . $this->lang->line('Parrain') . "" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Délai de traitement') . "
$num$row->emetteur$superviseur$row->dateA$row->dateM" . duree($row->temps) . "
$num$row->emetteur$superviseur$row->montant$row->dateA$row->dateM" . duree($row->temps) . "
+ + +
+
+
+
+
+
+

lang->line('Demandes'); ?> lang->line('Sortantes'); ?>lang->line('les plus rapidement traitées'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + + "; + + ?> + + + + + result() as $row) { + $num++; + $superviseur = $row->superviseur; + if ($row->superviseur == $this->session->userdata('member_code')) { + $superviseur = $this->lang->line('Vous'); + } + if ($type == $this->lang->line('Adhésion')) { + + echo " + + + + + + + + + "; + } else { + echo " + + + + + + + + + + "; + } + } + ?> + + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + + + ?> + +
" . $this->lang->line('Membre') . "" . $this->lang->line('Parrain') . "" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Délai de traitement') . "
$num$row->emetteur$superviseur$row->dateA$row->dateM" . duree($row->temps) . "
$num$row->emetteur$superviseur$row->montant$row->dateA$row->dateM" . duree($row->temps) . "
+ + +
+
+
+
+
+
+
+
+

lang->line('Demandes'); ?>lang->line('entrantes'); ?>lang->line('les plus tardivement traitées'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + + "; + ?> + + + + + result() as $row) { + $num++; + $superviseur = $row->superviseur; + if ($row->superviseur == $this->session->userdata('member_code')) { + $superviseur = $this->lang->line('Vous'); + } + if ($type == $this->lang->line('Adhésion')) { + echo " + + + + + + + + + "; + } else { + echo " + + + + + + + + + + "; + } + } + ?> + + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + + + ?> + +
" . $this->lang->line('Membre') . "" . $this->lang->line('Parrain') . "" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Délai de traitement') . "
$num$row->emetteur$superviseur$row->dateA$row->dateM" . duree($row->temps) . "
$num$row->emetteur$superviseur$row->montant$row->dateA$row->dateM" . duree($row->temps) . "
+ + +
+
+
+
+
+
+

lang->line('Demandes'); ?> lang->line('Sortantes'); ?> lang->line('les plus tardivement traitées'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + lang->line('Adhésion')) { + echo " + + + + + + + + "; + } else { + echo " + + + + + + + + "; + } + ?> + + + + + result() as $row) { + $num++; + $superviseur = $row->superviseur; + if ($row->superviseur == $this->session->userdata('member_code')) { + $superviseur = $this->lang->line('Vous'); + } + if ($type == $this->lang->line('Adhésion')) { + echo " + + + + + + + + + "; + } else { + echo " + + + + + + + + + + "; + } + } + ?> + + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + + ?> + +
" . $this->lang->line('Contact') . "" . $this->lang->line('Parrain') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Délai de traitement') . "
" . $this->lang->line('Membre') . "" . $this->lang->line('Parrain') . "" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Délai de traitement') . "
$num$row->emetteur$superviseur$row->dateA$row->dateM" . duree($row->temps) . "
$num$row->emetteur$superviseur$row->montant$row->dateA$row->dateM" . duree($row->temps) . "
+ + +
+
+
+
+ +
+
+ +
+

lang->line('Demandes'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + + + "; + ?> + + + + result() as $row) { + $num++; + $etat = $this->lang->line("Non traitée"); + if ($row->statut == 1) { + $etat = $this->lang->line("Acceptée"); + } else if ($row->statut == 2) { + $etat = $this->lang->line("Annulée"); + } + $origin = $row->codeMembre; + $destination = $row->codeParrain; + if ($row->codeMembre == $this->session->userdata('member_code')) { + $origin = $this->lang->line('Vous'); + } + if ($row->codeParrain == $this->session->userdata('member_code')) { + $destination = $this->lang->line('Vous'); + } + echo " + + + + + + + + + + + + "; + + } + ?> + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + + ?> + +
" . $this->lang->line('Reseau') . "" . $this->lang->line('Téléphone utilisateur') . "" . $this->lang->line('Emetteur') . "" . $this->lang->line('Parrain') . "" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Statut') . "" . $this->lang->line('Délai de traitement') . "
$row->reseau $row->phone $origin $destination $row->montant$row->dateAjout $row->dateModif$etat" . traitementTemps($row->temps, $row->dateAjout) . "
+ + +
+
+
+
+
+ +
+

lang->line('Demandes'); ?> lang->line('les plus rapidement traitées'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + + "; + ?> + + + + + result() as $row) { + $num++; + $superviseur = $row->superviseur; + if ($row->superviseur == $this->session->userdata('member_code')) { + $superviseur = $this->lang->line('Vous'); + } + + echo " + + + + + + + + + + "; + + } + ?> + + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + + ?> + +
" . $this->lang->line('Membre') . "" . $this->lang->line('Parrain') . "" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Délai de traitement') . "
$num$row->emetteur$superviseur$row->montant$row->dateA$row->dateM" . duree($row->temps) . "
+ + +
+
+
+
+
+
+

lang->line('Demandes'); ?> lang->line('les plus tardivement traitées'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + + ?> + + + + + + + + + + + + "; + + ?> + + + result() as $row) { + $num++; + $superviseur = $row->superviseur; + if ($row->superviseur == $this->session->userdata('member_code')) { + $superviseur = $this->lang->line('Vous'); + } + + echo " + + + + + + + + + + "; + + } + ?> + + + lang->line('Aucune demande'); + } + } else { + echo $this->lang->line('Aucune demande'); + } + + ?> + +
" . $this->lang->line('Membre') . "" . $this->lang->line('Parrain') . "" . $this->lang->line('Montant') . "" . $this->lang->line('Date de la demande') . "" . $this->lang->line('Date de traitement') . "" . $this->lang->line('Délai de traitement') . "
$num$row->emetteur$superviseur$row->montant$row->dateA$row->dateM" . duree($row->temps) . "
+ + +
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/gestion_wallet.php b/application/views/gestion_wallet.php index 86211a60..c665769c 100644 --- a/application/views/gestion_wallet.php +++ b/application/views/gestion_wallet.php @@ -337,12 +337,14 @@ if ($transactions != false) { - - - - - - + Nom + + + + + "; + ?> diff --git a/application/views/gestion_wallet_sup.php b/application/views/gestion_wallet_sup.php index d716b36d..05fe5559 100644 --- a/application/views/gestion_wallet_sup.php +++ b/application/views/gestion_wallet_sup.php @@ -197,18 +197,6 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL ); -
-
-
-

format($totalCommissionBanque); ?>FCFA

-

Total commission de la banque

-
-
- -
-
-
-
@@ -244,7 +232,6 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
- @@ -273,21 +260,17 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL ); "; $nb_depots = 0; $nb_retraits = 0; - $commission_banque = 0; foreach($depots as $depot){ if($depot->agent_id == $row->agent_id) { $nb_depots ++; - $commission_banque+= $depot->commission_banque; } } foreach($retraits as $retrait){ if($retrait->agent_id == $row->agent_id) { $nb_retraits ++; - $commission_banque+= $retrait->commission_banque; } } - echo " - + echo ""; } diff --git a/application/views/historique_transactions.php b/application/views/historique_transactions.php index e638b9ba..4bb95d36 100755 --- a/application/views/historique_transactions.php +++ b/application/views/historique_transactions.php @@ -48,12 +48,13 @@
lang->line('Période') ?> - + Format : session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day'?>
@@ -67,7 +68,6 @@
num_rows(); $num = 0; @@ -79,12 +79,12 @@
- - - - - - + + + + + + @@ -94,7 +94,7 @@ foreach ($transactions->result() as $row) { $num++; - $type = $row->type_transac == 'credit' ? 'DEPOT' : 'RETRAIT'; + $type = $row->type_transac == 'credit' ? $this->lang->line('DEPOT') : $this->lang->line('RETRAIT'); echo " @@ -145,14 +145,23 @@ - + + + @@ -176,6 +185,12 @@ window.location = "" + "?id=118&history=true" + "&d=" + debut + "&f=" + fin; }); + + $('input[name="daterange"]').on('cancel.daterangepicker', function(ev, picker) { + //do something, like clearing an input + $('#daterange').val(''); + window.location = "" + "?id=118&history=true"; + }); }); diff --git a/application/views/login.php b/application/views/login.php index 1bc20747..73c51e55 100644 --- a/application/views/login.php +++ b/application/views/login.php @@ -28,8 +28,8 @@
- - + +
NomSolde Princ.Solde Com.Com. BanqueDépotsRetraitsSolde Princ.Solde Com.Com. Banque".$this->lang->line('DEPOT')."".$this->lang->line('RETRAIT')."
Nom Solde Princ. Solde Com.Com. Banque Dépots Retraits
".$fmt->format($com)."".$fmt->format($commission_banque)."".$nb_depots."".$nb_depots." ".$nb_retraits."
ID Type MontantCommission de la banqueCommission de l'hyperviseurCommission du superviseurCommission de l'agentTypelang->line('Montant') ?>lang->line('Commission de la banque') ?>lang->line('Commission de l\'hyperviseur') ?>lang->line('Commission du superviseur') ?>lang->line('Commission de l\'agent') ?> Date
$row->id ".strtoupper($type)."