Example #1
0
# This file is part of BlogoText.
# http://lehollandaisvolant.net/blogotext/
#
# 2006      Frederic Nassar.
# 2010-2014 Timo Van Neerden <*****@*****.**>
#
# BlogoText is free software.
# You can redistribute it under the terms of the MIT / X11 Licence.
#
# *** LICENSE ***
$GLOBALS['BT_ROOT_PATH'] = '../';
require_once '../inc/inc.php';
error_reporting($GLOBALS['show_errors']);
operate_session();
$begin = microtime(TRUE);
$GLOBALS['db_handle'] = open_base($GLOBALS['db_location']);
$GLOBALS['liste_flux'] = open_serialzd_file($GLOBALS['fichier_liste_fluxrss']);
//foreach ($GLOBALS['liste_flux'] as $url => $arr) {
//	$GLOBALS['liste_flux'][$url]['time'] -= 80000;
//	$GLOBALS['liste_flux'][$url]['checksum'] = '42';
//	$GLOBALS['liste_flux'][$url]['iserror'] = 1;
//}
//file_put_contents($GLOBALS['fichier_liste_fluxrss'], '<?php /* '.chunk_split(base64_encode(serialize($GLOBALS['liste_flux']))).' */');
//debug($GLOBALS['liste_flux']);
// TRAITEMENT
$erreurs = array();
if (isset($_POST['verif_envoi'])) {
    $erreurs = valider_form_rss();
    if (empty($erreurs)) {
        traiter_form_rssconf();
    }
Example #2
0
function traiter_install_3()
{
    //include('../config/prefs.php');
    $GLOBALS['db_handle'] = open_base();
    $time = time();
    if ($GLOBALS['db_handle']) {
        //print_r($GLOBALS['lang']);die();
        $first_post = array('bt_id' => date('YmdHis', $time), 'bt_date' => date('YmdHis', $time), 'bt_title' => $GLOBALS['lang']['first_titre'], 'bt_abstract' => $GLOBALS['lang']['first_edit'], 'bt_content' => $GLOBALS['lang']['first_edit'], 'bt_wiki_content' => $GLOBALS['lang']['first_edit'], 'bt_keywords' => '', 'bt_categories' => '', 'bt_link' => '', 'bt_notes' => '', 'bt_statut' => '1', 'bt_allow_comments' => '1');
        $readme_post = array('bt_notes' => '', 'bt_link' => '', 'bt_categories' => '', 'bt_link' => '', 'bt_id' => date('YmdHis', $time + 2), 'bt_date' => date('YmdHis', $time + 2), 'bt_title' => 'README / LISEZ-MOI', 'bt_abstract' => 'Instructions / Instructions', 'bt_content' => gzinflate(base64_decode('rVPLjtQwELzPV7T2MoDC7A+sVgIE0t5WYuHecXoSC8c9+JHs7NdwJELiB7htfoxuJwOzB+DCSGNZdruqq7qyuesoEmAgiNwTWB9TyCZZ9hH2HCB1coN7SkfgPRw5B6gdt7urOlxeb248cGhIyhgOgROZtNQcKET26EoxYIsKDJgSmk+xgtdyKtX3cuQcj1EfKcZVfR3IozSivBfY9NZfSB9OOK4u6+sdfIjWt+X23d0tGPaeSrf6ujCPVL/sOCYpqwps7Di7BgIJ1RH+CK8AY4eJBtnruxF92mlHN2kbwXNSPww1FdQ5gU0wWufEMCPIYmFHOFghKIYloWlTp5adSX3qQtGz2HjrFKIC3KeVfGmzKWhrf89s8R8afl7JfU99Tct8PI1QVNVkMEdVh2t7nkc5PYdRiA4HUr0t62rPhojGUIylvrgDB/TknujYbZamX/zH34K4rB/ZGgufMzn5Rx1xJOsiHHS6DiHOk8nBpnmChmBg8fo8kq/20rVcaBznqRVZv0sUTPfNdp4G8kk4nFDoQJTrPJcD56gp7ikp2hJM7nvBcwLAMVrZPn5bbXr8scTzrYecrLNRwqPNloDeaz41rvOXtRmKBzTaRzdPMsVWpulTtZA2NARLD/APPiCh8oBZ8aRSHVsAZGkCPZTsviHx0m9JYnfACFw722JiK296tOIuSZPYz5OzHCigau3R2/mr2hRQviPF/YvtJ0/PjdypGcs43m+tW810OH9XkZQlmUVgIm+LPs95IMxPdTTq3YMoPMmvwGAAU9SYk2jF36MoxtV5scmocb9MO33nJUAS8HnSsAtsyfZus/kJ')), 'bt_wiki_content' => 'Once readed, you may delete this post / Une fois que vous avez lu ceci, vous pouvez supprimer l\'article', 'bt_keywords' => '', 'bt_statut' => '0', 'bt_allow_comments' => '0');
        if (TRUE !== bdd_article($first_post, 'enregistrer-nouveau')) {
            die('ERROR SQL posting first article..');
        }
        // billet "Mon premier article"
        bdd_article($readme_post, 'enregistrer-nouveau');
        // billet "read me" avec les instructions // Assuming the 2nd possing will be good if the first was too.
        $link_ar = array('bt_type' => 'link', 'bt_id' => date('YmdHis', $time + 1), 'bt_content' => 'Blog du Hollandais Volant, développeur de Blogotext', 'bt_wiki_content' => 'Blog du Hollandais Volant, développeur de BlogoText.', 'bt_author' => 'BlogoText', 'bt_title' => 'Le Hollandais Volant', 'bt_link' => 'http://lehollandaisvolant.net/', 'bt_tags' => 'blog, timo', 'bt_statut' => '1');
        $link_ar2 = array('bt_type' => 'note', 'bt_id' => date('YmdHis', $time + 5), 'bt_content' => 'Ceci est un lien privé. Vous seuls pouvez le voir.', 'bt_wiki_content' => 'Ceci est un lien privé. Vous seul pouvez le voir.', 'bt_author' => 'BlogoText', 'bt_title' => 'Note : lien privé', 'bt_link' => $GLOBALS['racine'] . 'index.php?mode=links&amp;id=' . date('YmdHis', $time + 5), 'bt_tags' => '', 'bt_statut' => '0');
        bdd_lien($link_ar, 'enregistrer-nouveau');
        // lien
        bdd_lien($link_ar2, 'enregistrer-nouveau');
        // lien
        $comm_ar = array('bt_type' => 'comment', 'bt_id' => date('YmdHis', $time + 6), 'bt_article_id' => date('YmdHis', $time), 'bt_content' => '<p>Ceci est un commentaire.</p>', 'bt_wiki_content' => 'Ceci est un commentaire.', 'bt_author' => 'Blogotext', 'bt_link' => '', 'bt_webpage' => 'http://lehollandaisvolant.net/blogotext/', 'bt_email' => '*****@*****.**', 'bt_subscribe' => '0', 'bt_statut' => '1');
        bdd_commentaire($comm_ar, 'enregistrer-nouveau');
        // commentaire sur l’article
    }
}