<col width="1" /> <tr> <td style="" class="a-right" colspan="1"><b>Subtotal</b></td> <td style="" class="a-right"> <span class="price">S/.<?php echo number_format($preciototal, 2, '.', ''); ?> </span></td> </tr> <?php if ($totalRows_DatosUsuario > 0) { // Show if recordset not empty ?> <tr class="other-amount"> <td style="text-align: right;"><b>Costo de Envio:(<?php $flete = PrecioDistrito($row_DatosUsuario['id_distrito']); echo NombreDistrito($row_DatosUsuario['id_distrito']); ?> )</b></td> <td class="a-right"><strong>+ S/.<?php echo number_format($flete, 2, '.', ''); ?> </strong></td> </tr> <?php } // Show if recordset not empty if ($totalRows_DatosUsuario == 0) { // Show if recordset empty ?> <tr class="other-amount">
function PrecioDistrito($Distrito) { global $database_Pinky, $Pinky; mysql_select_db($database_Pinky, $Pinky); $query_Tallon = sprintf("SELECT costo FROM distritos WHERE id_distrit = %s", $Distrito); $Tallon = mysql_query($query_Tallon, $Pinky) or die(mysql_error()); $row_Tallon = mysql_fetch_assoc($Tallon); $totalRows_Tallon = mysql_num_rows($Tallon); return $row_Tallon['costo']; mysql_free_result($Tallon); PrecioDistrito($_SESSION['MM_UsuCliente']); }
function PrecioDistrito($Distritso) { global $database_HotSecrets, $HotSecrets; mysql_select_db($database_HotSecrets, $HotSecrets); $query_PrecDist = sprintf("SELECT costo FROM distritos WHERE id_distrito = %s", $Distritso); $PrecDist = mysql_query($query_PrecDist, $HotSecrets) or die(mysql_error()); $row_PrecDist = mysql_fetch_assoc($PrecDist); $totalRows_PrecDist = mysql_num_rows($PrecDist); return $row_PrecDist['costo']; mysql_free_result($PrecDist); PrecioDistrito($_SESSION['MM_Usuario']); }