예제 #1
0
function getImage($file, $width = -1, $maxWidth = -1, $maxHeight = -1) {
	header("Expires: Mon, 20 Dec 1998 01:00:00 GMT");
	header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
	header("Cache-Control: no-cache, must-revalidate");
	header("Pragma: no-cache");
	ini_set("memory_limit", "-1");

	if (!file_exists($file))
		$file = DEFAULT_IMAGE;

	$ext = stringToUpper(substr($file, strrpos($file, "."), 20));

	if (($ext == ".JPG") or ($ext == ".JPEG"))
		getImageJpg($file, $width, $maxWidth, $maxHeight);

	if ($ext == ".GIF")
		getImageGif($file, $width, $maxWidth, $maxHeight);

	if ($ext == ".PNG")
		getImagePng($file, $width, $maxWidth, $maxHeight);
}
예제 #2
0
<!--ZOOMSTOP-->
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/constants.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/../Common/miscellaneous/date_utils.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/../Common/miscellaneous/string_utils.php");


$params = array(":usuario" => getWindowsLoginName(true));
$sql =
	"SELECT 1
		 FROM use_usuarios
		WHERE se_usuario IN ('ALAPACO', 'FPEREZ')
			AND se_usuario = :usuario";
$isSegInfo = existeSql($sql, $params);

$today = stringToUpper(getDayName(date("N")))." ".date("j")." DE ".stringToUpper(getMonthName(date("n")))." DE ".date("Y");
?>
<div>
	<div id="divImagenCabecera"><img id="imgImagenCabecera" src="/images/header/header_logo_1.jpg" usemap="#inicio" /></div>
<?
if (isset($_REQUEST["vistaprevia"])) {
?>
	<div id="divVistaPrevia">
		<div><img src="/modules/portada/images/vista_previa.png" title="Vista Previa" /></div>
		<div><a href="javascript:limpiarVistaPrevia()"><img src="/modules/portada/images/limpiar_vista_previa.png" title="Limpiar Vista Previa" /></a></div>
	</div>
<?
}

if ($isSegInfo) {
?>
예제 #3
0
function getWindowsLoginName($upper = false) {
	
	if (isset($_SESSION["FAKE_REMOTE_USER"])){
		return stringToUpper($_SESSION["FAKE_REMOTE_USER"]);
	}
	
	// Estas dos primeras lineas se agregan para que ande el motor de búsqueda..
	if (!isset($_SERVER["REMOTE_USER"]))
		$_SERVER["REMOTE_USER"] = "******";

	$cred = explode("\\", $_SERVER["REMOTE_USER"]);
	if (count($cred) == 1)
		array_unshift($cred, "No hay información disponible sobre el dominio donde Ud. está logueado.");
	list($domain, $user) = $cred;

	if ($upper)
		return stringToUpper($user);
	else
		return stringToLower($user);
}