Jump to content


patyreis

Member Since 04/12/2011
Offline Last Active 07/12/2011, 22:26
-----

Topics I've Started

Erro Undefined Variable

07/12/2011, 18:13

( ! ) Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\lojavirtual\produtos_inicial.php on line 141
Call Stack
# Time Memory Function Location
1 0.0014 399936 {main}( ) ..\index.php:0
2 0.0611 1542736 require( 'C:\wamp\www\lojavirtual\produtos_inicial.php' ) ..\index.php:65

( ! ) Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\lojavirtual\produtos_inicial.php on line 146
Call Stack
# Time Memory Function Location
1 0.0014 399936 {main}( ) ..\index.php:0
2 0.0611 1542736 require( 'C:\wamp\www\lojavirtual\produtos_inicial.php' ) ..\index.php:65
1 |
( ! ) Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\lojavirtual\produtos_inicial.php on line 151
Call Stack
# Time Memory Function Location
1 0.0014 399936 {main}( ) ..\index.php:0
2 0.0611 1542736 require( 'C:\wamp\www\lojavirtual\produtos_inicial.php' ) ..\index.php:65

( ! ) Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\lojavirtual\produtos_inicial.php on line 155
Call Stack
# Time Memory Function Location
1 0.0014 399936 {main}( ) ..\index.php:0
2 0.0611 1542736 require( 'C:\wamp\www\lojavirtual\produtos_inicial.php' ) ..\index.php:65


-------------------------------------------------------------------------------------------------------------------------------------------------------


<td>
<?php if($_GET["pageNum_RsProdutosInicial"] > 0) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, max(0, $pageNum_RsProdutosInicial - 2), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial - 1; ?>
</a> |
<?php } ?>
<?php if($_GET['pageNum_RsProdutosInicial'] > 0) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, max(0, $pageNum_RsProdutosInicial - 1), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial; ?></a> |
<?php } ?>
<strong><?php echo $pageNum_RsProdutosInicial + 1; ?></strong> |
<?php if($_GET['pageNum_RsProdutosInicial'] + 2 <= ceil($totalRows_RsProdutosInicial / $maxRows_RsProdutosInicial)) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, min($totalPages_RsProdutosInicial, $pageNum_RsProdutosInicial + 1), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial + 2; ?></a> |
<?php } ?>
<?php if($_GET['pageNum_RsProdutosInicial'] + 3 <= ceil($totalRows_RsProdutosInicial / $maxRows_RsProdutosInicial)) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, min($totalPages_RsProdutosInicial, $pageNum_RsProdutosInicial + 2), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial + 3; ?></a>
<?php } ?>
</td>

Erro Undefined Index

04/12/2011, 10:16

NAO ESTOU CONSEGUINDO ENTENDER O ERRO ABAIXO
--------------------------------------------------------------------------------------------------------------------
Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\horta_virtual\produtos_inicial.php on line 144
Call Stack
# Time Memory Function Location
1 0.0013 399992 {main}( ) ..\index.php:0
2 0.1592 1543200 require( 'C:\wamp\www\horta_virtual\produtos_inicial.php' ) ..\index.php:63

---------------------------------------------------------------------------------------------------------------------

<?php
// Require the MXI classes
require_once ('includes/mxi/MXI.php');

