Files
code-cegled/_ajax/get_lease_sum.php
Tóth Richárd dccd23f1a1 big changes
everything with lease and expire dates
2019-08-29 17:22:24 +02:00

20 lines
608 B
PHP

<?php
//tag listánál ez adja vissza a keresés eredményét
ini_set('include_path', '../_class/');
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']) || 'null' == $_GET['lease_id']) {
echo json_encode(null);
}
else {
$l_query = "SELECT l_sum, l_expire_type, l_expire_date FROM lease WHERE l_id = " . $_GET['lease_id'];
$l_res = $sql->assoc_array($l_query);
echo json_encode($l_res[0]);
}
?>