big changes

everything with lease and expire dates
This commit is contained in:
Tóth Richárd
2019-08-29 17:22:24 +02:00
parent 3915d630dd
commit dccd23f1a1
20 changed files with 315 additions and 125 deletions

View File

@@ -5,15 +5,15 @@ include('class_sql.php');
if ($_SERVER['HTTP_HOST'] == 'cegledcoach.hu') $sql = new sql('bcd_mysql','root','','badminton_coach');
else $sql = new sql('localhost','livingsp_coach','R186er012qw5','livingsp_badminton');
if (empty($_GET['lease_id'])) {
if (empty($_GET['lease_id']) || 'null' == $_GET['lease_id']) {
echo json_encode(null);
}
else {
$l_query = "SELECT l_sum FROM lease WHERE l_id = " . $_GET['lease_id'];
$l_query = "SELECT l_sum, l_expire_type, l_expire_date FROM lease WHERE l_id = " . $_GET['lease_id'];
$l_sum = $sql->single_variable($l_query);
$l_res = $sql->assoc_array($l_query);
echo json_encode($l_sum);
echo json_encode($l_res[0]);
}
?>