// Include Multiple Static Pages
$mxiObj = new MXI_Includes("pagina.php");
$mxiObj->IncludeStatic("detalhesdoproduto", "detalhes_produto.php", "Titulo da Pagina = Detalhes do Produto", "Meta KeyWords = Palavras Chaves do site", "Meta Tag Description = Descrição do site");
$mxiObj->IncludeStatic("listadepartamento", "produtos_departamento.php", "Titulo da Pagina departamento = Detalhes do Produto", "Meta KeyWords = Palavras Chaves do site", "Meta Tag Description = Descrição do site");
$mxiObj->IncludeStatic("listadecategoria", "produtos_categoria.php", "Titulo da Pagina categoria = Detalhes do Produto", "Meta KeyWords = Palavras Chaves do site", "Meta Tag Description = Descrição do site");
$mxiObj->IncludeStatic("listadesubcategoria", "produtos_scategoria.php", "Titulo da Pagina sub categoria = Detalhes do Produto", "Meta KeyWords = Palavras Chaves do site", "Meta Tag Description = Descrição do site");
$mxiObj->IncludeStatic("carrinho", "carrinho.php", "Carrinho de Compras ", "", "");
$mxiObj->IncludeStatic("identificacao", "identificacao.php", "Identificação do Cliente ", "", "");
$mxiObj->IncludeStatic("entrega", "entrega.php", "Dados de Entrega dos Produtos ", "", "");
$mxiObj->IncludeStatic("pagamento", "pagamento.php", "Página de pagamento ", "", "");
$mxiObj->IncludeStatic("pedidofinalizado", "pedidofinalizado.php", "O seu pedido foi finalizado com sucesso.", "", "");
$mxiObj->IncludeStatic("meuspedidos", "meuspedidos.php", "Meus Pedidos", "", "");
$mxiObj->IncludeStatic("itenspedido", "itenspedido.php", "Itens do Meu Pedido", "", "");
$mxiObj->IncludeStatic("meusdados", "meusdados.php", "Meus dados de acesso", "", "");
$mxiObj->IncludeStatic("login", "login.php", "Página de Login da Loja Virtual", "", "");
$mxiObj->IncludeStatic("cadastro", "cadastro.php", "Página de Cadastro da Loja Virtual", "", "");
// End Include Multiple Static Pages
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $mxiObj->getTitle(); ?></title>
<meta name="keywords" content="<?php echo $mxiObj->getKeywords(); ?>" />
<meta name="description" content="<?php echo $mxiObj->getDescription(); ?>" />
<base href="<?php echo mxi_getBaseURL(); ?>" />
</head>

<body>
<table width="800">
<tr>
<td colspan="3">
<?php
mxi_includes_start("topo.php");
require(basename("topo.php"));
mxi_includes_end();
?> </td>
</tr>
<tr>
<td width="150" valign="top"><?php
mxi_includes_start("menu.php");
require(basename("menu.php"));
mxi_includes_end();
?></td>
<td rowspan="2" valign="top">
<?php if(isset($_GET['pagina'])) { ?>
<?php
$incFileName = $mxiObj->getCurrentInclude();
if ($incFileName !== null) {
mxi_includes_start($incFileName);
require(basename($incFileName)); // require the page content
mxi_includes_end();
}
?>

<?php } else { ?>
<?php
mxi_includes_start("produtos_inicial.php");
require(basename("produtos_inicial.php"));
mxi_includes_end();
?>
<?php } ?> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="150">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3"><?php
mxi_includes_start("rodape.php");
require(basename("rodape.php"));
mxi_includes_end();
?></td>
</tr>
</table>
</body>
</html>
--------------------------------------------------------------------------------------------------------------------------------------------------------

<?php require_once('Connections/lojavirtual.php'); ?>
<?php

// Carregando classes TNgs
require_once('includes/tng/tNG.inc.php');

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;
}
}

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_RsProdutosInicial = 9;
$pageNum_RsProdutosInicial = 1;
if (isset($_GET['pageNum_RsProdutosInicial'])) {
$pageNum_RsProdutosInicial = $_GET['pageNum_RsProdutosInicial'];
}
$startRow_RsProdutosInicial = $pageNum_RsProdutosInicial * $maxRows_RsProdutosInicial;

mysql_select_db($database_lojavirtual, $lojavirtual);
$query_RsProdutosInicial = "SELECT pdt_id, pdt_codigo, pdt_descricao, pdt_preco, pdt_foto, pdt_status, pdt_detalhes, pdt_destaques, pdt_preco_promocional FROM lv_produtos_pdt WHERE pdt_status = 1 AND pdt_destaques = 1 ORDER BY RAND()";
$query_limit_RsProdutosInicial = sprintf("%s LIMIT %d, %d", $query_RsProdutosInicial, $startRow_RsProdutosInicial, $maxRows_RsProdutosInicial);
$RsProdutosInicial = mysql_query($query_limit_RsProdutosInicial, $lojavirtual) or die(mysql_error());
$row_RsProdutosInicial = mysql_fetch_assoc($RsProdutosInicial);

if (isset($_GET['totalRows_RsProdutosInicial'])) {
$totalRows_RsProdutosInicial = $_GET['totalRows_RsProdutosInicial'];
} else {
$all_RsProdutosInicial = mysql_query($query_RsProdutosInicial);
$totalRows_RsProdutosInicial = mysql_num_rows($all_RsProdutosInicial);
}
$totalPages_RsProdutosInicial = ceil($totalRows_RsProdutosInicial/$maxRows_RsProdutosInicial)-1;

