fxGetRow($sqlkey_chain); if (!$infoCompte == null) { $mem_count = $infoCompte['key_chain_count'] + 1; $update_plus = ''; if ($infoCompte['key_chain_com_id'] == 0 && isset($_SESSION['com_id'])) { $update_plus = 'key_chain_com_id=' . intval($_SESSION['com_id']) . ','; } $sqlUpdate = 'UPDATE key_chain SET ' . $update_plus . "key_chain_adress_ip='" . $objDatabase->fxEscape($_SERVER['REMOTE_ADDR']) . "'," . 'key_chain_count = ' . intval($mem_count) . ' WHERE pk_key_chain = ' . $key_chain_id; $qryUpdate = $objDatabase->fxQuery($sqlUpdate); header('Location: ' . $infoCompte['key_chain_http']); } else { if (isset($_SESSION['com_id'])) { $mem_com_id = intval($_SESSION['com_id']); } else { $mem_com_id = 0; } $sqlUpdate = 'INSERT key_chain SET key_chain_com_id=' . $mem_com_id . ',key_chain_timestamp=now(),' . "key_chain_http='" . $objDatabase->fxEscape($defaut_landingpage) . "'," . "key_chain_adress_ip='" . $objDatabase->fxEscape($_SERVER['REMOTE_ADDR']) . "'," . 'key_chain_count = 1,pk_key_chain=' . $key_chain_id; $qryUpdate = $objDatabase->fxQuery($sqlUpdate); header('Location: ' . $defaut_landingpage); } exit;