<?php $tprice = (int) $_SESSION['tprice']; if (isset($_REQUEST['user'])) { $ret = "NOK"; $out = gohar_class::login(trim($_REQUEST['user']), trim($_REQUEST['pass'])); // var_dump($out); if ($out['err'] == NULL) { $credit = (int) $out['out']['credit']; if ($credit >= $tprice) { $ret = "OK"; } else { $ret = "CREDIT"; } } die($ret); } $loged = isset($_SESSION['credit']); $voucher_id = $_SESSION['voucher_id']; $voucher = $voucher_id[0] . (count($voucher_id) == 2 ? '-' . $voucher_id[1] : ''); $refrence_id = (int) $_SESSION['refrence_id']; $passengers = $_SESSION['passengers']; $data = $_SESSION['data']; $data2 = isset($_SESSION['data2']) ? $_SESSION['data2'] : ''; $adl = (int) $_SESSION['adl']; $chd = (int) $_SESSION['chd']; $inf = (int) $_SESSION['inf']; $price = $_SESSION['price']; $mobile = $_SESSION['mobile']; $address = $_SESSION['address']; $extra_info = $_SESSION['extra_info'];
<?php $out = gohar_class::login('hrak', '3101', '724'); var_dump($out); $out = gohar_class::decCredit("hrak", "3101", "1200", "113", "724"); var_dump($out);