| Server IP : 162.214.74.102 / Your IP : 216.73.216.139 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/public_html/lrsys_apps/school/application/helpers/ |
Upload File : |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
* @filesource
*/
if ( ! function_exists('get_phrase'))
{
function get_phrase($phrase = '') {
$CI =& get_instance();
$CI->load->database();
$current_language = $CI->db->get_where('settings' , array('type' => 'language'))->row()->description;
if ( $current_language == '') {
$current_language = 'english';
$CI->session->set_userdata('current_language' , $current_language);
}
/** insert blank phrases initially and populating the language db ***/
$check_phrase = $CI->db->get_where('language' , array('phrase' => $phrase))->row()->phrase;
if ( $check_phrase != $phrase)
$CI->db->insert('language' , array('phrase' => $phrase));
// query for finding the phrase from `language` table
$query = $CI->db->get_where('language' , array('phrase' => $phrase));
$row = $query->row();
// return the current sessioned language field of according phrase, else return uppercase spaced word
if (isset($row->$current_language) && $row->$current_language !="")
return $row->$current_language;
else
return ucwords(str_replace('_',' ',$phrase));
}
}
// ------------------------------------------------------------------------
/* End of file language_helper.php */
/* Location: ./system/helpers/language_helper.php */