{"id":21403,"date":"2026-05-28T15:51:28","date_gmt":"2026-05-28T13:51:28","guid":{"rendered":"https:\/\/www.drugshortage.ch\/?page_id=21403"},"modified":"2026-06-20T15:18:00","modified_gmt":"2026-06-20T13:18:00","slug":"abo-conferma","status":"publish","type":"page","link":"https:\/\/www.drugshortage.ch\/index.php\/abo-conferma\/","title":{"rendered":"Abo conferma"},"content":{"rendered":"\n<!-- Slug: abo-conferma -->\n<style>\n  #conf-it-outer { width:100%; max-width:600px; margin:0 auto; box-sizing:border-box; font-family:'Segoe UI',Arial,sans-serif; font-size:14px; color:#2d3748; }\n  .conf-it-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:28px; box-shadow:0 2px 8px rgba(0,0,0,.07); text-align:center; }\n  .conf-it-spinner { width:48px; height:48px; border:4px solid #e2e8f0; border-top-color:#e53e3e; border-radius:50%; animation:citspin .8s linear infinite; margin:0 auto 20px; }\n  @keyframes citspin { to { transform:rotate(360deg); } }\n  .conf-it-icon { font-size:48px; margin-bottom:16px; }\n  .conf-it-title { font-size:20px; font-weight:700; color:#2d3748; margin-bottom:10px; }\n  .conf-it-text { font-size:14px; color:#718096; margin-bottom:20px; line-height:1.6; }\n  .conf-it-info { background:#f0fff4; border:1px solid #9ae6b4; border-radius:8px; padding:12px 16px; color:#276749; font-size:13px; margin:12px 0 20px; text-align:left; }\n  .conf-it-warn { background:#fffbeb; border:1px solid #fbd38d; border-radius:8px; padding:12px 16px; color:#744210; font-size:13px; margin:12px 0 20px; text-align:left; }\n  .conf-it-btn { display:inline-block; padding:12px 24px; background:#e53e3e; color:#fff; border:none; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; text-decoration:none; }\n  .conf-it-btn-sec { display:inline-block; padding:12px 24px; background:#fff; color:#718096; border:1px solid #e2e8f0; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; text-decoration:none; margin-left:8px; }\n  .conf-it-lang { text-align:right; margin-bottom:12px; font-size:12px; color:#718096; }\n  .conf-it-lang a { color:#e53e3e; text-decoration:none; font-weight:600; }\n<\/style>\n\n<div id=\"conf-it-outer\">\n  <div class=\"conf-it-lang\">\n    <a href=\"https:\/\/www.drugshortage.ch\/index.php\/abo-bestaetigung\/\">&#x1f1e9;&#x1f1ea; Deutsch<\/a> &nbsp;|&nbsp;\n    <a href=\"https:\/\/www.drugshortage.ch\/index.php\/abo-confirmation\/\">&#x1f1eb;&#x1f1f7; Fran\u00e7ais<\/a>\n  <\/div>\n  <div class=\"conf-it-card\" id=\"conf-it-loading\">\n    <div class=\"conf-it-spinner\"><\/div>\n    <div class=\"conf-it-title\">Verifica in corso\u2026<\/div>\n    <div class=\"conf-it-text\">Attendere prego.<\/div>\n  <\/div>\n  <div class=\"conf-it-card\" id=\"conf-it-success\" style=\"display:none;\">\n    <div class=\"conf-it-icon\">&#x2705;<\/div>\n    <div class=\"conf-it-title\">Accesso riuscito!<\/div>\n    <div class=\"conf-it-text\">Sei ora connesso\/a come <strong id=\"conf-it-email\"><\/strong>.<\/div>\n    <div id=\"conf-it-abo-hinweis\"><\/div>\n    <a href=\"https:\/\/www.drugshortage.ch\/index.php\/abo-gestione\/\" class=\"conf-it-btn\">Gestire i miei abbonamenti \u2192<\/a>\n  <\/div>\n  <div class=\"conf-it-card\" id=\"conf-it-error\" style=\"display:none;\">\n    <div class=\"conf-it-icon\">&#x26a0;&#xfe0f;<\/div>\n    <div class=\"conf-it-title\">Link scaduto o gi\u00e0 utilizzato<\/div>\n    <div class=\"conf-it-text\">Questo link di accesso non \u00e8 pi\u00f9 valido. Richiederne uno nuovo.<\/div>\n    <a href=\"https:\/\/www.drugshortage.ch\/index.php\/abo-iscrizione\/\" class=\"conf-it-btn\">Nuova iscrizione<\/a>\n    <a href=\"https:\/\/www.drugshortage.ch\/index.php\/abo-iscrizione\/\" class=\"conf-it-btn-sec\">Richiedere un nuovo link<\/a>\n  <\/div>\n<\/div>\n\n<script>\nconst CONF_IT_BASE    = \"https:\/\/www.drugshortage.ch\";\nconst CONF_IT_API_REG = CONF_IT_BASE + \"\/api\/api_abo_registrierung.php\";\nconst CONF_IT_API_ABO = CONF_IT_BASE + \"\/api\/api_abo_verwaltung.php\";\n\ndocument.addEventListener('DOMContentLoaded', async function() {\n  var params  = new URLSearchParams(window.location.search);\n  var token   = params.get('token') || '';\n  var gtin    = params.get('gtin')  || '';\n  var bez     = params.get('bez')   || '';\n\n  if (params.get('upgrade') === 'success') {\n    localStorage.setItem('abo_upgrade_success', '1');\n    window.location.href = CONF_IT_BASE + '\/index.php\/abo-gestione\/';\n    return;\n  }\n\n  if (!token) {\n    document.getElementById('conf-it-loading').style.display = 'none';\n    document.getElementById('conf-it-error').style.display   = 'block';\n    return;\n  }\n\n  try {\n    var res = await fetch(CONF_IT_API_REG + \"?action=bestaetigen&token=\" + encodeURIComponent(token));\n    var d   = await res.json();\n\n    document.getElementById('conf-it-loading').style.display = 'none';\n\n    if (!d.ok) {\n      document.getElementById('conf-it-error').style.display = 'block';\n      return;\n    }\n\n    localStorage.setItem('abo_token', d.token);\n    localStorage.setItem('abo_email', d.email);\n    document.getElementById('conf-it-email').textContent = d.email;\n\n    var hinweisEl = document.getElementById('conf-it-abo-hinweis');\n    if (gtin) {\n      try {\n        var aboRes = await fetch(CONF_IT_API_ABO + '?action=hinzufuegen&token=' + encodeURIComponent(d.token), {\n          method: 'POST',\n          headers: {'Content-Type': 'application\/json'},\n          body: JSON.stringify({gtins: [{gtin: gtin, bezeichnung: bez}]})\n        });\n        var aboD = await aboRes.json();\n        if (aboD.ok && aboD.hinzugefuegt > 0) {\n          hinweisEl.innerHTML = '<div class=\"conf-it-info\">&#x2705; <strong>' + (bez || gtin) + '<\/strong> \u00e8 stato aggiunto ai tuoi abbonamenti.<\/div>';\n        } else if (aboD.ok && aboD.hinzugefuegt === 0) {\n          hinweisEl.innerHTML = '<div class=\"conf-it-info\">&#x2139;&#xfe0f; <strong>' + (bez || gtin) + '<\/strong> \u00e8 gi\u00e0 nei tuoi abbonamenti.<\/div>';\n        } else {\n          hinweisEl.innerHTML = '<div class=\"conf-it-warn\">&#x26a0;&#xfe0f; ' + (aboD.message || 'Il farmaco non ha potuto essere aggiunto.') + '<\/div>';\n        }\n      } catch(aboErr) {\n        hinweisEl.innerHTML = '<div class=\"conf-it-warn\">&#x26a0;&#xfe0f; Il farmaco non ha potuto essere aggiunto automaticamente. Aggiungilo manualmente.<\/div>';\n      }\n    }\n\n    document.getElementById('conf-it-success').style.display = 'block';\n    setTimeout(function() {\n      window.location.href = CONF_IT_BASE + '\/index.php\/abo-gestione\/';\n    }, 3000);\n\n  } catch(err) {\n    document.getElementById('conf-it-loading').style.display = 'none';\n    document.getElementById('conf-it-error').style.display   = 'block';\n  }\n});\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>&#x1f1e9;&#x1f1ea; Deutsch &nbsp;|&nbsp; &#x1f1eb;&#x1f1f7; Fran\u00e7ais Verifica in corso\u2026 Attendere prego. &#x2705; Accesso riuscito! Sei ora connesso\/a come . Gestire i miei abbonamenti \u2192 &#x26a0;&#xfe0f; Link scaduto o gi\u00e0 utilizzato Questo link di accesso non \u00e8 pi\u00f9 valido. Richiederne uno nuovo. Nuova iscrizione Richiedere un nuovo link<\/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-21403","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21403","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=21403"}],"version-history":[{"count":2,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21403\/revisions"}],"predecessor-version":[{"id":21877,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21403\/revisions\/21877"}],"wp:attachment":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/media?parent=21403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}