HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux Bradford-Sitios 6.14.0-1017-azure #17~24.04.1-Ubuntu SMP Mon Dec 1 20:10:50 UTC 2025 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/formularioinscripcion.bradford/application/helpers/utilities_helper.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

function limpiacaracteres($str){
	$res = str_replace('ñ', 'n', $str);
	$res = str_replace('/', ' ', $str);
	$res = str_replace('á', 'a', $res);
	$res = str_replace('é', 'e', $res);
	$res = str_replace('í', 'i', $res);
	$res = str_replace('ó', 'o', $res);
	$res = str_replace('ú', 'u', $res);
	$res = preg_replace('([^A-Za-z0-9 ])', '', $res);
	return $res;
}
function format_price($price, $prefix = "$")
{
	if (!empty($price)) {
		$price = $prefix . number_format($price, 0, ',', '.');
	} else {
		$price = $prefix . "0";
	}
	return $price;
}

function format_miles($price)
{
	if (!empty($price)) {
		$price = number_format($price, 0, ',', '.');
	} else {
		$price =  "0";
	}
	return $price;
}

function rut($rut)
{
	return number_format(substr($rut, 0, -1), 0, "", ".") . '-' . substr($rut, strlen($rut) - 1, 1);
}

function format_rut($rut) {
    $rut = preg_replace('/[^\dkK]/', '', $rut);

    $numero = substr($rut, 0, -1);
    $verificador = substr($rut, -1);

    $numeroFormateado = number_format($numero, 0, '', '.');

    $rutFormateado = $numeroFormateado . '-' . $verificador;

    return $rutFormateado;
}

function clean_str_url($string='')
  {
      //$search = array(' - ', ' ','á','é','í','ó','ú','ñ','ü','Á','É','Í','Ó','Ú','Ñ','Ü','±','°', 'ó');
      //$replace = array('-' , '-','a','e','i','o','u','n','u','A','E','I','O','U','N','U','n','-', 'o');
	  $search = array(' - ', ' ','á','é','í','ó','ú','ñ','ü','Á','É','Í','Ó','Ú','Ñ','Ü','À','È','Ì','Ò','Ù','à','è','ì','ò','ù','±','°', '&');
      $replace = array('-' , '-','a','e','i','o','u','n','u','A','E','I','O','U','N','U','A','E','I','O','U','a','e','i','o','u','n','-', '-');

      $clean_str = str_replace($search, $replace, $string);

      //$search = array('$','$','/','*',')','(','=', "'", '"','!','¡',',',':',';','%','#','@','<','>','+','¿','|','.');
	  $search = array('\\','$','$','/','*',')','(','=', "'", '"','!','¡',',',':',';','%','#','@','<','>','+','¿','|','?');
      $clean_str = str_replace($search, '', $clean_str);

	  $search = array('$','$','/','*',')','(','=', "'", '"','!','¡',',',':',';','%','#','@','<','>','+','¿','|','?','”',"\t", '“',"\n",'[',']','?','¿');
	  $clean_str = str_replace($search, '', $clean_str);

	  $clean_str = str_replace('--', '-', $clean_str);
	  $clean_str = preg_replace('~\x{00AD}~u', '', $clean_str);
      $clean_str = strtolower($clean_str);

      return $clean_str;
  }