Im just wondering which is better to use for security.
Can this be written in php? Id like to switch some of the functions of my site to javascript.
var withdrawing;
function withdraw() {
withdrawing=false;
$.msgBox({
title:"Withdraw Funds",
content:"<div id=\"_withdraw_content\"><br><small>Enter valid <?php echo $settings['currency_sign']; ?> address:</small><br><input id=\"w_valid_ltc\" type='text' class='l' style='width: 100%;'><br><br><small>Enter amount to be paid-out:</small><br><input id=\"w_amount\" type='text' class='l' style='width: 100px; text-align: center;'><br><br><small><small>Min. value: <b>0.001</b> <?php echo $settings['currency_sign']; ?><br>We charge a fee <b>0.0002</b> <?php echo $settings['currency_sign']; ?> for each withdrawal.</small></small></div>",
type:"info",
opacity:0.8,
buttons: [{ value: "Withdraw" }, { value: "Cancel" }],
success: function(button) {
if (button=="Withdraw" && withdrawing==false) {
w_amount=$("input#w_amount").val();
w_valid=$("input#w_valid_ltc").val();
if (w_amount!='' && w_valid!='') {
$("#_withdraw_content").html('<div style=\"height: 50px;\"></div> <img src="content/images/ajax_loader.gif">');
withdrawing=true;
_requestWithdraw(w_amount,w_valid);
}
else {
alert('One of required fields stayed empty!');
}
}
}
});
return false;
}