示例#1
0
        $result = $holidays->get(10);
        foreach ($result['data'] as $rec) {
            $row = $tmpl;
            foreach ($rec as $k => $v) {
                if (is_array($v)) {
                    continue;
                }
                $row = str_replace("[{$k}]", $v, $row);
            }
            $google_part .= $row;
        }
    } else {
        $google_part = '<h1>' . $description . '</h1>' . "\n";
        $template = new templateController();
        $template->init();
        $countries = $template->countries();
        $google_part .= '<ul>';
        $countries = array_merge($countries, ['Majorka', 'Wyspy Kanaryjskie', 'Kreta', 'Kos']);
        sort($countries);
        foreach ($countries as $country) {
            $country = str_replace('Republika Południowej Afryki', 'RPA', $country);
            $country = str_replace('Trynidad I Tobago', 'Trynidad i Tobago', $country);
            $google_part .= '<li>';
            $google_part .= '<a href="' . Tools::str_to_url($country) . '">';
            $google_part .= $country;
            $google_part .= '</a></li>';
        }
        $google_part .= '</ul>';
    }
}
$title = $q ? str_replace('{q}', $q, Bootstrap::$main->getConfig('page.title')) : Bootstrap::$main->getConfig('page.title0');