Server IP : 192.185.129.71 / Your IP : 3.12.160.196 Web Server : Apache System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : svymadmin ( 4072) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/application/helpers/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php defined('BASEPATH') or exit('No direct script access allowed'); /** * Get all countries stored in database * @return array */ function get_all_countries() { return hooks()->apply_filters('all_countries', get_instance()->db->order_by('short_name', 'asc')->get(db_prefix().'countries')->result_array()); } /** * Get country row from database based on passed country id * @param mixed $id * @return object */ function get_country($id) { $CI = & get_instance(); $country = $CI->app_object_cache->get('db-country-' . $id); if (!$country) { $CI->db->where('country_id', $id); $country = $CI->db->get(db_prefix().'countries')->row(); $CI->app_object_cache->add('db-country-' . $id, $country); } return $country; } /** * Get country short name by passed id * @param mixed $id county id * @return mixed */ function get_country_short_name($id) { $country = get_country($id); if ($country) { return $country->iso2; } return ''; } /** * Get country name by passed id * @param mixed $id county id * @return mixed */ function get_country_name($id) { $country = get_country($id); if ($country) { return $country->short_name; } return ''; }