diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2023-03-26 20:32:38 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2023-03-26 20:32:38 +0200 |
| commit | 261a7ac22a6027e024aa12efb35cbeaac67fad59 (patch) | |
| tree | 9472a9b6c05d8c074e58e0e6b751a4f05493aaf1 /index.php | |
| parent | 3f375f41a0d8176396da0a5988a9db06383e1636 (diff) | |
| download | alahelo-madio-261a7ac22a6027e024aa12efb35cbeaac67fad59.tar.gz alahelo-madio-261a7ac22a6027e024aa12efb35cbeaac67fad59.tar.zst alahelo-madio-261a7ac22a6027e024aa12efb35cbeaac67fad59.zip | |
Add start script
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -7,12 +7,13 @@ if ($method === "GET") { $result = $xml->xpath('//NAZWA_DOD[text()="województwo"]/ancestor::*/NAZWA/text()'); } else if ($method === "POST") { $body = file_get_contents('php://input'); - $one_xpath = true; + $one_xpath = false; if (!$one_xpath) { $id = $xml->xpath('//row/NAZWA[text()="' . $body . '"]/ancestor::*/WOJ'); $id = "{$id[0]}"; $result = $xml->xpath('//WOJ[text()=' . $id . ']/ancestor::*/NAZWA_DOD[contains(text(),"miejs")]/ancestor::*/NAZWA/text()'); } else { + set_time_limit(200); $result = $xml->xpath('//WOJ[text()=//row/NAZWA[text()="' . $body . '"]/ancestor::*/WOJ]/ancestor::*/NAZWA_DOD[contains(text(),"miejs")]/ancestor::*/NAZWA/text()'); } } |
