|
|
@ -95,7 +95,31 @@ $change_fund = CHANGE_FUND; |
|
|
|
while ( $result = mysql_fetch_assoc($sql) ) { |
|
|
|
$slider_range[] = $result; |
|
|
|
} |
|
|
|
echo json_encode($slider_range); |
|
|
|
|
|
|
|
// this is the first real deposit |
|
|
|
if ($slider_range && !$slider_range[1]["transaction_id"]) { |
|
|
|
$fake_trans_id = $slider_range[0]["transaction_id"] - 1; |
|
|
|
$real_trans = $slider_range[0]; |
|
|
|
$year = date("Y"); |
|
|
|
$slider_range[0] = array("transaction_id" => "$fake_trans_id","deposited" => "yes","date" => "$year-01-01 22:22:22"); |
|
|
|
$slider_range[1] = $real_trans; |
|
|
|
echo json_encode($slider_range); |
|
|
|
|
|
|
|
// no real deposits exist |
|
|
|
} elseif (!$slider_range) { |
|
|
|
// send fake data |
|
|
|
$year = date("Y"); |
|
|
|
$slider_range = array |
|
|
|
( array("transaction_id" => "1","deposited" => "yes","date" => "$year-01-01 22:22:22"), |
|
|
|
array("transaction_id" => "2","deposited" => "yes","date" => "$year-01-02 22:22:22"), |
|
|
|
); |
|
|
|
echo json_encode($slider_range); |
|
|
|
|
|
|
|
// more than 1 deposit exists |
|
|
|
} else { |
|
|
|
echo json_encode($slider_range); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// Deposit Calculator |
|
|
|