define("TEditorPath", '../../admin/');
if (file_exists("" . TEditorPath . "TE_TODAS_LAS_TABLAS_ajax.php")) {
    include "" . TEditorPath . "TE_TODAS_LAS_TABLAS_ajax.php";
}
$sql = $editor->AJAX_autocompleta[$campo]["SQL"];
if ($len) {
    if ($table != "" and $campo != "") {
        if ($sql != "") {
            $sql = str_replace("IdValue", "{$input}", $sql);
            logea($sql);
        }
        $query = mysql_query($sql, $link);
        while ($dato = mysql_fetch_array($query)) {
            $aux_1 = elimina_acentos($dato[0]);
            $aux_2 = elimina_acentos($dato[1]);
            $aux_3 = elimina_acentos($dato[2]);
            $aResults[] = array("id" => $aux_3, "value" => htmlspecialchars($aux_1), "info" => htmlspecialchars($aux_2));
        }
    }
}
////////////////////////////////////////////////////////////////////////////////////////////
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always modified
header("Cache-Control: no-cache, must-revalidate");
// HTTP/1.1
header("Pragma: no-cache");
// HTTP/1.0
if (isset($_REQUEST['json'])) {
    header("Content-Type: application/json");
Esempio n. 2
0
 function sin_acentos_espacios($text){
     $text=elimina_acentos($text);
     $text=espacios_blancos($text);
     return $text;
 }
function ConsultaCaracteres($texto)
{
    $texto = strtolower(elimina_acentos($texto));
    $texto = str_replace(".", "", $texto);
    $texto = str_replace(",", "", $texto);
    $texto = str_replace("a", "[aáàä]", $texto);
    $texto = str_replace("e", "[eéèë]", $texto);
    $texto = str_replace("i", "[iíìï]", $texto);
    $texto = str_replace("o", "[oóòö]", $texto);
    $texto = str_replace("u", "[uúùü]", $texto);
    $texto = str_replace("n", "[nñ]", $texto);
    $texto = str_replace("s", "[sz]", $texto);
    $texto = str_replace("z", "[sz]", $texto);
    $texto = str_replace("[s[sz]]", "[sz]", $texto);
    $texto = str_replace("v", "[vb]", $texto);
    $texto = str_replace("b", "[vb]", $texto);
    $texto = str_replace("[v[vb]]", "[vb]", $texto);
    //$texto=str_replace("z","[sz]",$texto);
    return $texto;
}
Esempio n. 4
0
        $estado_sesion = estado_sesion();
        if ($estado_sesion == 0) {
            ?>
							<script>
								window.location.href="home.html";
							</script>
		<?php 
        }
    } elseif ($_REQUEST['tipo'] == 10) {
        $query = trim($_REQUEST['query']);
        $query = str_replace("#", "", $query);
        $query = str_replace(" , ", " ", $query);
        $query = str_replace(", ", " ", $query);
        $query = str_replace(" ,", " ", $query);
        $query = str_replace(",", " ", $query);
        $query = strtolower(elimina_acentos(utf8_decode($query)));
        $query = str_replace("'", "", $query);
        $query = str_replace('"', "", $query);
        $busca_direccion = false;
        $query_arr = explode(" ", $query);
        foreach ($query_arr as $q) {
            if (is_numeric(trim($q))) {
                $busca_direccion = true;
                break;
            }
        }
        if ($busca_direccion) {
            $calle = array();
            $num = array();
            $com = array();
            $lon = array();
Esempio n. 5
0
/** call back function to change the array values in to lower case */
function setFormatForDuplicateCompare(&$string)
{
    global $default_charset;
    $string = elimina_acentos(trim($string));
    $string = strtolower(html_entity_decode($string, ENT_QUOTES, $default_charset));
}
Esempio n. 6
0
$nomcriterio = espacios_blancos($nomcriterio);
$nomcriterio = strtolower($nomcriterio);
mysql_query("CREATE TABLE `evaluacion_{$nomcriterio}` (  `MatriculaAlu` VARCHAR(9) NOT NULL,  PRIMARY KEY (`MatriculaAlu`), FOREIGN KEY (`MatriculaAlu`) REFERENCES alumno_ss_fca (`MatriculaAlu`) ) COLLATE='latin1_spanish_ci' ENGINE=InnoDB ROW_FORMAT=DEFAULT;");
$criterios = array();
for ($ii = 0; $ii < $cuantos; $ii++) {
    array_push($criterios, $_POST['criterio' . $ii]);
}
for ($i = 0; $i < $cuantos; $i++) {
    $sql;
    //$criterio=$_POST['criterio'.$i];
    $valor = $_POST['valor' . $i];
    $fechaA = $_POST['fechaA' . $i];
    $fechaE = $_POST['fechaE' . $i];
    $sql = "INSERT INTO criterios_ss_fca(nombreCriterio,evaluar,valor,fechaInicio,fechaEntrega) values ('" . $nomcriterio . "','" . utf8_decode(trim($criterios[$i])) . "',{$valor},'{$fechaA}','{$fechaE}'); ";
    mysql_query($sql) or die(mysql_error());
    $criterio[$i] = elimina_acentos($criterio[$i]);
    $criterio[$i] = espacios_blancos($criterio[$i]);
    //mysql_query("INSERT INTO evaluacion_ss_fca(nombreCriterio,criterio) values ('".$nomcriterio."','".($criterio=trim($criterio))."'); ") or die(mysql_error());
    if ($i == 0) {
        $sql = "ALTER TABLE `evaluacion_{$nomcriterio}`  ADD COLUMN `" . $criterios[$i] . "` FLOAT NULL DEFAULT '-1' COMMENT 'criterio evaluado' AFTER `MatriculaAlu` ;";
    } else {
        $sql = "ALTER TABLE `evaluacion_{$nomcriterio}`  ADD COLUMN `" . $criterios[$i] . "` FLOAT NULL DEFAULT '-1' COMMENT 'criterio evaluado' AFTER `" . $criterios[$i - 1] . "` ;";
    }
    mysql_query($sql) or die(mysql_error());
    if ($i == $cuantos - 1) {
        $sql = "ALTER TABLE `evaluacion_{$nomcriterio}`  ADD COLUMN `PeriodoAlu` VARCHAR(50) NULL DEFAULT NULL COMMENT 'Periodo en el que fue evaluado' AFTER `" . $criterios[$i] . "` ;";
        mysql_query($sql) or die(mysql_error());
    }
}
include_once '../header.php';
?>
Esempio n. 7
0
$estadoempresa = utf8_encode(strtoupper(elimina_acentos(trim($_POST['edo_estado_empresa']))));
$municipioempresa = utf8_encode(strtoupper(elimina_acentos(trim($_POST['mun_estado_empresa']))));
$localidadempresa = utf8_encode(strtoupper(elimina_acentos(trim($_POST['loc_estado_empresa']))));
$correoempresa = trim($_POST['correo_empresa']);
$area = utf8_encode(strtoupper(elimina_acentos(trim($_POST['area']))));
$jefe = utf8_encode(strtoupper(elimina_acentos(trim($_POST['jefe']))));
$puesto = utf8_encode(strtoupper(elimina_acentos(trim($_POST['puesto']))));
$correojefe = trim($_POST['correo_encargado']);
$giro = "";
$funcion = utf8_encode(strtoupper(elimina_acentos(trim($_POST['funcion']))));
$tipo = $_POST['tipo'];
$nombrepro = utf8_encode(strtoupper(elimina_acentos(trim($_POST['nombre_programa']))));
$objetivo = utf8_encode(strtoupper(elimina_acentos(trim($_POST['objetivop']))));
$tipo_empresa = $_POST['tipo_empresa'];
if ($_POST['giro_empresa'] == 'otra') {
    $giro = utf8_encode(strtoupper(elimina_acentos(trim($_POST['otrogiro_empresa']))));
} else {
    $giro = $_POST['giro_empresa'];
}
$validar = 0;
$mensajeERROR = "";
$sql = " SELECT * FROM alumno_ss_fca WHERE MatriculaAlu='{$matricula}' AND PeriodoAlu='{$periodo}' ";
$alumno = mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($alumno) == 1) {
    $mensajeERROR .= "Tus datos como nombre,matrícula,carrera ya existen  y estan registrados en el periodo <em>{$periodo}</em>. <br>";
} else {
    $sql = "INSERT INTO alumno_ss_fca (CriterioAlu,MatriculaAlu,NombreAlu,CarreraAlu,PeriodoAlu,EmailAlu,TelefonoAlu) value('meifv1','{$matricula}','{$nombrecompleto}','{$carrera}','{$periodo}','{$correo}','{$telefono}')";
    $alumno = mysql_query($sql) or die(mysql_error());
    if (mysql_affected_rows() > 0) {
        $validar += 1;
    }
Esempio n. 8
0
<?php

@(include_once '../script/php/functions.php');
$periodo = strtoupper(elimina_acentos(espacios_blancos($_POST['periodo'])));
conectar();
echo $periodo;
$sql = "insert into configuraciones_ss_fca (periodo,carrera) values('{$periodo}','lsca'),('{$periodo}','lg'),('{$periodo}','lc'),('{$periodo}','la') ";
mysql_query($sql) or die(mysql_error());
Esempio n. 9
0
        if (count($servicios) > 0) {
            $estado_ses = estado_sesion();
            foreach ($servicios as $i => $serv) {
                $categoria = $serv[2];
                $texto = "<div id=titulo2>" . strtoupper($serv[1]) . "</div>";
                $texto .= "<div id=titulo4>" . strtoupper($categoria) . "</div>";
                if (trim($serv[5]) != "" or trim($serv[6]) != "") {
                    $texto .= "<div id=titulo5>" . ucwords($serv[5]) . " #" . $serv[6] . "</div>";
                }
                $texto .= "<div id=titulo6>" . ucwords($serv[7]) . "</div>";
                $texto .= "<div id=titulo3>Distancia: " . round($serv[8], 2) . "Km </div>";
                if (trim($serv[10]) != "") {
                    $texto .= "<div id=titulo_descripcion>" . utf8_decode($serv[10]) . "</div>";
                }
                $texto .= "<div id=botonera><img class=img_boton src=images/favorito.png title=Agregar a favoritos onclick=javascript:addFavorito(" . $estado_ses . "," . $serv[0] . ",2);><img class=img_boton src=images/mail.png title=Enviar por correo onclick=compartirPto(" . $serv[0] . ",2);><img class=img_boton src=images/facebook.png title=Compartir en Facebook onclick=javascript:compartirFace(**" . $CM_path_base2 . "?ptot=2&pto=" . $serv[0] . "**);> <a href=**https://twitter.com/share?url=" . $CM_path_base2 . "?ptot=2&pto=" . $serv[0] . "&via=chilemap&text=Revisa este link** target=_BLANK><img  class=img_boton src=images/twitter.png title=Compartir en Twitter></a></div>";
                $texto = elimina_acentos($texto);
                $texto_mini = ucwords(strtolower($serv[1]));
                $data_categoria = getServicioCategoria($serv[9]);
                $icono = $data_categoria[2];
                if (trim($icono) == "") {
                    $icono = $CM_ICONO_SERV;
                }
                //$texto=ConsultaCaracteres($texto);
                ?>
			<script>
				CM_busqueda[CM_busqueda.length]="<?php 
                echo $serv[3];
                ?>
,<?php 
                echo $serv[4];
                ?>