$porkfolio = porkfolio::byId($id); $retrait = init('montant'); $somme = $porkfolio->getCmd(null, 'somme')->execCmd(); if (!is_numeric($retrait)) { ajax::error('Veuillez saisir un nombre SVP'); } else { if ($somme + $retrait < 0) { ajax::error('Vous demandez à retirer plus que ce que vous possédez'); } else { if ($retrait > 99) { ajax::error('Vous ne pouvez pas déposer plus de 99€'); } else { if ($retrait == 0) { ajax::error('A quoi ca sert de déposer 0€'); } else { porkfolio::retraitdepotporkfolio(init('id'), init('montant')); ajax::success(); } } } } } if (init('action') == 'nezcouleur') { porkfolio::changenezporkfolio(init('id'), init('couleur')); ajax::success(); } if (init('action') == 'objectif') { $objectif = init('montant'); if (!is_numeric($objectif)) { ajax::error('Veuillez saisire un nombre SVP'); } else {