query ("UPDATE biblio SET download_biblio = download_biblio + 1, timestamp = NOW() WHERE biblio_id = ".$b_id); // if (isset($_POST['ajaxsec_user'])) { $ajaxsec_user = $_POST['ajaxsec_user']; } if (isset($_POST['ajaxsec_passwd'])) { $ajaxsec_passwd = $_POST['ajaxsec_passwd']; } if (($ajaxsec_user == $sysconf['ajaxsec_user']) AND ($ajaxsec_passwd == $sysconf['ajaxsec_passwd'])) { if ($sysconf['ajaxsec_ip_enabled'] == '1') { $server_addr = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : (isset($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : gethostbyname($_SERVER['SERVER_NAME'])); if ($server_addr == $sysconf['ajaxsec_ip_allowed']) { die(); } } if (isset($_POST['id'])) { $id = intval($_POST['id']); $attachment_q = $dbs->query('SELECT att.*, f.* FROM biblio_attachment AS att LEFT JOIN files AS f ON att.file_id=f.file_id WHERE att.biblio_id='.$id.' AND att.access_type=\'public\' LIMIT 20'); if ($attachment_q->num_rows < 1) { echo ''.__('No Attachment').''; } else { echo ''; } } }