- New skin : openweb. -MC
- No more annoying submit button, onclick is used to submit. -MC
- This is the first autonom module of the site ! -MC
+
+ * WebRedirect (was: Carva) : now standalone. -MC
Bug/Wish :
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * 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 *
+ ***************************************************************************/
+
+ini_set("include_path","/usr/share/php/diogenes:/usr/share/php:../include:../../include");
+
+require("xorg.inc.php");
+require("xorg.misc.inc.php");
+$globals->dbconnect();
+
+?>
+++ /dev/null
-<?php
-/***************************************************************************
- * Copyright (C) 2003-2004 Polytechnique.org *
- * http://opensource.polytechnique.org/ *
- * *
- * 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 *
- ***************************************************************************/
-
-ini_set("include_path","/usr/share/php/diogenes:/usr/share/php:../../include");
-
-require("xorg.inc.php");
-require("xorg.misc.inc.php");
-$globals->dbconnect();
-
-?>
--- /dev/null
+../connect.db.inc.php
\ No newline at end of file
***************************************************************************/
require('./connect.db.inc.php');
-require("../../include/newsletter.inc.php");
+require("newsletter.inc.php");
function query ($sql) {
mysql_query($sql);
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * 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 *
+ ***************************************************************************/
+
+// {{{ function newsletter_subscirbe()
+
+function &newsletter_subscribe($forlife, $uid, $promo, $password, &$result)
+{
+ global $globals;
+ require_once('newsletter.inc.php');
+ subscribe_nl();
+
+ return ($result = true);
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
// affichage de la boîte avec quelques liens
-$res = $globals->db->query("SELECT id FROM newsletter ORDER BY date DESC");
-list($nb) = mysql_fetch_row($res);
-mysql_free_result($res);
-
require_once('login.conf.php') ;
$pub_nbElem = $pub_nbLig * $pub_nbCol ;
if (count($pub_tjs) <= $pub_nbElem)
-precious ^xorg.globals.inc.php
+precious ^xorg.globals.inc.php$
--- /dev/null
+<?php
+$this->addPrivateEntry(XOM_INFOS, 00, 'Lettres mensuelles', 'newsletter/');
+?>
$this->addPrivateEntry(XOM_GROUPS, 30, 'Groupes X', 'http://www.polytechnique.net/plan.php');
$this->addPrivateEntry(XOM_GROUPS, 40, 'Web Polytechnicien', 'http://www.polytechnique.net/');
-$this->addPrivateEntry(XOM_INFOS, 00, 'Lettres mensuelles', 'newsletter/');
$this->addPrivateEntry(XOM_INFOS, 10, 'Documentations', 'docs/');
$this->addPrivateEntry(XOM_INFOS, 20, 'Nous contacter', 'docs/contacts.php');
$this->addPrivateEntry(XOM_INFOS, 30, 'Emploi', 'http://www.manageurs.com/');
function inscription_listes_base($uid,$pass,$promo)
{
require_once('xml-rpc-client.inc.php');
- require_once('newsletter.inc.php');
global $globals;
// récupération de l'id de la liste promo
$client = new xmlrpc_client("http://$uid:$pass@localhost:4949/polytechnique.org");
$client->subscribe("promo$promo");
- subscribe_nl();
}
// }}}
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * 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 *
+ ***************************************************************************/
+
+require_once("diogenes.core.globals.inc.php");
+require_once("diogenes.database.inc.php");
+
+// {{{ class XorgGlobals
+
+class XorgGlobals extends DiogenesCoreGlobals
+{
+ var $page = 'XorgPage';
+ var $session = 'XorgSession';
+ var $menu;
+
+ /** The x.org version */
+ var $version = "@VERSION@";
+ var $debug = false;
+
+ /** db params */
+ var $dbdb = 'x4dat';
+ var $dbhost = 'localhost';
+ var $dbuser = 'x4dat';
+ var $dbpwd = 'x4dat';
+
+ var $table_auth = 'auth_user_md5';
+ var $table_log_actions = 'logger.actions';
+ var $table_log_sessions = 'logger.sessions';
+ var $table_log_events = 'logger.events';
+
+ /** logger */
+ var $tauth = array('native'=>"auth_user_md5");
+ var $tlabel = array('native'=>"X.Org");
+
+ /** paths */
+ var $baseurl = "http://localhost/xorg";
+ var $spoolroot = "/var/spool/xorg";
+ var $root = null;
+
+ function XorgGlobals() {
+ $this->root = dirname(dirname(__FILE__));
+
+ foreach(glob($this->root.'/include/conf.d/*.globals.inc.php') as $inc) {
+ require_once($inc);
+ }
+
+ $array = parse_ini_file($this->root.'/configs/platal.conf', true);
+ if (!is_array($array)) {
+ return;
+ }
+
+ foreach ($array as $cat=>$conf) {
+ $c = strtolower($cat);
+ foreach ($conf as $key=>$val) {
+ if ($c == 'core' && isset($this->$key)) {
+ $this->$key=$val;
+ } else {
+ $this->$c->$key = $val;
+ }
+ }
+ }
+
+ $this->menu = new XOrgMenu($this->root.'/include/conf.d/');
+
+ session_start();
+
+ $this->dbconnect();
+ if ($this->debug) {
+ $this->db->trace_on();
+ }
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
quite good shape.
converting banana into templates would be great though
+newsletter
+
+ it's mixed into the lists module ...
+ we have to repair this, and all will be OK
+
IN PROGRESS
-----------
marketing
money
news
-newsletter
platal
platal-dev
profile
+bin/mailman/foreach_template.py
+bin/mailman/mailman-rpc.py
+bin/mailman/mhonarc_by_month.pl
+bin/mailman/mhonarc_pipe.sh
htdocs/admin/lists.php
+htdocs/images/lists_date.png
+htdocs/images/lists_firstia.png
+htdocs/images/lists_first.png
+htdocs/images/lists_lastia.png
+htdocs/images/lists_last.png
+htdocs/images/lists_nextia.png
+htdocs/images/lists_next.png
+htdocs/images/lists_previa.png
+htdocs/images/lists_prev.png
+htdocs/images/lists_thread.png
htdocs/listes/admin.php
+htdocs/listes/archives.php
htdocs/listes/check.php
htdocs/listes/create.php
+htdocs/listes/delete.php
htdocs/listes/index.php
htdocs/listes/members.php
htdocs/listes/moderate.php
htdocs/listes/options.php
htdocs/listes/soptions.php
htdocs/listes/trombi.php
-htdocs/listes/delete.php
-htdocs/listes/archives.php
include/validations/listes.inc.php
-bin/mailman/foreach_template.py
-bin/mailman/mailman-rpc.py
templates/admin/lists.tpl
templates/include/form.valid.listes.tpl
templates/include/form.valid.ml.tpl
templates/listes/admin.tpl
+templates/listes/archives.tpl
templates/listes/check.tpl
templates/listes/create.tpl
+templates/listes/delete.tpl
templates/listes/header_listes.tpl
templates/listes/index.tpl
templates/listes/listes.inc.tpl
templates/listes/options.tpl
templates/listes/soptions.tpl
templates/listes/trombi.tpl
-templates/listes/delete.tpl
-templates/listes/archives.tpl
templates/mails/listes.promo.tpl
templates/mails/valid.liste.tpl
-htdocs/images/lists_date.png
-htdocs/images/lists_firstia.png
-htdocs/images/lists_first.png
-htdocs/images/lists_lastia.png
-htdocs/images/lists_last.png
-htdocs/images/lists_nextia.png
-htdocs/images/lists_next.png
-htdocs/images/lists_previa.png
-htdocs/images/lists_prev.png
-htdocs/images/lists_thread.png
--- /dev/null
+
+ Notes for the newsletter module for plat/al
+
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ N/A
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=14
+
+
+DEPENDS
+-------
+
+ platal
+
+
+bin/newsletter.send.php
+hooks/core/newsletter.inc.php
htdocs/admin/newsletter_cats.php
htdocs/admin/newsletter_edit.php
htdocs/admin/newsletter.php
htdocs/newsletter/index.php
htdocs/newsletter/show.php
htdocs/newsletter/submit.php
+include/conf.d/newsletter.menu.inc.php
include/newsletter.inc.php
-bin/cron/send_nl.php
templates/admin/newsletter_edit.tpl
templates/admin/newsletter.tpl
templates/newsletter/head.tpl
--- /dev/null
+insert into admin_h2 VALUES (2,6,'Newsletter',30);
+
+INSERT INTO admin_a VALUES (6,'Liste','admin/newsletter.php',0);
+INSERT INTO admin_a VALUES (6,'Catégories','admin/newsletter_cats.php',10);
+INSERT INTO admin_a VALUES (6,'Adresses en panne','admin/newsletter_pattecassee.php',20);
+
+--
+-- Table structure for table `newsletter`
+--
+
+CREATE TABLE `newsletter` (
+ `id` int(11) NOT NULL auto_increment,
+ `date` date NOT NULL default '0000-00-00',
+ `titre` varchar(255) NOT NULL default '',
+ `bits` enum('sent','new') NOT NULL default 'new',
+ `head` mediumtext NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM COMMENT='liste des NL envoyes';
+
+--
+-- Table structure for table `newsletter_art`
+--
+
+CREATE TABLE `newsletter_art` (
+ `id` int(10) unsigned NOT NULL default '0',
+ `aid` smallint(5) unsigned NOT NULL default '0',
+ `cid` smallint(5) unsigned NOT NULL default '0',
+ `pos` tinyint(3) unsigned NOT NULL default '0',
+ `title` mediumtext NOT NULL,
+ `body` mediumtext NOT NULL,
+ `append` mediumtext NOT NULL,
+ PRIMARY KEY (`id`,`aid`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `newsletter_cat`
+--
+
+CREATE TABLE `newsletter_cat` (
+ `cid` tinyint(3) unsigned NOT NULL auto_increment,
+ `pos` tinyint(3) unsigned NOT NULL default '0',
+ `titre` varchar(128) NOT NULL default '',
+ PRIMARY KEY (`cid`),
+ KEY `pos` (`pos`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `newsletter_ins`
+--
+
+CREATE TABLE `newsletter_ins` (
+ `user_id` smallint(4) unsigned NOT NULL default '0',
+ `last` int(11) NOT NULL default '0',
+ `pref` enum('text','html') NOT NULL default 'html',
+ PRIMARY KEY (`user_id`),
+ KEY `last` (`last`)
+) TYPE=MyISAM COMMENT='liste des abonnés à la newsletter';
+
--- /dev/null
+
+delete from admin_h2 where h2id=6;
+delete from admin_a where h2id=6;
+
+drop TABLE newsletter;
+drop TABLE newsletter_art;
+drop TABLE newsletter_cat;
+drop TABLE newsletter_ins;