* Copyright (C) 2003,2005 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ */ /** \file htdocs/admin/external_rss.php \ingroup external_rss \brief Page d'administration/configuration du module ExternalRss \version $Revision$ */ require("./pre.inc.php"); $langs->load("admin"); if (!$user->admin) accessforbidden(); $def = array(); // positionne la variable pour le nombre de rss externes $result=$db->query("select count(*) nb from ".MAIN_DB_PREFIX."const WHERE name like 'EXTERNAL_RSS_URLRSS_%'"); if ($result) { $obj = $db->fetch_object($result); $nbexternalrss = $obj->nb; } else { dolibarr_print_error($db); } if ($_POST["action"] == 'add' || $_POST["modify"]) { $external_rss_urlrss = "external_rss_urlrss_" . $_POST["norss"]; if(isset($_POST[$external_rss_urlrss])) { $external_rss_title = "external_rss_title_" . $_POST["norss"]; //$external_rss_url = "external_rss_url_" . $_POST["norss"]; $db->begin(); $result1=dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_" . $_POST["norss"],$_POST[$external_rss_title]); if ($result1) $result2=dolibarr_set_const($db, "EXTERNAL_RSS_URLRSS_" . $_POST["norss"],$_POST[$external_rss_urlrss]); if ($result1 && $result2) { $db->commit(); //$mesg='
'.$langs->trans("Success").'
'; header("Location: external_rss.php"); } else { $db->rollback(); dolibarr_print_error($db); } } } if ($_POST["delete"]) { if(isset($_POST["norss"])) { $db->begin(); $result1=dolibarr_del_const($db,"EXTERNAL_RSS_TITLE_" . $_POST["norss"]); if ($result1) $result2=dolibarr_del_const($db,"EXTERNAL_RSS_URLRSS_" . $_POST["norss"]); if ($result1 && $result2) { $db->commit(); //$mesg='
'.$langs->trans("Success").'
'; header("Location: external_rss.php"); } else { $db->rollback(); dolibarr_print_error($db); } } } /* * Affichage du formulaire de saisie */ llxHeader(); print_fiche_titre($langs->trans("ExternalRSSSetup"), $mesg); print '
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; ?>
'.$langs->trans("NewRSS").''.$langs->trans("Example").'
'.$langs->trans("Title").'April,
LinuxFR,
Lolix,
Parinux
URL du RSS " size="64"> http://wiki.april.org/RecentChanges?format=rss,
http://www.linuxfr.org/backend.rss,
http://back.fr.lolix.org/jobs.rss.php3,
http://parinux.org/backend.rss
">

"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; } ?>
Syndication du flux numéro " . ($i+1) . "
".$langs->trans("Title")."
URL du RSS
"; print "trans("Modify")."\">  "; print "trans("Delete")."\">"; print ""; print "
close(); llxFooter('$Date$ - $Revision$'); ?>