diff --git a/application/controllers/Confg.php b/application/controllers/Confg.php index bf8ec1e..bbb93a2 100644 --- a/application/controllers/Confg.php +++ b/application/controllers/Confg.php @@ -100,8 +100,14 @@ class Confg extends Bko_Controller { $this->load->library('table'); $this->table->set_template($this->template); - $mysql = "SELECT id,code,country,phone_code, - allow::date, + $mysql = "SELECT id,code,country,phone_code, + (CASE WHEN + allow IS NULL + THEN '
' + ELSE + '' + END) + AS Allow, ''|| jobs::date||'' AS Jobs, status FROM country @@ -169,6 +175,35 @@ class Confg extends Bko_Controller { } } + public function allowCountry(){ + + if ($_GET) { + $countyry_code = trim( $this->input->get('countyry_code') ); + $action = trim($this->input->get('action')); + //echo "ameye-ameye 22 - ".$countyry_code; + + if($countyry_code !='' & $action !='' & $action == 1 ){ + $sql1 = "UPDATE country SET allow=now() WHERE code= '$countyry_code' "; + $this->db->query($sql1); + echo 'Updated'; + } +// else{ +// echo 'Not Updated'; +// } + + if($countyry_code !='' & $action !='' & $action == 0 ){ + $sql1 = "UPDATE country SET allow=NULL WHERE code= '$countyry_code' "; + $this->db->query($sql1); + echo 'Disabled'; + } +// else{ +// echo 'Not Updated'; +// } + + + } + } + public function updateHelpfaq(){ if ($_GET) { $faq_id = $this->input->get('faq_id'); diff --git a/application/views/bko/configure/extra/country_form.php b/application/views/bko/configure/extra/country_form.php index 69ae3b0..6edeb27 100644 --- a/application/views/bko/configure/extra/country_form.php +++ b/application/views/bko/configure/extra/country_form.php @@ -17,4 +17,22 @@ +