X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=examples%2Findex.php;h=5ce833e9d4eedf81b84dafaaf169c40b76d2dbf9;hb=257640d8dbfbebbad42f6d6706a8ec27fa6db9ad;hp=3995249ac92da76e7d7135879c7e4ae9aa2b9c30;hpb=62add4052a53ccfaf3751ecd1d257e0f35f877f7;p=banana.git diff --git a/examples/index.php b/examples/index.php index 3995249..5ce833e 100644 --- a/examples/index.php +++ b/examples/index.php @@ -17,6 +17,7 @@ Banana::$spool_root = dirname(__FILE__) . '/spool'; // where to store cache fil Banana::$debug_nntp = false; // if true, show the NNTP backtrace Banana::$debug_smarty = false; // if true, shos php-error in page generation Banana::$feed_active = true; // Activate RSS feed +Banana::$feed_updateOnDemand = true; // Update the feed cache when it is acceeded // Implement a Banana which stores subscription list in a cookie class MyBanana extends Banana @@ -29,6 +30,53 @@ class MyBanana extends Banana } } +// Minimalist login +if ((@$_GET['action'] == 'rss2') || + (!isset($_SESSION['banana_email']) || isset($_POST['change_login']) || isset($_POST['valid_change']))) { + if (isset($_COOKIE['banana_email']) && !isset($_POST['change_login']) && !isset($_POST['valid_change'])) { + $_SESSION['banana_email'] = $_COOKIE['banana_email']; + $_SESSION['banana_name'] = $_COOKIE['banana_name']; + } elseif (isset($_POST['valid_change'])) { + $_SESSION['banana_name'] = $_POST['name']; + $_SESSION['banana_email'] = $_POST['email']; + setcookie('banana_name', $_POST['name'], time() + 25920000); + setcookie('banana_email', $_POST['email'], time() + 25920000); + } else { +?> + + + + + + + Banana, a NNTP<->Web Gateway + + +
+

Les Forums de Banana

+ Merci d'entrer vos identifiants pour accéder à Banana : +
+
+ Nom :
+ Email : +
+ +
+
+
+
+ Banana, a Web interface for a NNTP Server
+ Developed under GPL License for Polytechnique.org
+ Use silk icons from www.famfamfam.com +
+
+ + +'; Banana::$profile['lastnews'] = $_SESSION['banana_lastnews']; setcookie('banana_lastnews', time(), time() + 25920000); @@ -77,11 +127,20 @@ session_write_close();

Les Forums de Banana

+
+
+
+ Vous êtes :
+
+ +
+
Banana, a Web interface for a NNTP Server
- Developed under GPL License for Polytechnique.org + Developed under GPL License for Polytechnique.org
Use silk icons from www.famfamfam.com
+