Ver Mensaje Individual
  #57 (permalink)  
Antiguo 26/11/2011, 11:44
Avatar de memp500
memp500
 
Fecha de Ingreso: octubre-2011
Ubicación: venezuela
Mensajes: 40
Antigüedad: 12 años, 6 meses
Puntos: 0
Respuesta: inicio de sesion

perdon me equivoque

user_mod.php

Código PHP:
Ver original
  1. <?php require("config.php"); //requiere config.php
  2. //initialize the session
  3. if (!isset($_SESSION)) {
  4. }
  5. ?>     
  6. <?php
  7. if (!function_exists("GetSQLValueString")) {
  8. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  9. {
  10.   if (PHP_VERSION < 6) {
  11.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  12.   }
  13.  
  14.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  15.  
  16.   switch ($theType) {
  17.     case "text":
  18.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  19.       break;    
  20.     case "long":
  21.     case "int":
  22.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  23.       break;
  24.     case "double":
  25.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  26.       break;
  27.     case "date":
  28.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  29.       break;
  30.     case "defined":
  31.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  32.       break;
  33.   }
  34.   return $theValue;
  35. }
  36. }
  37.  
  38. $colname_Recordset1 = "-1";
  39. if (isset($_SESSION['MM_Username'])) {
  40.   $colname_Recordset1 = $_SESSION['MM_Username'];
  41. }
  42. mysql_select_db($database_localhost, $localhost);
  43. $query_Recordset1 = sprintf("SELECT * FROM ft_ausuarios WHERE primer_nombre = %s", GetSQLValueString($colname_Recordset1, "text"));
  44. $Recordset1 = mysql_query($query_Recordset1, $localhost) or die(mysql_error());
  45. $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  46. $totalRows_Recordset1 = mysql_num_rows($Recordset1);
  47. ?>
  48. <table width="auto" border="0" cellspacing="0">
  49.   <tr>
  50.     <td><table width="auto" border="0" cellspacing="0">
  51.   <tr>
  52.     <td><table width="auto" border="0" cellspacing="0">
  53.   <tr>
  54.     <td><img src="http://www.forosdelweb.com/images/icono_usuario.png" width="25" height="26"/></td>
  55.     <td>  <?php if(empty($_SESSION['MM_Username']))
  56.     {
  57.     echo "Ingrese al Sistema";}
  58.     else echo "Bienvenido ".$_SESSION['MM_Username'] ;?></td>
  59.   </tr>
  60. </table>
  61. </td>
  62.   </tr>
  63.   <tr>
  64.     <td><center><a href="index.php?seccion=welcome">Desconectar</a>
  65.     </center></td>
  66.   </tr>
  67. </table>
  68. </td>
  69.   </tr>
  70. </table>
  71. <?php
  72. mysql_free_result($Recordset1);
  73. ?>
__________________
crear soluciones y oportunidades de desarrollo y crecimiento