Numismatica Lago Maggiore S.p.A.
Riproponi un lotto scaduto
if (!isset($EXEC)) $EXEC = "Chiedi" ?>
include "connessioni.inc";
?>
if ($EXEC == "Inserisci") { ?>
if ($Lotto == "") { ?>
Inserire il numero del lotto
$EXEC = "Chiedi"; ?>
} else {?>
$sql = "select lotto,lotti.codice,offertaminima from lotti left join veac using(codice) where lotti.codice = $UserID and pwd = '$Password' and lotto=$Lotto";
$res = mysql_db_query($db, $sql, $dbcon);
if ($res) $qi = mysql_fetch_array($res);
if(!$res || mysql_num_rows($res)==0){
?>
Username e/o password non validi. Riprova
$EXEC = "Chiedi"; ?>
} else { ?>
Password corretta!
}?>
}?>
}?>
if ($EXEC == "Estendi") { ?>
$sql = "select lotto,lotti.codice,offertaminima
from lotti left join veac using(codice)
where lotti.codice = $UserID and
pwd = '$Password' and lotto=$Lotto";
$res = mysql_db_query($db, $sql, $dbcon);
if ($res) $qi = mysql_fetch_array($res);
if(!$res || mysql_num_rows($res)==0){
?>
Username e/o password non validi. Riprova
$EXEC = "Chiedi"; ?>
} else {?>
$sql = "select dtfineasta from lotti where (lotto=$Lotto
and dtfineasta
Spiacente, non e' possibile modificare la
data di scadenza di un lotto quando l'asta
e' ancora aperta.
} else {?>
if (($Base<=0)) { ?>
Base d'asta non valida"
} else { ?>
$sql = "select credito from veac where codice=$UserID";
$res = mysql_db_query($db, $sql, $dbcon);
if ($res) $q = mysql_fetch_array($res);
if ($q[0] < 0.01 * $Base) { ?>
Credito insufficiente
} else { ?>
$sqlqq = "select offertaminima from lotti where lotto=?Lotto";
$res = mysql_db_query($db, $sqlqq, $dbcon);
if ($res) $qq = mysql_fetch_array($res);
$sqlq = "update veac set credito=credito-".$qq[0]*0.01."
where codice=$UserID";
$res = mysql_db_query($db, $sqlq, $dbcon);
?>
$sql = "update lotti set dtfineasta =
from_days(to_days(now())+20),
offertaminima=$Base where lotto = $Lotto";
$res = mysql_db_query($db, $sql, $dbcon);
?>
Lotto risproposto e credito aggiornato.
}?>
}?>
}?>
}?>
}?>
if ($EXEC == "Chiedi") { ?>
}?>