[Devel] r271 - trunk

svn at agendadulibre.org svn at agendadulibre.org
Sam 5 Mai 13:00:10 CEST 2007


Author: thomas
Date: Sat May  5 13:00:08 2007
New Revision: 271

Log:
Ajout d'un script permettant de récupérer une version texte d'une
liste d'évènements.



Added:
   trunk/textlist.php

Added: trunk/textlist.php
==============================================================================
--- (empty file)
+++ trunk/textlist.php	Sat May  5 13:00:08 2007
@@ -0,0 +1,30 @@
+<?php
+header("Content-Type: text/plain; charset=utf-8");
+include("bd.inc.php");
+include("funcs.inc.php");
+
+calendar_setlocale();
+
+$db = new db();
+
+echo "===============================================================\n";
+$events = $db->query ("select * from events where tags like '%" . $_GET['tag'] . "%' order by start_time");
+while ($event = mysql_fetch_object($events))
+{
+  echo "Titre:      " . utf8_encode($event->title) . "\n";
+  echo "Ville:      " . utf8_encode($event->city)  . "\n";
+  echo "Région:     " . utf8_encode(region_find($db, $event->region)) . "\n";
+  echo "Date début: " . utf8_encode(strftime ("%A %d %B %Y %Hh%M", date_mysql2timestamp($event->start_time))) . "\n";
+  echo "Date fin:   " . utf8_encode(strftime ("%A %d %B %Y %Hh%M", date_mysql2timestamp($event->end_time))) . "\n";
+  echo "Contact:    " . utf8_encode(scramble_email($event->contact)) . "\n";
+  echo "URL:        " . utf8_encode($event->url) . "\n";
+  echo "URL AdL:    " . "http://www.agendadulibre.org/showevent.php?id=" . $event->id . "\n";
+  echo "Description:\n";
+  if ($_GET["nohtml"])
+    echo wordwrap(utf8_encode(strip_tags($event->description)));
+  else
+    echo wordwrap(utf8_encode($event->description));
+  echo "\n";
+  echo "===============================================================\n";
+}
+?>
\ No newline at end of file


Plus d'informations sur la liste de diffusion Devel