Ver Mensaje Individual
  #6 (permalink)  
Antiguo 09/06/2005, 17:40
marcoriquelme
 
Fecha de Ingreso: junio-2005
Mensajes: 3
Antigüedad: 18 años, 10 meses
Puntos: 0
Este es el codigo desde donde parto

<table width="570" align="center" border="0" class="noborde">
<tr class="encabezado">
<td></td>
<td>Prefix </td>
<td>Destination </td>
<td>Calls </td>
<td>Total Mins </td>
<td>Total en $</td>
</tr>
{section name=index loop=$data}
<tr>
<td>{$data[index]}</td>
<td align="right">{$prefix[index]} </td>
{if $totalmin[index] > 0}
<td><a href=trafico_det.php?prefi={$prefix[index]}:{$trafico_fini}:{$trafico_fend} target="_blank">{$dest[index]}</a></td> -->
{/if}
{if $totalmin[index] == 0}
<td>{$dest[index]} </td>
{/if}
<td align="right">{$calls[index]} </td>
<td align="right">{$totalmin[index]} </td>
<td align="right">{$totalpesos[index]} </td>
</tr>
<tr>
<td align="right">{$totalsumapesos[index]}</td>
</tr>
{/section}
</table>

Y este a donde llego

$paso = explode(":",$prefi);
$pref = $paso[0];
$fini = $paso[1];
$fend = $paso[2];
echo $prefi;

$smarty->assign("trafico_fini", $fini);
$smarty->assign("trafico_fend", $fend);

$sql = "
select
".$option."
duration as Duracion,
Total as Totalpesos,
ROUND(Precio_min) as Precio_min,
prefix,
country,
number,
ROUND(duration%60) as seconds,
ROUND(duration/60,2) as minutes,
starttime,
endtime
from
cdr
where
".$option_where." AND
prefix = $pref and
fecha >= '".$fini."' AND
fecha <= '".$fend."' and
duration > 0
";
$rs = $db->Execute($sql);

if (!$rs) {
die("Can't retrieve data <br />" . $sql);
}

Gracias