{"id":21384,"date":"2026-05-27T14:56:57","date_gmt":"2026-05-27T12:56:57","guid":{"rendered":"https:\/\/www.drugshortage.ch\/?page_id=21384"},"modified":"2026-05-27T22:46:50","modified_gmt":"2026-05-27T20:46:50","slug":"abo-gestion","status":"publish","type":"page","link":"https:\/\/www.drugshortage.ch\/index.php\/abo-gestion\/","title":{"rendered":"Abonnements gestion"},"content":{"rendered":"\n<!-- ============================================================\n     Slug: abo-gestion\n     Version fran\u00e7aise de la page de gestion des abonnements\n     ============================================================ -->\n<style>\n  #gest-outer { width:100%; max-width:800px; margin:0 auto; box-sizing:border-box; font-family:'Segoe UI',Arial,sans-serif; font-size:14px; color:#2d3748; }\n  .gest-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:28px; box-shadow:0 2px 8px rgba(0,0,0,.07); margin-bottom:16px; }\n  .gest-title { font-size:18px; font-weight:700; color:#2d3748; margin-bottom:4px; }\n  .gest-email { font-size:13px; color:#718096; margin-bottom:20px; }\n  .gest-section-title { font-size:14px; font-weight:700; color:#e53e3e; text-transform:uppercase; letter-spacing:.5px; margin-bottom:12px; padding-bottom:6px; border-bottom:2px solid #e53e3e; }\n  .gest-suche-wrap { display:flex; gap:8px; margin-bottom:12px; }\n  .gest-input { flex:1; padding:10px 12px; border:1px solid #e2e8f0; border-radius:8px; font-size:14px; outline:none; }\n  .gest-input:focus { border-color:#e53e3e; }\n  .gest-btn-suche { padding:10px 18px; background:#2d3748; color:#fff; border:none; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; }\n  .gest-btn-suche:hover { background:#4a5568; }\n  .gest-resultate { max-height:280px; overflow-y:auto; border:1px solid #e2e8f0; border-radius:8px; margin-bottom:12px; }\n  .gest-resultat-item { display:flex; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid #edf2f7; cursor:pointer; }\n  .gest-resultat-item:last-child { border-bottom:none; }\n  .gest-resultat-item:hover { background:#f7fafc; }\n  .gest-resultat-item input[type=checkbox] { width:16px; height:16px; cursor:pointer; }\n  .gest-resultat-name { font-weight:500; font-size:13px; }\n  .gest-resultat-sub { font-size:11px; color:#718096; }\n  .gest-btn-add { width:100%; padding:10px; background:#e53e3e; color:#fff; border:none; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; }\n  .gest-btn-add:hover { background:#c53030; }\n  .gest-btn-add:disabled { background:#a0aec0; cursor:not-allowed; }\n  .gest-medi-item { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid #edf2f7; }\n  .gest-medi-item:last-child { border-bottom:none; }\n  .gest-medi-info { flex:1; }\n  .gest-medi-name { font-weight:500; font-size:13px; }\n  .gest-medi-sub { font-size:11px; color:#718096; margin-top:2px; }\n  .gest-engpass-badge { font-size:11px; background:#fff5f5; color:#c53030; border:1px solid #feb2b2; border-radius:4px; padding:1px 6px; margin-left:6px; }\n  .gest-btn-del { padding:4px 10px; background:#fff; color:#c53030; border:1px solid #feb2b2; border-radius:6px; font-size:12px; cursor:pointer; }\n  .gest-btn-del:hover { background:#fff5f5; }\n  .gest-leer { padding:16px; color:#718096; text-align:center; font-style:italic; font-size:13px; }\n  .gest-profil-wrap { display:flex; gap:8px; align-items:flex-end; }\n  .gest-profil-wrap .gest-input { flex:1; }\n  .gest-danger { background:#fff5f5; border:1px solid #feb2b2; border-radius:8px; padding:14px 16px; font-size:13px; color:#742a2a; margin-bottom:12px; }\n  .gest-btn-danger { padding:10px 20px; background:#fff; color:#c53030; border:2px solid #c53030; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; }\n  .gest-meldung { display:none; margin-top:10px; padding:10px 14px; border-radius:8px; font-size:13px; font-weight:600; }\n  .gest-meldung.success { background:#f0fff4; border:1px solid #9ae6b4; color:#276749; }\n  .gest-meldung.error   { background:#fff5f5; border:1px solid #feb2b2; color:#c53030; }\n  #gest-login-hinweis { background:#fffbeb; border:1px solid #fbd38d; border-radius:10px; padding:20px 24px; font-size:14px; color:#744210; }\n  .gest-login-btn { display:inline-block; margin-top:12px; padding:10px 20px; background:#e53e3e; color:#fff; border-radius:8px; text-decoration:none; font-weight:600; }\n  .gest-spinner { display:inline-block; width:14px; height:14px; border:2px solid #fff; border-top-color:transparent; border-radius:50%; animation:gestspin .7s linear infinite; vertical-align:middle; margin-right:4px; }\n  @keyframes gestspin { to { transform:rotate(360deg); } }\n  .gest-lang { text-align:right; margin-bottom:12px; font-size:12px; color:#718096; }\n  .gest-lang a { color:#e53e3e; text-decoration:none; font-weight:600; }\n\n  \/* Modal *\/\n  #gest-modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,.5); z-index:9999; align-items:center; justify-content:center; }\n  #gest-modal-inner { background:#fff; border-radius:12px; padding:28px; max-width:400px; width:90%; box-shadow:0 8px 32px rgba(0,0,0,.2); }\n  #gest-modal-text { font-size:14px; color:#2d3748; margin-bottom:20px; line-height:1.6; }\n  #gest-modal-btn { width:100%; padding:10px; background:#e53e3e; color:#fff; border:none; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; }\n<\/style>\n\n<!-- Modal -->\n<div id=\"gest-modal\">\n  <div id=\"gest-modal-inner\">\n    <div id=\"gest-modal-text\"><\/div>\n    <button id=\"gest-modal-btn\" onclick=\"document.getElementById('gest-modal').style.display='none'\">OK<\/button>\n  <\/div>\n<\/div>\n\n<div id=\"gest-outer\">\n  <div class=\"gest-lang\">\n    <a href=\"https:\/\/www.drugshortage.ch\/index.php\/abo-verwaltung\/\">&#x1f1e9;&#x1f1ea; Deutsch<\/a>\n  <\/div>\n\n  <div id=\"gest-login-hinweis\" style=\"display:none;\">\n    &#x26a0;&#xfe0f; Vous n&#8217;\u00eates pas connect\u00e9(e).\n    <br><a href=\"https:\/\/www.drugshortage.ch\/index.php\/abo-inscription\/\" class=\"gest-login-btn\">Se connecter \u2192<\/a>\n  <\/div>\n\n  <div id=\"gest-inhalt\" style=\"display:none;\">\n    <div class=\"gest-card\">\n      <div class=\"gest-title\">&#x1f514; Mes abonnements m\u00e9dicaments<\/div>\n      <div class=\"gest-email\">Connect\u00e9(e) en tant que : <strong id=\"gest-email-anzeige\">\u2013<\/strong> &nbsp;<button onclick=\"gestLogout()\" style=\"padding:3px 10px;background:#fff;color:#718096;border:1px solid #e2e8f0;border-radius:6px;font-size:12px;cursor:pointer;\">Se d\u00e9connecter<\/button><\/div>\n\n      <div id=\"gest-abo-status\" style=\"margin-bottom:12px;\"><\/div>\n      <div class=\"gest-section-title\">Ajouter un m\u00e9dicament<\/div>\n      <div class=\"gest-suche-wrap\">\n        <input type=\"text\" id=\"gest-suche\" class=\"gest-input\" placeholder=\"Num\u00e9ro sous le code-barres (GTIN) ou nom du m\u00e9dicament\u2026\">\n        <button class=\"gest-btn-suche\" onclick=\"gestSuche()\">Rechercher \u2192<\/button>\n      <\/div>\n      <div style=\"font-size:12px;color:#718096;margin-bottom:10px;background:#ebf8ff;border:1px solid #bee3f8;border-radius:6px;padding:8px 12px;\">\n        &#x2139;&#xfe0f; Seuls les m\u00e9dicaments <strong>soumis \u00e0 ordonnance (cat\u00e9gorie A et B)<\/strong> et\/ou <strong>rembours\u00e9s par l&#8217;assurance maladie<\/strong> peuvent \u00eatre suivis.\n      <\/div>\n      <div id=\"gest-resultate\" class=\"gest-resultate\" style=\"display:none;\"><\/div>\n      <button class=\"gest-btn-add\" id=\"gest-add-btn\" onclick=\"gestHinzufuegen()\" style=\"display:none;\">Ajouter les m\u00e9dicaments s\u00e9lectionn\u00e9s<\/button>\n      <div class=\"gest-meldung\" id=\"gest-add-meldung\"><\/div>\n    <\/div>\n\n    <div class=\"gest-card\">\n      <div class=\"gest-section-title\">Mes m\u00e9dicaments suivis (<span id=\"gest-anzahl\">0<\/span>)<\/div>\n      <div id=\"gest-medi-liste\"><\/div>\n      <div class=\"gest-meldung\" id=\"gest-del-meldung\"><\/div>\n    <\/div>\n\n    <div class=\"gest-card\">\n      <div class=\"gest-section-title\">Num\u00e9ro de t\u00e9l\u00e9phone<\/div>\n      <div class=\"gest-profil-wrap\">\n        <input type=\"tel\" id=\"gest-telefon\" class=\"gest-input\" placeholder=\"+41 79 000 00 00\">\n        <button class=\"gest-btn-suche\" onclick=\"gestTelefonSpeichern()\">Enregistrer<\/button>\n      <\/div>\n      <div class=\"gest-meldung\" id=\"gest-tel-meldung\"><\/div>\n    <\/div>\n\n    <div class=\"gest-card\">\n      <div class=\"gest-section-title\">Compte<\/div>\n      <div class=\"gest-danger\">\n        <strong>D\u00e9sactiver le compte :<\/strong> Toutes vos donn\u00e9es (e-mail, t\u00e9l\u00e9phone, abonnements) seront supprim\u00e9es imm\u00e9diatement et de mani\u00e8re irr\u00e9versible.\n      <\/div>\n      <button class=\"gest-btn-danger\" onclick=\"gestDeaktivieren()\">D\u00e9sactiver le compte et supprimer les donn\u00e9es<\/button>\n      <div class=\"gest-meldung\" id=\"gest-del-account-meldung\"><\/div>\n    <\/div>\n  <\/div>\n<\/div>\n\n<script>\nconst GEST_BASE       = \"https:\/\/www.drugshortage.ch\";\nconst GEST_API        = GEST_BASE + \"\/api\/api_abo_verwaltung_fr.php\";\nconst GEST_STRIPE_API = GEST_BASE + \"\/api\/api_stripe_checkout.php\";\nconst GEST_AMP        = String.fromCharCode(38);\n\n\nlet gestToken      = '';\nlet gestAusgewaehlt = [];\nlet gestAboTyp     = 'gratis';\nlet gestLimit      = 2;\nlet gestAktuell    = 0;\n\ndocument.addEventListener('DOMContentLoaded', async function() {\n  gestToken = localStorage.getItem('abo_token') || '';\n  if (!gestToken) {\n    document.getElementById('gest-login-hinweis').style.display = 'block';\n    return;\n  }\n\n  \/\/ Upgrade-Erfolg anzeigen?\n  if (localStorage.getItem('abo_upgrade_success')) {\n    localStorage.removeItem('abo_upgrade_success');\n    gestZeigeModal('&#x1f389; Votre abonnement a \u00e9t\u00e9 activ\u00e9 avec succ\u00e8s !');\n  }\n\n  await gestLadeProfil();\n  document.getElementById('gest-suche').addEventListener('keydown', function(e) {\n    if (e.key === 'Enter') gestSuche();\n  });\n});\n\nfunction gestZeigeModal(text) {\n  document.getElementById('gest-modal-text').textContent = text;\n  document.getElementById('gest-modal').style.display = 'flex';\n}\n\nfunction gestMakeBtn(label, plan, bg, color) {\n  var b = document.createElement('button');\n  b.textContent = label;\n  b.style.cssText = 'margin:4px 4px 0 0;padding:4px 10px;background:' + bg + ';color:' + color + ';border:none;border-radius:6px;cursor:pointer;font-size:12px;';\n  b.addEventListener('click', function() { gestUpgrade(plan); });\n  return b;\n}\n\nfunction gestZeigeAboStatus() {\n  var div = document.getElementById('gest-abo-status');\n  if (!div) return;\n  div.innerHTML = '';\n\n  var rest = gestLimit === 9999 ? 'illimit\u00e9' : (gestLimit - gestAktuell) + ' restant(s)';\n  var farbe = '#276749';\n  if (gestLimit !== 9999 && gestAktuell >= gestLimit) farbe = '#c53030';\n  else if (gestLimit !== 9999 && gestAktuell >= gestLimit - 1) farbe = '#dd6b20';\n\n  var labels = {\n    'gratis':  'Gratuit (max. 2) \u2013 gratuit',\n    'basis':   'Base (max. 10) \u2013 CHF 2.-\/mois',\n    'pro':     'Pro (max. 20) \u2013 CHF 5.-\/mois',\n    'proplus': 'Pro+ (illimit\u00e9) \u2013 CHF 10.-\/mois'\n  };\n\n  var span = document.createElement('span');\n  span.style.cssText = 'font-size:13px;color:#4a5568;';\n  span.innerHTML = 'Abonnement : <strong>' + (labels[gestAboTyp] || gestAboTyp) + '<\/strong> &nbsp;|&nbsp; Suivis : <strong style=\"color:' + farbe + ';\">' + gestAktuell + ' \/ ' + (gestLimit === 9999 ? '\\u221e' : gestLimit) + '<\/strong> &nbsp;(' + rest + ')';\n  div.appendChild(span);\n\n  var br = document.createElement('div');\n  br.style.marginTop = '6px';\n  div.appendChild(br);\n\n  if (gestAboTyp === 'gratis') {\n    br.appendChild(gestMakeBtn('Base CHF 2.-\/mois (max. 10)', 'basis', '#e53e3e', '#fff'));\n    br.appendChild(gestMakeBtn('Pro CHF 5.-\/mois (max. 20)', 'pro', '#2b6cb0', '#fff'));\n    br.appendChild(gestMakeBtn('Pro+ CHF 10.-\/mois (illimit\u00e9)', 'proplus', '#276749', '#fff'));\n  } else if (gestAboTyp === 'basis') {\n    br.appendChild(gestMakeBtn('Pro CHF 5.-\/mois (max. 20)', 'pro', '#2b6cb0', '#fff'));\n    br.appendChild(gestMakeBtn('Pro+ CHF 10.-\/mois (illimit\u00e9)', 'proplus', '#276749', '#fff'));\n  } else if (gestAboTyp === 'pro') {\n    br.appendChild(gestMakeBtn('Pro+ CHF 10.-\/mois (illimit\u00e9)', 'proplus', '#276749', '#fff'));\n  }\n}\n\nasync function gestLadeProfil() {\n  try {\n    var res = await fetch(GEST_API + \"?action=profil\" + GEST_AMP + \"token=\" + encodeURIComponent(gestToken));\n    var d   = await res.json();\n    if (!d.ok && d.login) {\n      localStorage.removeItem('abo_token');\n      document.getElementById('gest-login-hinweis').style.display = 'block';\n      return;\n    }\n    document.getElementById('gest-email-anzeige').textContent = d.email || '\u2013';\n    document.getElementById('gest-telefon').value = d.telefon || '';\n    document.getElementById('gest-inhalt').style.display = 'block';\n    gestAboTyp  = d.aboTyp  || 'gratis';\n    gestLimit   = d.limit   || 2;\n    gestAktuell = (d.medikamente || []).length;\n    gestZeigeMedikamente(d.medikamente || []);\n    gestZeigeAboStatus();\n  } catch(err) {\n    document.getElementById('gest-login-hinweis').style.display = 'block';\n  }\n}\n\nfunction gestZeigeMedikamente(liste) {\n  document.getElementById('gest-anzahl').textContent = liste.length;\n  var el = document.getElementById('gest-medi-liste');\n  if (!liste.length) {\n    el.innerHTML = \"<div class='gest-leer'>Aucun m\u00e9dicament suivi pour l'instant.<\/div>\";\n    return;\n  }\n  el.innerHTML = '';\n  liste.forEach(function(m) {\n    var div = document.createElement('div');\n    div.className = 'gest-medi-item';\n    var nom = m.nomF || m.bezeichnung || '\u2013';\n    div.innerHTML =\n      \"<div class='gest-medi-info'>\" +\n        \"<div class='gest-medi-name'>\" + nom +\n          (m.hatEngpass ? \"<span class='gest-engpass-badge'>&#x26a0;&#xfe0f; Rupture<\/span>\" : \"\") +\n        \"<\/div>\" +\n        \"<div class='gest-medi-sub'>GTIN : \" + m.gtin + \" \u00b7 \" + (m.firma || '\u2013') + \" \u00b7 \" + (m.atc || '\u2013') +\n          (m.hatEngpass && m.status ? \" \u00b7 Statut : \" + m.status : \"\") +\n        \"<\/div>\" +\n      \"<\/div>\" +\n      \"<button class='gest-btn-del' onclick='gestLoeschen(\\\"\" + m.gtin + \"\\\")'>Supprimer \u2715<\/button>\";\n    el.appendChild(div);\n  });\n}\n\nasync function gestSuche() {\n  var q = document.getElementById('gest-suche').value.trim();\n  if (q.length < 2) return;\n  var res = await fetch(GEST_API + \"?action=suche\" + GEST_AMP + \"token=\" + encodeURIComponent(gestToken) + GEST_AMP + \"q=\" + encodeURIComponent(q));\n  var d   = await res.json();\n  var container = document.getElementById('gest-resultate');\n  gestAusgewaehlt = [];\n  document.getElementById('gest-add-btn').style.display = 'none';\n  if (!d.resultate || !d.resultate.length) {\n    container.innerHTML = \"<div class='gest-leer'>Aucun m\u00e9dicament trouv\u00e9.<\/div>\";\n    container.style.display = 'block';\n    return;\n  }\n  container.innerHTML = '';\n  d.resultate.forEach(function(r) {\n    var item = document.createElement('div');\n    item.className = 'gest-resultat-item';\n    var cbId = 'gcb-' + r.gtin;\n    var nom  = r.nomF || r.bezeichnung || '\u2013';\n    var smcat = r.smcat || '';\n    var kk    = r.kk    || '';\n    var kkPflichtig = kk === 'SL';\n    var smcatAB     = smcat === 'A' || smcat === 'B';\n    var badge = '';\n    if (smcatAB)     badge += \"<span style='font-size:10px;background:#bee3f8;color:#2b6cb0;border-radius:3px;padding:1px 5px;margin-left:4px;'>Cat. \" + smcat + \"<\/span>\";\n    if (kkPflichtig) badge += \"<span style='font-size:10px;background:#c6f6d5;color:#276749;border-radius:3px;padding:1px 5px;margin-left:4px;'>Rembours\u00e9<\/span>\";\n    item.innerHTML =\n      \"<input type='checkbox' id='\" + cbId + \"' value='\" + r.gtin + \"' data-bez='\" + nom.replace(\/'\/g, '') + \"' onchange='gestCheckChange(this)'>\" +\n      \"<label for='\" + cbId + \"' style='flex:1;cursor:pointer;'>\" +\n        \"<div class='gest-resultat-name'>\" + nom + badge + \"<\/div>\" +\n        \"<div class='gest-resultat-sub'>GTIN : \" + r.gtin + \" \u00b7 \" + (r.firma || '\u2013') + \" \u00b7 \" + (r.atc || '\u2013') + \"<\/div>\" +\n      \"<\/label>\";\n    container.appendChild(item);\n  });\n  container.style.display = 'block';\n}\n\nfunction gestCheckChange(cb) {\n  if (cb.checked) {\n    gestAusgewaehlt.push({gtin: cb.value, bezeichnung: cb.dataset.bez});\n  } else {\n    gestAusgewaehlt = gestAusgewaehlt.filter(function(x) { return x.gtin !== cb.value; });\n  }\n  document.getElementById('gest-add-btn').style.display = gestAusgewaehlt.length > 0 ? 'block' : 'none';\n  document.getElementById('gest-add-btn').textContent = gestAusgewaehlt.length + ' m\u00e9dicament(s) \u00e0 ajouter';\n}\n\nasync function gestHinzufuegen() {\n  if (!gestAusgewaehlt.length) return;\n  var btn = document.getElementById('gest-add-btn');\n  btn.disabled = true;\n  btn.innerHTML = \"<span class='gest-spinner'><\/span> Enregistrement\u2026\";\n  var res = await fetch(GEST_API + \"?action=hinzufuegen\" + GEST_AMP + \"token=\" + encodeURIComponent(gestToken), {\n    method: 'POST', headers: {'Content-Type': 'application\/json'},\n    body: JSON.stringify({gtins: gestAusgewaehlt})\n  });\n  var d = await res.json();\n  var msg = document.getElementById('gest-add-meldung');\n  msg.className = 'gest-meldung ' + (d.ok ? 'success' : 'error');\n  msg.textContent = gestTraduireMessage(d.message);\n  msg.style.display = 'block';\n  if (d.ok) {\n    gestAktuell = d.aktuell || gestAktuell;\n    gestZeigeAboStatus();\n    if (d.abgelehnt > 0) gestZeigeModal(gestTraduireMessage(d.message));\n  }\n  btn.disabled = false;\n  btn.style.display = 'none';\n  document.getElementById('gest-resultate').style.display = 'none';\n  document.getElementById('gest-suche').value = '';\n  gestAusgewaehlt = [];\n  await gestLadeProfil();\n}\n\nfunction gestTraduireMessage(msg) {\n  var t = {\n    'Limit von 2 Medikamenten erreicht. F\u00fcr bis zu 10 Medikamente: CHF 2.-\/Monat. F\u00fcr bis zu 20 Medikamente: CHF 5.-\/Monat. Unbegrenzt: CHF 10.-\/Monat.':\n      'Limite de 2 m\u00e9dicaments atteinte. Jusqu\\'\u00e0 10 : CHF 2.-\/mois. Jusqu\\'\u00e0 20 : CHF 5.-\/mois. Illimit\u00e9 : CHF 10.-\/mois.',\n    'Limit von 10 Medikamenten erreicht. F\u00fcr bis zu 20 Medikamente: CHF 5.-\/Monat. Unbegrenzt: CHF 10.-\/Monat.':\n      'Limite de 10 m\u00e9dicaments atteinte. Jusqu\\'\u00e0 20 : CHF 5.-\/mois. Illimit\u00e9 : CHF 10.-\/mois.',\n    'Limit von 20 Medikamenten erreicht. F\u00fcr unbegrenzte Abonnements: CHF 10.-\/Monat.':\n      'Limite de 20 m\u00e9dicaments atteinte. Illimit\u00e9 : CHF 10.-\/mois.',\n  };\n  \/\/ Partielles Matching f\u00fcr \"X Medikament(e) hinzugef\u00fcgt\"\n  if (msg && msg.match(\/^\\d+ Medikament\\(e\\) hinzugef\u00fcgt\\.$\/)) {\n    var n = msg.match(\/^(\\d+)\/)[1];\n    return n + ' m\u00e9dicament(s) ajout\u00e9(s).';\n  }\n  return t[msg] || msg;\n}\n\nasync function gestUpgrade(plan) {\n  try {\n    var res = await fetch(GEST_STRIPE_API + \"?token=\" + encodeURIComponent(gestToken), {\n      method: 'POST', headers: {'Content-Type': 'application\/json'},\n      body: JSON.stringify({plan: plan})\n    });\n    var d = await res.json();\n    if (d.ok && d.url) {\n      window.location.href = d.url;\n    } else {\n      gestZeigeModal('Erreur : ' + (d.message || 'Erreur inconnue'));\n    }\n  } catch(err) {\n    gestZeigeModal('Erreur de connexion \u00e0 Stripe : ' + err);\n  }\n}\n\nfunction gestLogout() {\n  if (!confirm('Voulez-vous vraiment vous d\u00e9connecter ?')) return;\n  localStorage.removeItem('abo_token');\n  localStorage.removeItem('abo_email');\n  window.location.href = GEST_BASE + '\/index.php\/abo-inscription\/';\n}\n\nasync function gestLoeschen(gtin) {\n  if (!confirm('Voulez-vous vraiment supprimer ce m\u00e9dicament ?')) return;\n  var res = await fetch(GEST_API + \"?action=loeschen\" + GEST_AMP + \"token=\" + encodeURIComponent(gestToken), {\n    method: 'POST', headers: {'Content-Type': 'application\/json'},\n    body: JSON.stringify({gtin: gtin})\n  });\n  await gestLadeProfil();\n}\n\nasync function gestTelefonSpeichern() {\n  var tel = document.getElementById('gest-telefon').value.trim();\n  var res = await fetch(GEST_API + \"?action=telefon\" + GEST_AMP + \"token=\" + encodeURIComponent(gestToken), {\n    method: 'POST', headers: {'Content-Type': 'application\/json'},\n    body: JSON.stringify({telefon: tel})\n  });\n  var d = await res.json();\n  var msg = document.getElementById('gest-tel-meldung');\n  msg.className = 'gest-meldung ' + (d.ok ? 'success' : 'error');\n  msg.textContent = d.ok ? 'Num\u00e9ro de t\u00e9l\u00e9phone enregistr\u00e9.' : 'Erreur lors de l\\'enregistrement.';\n  msg.style.display = 'block';\n}\n\nasync function gestDeaktivieren() {\n  if (!confirm('Voulez-vous vraiment supprimer votre compte et toutes vos donn\u00e9es ? Cette action est irr\u00e9versible.')) return;\n  var res = await fetch(GEST_API + \"?action=deaktivieren\" + GEST_AMP + \"token=\" + encodeURIComponent(gestToken), {\n    method: 'POST', headers: {'Content-Type': 'application\/json'},\n    body: JSON.stringify({})\n  });\n  var d = await res.json();\n  if (d.ok) {\n    localStorage.removeItem('abo_token');\n    localStorage.removeItem('abo_email');\n    window.location.href = GEST_BASE + '\/index.php\/abo-inscription\/';\n  }\n}\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>OK &#x1f1e9;&#x1f1ea; Deutsch &#x26a0;&#xfe0f; Vous n&#8217;\u00eates pas connect\u00e9(e). Se connecter \u2192 &#x1f514; Mes abonnements m\u00e9dicaments Connect\u00e9(e) en tant que : \u2013 &nbsp;Se d\u00e9connecter Ajouter un m\u00e9dicament Rechercher \u2192 &#x2139;&#xfe0f; Seuls les m\u00e9dicaments soumis \u00e0 ordonnance (cat\u00e9gorie A et B) et\/ou rembours\u00e9s par l&#8217;assurance maladie peuvent \u00eatre suivis. Ajouter les m\u00e9dicaments s\u00e9lectionn\u00e9s Mes m\u00e9dicaments suivis (0)&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":"","_members_access_role":[],"_members_access_error":""},"class_list":["post-21384","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/comments?post=21384"}],"version-history":[{"count":2,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21384\/revisions"}],"predecessor-version":[{"id":21393,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21384\/revisions\/21393"}],"wp:attachment":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/media?parent=21384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}