{"id":515,"date":"2020-07-01T16:05:09","date_gmt":"2020-07-01T14:05:09","guid":{"rendered":"https:\/\/cartemsante.net\/?page_id=515"},"modified":"2020-07-01T18:18:46","modified_gmt":"2020-07-01T16:18:46","slug":"liste-pharmacies","status":"publish","type":"page","link":"https:\/\/cartemsante.net\/index.php\/liste-pharmacies\/","title":{"rendered":"Liste des Pharmacies"},"content":{"rendered":"\n<h2 class=\"has-colibri-color-1-color has-text-color wp-block-heading\">Demandez la carte en pharmacie.<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Vous souhaitez faire votre demande de carte en pharmacie ?<\/h4>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-image-fill\"><figure class=\"wp-block-media-text__media\" style=\"background-image:url(https:\/\/cartemsante.net\/wp-content\/uploads\/2020\/07\/Achat-en-pharmacie.jpg);background-position:50% 50%\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/cartemsante.net\/wp-content\/uploads\/2020\/07\/Achat-en-pharmacie.jpg\" alt=\"\" class=\"wp-image-524\" srcset=\"https:\/\/cartemsante.net\/wp-content\/uploads\/2020\/07\/Achat-en-pharmacie.jpg 1024w, https:\/\/cartemsante.net\/wp-content\/uploads\/2020\/07\/Achat-en-pharmacie-300x225.jpg 300w, https:\/\/cartemsante.net\/wp-content\/uploads\/2020\/07\/Achat-en-pharmacie-768x576.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-text-align-left has-medium-font-size\">Tapez votre ville ou commune pour trouver la pharmacie la plus proche :<\/p>\n\n\n\n<p class=\"has-text-color has-text-align-left has-large-font-size has-colibri-color-6-color\">\n<!-- HK CSV search -->\n<div class='content-container  csv-container'><div class=\"hk-csv-search-wrapper\"><form method=\"POST\" class=\"hk-csv-search-form-5593\"><input type=\"text\" name=\"hk-csv-input\" class=\"hk-csv-input\" \/><input type=\"submit\" name=\"hk-csv-button\" class=\"hk-csv-button\" value=\"Rechercher\" \/><div class=\"hk-csv-search-output\"><\/div><\/form><\/div><\/div>\n<script>\r\n\t\t(function($) {\r\n\t\t\tshow_header_row_5593 = false;\r\n\t\t\t$(document).ready(function () {\r\n\t\t\t\tvar lines5593 = []; \r\n\t\t\t\tvar nothing_msg_5593 = \"Nothing found when searching for: \";\r\n\t\t\t\t\/\/ search button\r\n\t\t\t\t$( \".hk-csv-search-form-5593\" ).submit(function( event ) {\r\n\t\t\t\t\tevent.preventDefault();\r\n                    var search = $(this).parents(\".hk-csv-search-wrapper\").find(\".hk-csv-input\").val();\r\n\t\t\t\t    if ($(this).parents(\".hk-csv-search-wrapper\").find(\".hk-csv-instantsearch\").length > 0) {\r\n\t\t\t\t\t\tsearch = $(this).parents(\".hk-csv-search-wrapper\").find(\".hk-csv-instant-list li:first a\").data(\"id\");\r\n                        if (search != \"\") {\r\n\t\t\t\t\t\t\t$(this).parents(\".hk-csv-search-wrapper\").find(\".hk-csv-instantsearch\").find(\"ul\").remove();\r\n                        }\r\n                    }\r\n                    \r\n                    doSearch5593(search);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n                \r\n\t\t\t\t\r\n                \r\n                \/\/ on keyup\r\n                \/\/var timer;\r\n                $(document).on(\"keyup\", \".hk-csv-search-form-5593 .hk-csv-input\", function(event){\r\n\t\t\t\t\t\/\/timer && clearTimeout(timer);\r\n\t\t\t\t\t\/\/timer = setTimeout(instantSearch, 200);\r\n                    instantSearch5593($(this));\r\n                });\r\n\t\t\t\t\r\n                \r\n                \/\/ on list click\r\n                $(document).on(\"click\", \".hk-csv-search-form-5593 .hk-csv-instant-list li a\", function(event){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\tsearch = $(this).data(\"id\");\r\n\t\t\t\t\tif (search != \"\") {\r\n\t\t\t\t\t\t$(this).parents(\"ul\").remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tdoSearch5593(search);\r\n\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\/\/ do search\r\n\t\t\t\tfunction doSearch5593(search) {\r\n\t\t\t\t\tif (search != \"\") {\r\n\t\t\t\t\t\t$(\".hk-csv-search-form-5593 .hk-csv-search-output\").html(\"\");\r\n\t\t\t\t\t\tvar output = searchData5593(search);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ((!show_header_row_5593 && output.length == 0) || (show_header_row_5593 && output.length <= 1)) {\r\n\t\t\t\t\t\t\t$(\".hk-csv-search-form-5593 .hk-csv-search-output\").append(nothing_msg_5593 + \" \" + search);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\/\/ output loop   \r\n\t\t\t\t\t\t\tfor(i=0; i<output.length; i++){\r\n\t\t\t\t\t\t\t\tif (show_header_row_5593 && i == 0) {\r\n\t\t\t\t\t\t\t\t\tretline = \"<div class='hk_header_row'>{1} | {2} | {3} | {4}{br\/}<\/div>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tretline = \"{1} | {2} | {3} | {4}{br\/}\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tfor(c=0; c<output[i].length; c++) {\r\n\t\t\t\t\t\t\t\t\tretline = retline.replace(\"{\"+c+\"}\",output[i][c]);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tretline = retline.replace(\/\\{\/g,\"<\");\r\n\t\t\t\t\t\t\t\tretline = retline.replace(\/\\}\/g,\">\");\r\n\t\t\t\t\t\t\t\t$(\".hk-csv-search-form-5593 .hk-csv-search-output\").append(retline);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n                    }\r\n                }\r\n                \r\n                \r\n                \/\/ instant search\r\n                function instantSearch5593(event){\r\n                    var search = $(event).parents(\".hk-csv-search-wrapper\").find(\".hk-csv-input\").val();\r\n\t\t\t\t\tvar output = searchData5593(search);\r\n                    if (search.length < 3) {\r\n                        $(event).parents(\".hk-csv-search-wrapper\").find(\".hk-csv-instantsearch\").html(\"<ul class='hk-csv-instant-list'><li>Keep writing...<\/li><\/ul>\");\r\n                    }\r\n                    else {\r\n                        $(event).parents(\".hk-csv-search-wrapper\").find(\".hk-csv-instantsearch\").html(\"<ul class='hk-csv-instant-list'>\");\r\n                        \/\/ output loop   \r\n                        for(i=0; i<output.length && i<10; i++) {\r\n                            retline = \"{0}\";\r\n                            dataid = \"{0}\";\r\n                            for(c=0; c<output[i].length; c++) {\r\n                                retline = retline.replace(\"{\"+c+\"}\",output[i][c]);\r\n                                dataid = dataid.replace(\"{\"+c+\"}\",output[i][c]);\r\n                            }\r\n                            \r\n                            $(event).parents(\".hk-csv-search-wrapper\").find(\".hk-csv-instant-list\").append(\"<li><a href='#' data-id='\"+dataid+\"'>\"+retline+\"<\/a><\/li>\");\r\n                        }\r\n\r\n\r\n                    }\r\n                }\r\n\r\n\t\t\t\t\/\/ ajax call to get the data and store it in the var above\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\ttype: \"GET\",\r\n\t\t\t\t\turl: \"\/wp-content\/uploads\/2020\/07\/Liste_Pharmacies_20062020.csv\",\r\n\t\t\t\t\tdataType: \"text\",\r\n\t\t\t\t\tcontentType: \"Content-type: text\/plain; charset=iso-8859-1\",\r\n\t\t\t\t\tbeforeSend: function(jqXHR) {\r\n\t\t\t\t\t\tjqXHR.overrideMimeType(\"text\/html;charset=iso-8859-1\");\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: function(data){\r\n\t\t\t\t\t\tprocessData5593(data);\r\n\t\t\t\t\t}     \r\n\t\t\t\t});\r\n\r\n\t\t\t\t\/\/ function to process the data into an array\r\n\t\t\t\tfunction processData5593(allText) {\r\n\t\t\t\t\tlines5593 = allText.split(\/\\r\\n|\\n\/);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\/\/ get first line function \r\n\t\t\t\tfunction headerData5593() {\r\n\t\t\t\t\tdata = lines5593;\r\n\r\n\t\t\t\t\tif (data.length > 0) {\r\n\t\t\t\t\t\treturn data[0].split(\";\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\/\/ search function \r\n\t\t\t\tfunction searchData5593(search){\r\n\t\t\t\t\tdata = lines5593;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\/\/ Create a temp array to store the found data\r\n\t\t\t\t\tvar tempArray = [];\r\n\t\t\t\t\tif (show_header_row_5593) {\r\n\t\t\t\t\t\tvar header = headerData5593();\r\n\t\t\t\t\t\ttempArray.push(header);\r\n\t\t\t\t\t}\r\n                    if (search != \"\")  {\r\n                        \/\/ Loop through the data to see if a line has the search term we need\r\n                        for(i=0; i<data.length; i++){\r\n\t\t\t\t\t\t\tif (false) { \/\/ find exact match\r\n\t\t\t\t\t\t\t\tdata[i].split(\";\").forEach( function(item, index, arr) {\r\n\t\t\t\t\t\t\t\t\tif (item == search && (-1 == -1 || -1 == index)) { \/\/ check exact name\r\n\t\t\t\t\t\t\t\t\t\ttempArray.push(arr);\r\n\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (-1 != -1) {\r\n\t\t\t\t\t\t\t\tif (search !== undefined && search.toUpperCase !== undefined && $.isFunction(search.toUpperCase)) {\r\n\t\t\t\t\t\t\t\t\tsearch = search.toUpperCase();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdata[i].split(\";\").forEach( function(item, index, arr) {\r\n\t\t\t\t\t\t\t\t\tif (-1 == index) { \/\/ search only in column\r\n\t\t\t\t\t\t\t\t\t\tif (item.toUpperCase().indexOf(search) >= 0) {\r\n\t\t\t\t\t\t\t\t\t\t\ttempArray.push(arr);\r\n\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse { \/\/ find if only part of match\r\n\t\t\t\t\t\t\t\tif (search !== undefined && search.toUpperCase !== undefined && $.isFunction(search.toUpperCase)) {\r\n\t\t\t\t\t\t\t\t\tsearch = search.toUpperCase();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (data[i].toUpperCase().indexOf(search) >= 0) {\r\n\t\t\t\t\t\t\t\t\t\/\/ Add found data to the array after split\r\n\r\n\t\t\t\t\t\t\t\t\tvar line = data[i].split(\";\"); \r\n\t\t\t\t\t\t\t\t\ttempArray.push(line);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n                        }\r\n                    }\r\n\t\t\t\t\t\/\/ Return the array of matched data\r\n\t\t\t\t\treturn tempArray;\r\n\t\t\t\t}\r\n\r\n\t\t\t });\r\n\r\n\t\t})(jQuery);\r\n\t\t\r\n\t<\/script>\n<style>.hk_header_row { font-weight: bold } .hk-csv-instant-list { list-style-type: none; margin-left: 0; display: inline-block; border: 1px solid #ddd; } .hk-csv-instant-list li { padding: 4px; } .hk-csv-instant-list li:hover { background-color: #ddd; }<\/style>\n<!-- END HK CSV search -->\n<\/p>\n<\/div><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Demandez la carte en pharmacie. Vous souhaitez faire votre demande de carte en pharmacie ? Tapez votre ville ou commune pour trouver la pharmacie la plus proche :<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-515","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cartemsante.net\/index.php\/wp-json\/wp\/v2\/pages\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cartemsante.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cartemsante.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cartemsante.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cartemsante.net\/index.php\/wp-json\/wp\/v2\/comments?post=515"}],"version-history":[{"count":21,"href":"https:\/\/cartemsante.net\/index.php\/wp-json\/wp\/v2\/pages\/515\/revisions"}],"predecessor-version":[{"id":566,"href":"https:\/\/cartemsante.net\/index.php\/wp-json\/wp\/v2\/pages\/515\/revisions\/566"}],"wp:attachment":[{"href":"https:\/\/cartemsante.net\/index.php\/wp-json\/wp\/v2\/media?parent=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}