![](http://s28.postimg.org/scdkx3o25/Sin_t_tulo.png)
Que Cada Valor de Creditos sea diferente es decir:
Ya cree una regla que me divide los Creditos Entre (60)
Entonces la web me lee las intruscciones y me canjea todos los CreditosT_T
Tengo Este Codigo Adelantado pero canjea todos los Puntos Acumuladors por creditos y quiero es q sea seleccionable :(
Código PHP:
<?php
define('phrase_chngtime',"Puedes cambiar la cantidad de horas jugadas por");
define('phrase_chng1',"Horas online ");
define('phrase_chng2',"Recompensa ");
$Otime['bonus'] = 'points';
$Otime['rate'] = 100;
}elseif ($Otime['bonus'] == 'points'){
$Currency['name'] = 'Points';
}
function Query($query) {
global $Query_Count;
$Query_Count = $Query_Count + 1;
return mssql_query($query);
}
$mi_reslut = $core_db->Execute("SELECT Credits from MEMB_CREDITS where memb___id='$user_auth_id'");
$mi_row = $mi_reslut->fetchRow();
if(($minute_row[0] % 60) > 0) {
$mis = ($mi_row[0] % 60);
$hs = (($mi_row[0] - $mis) / 60);
if ($Otime['bonus'] == 'points') {
$update_money = "UPDATE dbo.Character SET Points = Points + '$add_credits' WHERE AccountID = '$user_auth_id'";
}
else {
$update_money = "";
}
$bonus = $Currency['name'];
if(isset($_POST['change'])) {
if($hours > 0) {
$sql_online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat=0 AND memb___id='$user_auth_id'");
$online_check = mssql_num_rows($sql_online_check);
if (account_online($user_auth_id) === true) {
echo msg('0', 'Revice No Puedieron Ser Cambiados.');
}else{
$delmis = $hs * 60;
$update_OHs = "UPDATE dbo.MEMB_CREDITS SET Credits = Credits - '$delmis' WHERE memb___id = '$user_auth_id'";
$removeotime = $core_db->Execute($update_OHs);
$addmoney = $core_db->Execute($update_money);
echo msg('1',"Puntos Cambiados correctamente.");
}
}
else {
echo msg('0',"Creditos Insuficientes para ser cambiadas.");
}
}
?>
<table width="100%">
<tr>
<td class="text_default" style='width:95%; text-align:justify; padding:5px 10px 5px 10px; border:1px dashed #B9955B;'>
<?php echo phrase_chngtime;?> <? echo $bonus; ?>.
</td>
</tr>
</table>
<br>
<table align="center" border="0" cellpadding="2" cellspacing="2" style="border:1px solid #B9955B; font-family:Tahoma; color:#9d8666; font-size:11px;">
<tr class="bgcol1">
<td class="text_default" align="right" width="50%"><b><?php echo phrase_chng1;?>:</b></td>
<td class="text_default"><?php echo $hours." h ";?></td>
</tr>
<tr>
<td class="text_default" align="right" width="50%"><b><?php echo phrase_chng2;?>:</b></td>
<td class="text_default"><?php echo $add_credits." ".$bonus; ?></td>
</tr>
</table>
<form method="post" action="" name="changetime_start">
<table align="center">
<br>
<tr>
<td>
<input type="hidden" name="change" value="1">
<input type="button" class="submit-form" onclick="this.disabled=true; this.value='Cargando...'; changetime_start.submit();" value="Obtener <? echo $Currency['name']; ?>">
</td>
</tr>
</table>
</form>