</tr> </table> </div> </form> <p> </p> <div id="divContent" name="divContent" style="height:176px;width:700px"> <? if ((isset($_REQUEST["buscar"])) and ($_REQUEST["buscar"] == "yes")) { $params = array(); $where = ""; if ($email != "") $where.= " AND UPPER(ART.UTILES.reemplazar_acentos(pl_mail)) LIKE '%".RemoveAccents(str_replace("'", "''", $email))."%'"; if ($empleado != "") { $params[":empleado"] = "%".RemoveAccents($empleado)."%"; $where.= " AND UPPER(ART.UTILES.reemplazar_acentos(pl_empleado)) LIKE UPPER(:empleado)"; } if ($estado != -1) { $params[":estado"] = $estado; $where.= " AND pl_idestado = :estado"; } if ($empresa != -1) { $params[":empresa"] = $empresa; $where.= " AND pl_empresa = :empresa"; } if ($gerencia != -1) { $params[":gerencia"] = $gerencia;
function MoreNaturalSort($ar1, $ar2) { if ($ar1 === $ar2) { return 0; } $len1 = strlen($ar1); $len2 = strlen($ar2); $shortest = min($len1, $len2); if (substr($ar1, 0, $shortest) === substr($ar2, 0, $shortest)) { // the shorter argument is the beginning of the longer one, like "str" and "string" if ($len1 < $len2) { return -1; } elseif ($len1 > $len2) { return 1; } return 0; } $ar1 = RemoveAccents(strtolower(trim($ar1))); $ar2 = RemoveAccents(strtolower(trim($ar2))); $translatearray = array('\'' => '', '"' => '', '_' => ' ', '(' => '', ')' => '', '-' => ' ', ' ' => ' ', '.' => '', ',' => ''); foreach ($translatearray as $key => $val) { $ar1 = str_replace($key, $val, $ar1); $ar2 = str_replace($key, $val, $ar2); } if ($ar1 < $ar2) { return -1; } elseif ($ar1 > $ar2) { return 1; } return 0; }
$pagina = $_REQUEST["pagina"]; $ob = "2"; if (isset($_REQUEST["ob"])) $ob = $_REQUEST["ob"]; $params = array(); $where = ""; if ($_REQUEST["codigo"] != "") { $params[":codigo"] = "%".$_REQUEST["codigo"]."%"; $where.= " AND ac_codigo LIKE :codigo"; } if ($_REQUEST["descripcion"] != "") { $params[":descripcion"] = "%".RemoveAccents($_REQUEST["descripcion"])."%"; $where.= " AND UPPER(ART.UTILES.reemplazar_acentos(ac_descripcion)) LIKE UPPER(:descripcion)"; } $sql = "SELECT ac_id ¿id?, ac_codigo ¿codigo?, ac_descripcion ¿descripcion? FROM cac_actividad WHERE ac_fechabaja IS NULL AND LENGTH(ac_codigo) = 6 _EXC1_"; $grilla = new Grid(); $grilla->addColumn(new Column("", -1, true, false, -1, "btnSeleccionar", "/modules/solicitud_cotizacion/seleccionar_ciiu.php?trgt=".$_REQUEST["trgt"], "")); $grilla->addColumn(new Column("Código", 40)); $grilla->addColumn(new Column("Descripción")); $grilla->setColsSeparator(true); $grilla->setColsSeparatorColor("#c0c0c0"); $grilla->setExtraConditions(array($where, $where));
// "[01] - Title With No Artist.mp3" ==> "[01] Title With No Artist.mp3" $PatternFilename = preg_replace('#' . preg_quote($pair[1]) . ' +\\- #', $pair[1] . ' ', $PatternFilename); } // get rid of leading & trailing spaces if end items (artist or title for example) are missing $PatternFilename = trim($PatternFilename, ' -'); if (!$PatternFilename) { // no tags to create a filename from -- skip this file continue; } $PatternFilename .= '.' . $row['fileformat']; $ActualFilename = basename($row['filename']); if ($ActualFilename != $PatternFilename) { $NotMatchedReasons = ''; if (strtolower($ActualFilename) === strtolower($PatternFilename)) { $NotMatchedReasons .= 'Aa '; } elseif (RemoveAccents($ActualFilename) === RemoveAccents($PatternFilename)) { $NotMatchedReasons .= 'ée '; } $actualExt = '.' . fileextension($ActualFilename); $patternExt = '.' . fileextension($PatternFilename); $ActualFilenameNoExt = $actualExt != '.' ? substr($ActualFilename, 0, 0 - strlen($actualExt)) : $ActualFilename; $PatternFilenameNoExt = $patternExt != '.' ? substr($PatternFilename, 0, 0 - strlen($patternExt)) : $PatternFilename; if (strpos($PatternFilenameNoExt, $ActualFilenameNoExt) !== false) { $DifferenceBoldedName = str_replace($ActualFilenameNoExt, '</b>' . $ActualFilenameNoExt . '<b>', $PatternFilenameNoExt); } else { $ShortestNameLength = min(strlen($ActualFilenameNoExt), strlen($PatternFilenameNoExt)); for ($DifferenceOffset = 0; $DifferenceOffset < $ShortestNameLength; $DifferenceOffset++) { if ($ActualFilenameNoExt[$DifferenceOffset] !== $PatternFilenameNoExt[$DifferenceOffset]) { break; } }
$params[":id"] = $_REQUEST["id"]; $where.= " AND bc_id = :id"; } if ($_REQUEST["empresaBusqueda"] != -1) { $params[":idempresa"] = $_REQUEST["empresaBusqueda"]; $where.= " AND bc_idempresa = :idempresa"; } if ($_REQUEST["estadoBusqueda"] != -1) { $params[":idestado"] = $_REQUEST["estadoBusqueda"]; $where.= " AND bc_idestado = :idestado"; } if ($_REQUEST["puestoBusqueda"] != "") { $params[":puesto"] = "%".RemoveAccents($_REQUEST["puestoBusqueda"])."%"; $where.= " AND UPPER(art.utiles.reemplazar_acentos(bc_puesto)) LIKE UPPER(:puesto)"; } if ($_REQUEST["vigenciaDesdeBusqueda"] != "") { $params[":vigenciaDesde"] = $_REQUEST["vigenciaDesdeBusqueda"]; $where.= " AND TO_DATE(:vigenciaDesde, 'dd/mm/yyyy') BETWEEN TRUNC(bc_fechavigenciadesde) AND bc_fechavigenciahasta"; } if ($_REQUEST["vigenciaHastaBusqueda"] != "") { $params[":vigenciaHasta"] = $_REQUEST["vigenciaHastaBusqueda"]; $where.= " AND TO_DATE(:vigenciaHasta, 'dd/mm/yyyy') BETWEEN TRUNC(bc_fechavigenciadesde) AND bc_fechavigenciahasta"; } $sql = "SELECT ¿bc_id?,
function setUrlAmigable($titulo) { return StringToLower(RemoveAccents(str_replace(" ", "-", $titulo))).".html"; }
$sql.= " OR useu.se_buscanombre LIKE :nombre1_".$i; } // Este for quita el caracter en el que se está loopeando.. for ($i=0; $i<strlen($nombre); $i++) { $texto = substr($nombre, 0, $i).substr($nombre, $i + 1); $params[":nombre2_".$i] = "%".RemoveAccents(strtoupper(str_replace("ñ", "Ñ", $texto)))."%"; $sql.= " OR useu.se_buscanombre LIKE :nombre2_".$i; } // Este for agrega un comodin antes de cada caracter.. for ($i=0; $i<strlen($nombre); $i++) { $texto = substr($nombre, 0, $i)."_".substr($nombre, $i); $params[":nombre3_".$i] = "%".RemoveAccents(strtoupper(str_replace("ñ", "Ñ", $texto)))."%"; $sql.= " OR useu.se_buscanombre LIKE :nombre3_".$i; } $sql.= ")"; $grilla->setParams($params); $grilla->setExtraConditions(array($sql)); echo "<div align='center' style='width:100%' ><div id='noDatos' style='padding:1px; width:80%'>No se encontraron datos con las caracteristicas buscadas, quizás quiso buscar a</div></div>"; $grilla->setShowMessageNoResults(true); $grilla->Draw(); if ($grilla->recordCount() == 0) { echo "<script>document.getElementById('noDatos').style.display = 'none';</script>"; } } }
$where = ""; if ($fechaDesde != "") { $params[":fechadesde"] = $_REQUEST["FechaDesde"]; $where.= " AND ap_fecha >= TO_DATE(:fechadesde, 'dd/mm/yyyy')"; } if ($fechaHasta != "") { $params[":fechahasta"] = $_REQUEST["FechaHasta"]; $where.= " AND ap_fecha <= TO_DATE(:fechahasta, 'dd/mm/yyyy')"; } if ($fuente != "") { $params[":fuente"] = "%".RemoveAccents($fuente)."%"; $where.= " AND UPPER(ART.UTILES.reemplazar_acentos(ap_fuente)) LIKE UPPER(:fuente)"; } if ($titulo != "") { $params[":titulo"] = "%".RemoveAccents($titulo)."%"; $where.= " AND UPPER(ART.UTILES.reemplazar_acentos(ap_titulo)) LIKE UPPER(:titulo)"; } $sql = "SELECT ¿ap_id?, ¿ap_fecha?, ¿ap_fuente?, ¿ap_titulo?, ap_fechabaja ¿baja? FROM rrhh.rap_articulosprensa WHERE 1 = 1 _EXC1_"; $grilla = new Grid(); $grilla->addColumn(new Column("", 8, true, false, -1, "BotonInformacion", "/index.php?pageid=13&page=articulo.php", "GridFirstColumn")); $grilla->addColumn(new Column("Fecha")); $grilla->addColumn(new Column("Fuente")); $grilla->addColumn(new Column("Título")); $grilla->addColumn(new Column("", 0, false, true)); $grilla->setBaja(5, $sb, false); $grilla->setColsSeparator(true);
$params[":evaluado"] = "%".RemoveAccents(str_replace("ñ", "Ñ", $evaluado))."%"; $where.= " AND evaluado.se_buscanombre LIKE UPPER(:evaluado)"; } if ($evaluador != "") { $params[":evaluador"] = "%".RemoveAccents(str_replace("ñ", "Ñ", $evaluador))."%"; $where.= " AND evaluador.se_buscanombre LIKE UPPER(:evaluador)"; } if ($notificacion != "") { $params[":notificacion"] = "%".RemoveAccents(str_replace("ñ", "Ñ", $notificacion))."%"; $where.= " AND ue_notificacion LIKE UPPER(:notificacion)"; } if ($supervisor != "") { $params[":supervisor"] = "%".RemoveAccents(str_replace("ñ", "Ñ", $supervisor))."%"; $where.= " AND supervisor.se_buscanombre LIKE UPPER(:supervisor)"; } $sql = "SELECT /*+ index(art.use_usuarios ndx_use_parabusqueda)*/ ue_id ¿ue_id?, evaluado.se_nombre ¿evaluado?, evaluador.se_nombre ¿evaluador?, supervisor.se_nombre ¿supervisor?, ¿ue_fechabaja? FROM rrhh.hue_usuarioevaluacion, use_usuarios evaluado, use_usuarios evaluador, use_usuarios supervisor WHERE ue_evaluado = evaluado.se_usuario AND ue_evaluador = evaluador.se_usuario(+) AND ue_supervisor = supervisor.se_usuario(+) AND ue_anoevaluacion = :ano _EXC1_";