$value){
logerror("|".__LINE__."|".__FUNCTION__."|#|"."In m.plfer.php WITH POST: ".$key ." - ".$value);
//echo $key ." - ".$value;
}
//Seller - Captain TinyOtherSeller - sdfsfQuadrant - -2,3System - Location - Gamma TDU 22910Stability - -390Slots_F - 45Slots_T - 45Resource - CobaltOtherResource - Size - 91819 mValue - 8367842Notes - ~- No ATH1 deployed ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡Save - Save
$db = getConnection();
$date = date('j M Y G:i:s');
//if (isset($_POST['API'])){
if (isset($_POST['BuyerID']) or (isset($_POST['OtherBuyer']))){
if (isset($_POST['OtherBuyer']) and $_POST['OtherBuyer'] != ''){
$buyer = $_POST['OtherBuyer'];
} else {
$buyer = $_POST['BuyerID'];
}
$stmt = $db->prepare("UPDATE deposits SET
Buyer =:buyer,
Paid = Price,
Notes = CONCAT(Notes,:notesextra)
WHERE DepositID=:id");+
$stmt->execute(array(':buyer' => $buyer,
':notesextra' => $_POST['Notesextra'],
':id' => $_POST['ID']));
} else {
$val = curr_to_int($_POST['Value']);
//echo $val."
";
$val_float = (float) $val;
//echo $val_float."
";
$price = round(($val_float * .15)/1750);
//echo $price."
";
$str_price = (string) $price;
//echo $str_price."
";
$stmt = $db->prepare("INSERT INTO deposits (
DepositID,
Date,
Quadrant,
Location,
Stability,
Slots,
Size,
Resource,
Value,
Price,
Seller,
Buyer,
Paid,
Notes
) VALUES (
:id,
:Date,
:Quadrant,
:Location,
:Stability,
:Slots,
:Size,
:Resource,
:Value,
:Price,
:Seller,
:Buyer,
:Paid,
:Notes
)");
$stmt->execute(array(':id' => 0,
':Date' =>$date,
':Quadrant' =>'('.trim($_POST['Quadrant']).')',
':Location' =>''.substr(strstr($_POST['Location']," "), 1).' -> '.$_POST['Location'],
':Stability' =>$_POST['Stability'],
':Slots' =>$_POST['Slots_F']."/".$_POST['Slots_T'],
':Size' =>$_POST['Size'],
':Resource' =>$_POST['Resource'],
':Value' =>$_POST['Value'],
':Price' =>$price,
':Seller' =>$_POST['Seller']=="New" ? $_POST['OtherSeller'] : $_POST['Seller'],
':Buyer' =>'',
':Paid' =>'',
':Notes' =>$_POST['Notes']
));
}
$db = null;
header("Location:http://orion.cbhp.com.au/deposit.php");
die();
}
echo "";
try {
//$stmt = $db->prepare("SELECT * from deposits where Buyer = ' '");
//$stmt->execute();
//$searches2 = $stmt->fetchAll(PDO::FETCH_ASSOC);
//$sql = $stmt->fullQuery;
//$result = [];
echo "
';
echo ' '; echo ' '; echo ' '; echo ' '; echo ' | Legend: 1. Add a deposit '; echo '2. Sort by sellers '; echo '3. Sales archives '; echo '4. Module market '; echo '[ΟΘ] Logo: Return to Deposit list '; echo ' |