1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| <html>
<head>
<script type="text/javascript">
function Calc_Pos1() {
var PrixEntrePos1 =((document.getElementById('PtEntre_1').value - document.getElementById('Strike_1').value)+2)/100;
PrixEntrePos1 = Math.round(PrixEntrePos1*100)/100;
PrixEntreTurbo1Calc.innerHTML = PrixEntrePos1;
var PrixTPPos1 =((document.getElementById('TP_1').value - document.getElementById('Strike_1').value)-2)/100;
PrixTPPos1 = Math.round(PrixTPPos1*100)/100;
PrixTurboTP_1Calc.innerHTML = PrixTPPos1;
var GainTP1 = (document.getElementById("PrixTurbotTP_1User").value - document.getElementById("PrixTurbotEntre_1User").value)* document.getElementById("QteUser_1").value;
GainTP1 = Math.round(GainTP1*100)/100;
GainTurbotTP_1.innerHTML=GainTP1;
}
</script>
</head>
<body>
<form method="post" action="" >
<?php
$FichierPos1 = file("pos01.txt");
$QtePos1 = $FichierPos1[0];
?>
Ex. Price : <input type="text" id="Strike_1" name="Strike_1" value="4224.90" size="6"/>
</br>
Qté. :
<input type="text" id="QteUser_1" name="QteUser_1" size="4" value="<?php echo $QtePos1; ?>"onkeyup="Calc_Pos1()"/>
</br>
P-E :
<input type="text" id="PtEntre_1" name="PtEntre_1" value="4685" size="5" onkeyup="Calc_Pos1()"/>
Calc : <span id="PrixEntreTurbo1Calc"></span>
User : <input type="text" id="PrixTurbotEntre_1User" name="PrixTurbotEntre_1User" size="5" onkeyup="Calc_Pos1()" />
</br>
T-P :
<input type="text" id="TP_1" name="TP_1" value="4730" size="5" onkeyup="Calc_Pos1()"/>
Calc : <span id="PrixTurboTP_1Calc"></span>
User : <input type="text" id="PrixTurbotTP_1User" name="PrixTurbotTP_1User" size="5" onkeyup="Calc_Pos1()"/>
Earn : <span id="GainTurbotTP_1"></span>
<br>
<input type="submit" name="ModifPos1" id="ModifPos1" value="Modify">
<?php
if(isset($_POST["ModifPos1"])){
$QtePos1 = $_POST['QteUser_1'];
file_put_contents('pos01.txt',$QtePos1);
}
?>
<script type="text/javascript">
window.onload = Calc_Pos1();
</script>
</body>
</html> |
Partager