Comunidad de diseño web y desarrollo en internet online

de PhpMyAdmyn no puedo ver las imag en el servidor-admin

Citar            
MensajeEscrito el 15 Feb 2010 03:09 am
<?php require_once('Connections/cnx.php'); ?>
<?php[url=http://www.arg-2011.com.ar/admin.gif][/url]
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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;
}
}

mysql_select_db($database_cnx, $cnx);
$query_Recordset1 = "SELECT * FROM tablamodelo ORDER BY id DESC";
$Recordset1 = mysql_query($query_Recordset1, $cnx) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_cnx, $cnx);
$query_Recordset1 = "SELECT * FROM tablamodelo ORDER BY id ASC";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $cnx) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}

$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
<h1>Administrador</h1>
<table width="475" height="119" border="1">
<tr>
<td width="148" align="center" bgcolor="#0099FF">titulo</td>
<td width="121" align="center" bgcolor="#0099FF">fotos</td>
<td width="81" align="center" bgcolor="#0099FF">descripcion</td>
<td width="97" align="center" bgcolor="#0099FF">modificar</td>
<td width="97" align="center" bgcolor="#0099FF">borrar</td>
</tr>
<?php do { ?>
<tr>
<td align="center" bgcolor="#009900"><?php echo $row_Recordset1['titulo']; ?></td>
<td ><img src="<?php echo $row_Recordset1['fotos']; ?>" alt="fotos" name="fotos" width="100" height="100" id="fotos" /></td>
<td bgcolor="#009900"><form id="form1" name="form1" method="post" action="">
<textarea name="descripcion" id="descripcion" cols="35" rows="5"><?php echo $row_Recordset1['descripcion']; ?></textarea>
</form></td>
<td bgcolor="#009900"><a href="modificar.php?id=<?php echo $row_Recordset1['id']; ?>">modificar</a></td>
<td bgcolor="#009900"><a onclick="return confirm('¿estas seguro de borrar?')" href="imagenes/borrar_con_foto.php?id=<?php echo $row_Recordset1['id']; ?>">borrar</a></td>

</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

Por anabelweb

2 de clabLevel



 

chrome
Citar            
MensajeEscrito el 15 Feb 2010 03:14 am

anabelweb escribió:

<?php require_once('Connections/cnx.php'); ?>
<?php[url=http://www.arg-2011.com.ar/admin.gif][/url]
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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;
}
}

mysql_select_db($database_cnx, $cnx);
$query_Recordset1 = "SELECT * FROM tablamodelo ORDER BY id DESC";
$Recordset1 = mysql_query($query_Recordset1, $cnx) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_cnx, $cnx);
$query_Recordset1 = "SELECT * FROM tablamodelo ORDER BY id ASC";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $cnx) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}

$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
<h1>Administrador</h1>
<table width="475" height="119" border="1">
<tr>
<td width="148" align="center" bgcolor="#0099FF">titulo</td>
<td width="121" align="center" bgcolor="#0099FF">fotos</td>
<td width="81" align="center" bgcolor="#0099FF">descripcion</td>
<td width="97" align="center" bgcolor="#0099FF">modificar</td>
<td width="97" align="center" bgcolor="#0099FF">borrar</td>
</tr>
<?php do { ?>
<tr>
<td align="center" bgcolor="#009900"><?php echo $row_Recordset1['titulo']; ?></td>
<td ><img src="<?php echo $row_Recordset1['fotos']; ?>" alt="fotos" name="fotos" width="100" height="100" id="fotos" /></td>
<td bgcolor="#009900"><form id="form1" name="form1" method="post" action="">
<textarea name="descripcion" id="descripcion" cols="35" rows="5"><?php echo $row_Recordset1['descripcion']; ?></textarea>
</form></td>
<td bgcolor="#009900"><a href="modificar.php?id=<?php echo $row_Recordset1['id']; ?>">modificar</a></td>
<td bgcolor="#009900"><a onclick="return confirm('¿estas seguro de borrar?')" href="imagenes/borrar_con_foto.php?id=<?php echo $row_Recordset1['id']; ?>">borrar</a></td>

</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>


Por anabelweb

2 de clabLevel



 

chrome
Citar            
MensajeEscrito el 15 Feb 2010 05:36 am
Una pregunta, las fotos están almacenadas en la misma carpeta que el script que posteaste?

Por bucle_infinito

Claber

166 de clabLevel

1 tutorial

 

.NET Developer

firefox
Citar            
MensajeEscrito el 15 Feb 2010 04:39 pm
hola y gracias por responder, están las imagenes en una carpeta que se llama imágenes que esta en otro nivel que los archivos principales como admin.php insertar.php modificar.php
en las dos imágenes que subí se ven todas las carpetas haciendo zoom a la pantalla se llegan a ver mejor.

yo estoy probando el sitio en mi pc
para luego subirlo al hosting verdadero pero claro si ya no las veo en mi pc, algo pasa, asi como intentando cambiar la foto desde modificar tampoco se deja.

saludos y gracias

Por anabelweb

2 de clabLevel



 

chrome
Citar            
MensajeEscrito el 15 Feb 2010 06:36 pm
Hola de nuevo, por lo que puedo ver en la imagen del internet explorer tu script admin.php está alojado en el directorio arg2011_compa y como tus imagenes están en otro directorio deberias especificar eso en tu codigo, o sea si el directorio imagenes es un subdirectorio de arg2011_compa, es decir, su ubicaciones es /arg2011_compa/imagenes/ entonces deberias colocar en tu script donde se alojan las imagenes:

Código PHP :

<img src="./imagenes/<?php echo $row_Recordset1['fotos']; ?>" alt="fotos" name="fotos" width="100" height="100" id="fotos" />

Fijate que antes de hacer un echo de la foto, añado que su ruta es parte del directorio /imagenes.
Prueba hacer esto y me cuentas

Por bucle_infinito

Claber

166 de clabLevel

1 tutorial

 

.NET Developer

firefox
Citar            
MensajeEscrito el 15 Feb 2010 07:42 pm
no paso nada de diferente
aca adjunto el arbol de mi sitio

Por anabelweb

2 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.