} else { ?> @<?php } if ($fila[$PREMIUM] == 1) { ?> <b> (PREMIUM)</b><?php } ?> [<?php echo "{$fila[$PORCENTAJE_REFS_D]}"; ?> % ref] = <?php echo "{$total}{$divisa}"; if ($divisa == '€') { $dif_dolares = conv_euro_a_dolar($total); $dif_dolares = redondear_dos_decimal($dif_dolares); $total_sindicato = $fila[$TARIFA_SINDIC_D] * $dif_dolares; $total_sindicato = redondear_dos_decimal($total_sindicato); ?> <br />-> a dólares = <?php echo "{$total}"; ?> € * <?php echo "{$fila[$E_DOLAR_D]}"; ?> $/€ = <?php echo "{$dif_dolares}"; ?> $<br> <span class="d2">% del Sindicato: </span><?php
$cantidad = conv_euro_a_dolar($cantidad); $cantidad2 = conv_euro_a_dolar($cantidad2); $cantidad3 = conv_euro_a_dolar($cantidad3); } } else { $neto = $fila3[$CLICKS] - $fila3[$CLICKS_PAGADOS]; $cantidad = $neto * $fila3[$C_AD_REF] * $TARIFA1; $cantidad2 = $neto * $fila3[$C_AD_REF] * $TARIFA2; $cantidad3 = ($neto - $fila3[$CLICKS_NETOS_TEMP]) * $fila3[$C_AD_REF]; //lo que cobramos gracias a sus clicks $sql2 = "UPDATE {$TABLA_PAGOS} SET {$CLICKS_NETOS_TEMP}=" . $neto . " WHERE {$ID_USUARIO}=" . $fila[$ID_USUARIO] . " AND {$ID_EMPRESA}=" . $id_empresa; $res2 = mysql_query($sql2) or die(mysql_error()); if ($divisa == '€') { $cantidad = conv_euro_a_dolar($cantidad); $cantidad2 = conv_euro_a_dolar($cantidad2); $cantidad3 = conv_euro_a_dolar($cantidad3); } $cantidad /= 100; $cantidad2 /= 100; $cantidad3 /= 100; } $cantidad = redondear_dos_decimal($cantidad); $cantidad2 = redondear_dos_decimal($cantidad2); $cantidad3 = redondear_dos_decimal($cantidad3); $sql4 = "SELECT {$NOMBRE_DE_USUARIO} FROM {$TABLA_USUARIOS} WHERE {$ID}=" . $fila[$ID_USUARIO]; $res4 = mysql_query($sql4) or die(mysql_error()); $fila4 = mysql_fetch_array($res4); if ($dueño != $fila4[$NOMBRE_DE_USUARIO]) { $cantidad_cobrada += $cantidad3; } $sql2 = "UPDATE {$TABLA_PAGOS} SET {$POR_PAGAR}=" . $cantidad . ",{$POR_COMISIONAR}=" . $cantidad2 . " WHERE {$ID_USUARIO}=" . $fila[$ID_USUARIO] . " AND {$ID_EMPRESA}=" . $id_empresa;