logo

blog

My little blog can’t be this cute! git clone https://hacktivis.me/git/blog.git
commit: 1b31407d3764997d7821dfb420c3a5f1e07928cb
parent 8eb3f76db42964e43acccca4c798619bef74e5ac
Author: lanodan <haelwenn@NightGlider.the-delta.lan>
Date:   Sat,  2 Jan 2010 23:29:41 +0000

Removing useless PHP files

Diffstat:

D404.php14--------------
Dconfig.php.example7-------
Dfooter.php5-----
Dindex.php47-----------------------------------------------
Dlang/en.php25-------------------------
Dlang/fr.php25-------------------------
Dlang/index.php8--------
Dlang/lang.php14--------------
Dlive.php24------------------------
Dpost.php80-------------------------------------------------------------------------------
10 files changed, 0 insertions(+), 249 deletions(-)

diff --git a/404.php b/404.php @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <title>404 not found<?=$locale['fullTitle']?></title> - <link rel="stylesheet" type="text/css" href="css/index.css"> - </head> - <body> -<?php include 'navbar.php';?> -<?php include 'images/deadlink.svg';?> - <strong>Oops</strong> you found a <strong>Dead Link !</strong> -<?php include 'footer.php';?> - </body> -</html> diff --git a/config.php.example b/config.php.example @@ -1,7 +0,0 @@ -<?php - $mysql['host'] = 'localhost'; - $mysql['user'] = 'www_data'; - $mysql['passwd'] = ''; - $mysql['database'] = 'www_data'; - $mysql['table'] = 'blog'; -?> diff --git a/footer.php b/footer.php @@ -1,5 +0,0 @@ - <footer> - <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="CC-BY-SA" src="images/cc-by-sa.png" /></a> <?=$locale['license']?> - <a href="http://www.anybrowser.org/campaign/" title="http://www.anybrowser.org/campaign/"><img src="images/anybrowser.png" alt="<?=$locale['anybrowser']?>"/></a> - <a href="https://flattr.com/submit/auto?user_id=lanodan&amp;url=<?=(isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER[HTTP_HOST].''.$_SERVER[REQUEST_URI]?> target="_blank"><img src="images/flattr.png" alt="Flattr" title="Flattr"></a> - </footer> diff --git a/index.php b/index.php @@ -1,47 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <title>lanodan’s cyber-home — Home</title> - <?php include 'templates/head.css.html'; ?> - <link type="application/rss+xml" href="/rss" title="RSS feed" rel="alternate"></link> - </head> - <body> -<?php -require_once 'config.php'; - -$mysqli = new mysqli($mysql['host'], $mysql['user'], $mysql['passwd'], $mysql['database']); - -if (mysqli_connect_errno()) { - print 'Connect failed: '.mysqli_connect_error(); - exit(); -} - -$query = 'SELECT * FROM '.$mysql['table'].' ORDER by id DESC'; -$result = $mysqli->query($query); - - -while($row = $result->fetch_array()) { - $rows[] = $row; -} -$transPage = True; -$transPageListItem = '<li><a href="accueil">Français</a></li>'; -virtual ('templates/en/nav.php'); -foreach($rows as $row) { - print ' <article> - <h2 class="postTitle"><a href="post?id='.utf8_encode($row['id']).'">'.utf8_encode($row['title']).'</a></h2> - '.utf8_encode($row['content']).' - <div class="info">'.utf8_encode($row['tags']).' ~~ '.date("c", strtotime($row['pubDate']) ).'</div> - </article> -'; -} - -# free result set -$result->close(); - -# close connection -$mysqli->close(); -include 'templates/en/footer.html'; -?> -</body> -</html> diff --git a/lang/en.php b/lang/en.php @@ -1,25 +0,0 @@ -<?php -/** - * @file - * English language file. - */ - -$locale['mainPage']='Main Page'; -$locale['mainPageWelcome']='Welcome on the main page of my blog \!'; -$locale['title']='Lanodan\'s blog'; -$locale['fullTitle']=' - '.$locale['title']; -$locale['home']='Home'; -$locale['tuto']='Tutorials'; -$locale['coding']='Coding'; -$locale['creations']='Creations'; -$locale['drawing']='Drawings'; -$locale['links']='Links'; -$locale['about']='About'; -$locale['license']='This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.'; -$locale['anybrowser']='Viewable on Any Browser'; -$locale['list']='Anime & Movies list'; -$locale['name']='name'; -$locale['startWatching']='Start Watching'; -$locale['finnishWatching']='Finnish Watching'; -$locale['ToC']='Table of Contents'; -?> diff --git a/lang/fr.php b/lang/fr.php @@ -1,25 +0,0 @@ -<?php -/** - * @file - * French language file. - */ - -$locale['mainPage']='Page Principale'; -$locale['mainPageWelcome']='Bienvenue sur la page principale de mon blog \!'; -$locale['title']='web-journal de lanodan'; -$locale['fullTitle']=' - '.$locale['title']; -$locale['home']='Accueil'; -$locale['tuto']='Tutoriels'; -$locale['coding']='Programmation'; -$locale['creations']='Créations'; -$locale['drawing']='Dessins'; -$locale['links']='Liens'; -$locale['about']='À Propos'; -$locale['license']='Cette œuvre est mise à disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Licence Creative Commons Attribution - Partage dans les Mêmes Conditions 4.0 International</a>.'; -$locale['anybrowser']='Visionable sur tous les navigateurs'; -$locale['list']='Liste Anime & Films'; -$locale['name']='Nom'; -$locale['startWatching']='Début du visionage'; -$locale['finnishWatching']='Fin du visionage'; -$locale['ToC']='Table des Matières'; -?> diff --git a/lang/index.php b/lang/index.php @@ -1,8 +0,0 @@ -<?php - $lang = 'fr'; //default language setting - $lang = $_COOKIE['lang']; - $lang = $_GET['lang'];//let user define his lang setting - - setcookie('lang', $lang, '0', '/', "the-delta.net", 0, 1); - header('Location: '.$_SERVER['HTTP_REFERER']); -?> diff --git a/lang/lang.php b/lang/lang.php @@ -1,14 +0,0 @@ -<?php - $langs = array('fr','en'); //just add new language here when you need - $lang = $_COOKIE['lang']; - - if (empty($lang)) { - $header = new http\Header('Language-Accept', $_SERVER['HTTP_ACCEPT_LANGUAGE']); - $negotiate = $header->negotiate($langs); - $lang = substr($negotiate, 0, 2); - setcookie('lang', $lang, '0', '/'); - } - - include_once 'lang/'.$lang.'.php'; - -?> diff --git a/live.php b/live.php @@ -1,24 +0,0 @@ -<?php - require_once 'lang/lang.php'; -?> -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <title>Livestream <?=$locale['fullTitle']?></title> - <link rel="stylesheet" type="text/css" href="css/live.css"> - <link rel="stylesheet" type="text/css" href="css/index.css"> - <script> - function livePopup() { - window.open("http://kiwiirc.com/client/the-delta.net/#live"); - return false; - } - </script> - </head> - <body> -<?php include 'navbar.php'; ?> - <div><a onclick="livePopup()" target="_blank" href="http://kiwiirc.com/client/the-delta.net/#live">web IRC Tchat</a> or use a irc client/ou utilisez un client irc</noscript></div> - <video src="live.webm" width="100%"/> -<?php include 'footer.php';?> - </body> -</html> diff --git a/post.php b/post.php @@ -1,80 +0,0 @@ -<?php - require_once 'lang/lang.php'; - require_once 'config.php'; - - $mysqli = new mysqli($mysql['host'], $mysql['user'], $mysql['passwd'], $mysql['database']); - - if (mysqli_connect_errno()) { - print 'Connect failed: '.mysqli_connect_error(); - exit(); - } - - $_id = $_GET['id']; - - if (!is_numeric($_id)) { - print '?id is not a number'; - exit(); - } - - $query = 'SELECT * FROM '.$mysql['table'].' WHERE id = '.$_id; - $result = $mysqli->query($query); - - $query_comments = 'SELECT * FROM '.$mysql['table'].'_comments WHERE post_id = '.$_id; - $result_comments = $mysqli->query($query_comments); - -?> -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <title><?=$locale['mainPage'].$locale['fullTitle']?></title> - <link rel="stylesheet" type="text/css" href="css/index.css"> - </head> - <body> -<?php - require_once 'config.php'; - if $lang == 'en' { - include 'navbar.php'; - } else { - include 'barredenavigation.php' - } -?> -<?php - /* fetch associative array */ - $row = $result->fetch_array(); - print ' <article> - <h2 class="postTitle"><a href="post?id='.utf8_encode($row['id']).'">'.utf8_encode($row['title']).'</a></h2> - '.utf8_encode($row['content']).' - <div class="info">'.utf8_encode($row['tags']).' ~~ '.date("c", strtotime($row['pubDate']) ).'</div> - </article> -'; - print ' Share: <a href="https://twitter.com/intent/tweet?text='.$baseURL.'post?id='.$row['id'].' '.$row['title'].'">Twitter</a> <a href="mailto:?to&subject='.$row[title].'&body='.$baseURL.'post?id='.$row['id'].'">Mail</a>'; - $result->close(); - $mysqli->close(); - ?> - <p><?php if ($lang == "en") { ?>Comments not available yet, send me a email or something else you can found at the about page.<?php } else { ?>Les commentaires ne sont pas disponible pour le moment, envoyer moi un mail ou autre chose que vous pouvez trouvez sur la page "À propos"<?php } ?></p> - <form action="comment.php"> - <label>User(optionnal): </label><input type="text" name="username" value="Anonymous" disabled=""></input><br /> - <label>Comment: </label><textarea name="comment" disabled=""></textarea> - </form> - <?php -/* - * while($row = $result_comments->fetch_array()) { - * $rows[] = $row; - * } - * - * foreach($rows as $row) { - * print ' <section class="comment" id="'.$row['id'].'"> - * <h1>'.$row['username'].'</h1> - * '.$row['comment'].' - * </section> - *'; - * } - * - * $result->close(); - * $mysqli->close(); - */ - ?> -<?php include 'footer.php';?> - </body> -</html>