<?php
	/*	include("conexion.php");
		
		$Base= new BaseDatos();
		$Base->conectarGen("localhost","root","","bd_impacto");


		//para hacer el nro maximo de items por pagina
		$currentPage = $HTTP_SERVER_VARS["PHP_SELF"];
		$maxRows_registros = 3;
		$pageNum_registros = 0;
		if (isset($HTTP_GET_VARS['pageNum_registros'])) {
		  $pageNum_registros = $HTTP_GET_VARS['pageNum_registros'];
		}
		$startRow_registros = $pageNum_registros * $maxRows_registros;

		$query = ("SELECT * FROM testimonios ORDER BY id DESC");
				
		$query_limit_registros = sprintf("%s LIMIT %d, %d", $query, $startRow_registros, $maxRows_registros);
		$registros = mysql_query($query_limit_registros) or die(mysql_error());
		//$row_registros = mysql_fetch_assoc($registros);
		if (isset($HTTP_GET_VARS['totalRows_registros'])) {
		  $totalRows_registros = $HTTP_GET_VARS['totalRows_registros'];
		} else {
		
		  $all_registros = mysql_query($query);
		
		  $totalRows_registros = mysql_num_rows($all_registros);
		
		}
		
		$totalPages_registros = ceil($totalRows_registros/$maxRows_registros)-1;
		
		
		
		$queryString_registros = "";
		
		if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
		
		  $params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
		
		  $newParams = array();
		
		  foreach ($params as $param) {
		
			if (stristr($param, "pageNum_registros") == false && 
		
				stristr($param, "totalRows_registros") == false) {
		
			  array_push($newParams, $param);
		
			}
		
		  }
		
		  if (count($newParams) != 0) {
		
			$queryString_registros = "&" . implode("&", $newParams);
		
		  }
		
		}
		
		$queryString_registros = sprintf("&totalRows_registros=%d%s", $totalRows_registros, $queryString_registros);
		
*/

