{"id":212,"date":"2014-05-06T14:33:17","date_gmt":"2014-05-06T14:33:17","guid":{"rendered":"http:\/\/www.autorouter.eu\/wiki\/?page_id=212"},"modified":"2014-05-06T14:33:27","modified_gmt":"2014-05-06T14:33:27","slug":"fpal-parse-flight-plan","status":"publish","type":"page","link":"https:\/\/www.autorouter.aero\/wiki\/flight-plan-addressing\/fpal-parse-flight-plan\/","title":{"rendered":"FPAL &#8211; Parse Flight Plan"},"content":{"rendered":"<p>Enter a flight plan in the field below and click submit to return the addresses.<\/p>\n<p>&nbsp;<\/p>\n\n\t\t<textarea id=\"fpl\" style=\"width: 400px; height: 200px; margin-bottom: 20px;\"><\/textarea><br \/>\n\t\t<div class=\"g-recaptcha\" data-sitekey=\"6Lc0MQkTAAAAAIT6g6wMkAzmgCecOsFaDm2yXD5N\"><\/div>\n\t\t<input type=\"submit\" id=\"fplsubmit\" value=\"Submit\" \/>\n\t\t<div id=\"fpalresult\" style=\"margin-top: 20px;\"><\/div>\n                <script src=\"https:\/\/www.google.com\/recaptcha\/api.js\" async defer><\/script>\n\t\t<script>\n\t\tjQuery(\"#fplsubmit\").click(function(e)\n\t\t{\n\t\t\tjQuery(\"#fpalresult\").html(\"<img src=\\\"\/images\/inprogress.gif\\\" \/>\");\n\t\t\te.preventDefault();\n\t\t\tjQuery.post(\"\/api\/system\/onetimeauth\/fplparse\",\n\t\t\t{\n\t\t\t\t\"g-recaptcha-response\": jQuery(\"#g-recaptcha-response\").val()\n\t\t\t}, function(data)\n\t\t\t{\n\t\t\t\tif (typeof data.error != \"undefined\")\n\t\t\t\t{\n\t\t\t\t\tjQuery(\"#fpalresult\").html(\"<span style=\\\"color: red;\\\"><strong>Error<\/strong>: \" + data.error + \"<\/span>\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\tmethod: \"PUT\",\n\t\t\t\t\turl: \"\/api\/flightplan\/fpal\/parse?onetimeauth_fplparse=\" + data.onetimeauth_fplparse,\n\t\t\t\t\tdata: jQuery(\"#fpl\").val()\n\t\t\t\t}).done(function(data)\n\t\t\t\t{\n\t\t\t\t\tvar output;\n\t\t\t\t\tif (typeof data.error !== \"undefined\")\n\t\t\t\t\t\toutput = \"<span style=\\\"color: red;\\\"><strong>Error:<\/strong> \" + data.error + \"<\/span>\";\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toutput = \"<h1>List of addresses<\/h1><ul>\";\n\t\t\t\t\t\tjQuery.each(data, function (index, address)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\toutput += \"<li>\" + address.addr + \" (\" + address.type + \", \" + address.doctype + \")<ul>\";\n\t\t\t\t\t\t\tjQuery.each(address.idents, function(index, ident)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toutput += \"<li>\" + ident + \"<\/li>\";\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\toutput += \"<\/ul><\/li>\";\n\t\t\t\t\t\t});\n\t\t\t\t\t\toutput += \"<\/ul>\";\n\t\t\t\t\t}\n\t\t\t\t\tjQuery(\"#fpalresult\").html(output);\n\t\t\t\t});\n\t\t\t\tgrecaptcha.reset();\n\t\t\t});\n\t\t});\n                <\/script>\n","protected":false},"excerpt":{"rendered":"<p>Enter a flight plan in the field below and click submit to return the addresses. &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":157,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-212","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/comments?post=212"}],"version-history":[{"count":2,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages\/212\/revisions"}],"predecessor-version":[{"id":214,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages\/212\/revisions\/214"}],"up":[{"embeddable":true,"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/pages\/157"}],"wp:attachment":[{"href":"https:\/\/www.autorouter.aero\/wiki\/wp-json\/wp\/v2\/media?parent=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}