gracias por la ayuda pero me bbota error te aso el codigo
Código PHP:
<?php require_once('Connections/conex.php'); ?>
<?php require_once('Connections/conex.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "usuarios.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "1,2";
$MM_donotCheckaccess = "false";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && false) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "error.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_Saludo = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_Saludo = $_SESSION['MM_Username'];
}
mysql_select_db($database_conex, $conex);
$query_Saludo = sprintf("SELECT * FROM logeo WHERE `user` = %s", GetSQLValueString($colname_Saludo, "text"));
$Saludo = mysql_query($query_Saludo, $conex) or die(mysql_error());
$row_Saludo = mysql_fetch_assoc($Saludo);
$totalRows_Saludo = mysql_num_rows($Saludo);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<link href="file:///E|/AppServ/www/nusil/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Estilo1 {
font-size: 12px;
font-weight: bold;
}
.Estilo3 {color: #006600}
.Estilo4 {
font-size: 14px;
color: #006600;
font-weight: bold;
}
.Estilo5 { color: #FF0000;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="741" align="center">
<!--header-->
<tr><td style="height:352px;">
<div style="position:absolute; margin-left:-13px;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24"
width="766" height="339">
<param name="movie" value="flash/header_v8.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
<!--[if !IE]> <-->
<object data="flash/header_v8.swf"
width="766" height="339" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]-->
</object></div></td></tr>
<!--content-->
<tr>
<td style="height:352px;"><p align="left" class="Estilo1"><span class="Estilo1">Bienvenido: </span><span class="Estilo3"><?php echo $row_Saludo['nombre']; ?> <?php echo $row_Saludo['apellidos']; ?></span></p>
<p><span class="Estilo1">
<?php if ($_SESSION['MM_UserGroup']=='1'){ ?>
</span> </p>
<div id="orangerow">
<!-- end .nav -->
<div class="col">
<p align="center">
<!-- end authormonth -->
<!-- end bookmonth -->
<strong>Tiene la información para descargar:</strong></p>
<table width="100%" border="0">
<tr>
<td width="35%"><strong>Certificado</strong></td>
<td width="65%"><?php echo $row_Saludo['certificado']; ?></td>
</tr>
<tr>
<td><strong>Comprobante</strong></td>
<td><?php echo $row_Saludo['comprobante']; ?></td>
</tr>
</table>
</div>
<!-- end .col -->
<div id="whitey"></div>
</div>
<p> </p>
<?php } else { ?>
<p class="Estilo4">Area administrativa</p>
<p class="Estilo4">
<?php } ?>
</p>
<p align="left" class="Estilo1"> </p>
<p align="left" class="Estilo1"> </p>
<p align="right" class="Estilo1"> <a href="<?php echo $logoutAction ?>">Desconectar</a></p>
<p align="right" class="Estilo1"> <a href="<?php echo $logoutAction ?>"></a></p>
<p> </p>
<p> </p>
<p> </p></td>
</tr>
<tr><td style="height:12px;"></td></tr>
<tr><td class="top_line"></td></tr>
<!--footer-->
<tr><td class="footer"><DIV align="center"></DIV></td></tr>
</table>
<p> </p>
</body>
</html>
<?php
mysql_free_result($Saludo);
mysql_free_result($Saludo);
?>
necesto en la parte de comprobante y certificado, gracias