?>
<!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=iso-8859-1" />
<title>Impacto Visual</title>
<link href="estilos/estilos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Estilo11 {color: #FF00FF}
.Estilo12 {color: #7D466D; }
-->
</style>
</head>

<body bgcolor="#F2E6E8" >
<table width="600" height="83"  align="center" bordercolor="#FFFFFF" style="border:double">
<tr>
<td width="111" bgcolor="#FFCCFF"> <img src="http://es.geocities.com/jusbaniz/faseII/analisis/t4/silueta2.jpg" width="111" height="111" /></td>
<td width="548"  bgcolor="#FFCCFF"><div class="Estilo1" style="font-family:Arial"> 
  <div align="center" class="Estilo2">IMPACTO VISUAL </div>
</div></td>
</tr>
</table>
<br />
<table width="600" height="31" align="center"   class="recuadromenu">
	<tr>
		<td width="52" height="23"  class="Estilo4"><a href="t4.html">Inicio</a></td>
		<td width="105" class="Estilo4"><a href="quienes.html">Qui&eacute;nes Somos</a></td>
		<td width="81" class="Estilo4"><a href="productos.php">Productos</a></td>
		<td width="85" class="Estilo4"><a href="#">Testimonios</a></td>
		<td width="64" class="Estilo4"><a href="contacto.php">Contacto</a></td>
		<td width="262" class="Estilo4">&nbsp;</td>
	</tr>
</table>

<form name="form1" action="testimonios.php" method="">
<table  align="center" width="600" style="border-bottom:medium" bgcolor="#FFFFFF">
		<tr>
		<td>
		<table width="329" align="center">
			<tr>
			<td colspan="7" align="center" bordercolor="#FFFFFF" bgcolor="#FF99FF" style="border: double"><span class="Estilo9">Nuevo Testimonio</span></td>
			</tr>
			<tr>
			<td width="61">&nbsp;</td>
			</tr>
			
			<tr>
			<td colspan="3" align="right"><span class="Estilo6">Nombre</span></td>
			<td width="251" colspan="4" align="left"><span class="Estilo8">
			  <input name="nombre" id="nombre" type="text" size="30" maxlength="25" />
			</span></td>
			</tr>
			<tr>
			<td  colspan="3" align="right"><span class="Estilo6">Apellido</span></td>
			<td  colspan="4" align="left"><span class="Estilo8"><input name="apellido" id="apellido" type="text" size="30" maxlength="25" />
			</span></td>
			</tr>
			<tr>
			<td colspan="3" align="right"><span class="Estilo6">Direccion</span></td>
			<td width="251" colspan="4" align="left"><span class="Estilo8">
			  <input name="direcc" id="direcc" type="text" size="30" maxlength="60" />
			</span></td>
			</tr>
			<tr>
			<td  colspan="3" align="right"><span class="Estilo6">Testimonio</span></td>
			<td  colspan="4" align="left"><span class="Estilo8"><textarea name="testi" id="testi" rows="4" cols="40"></textarea></span>
			</span></td>
			</tr>
			
			<tr>
			<td>&nbsp;</td>
			</tr>
			<tr>
			<td colspan="7" align="center"><input name="agregar" type="button" <?php //onclick="guardar_reg()" ?> value="Agregar" /></td>
			</tr>
			<tr>
			<td>&nbsp;</td>
			</tr>
		</table>		</td>
	</tr>
  </table>
				<tr>
			<td>&nbsp;</td>
			</tr>
	<table  align="center" width="600" style="border-bottom:medium" bgcolor="#FFECFF">
  <?php /*<tr>
    <td width="39" height="58">&nbsp;</td>
    <td width="688" height="58" valign="top" class="texto1"><div align="center" class="Estilo4 Estilo12">Estos son los testimonios de la gente que la faja le ha cambiado la vida</div>
    <br /> */?>
			<?php /*

		$cont = 0;

		$total = mysql_num_rows($registros);

		while (@$row = mysql_fetch_array($registros)){

		//if ($cont<4){

		?>
	<table width="486" align="center" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="232"><table align="center" width="480" cellpadding="0" cellspacing="0" bordercolor="#CCCC00">
			  <tr>
				<td class="Estilo8"><strong>Nombre:</strong><?PHP echo ' '.$row['nombre'];?></td>
				</tr>
				<tr>
				<td class="Estilo8"><strong>Apellido:</strong><?PHP echo ' '.$row['apellido'];?></td>
				</tr>
				<tr>
				  <td class="Estilo8"><strong>Testimonio:</strong><?PHP echo ' '.trim($row['testimonio']);?></td>  
			    </tr>
        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td width="98">&nbsp;</td>
      </tr>
    </table> <?php } ?>   </td>
    <td width="23" valign="top" class="texto1">&nbsp;</td>
  </tr>
  
  <tr>
    <td colspan="3"><img src="img/spacer.gif" width="1" height="10" /></td>
	  </tr>	


  <tr>
  <td colspan="2">
  			<div align="center"><?php if ($pageNum_registros> 0) { // Show if not first page ?>

              <a href="<?php printf("%s?pageNum_registros=%d%s", $currentPage, 0, $queryString_registros); ?>" class="links"><font color="#CC9966"><<</font></a><font color="#CC9966">
              <?php } // Show if not first page ?>&nbsp;
              <?php if ($pageNum_registros > 0) { // Show if not first page ?>

                <a href="<?php printf("%s?pageNum_registros=%d%s", $currentPage, max(0, $pageNum_registros - 1), $queryString_registros); ?>" class="links"><font color="#CC9966"><</font></a>

                <?php } // Show if not first page ?>&nbsp;
              <?php if ($pageNum_registros < $totalPages_registros) { // Show if not last page ?>

                <a href="<?php printf("%s?pageNum_registros=%d%s", $currentPage, min($totalPages_registros, $pageNum_registros + 1), $queryString_registros); ?>" class="links"><font color="#CC9966">></font></a>

                <?php } // Show if not last page ?>
              </font>&nbsp;
              <?php if ($pageNum_registros < $totalPages_registros) { // Show if not last page ?>

                <a href="<?php printf("%s?pageNum_registros=%d%s", $currentPage, $totalPages_registros, $queryString_registros); ?>" class="links"><font color="#CC9966">>></font></a>

                <?php } // Show if not last page */?>				  
        </div>
	 </td>
  </tr>
 </font>
 </table> 
	</table>

	<tr><td>&nbsp;</td></tr>
</form>


<table align="center" width="600" height="4" bgcolor="#FF99FF">
<tr>
<td> </td>
</tr>
</table>
<script>
function guardar_reg()
{
	if (document.form1.nombre.value=="" || document.form1.apellido.value=="" || document.form1.direcc.value=="" || document.form1.testi.value=="")
	{
		alert("Disculpe, Faltan Datos por Llenar");
	}
	else
	{
		document.form1.action='guardar_action.php';
		document.form1.submit();
	}
}
</script>
</body>
</html>

