Пример #1
0
            $STH->bindValue(":adddate", $marker);
            /* $STH->bindValue(":content", str_replace(array("—", "–", "'"), array("—", "-", "'"), $this->conv_symbs_to_ents($p))); */
            $STH->bindValue(":content", $p);
            $STH->execute();
        }
    }
}
if (!isset($RandomQuote) || empty($RandomQuote)) {
    $RandomQuote = new RandomQuote();
}
$table_name = $dict_enen_quotations_table_name;
$cache_json_table_name = "cache_" . $dict_enen_quotations_table_name . "_json";
$cache_js_table_name = "cache_" . $dict_enen_quotations_table_name . "_js";
$SQLITE_CACHE->exec("CREATE TABLE IF NOT EXISTS `" . $cache_json_table_name . "` ( `adddate` INTEGER NOT NULL, `content` TEXT )");
$SQLITE_CACHE->exec("CREATE TABLE IF NOT EXISTS `" . $cache_js_table_name . "` ( `adddate` INTEGER NOT NULL, `content` TEXT )");
$type = $RandomQuote->get_post('type');
$code = $RandomQuote->get_post('code');
if ($code == "JSON") {
    header('Cache-Control: no-cache, must-revalidate');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    header('Content-type: application/json');
} else {
    header('Cache-Control: no-cache, must-revalidate');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    header('Content-type: application/x-javascript');
}
if (!$type || $type == 'random') {
    /**
     * output as JSON
     */
    $p_json = '';