Ver Mensaje Individual
  #11 (permalink)  
Antiguo 28/07/2008, 13:13
dannysoft
 
Fecha de Ingreso: julio-2008
Mensajes: 39
Antigüedad: 15 años, 9 meses
Puntos: 1
Respuesta: ayuda con codigo php

aver disculpa la ignorancia norpool1 lo he colocado de esta manera:

ig_nuevos_productos.php
Código PHP:
<?php


  
//    Copyright (c) Interakt Online 2001
  //    http://www.interakt.ro/

  
require("./adodb/adodb.inc.php");
  require(
"./Connections/cnSoporte.php");
?><?php
   $rs
=$cnSoporte->Execute("SELECT * FROM soporte") or DIE($cnSoporte->ErrorMsg());
   
$rs_numRows=0;
   
$rs__totalRows=$rs->RecordCount();
?><?php


  
//    Copyright (c) Interakt Online 2001
  //    http://www.interakt.ro/

  
require("./adodb/adodb.inc.php");
  require(
"./Connections/cnSoporte.php");
?><?php
   $rs
=$cnSoporte->Execute("SELECT * FROM soporte") or DIE($cnSoporte->ErrorMsg());
   
$rs_numRows=0;
   
$rs__totalRows=$rs->RecordCount();
?><?php


  
//    Copyright (c) Interakt Online 2001
  //    http://www.interakt.ro/

  
require("./adodb/adodb.inc.php");
  require(
"./Connections/cnSoporte.php");
?><?php
   $rs
=$cnSoporte->Execute("SELECT * FROM soporte") or DIE($cnSoporte->ErrorMsg());
   
$rs_numRows=0;
   
$rs__totalRows=$rs->RecordCount();
?><?php
   $Repeat1__numRows 
= -1;
   
$Repeat1__index0;
   
$rs_numRows $rs_numRows $Repeat1__numRows;
?><?php
  
// *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
  
  // set the record count
  
$rs_total $rs->RecordCount();
  
  
// set the number of rows displayed on this page
  
if ($rs_numRows 0) {            // if repeat region set to all records
    
$rs_numRows $rs_total;
  } else if (
$rs_numRows == 0) {    // if no repeat regions
    
$rs_numRows 1;
  }
  
  
// set the first and last displayed record
  
$rs_first 1;
  
$rs_last  $rs_first $rs_numRows 1;
  
  
// if we have the correct record count, check the other stats
  
if ($rs_total != -1) {
    
$rs_numRows min($rs_numRows$rs_total);
    
$rs_first  min($rs_first$rs_total);
    
$rs_last  min($rs_last$rs_total);
  }
  
?><?php $MM_paramName ""?><?php
// *** Move To Record and Go To Record: declare variables

$MM_rs      = &$rs;
$MM_rsCount   $rs_total;
$MM_size      $rs_numRows;
$MM_uniqueCol "id";
$MM_paramName "id";
$MM_offset 0;
$MM_atTotal false;
$MM_paramIsDefined = ($MM_paramName != "" && isset($$MM_paramName));
?><?php
// *** Move To Specific Record: handle detail parameter