$queryString_RsProdutosInicial = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_RsProdutosInicial") == false &&
stristr($param, "totalRows_RsProdutosInicial") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_RsProdutosInicial = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_RsProdutosInicial = sprintf("&totalRows_RsProdutosInicial=%d%s", $totalRows_RsProdutosInicial, $queryString_RsProdutosInicial);

// Trigger miniatura de imagens
$miniaturaObj = new tNG_DynamicThumbnail("", "KT_thumbnail");
$miniaturaObj -> setFolder("imagens/");
$miniaturaObj -> setRenameRule("{RsProdutosInicial.pdt_foto}");
$miniaturaObj -> setResize(100, 75, true);
$miniaturaObj -> setWatermark(false);
// Fim da trigger miniatura de imagens

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style3 {font-size: 12px}
.style2 {
font-size: 14px;
font-weight: bold;
color: #990000;
}
-->
</style>
</head>

<body>
<table>
<tr>
<?php do { ?>
<?php } while ($row_RsProdutosInicial = mysql_fetch_assoc($RsProdutosInicial)); ?>
<td width="215">
<table>
<tr>
<td><img src="<?php echo $miniaturaObj->Execute(); ?>" border="0" /></td>
</tr>
<tr>
<td><span class="style3"><?php echo $row_RsProdutosInicial['pdt_descricao']; ?></span><strong> - <span class="style3"><?php echo $row_RsProdutosInicial['pdt_codigo']; ?></span></strong></td>
</tr>
<tr>
<td><?php if($row_RsProdutosInicial['pdt_preco_promocional'] > 0) { ?>
de: R$ <s><?php echo $row_RsProdutosInicial['pdt_preco']; ?></s> por: <span class="style2">R$ <?php echo $row_RsProdutosInicial['pdt_preco_promocional']; ?></span>
<?php } else { ?>
<span class="style2"><strong>R$</strong> <?php echo $row_RsProdutosInicial['pdt_preco']; ?></span>
<?php } ?></td>
</tr>
</table>
</td>
<?php
$row_RsProdutosInicial = mysql_fetch_assoc($RsProdutosInicial);
if(!isset($nested_RsProdutosInicial))
{
$nested_RsProdutosInicial = 1;
}
if(isset($row_RsProdutosInicial) && is_array($row_RsProdutosInicial) && $nested_RsProdutosInicial++%3==0) {
echo "</tr><tr>";
} while ($row_RsProdutosInicial); ?>
</tr>
</table>
<table align="center">
<tr>
<td><?php if($pageNum_RsProdutosInicial > 0) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage,0, $queryString_RsProdutosInicial); ?>">Primeiro</a><?php } ?> </td>
<td><?php if($pageNum_RsProdutosInicial > 0) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, max(0, $pageNum_RsProdutosInicial - 1), $queryString_RsProdutosInicial); ?>">Anterior</a><?php } ?>
</td>
<td>
<?php if($_GET['pageNum_RsProdutosInicial'] > 1) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, max(0, $pageNum_RsProdutosInicial - 2), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial - 1; ?>
</a> |
<?php } ?>
<?php if($_GET['pageNum_RsProdutosInicial'] > 0) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, max(0, $pageNum_RsProdutosInicial - 1), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial; ?></a> |
<?php } ?>
<strong><?php echo $pageNum_RsProdutosInicial + 1; ?></strong> |
<?php if($_GET['pageNum_RsProdutosInicial'] + 2 <= ceil($totalRows_RsProdutosInicial / $maxRows_RsProdutosInicial)) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, min($totalPages_RsProdutosInicial, $pageNum_RsProdutosInicial + 1), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial + 2; ?></a> |
<?php } ?>
<?php if($_GET['pageNum_RsProdutosInicial'] + 3 <= ceil($totalRows_RsProdutosInicial / $maxRows_RsProdutosInicial)) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, min($totalPages_RsProdutosInicial, $pageNum_RsProdutosInicial + 2), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial + 3; ?></a>
<?php } ?>
</td>
<td><?php if($pageNum_RsProdutosInicial < $totalPages_RsProdutosInicial) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, min($totalPages_RsProdutosInicial, $pageNum_RsProdutosInicial + 1), $queryString_RsProdutosInicial); ?>">Próximo</a><?php } ?>
</td>
<td><?php if($pageNum_RsProdutosInicial < $totalPages_RsProdutosInicial) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, $totalPages_RsProdutosInicial, $queryString_RsProdutosInicial); ?>">Último</a><?php } ?>
</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($RsProdutosInicial);
?>

IPB Skin By Virteq