if ($MM_paramIsDefined && $MM_rsCount != 0) {

  
// get the value of the parameter
  
$param = $$MM_paramName;

  
// find the record with the unique column value equal to the parameter value
  
for ($MM_offset=0; !$MM_rs->EOF$MM_offset++) {
    if (
$MM_rs->Fields($MM_uniqueCol) == $param) break;
    
$MM_rs->MoveNext();
  }

  
// if not found, set the number of records and reset the cursor
  
if ($MM_rs->EOF) {
    if (
$MM_rsCount 0$MM_rsCount $MM_offset;
    if (
$MM_size || $MM_size $MM_rsCount$MM_size $MM_rsCount;
    
$MM_offset 0;

    
// reset the cursor to the beginning
    
$MM_rs->MoveFirst();
  }
}
?><?php
// *** Move To Record: if we dont know the record count, check the display range

if ($MM_rsCount == -1) {

  
// walk to the end of the display range for this page
  
for ($i=$MM_offset; !$MM_rs->EOF && ($MM_size || $i $MM_offset $MM_size); $i++) {
    
$MM_rs->MoveNext();
  }

  
// if we walked off the end of the recordset, set MM_rsCount and MM_size
  
if ($MM_rs->EOF) {
    
$MM_rsCount $i;
    if (
$MM_size || $MM_size $MM_rsCount$MM_size $MM_rsCount;
  }

  
// if we walked off the end, set the offset based on page size
  
if ($MM_rs->EOF && !$MM_paramIsDefined) {
    if ((
$MM_rsCount $MM_size) != 0) {  // last page not a full repeat region
      
$MM_offset $MM_rsCount - ($MM_rsCount $MM_size);
    } else {
      
$MM_offset $MM_rsCount $MM_size;
    }
  }

  
// reset the cursor to the beginning
  
$MM_rs->MoveFirst();

  
// move the cursor to the selected record
  
for ($i=0; !$MM_rs->EOF && $i $MM_offset$i++) {
    
$MM_rs->MoveNext();
  }
}
?><?php
// *** Move To Record: update recordset stats

// set the first and last displayed record
$rs_first $MM_offset 1;
$rs_last  $MM_offset $MM_size;
if (
$MM_rsCount != -1) {
  
$rs_first $rs_first<$MM_rsCount?$rs_first:$MM_rsCount;
  
$rs_last  $rs_last<$MM_rsCount?$rs_last:$MM_rsCount;
}

// set the boolean used by hide region to check if we are on the last record
$MM_atTotal = ($MM_rsCount != -&& $MM_offset $MM_size >= $MM_rsCount);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="estilo_noticias.css" type="text/css">
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <th colspan="3" valign="top" scope="col"> 
      <?include("superior.htm")?>
    </th>
  </tr>
  <tr> 
    <td width="140" valign="top" bgcolor="#FFDF9D"> 
      <?include("izquierda.htm")?>
    </td>
    <td width="480" valign="top" bgcolor="#FFFFFF"> 
      <table width="460" border="0" align="center" cellspacing="0" cellpadding="0">
        <tr> 
          <td class="texto_titulo" colspan="2"> 
            <table border="0" cellpadding="0" cellspacing="0" width="436">
              <!-- fwtable fwsrc="titulo.png" fwbase="titulo.jpg" fwstyle="Dreamweaver" fwdocid = "694147630" fwnested="0" -->
              <tr> 
                <td><img src="img/spacer.gif" width="2" height="1" border="0" alt="" /></td>
                <td><img src="img/spacer.gif" width="396" height="1" border="0" alt="" /></td>
                <td><img src="img/spacer.gif" width="38" height="1" border="0" alt="" /></td>
                <td><img src="img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
              </tr>
              <tr> 
                <td colspan="3"><img name="titulo_r1_c1" src="img/titulo_r1_c1.jpg" width="436" height="3" border="0" id="titulo_r1_c1" alt="" /></td>
                <td><img src="img/spacer.gif" width="1" height="3" border="0" alt="" /></td>
              </tr>
              <tr> 
                <td rowspan="2"><img name="titulo_r2_c1" src="img/titulo_r2_c1.jpg" width="2" height="27" border="0" id="titulo_r2_c1" alt="" /></td>
                <td background="img/titulo_r2_c2.jpg"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="396" height="25">
                    <param name="movie" value="flash/ig_nuevos_productos.swf">
                    <param name="quality" value="high">
                    <param name="wmode" value="transparent">
                    <embed src="flash/ig_nuevos_productos.swf" width="396" height="25" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent">
                    </embed> 
                  </object></td>
                <td rowspan="2"><img name="titulo_r2_c3" src="img/titulo_r2_c3.jpg" width="38" height="27" border="0" id="titulo_r2_c3" alt="" /></td>
                <td><img src="img/spacer.gif" width="1" height="25" border="0" alt="" /></td>
              </tr>
              <tr> 
                <td><img name="titulo_r3_c2" src="img/titulo_r3_c2.jpg" width="396" height="2" border="0" id="titulo_r3_c2" alt="" /></td>
                <td><img src="img/spacer.gif" width="1" height="2" border="0" alt="" /></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td class="texto_titulo">&nbsp;</td>
          <td class="texto_titulo" valign="top">&nbsp; </td>
        </tr>
        <tr> 
          <td colspan="2"> 
            <?php while (($Repeat1__numRows-- != 0) && (!$rs->EOF)) 
   { 
?>
            <table width="460" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="120"><img src="fotos_soporte/<?php echo $rs->Fields("id")?>.jpg" width="100" height="100"></td>
                <td valign="top" width="340"><a href="echo ahref=/pdf_soporte/$nombre.pdf;"> 
                  <?php echo $rs->Fields("titulo")?>
                  </a><br />

                  <span class="texto_comentario"> 
                  <?php echo $rs->Fields("comentario")?>
                  </span></td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td colspan="2"> 
                  <hr>
                </td>
              </tr>
            </table>
            <?php
  $Repeat1__index
++;
  
$rs->MoveNext();
}
?>
          </td>
        </tr>
      </table>
      <p align="center">&nbsp;</p>
      <p align="right"><a href="javascript:window.history.back()"><span class="texto_comentario">&gt;&gt; 
        Regresar</span></a><br>
      </p>
    </td>
    <td width="140" valign="top" bgcolor="#FFDF9D"> 
      <?include("derecha.htm")?>
    </td>
  </tr>
  <tr> 
    <td colspan="3" valign="top" bgcolor="#FFFFFF"> 
      <?include("base.htm")?>
    </td>
  </tr>
</table>
</body>
</html>
<?php
  $rs
->Close();
?>
<?php
  $rs
->Close();
?>
<?php
  $rs
->Close();
?>