From e6416df56f642d5aed0e7de5c2c9868f4970bf46 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Mon, 30 Aug 2004 09:14:48 +0000 Subject: [PATCH] tons of bugfixes --- htdocs/admin/evenements.php | 9 -- htdocs/admin/gerer_skins.php | 8 +- htdocs/admin/newsletter_archi.php | 29 ++---- htdocs/css/default.css | 4 +- templates/admin/deces_promo.tpl | 14 +-- templates/admin/evenements.tpl | 41 ++++---- templates/admin/homonymes.tpl | 8 +- templates/admin/index.tpl | 172 ++++++++++++++++------------------ templates/admin/newsletter_archi.tpl | 22 ----- templates/admin/newsletter_prep.tpl | 8 +- templates/admin/postfix.common.tpl | 4 +- templates/include/form.evenement.tpl | 12 +-- templates/include/form.newsletter.tpl | 41 -------- templates/include/newsletter.list.tpl | 64 ++++++------- templates/login.tpl | 6 +- 15 files changed, 163 insertions(+), 279 deletions(-) delete mode 100644 templates/admin/newsletter_archi.tpl delete mode 100644 templates/include/form.newsletter.tpl diff --git a/htdocs/admin/evenements.php b/htdocs/admin/evenements.php index fccb390..519f20e 100644 --- a/htdocs/admin/evenements.php +++ b/htdocs/admin/evenements.php @@ -8,8 +8,6 @@ $page->assign('arch', $arch); $action = isset($_POST['action']) ? $_POST['action'] : ""; -$err = Array(); - switch($action) { case "Proposer": $req = "UPDATE evenements @@ -18,7 +16,6 @@ switch($action) { WHERE id = {$_POST['evt_id']} LIMIT 1"; $result = $globals->db->query ($req); - $err[] = "Requete effectuée : $req"; break; case "Valider": @@ -30,7 +27,6 @@ switch($action) { WHERE id ='{$_POST['evt_id']}' LIMIT 1"; $result = $globals->db->query ($req); - $err[] = "Requete effectuée : $req"; break; case "Invalider": @@ -42,25 +38,21 @@ switch($action) { WHERE id = ".$_POST['evt_id']." LIMIT 1"; $result = $globals->db->query ($req); - $err[] = "Requete effectuée : $req"; break; case "Supprimer": $req="DELETE from evenements WHERE id = ".$_POST['evt_id']." LIMIT 1"; $result = $globals->db->query ($req); - $err[] = "Requete effectuée : $req"; break; case "Archiver": $req="UPDATE evenements SET flags = CONCAT(flags,',archive')WHERE id = ".$_POST['evt_id']." LIMIT 1"; $result = $globals->db->query ($req); - $err[] = "Requete effectuée : $req"; break; case "Desarchiver": $req="UPDATE evenements SET flags = REPLACE(flags,'archive','')WHERE id = ".$_POST['evt_id']." LIMIT 1"; $result = $globals->db->query ($req); - $err[] = "Requete effectuée : $req"; break; case "Editer": @@ -105,6 +97,5 @@ if ($action != "Editer") { $page->mysql_assign($sql, 'evs'); } -$page->assign('err', $err); $page->run(); ?> diff --git a/htdocs/admin/gerer_skins.php b/htdocs/admin/gerer_skins.php index 82fe3a4..914f5cf 100644 --- a/htdocs/admin/gerer_skins.php +++ b/htdocs/admin/gerer_skins.php @@ -6,13 +6,7 @@ $editor->describe('skin_tpl','nom du template',true); $editor->describe('auteur','auteur',false); $editor->describe('comment','commentaire',true,'textarea'); $editor->describe('date','date',false); -$editor->describe('bgtable','OBSOLETE bgtable',false); -$editor->describe('typelogo','OBSOLETE type logo',false); -$editor->describe('typeban','OBSOLETE type ban',false); -$editor->describe('typelesX','OBSOLETE type les X',false); -$editor->describe('type','type',true,'set'); - -#FIXME enlever les entrées obsoletes +$editor->describe('ext','extension du screenshot',false); $editor->assign('title', 'Gestion des skins'); $editor->run(); diff --git a/htdocs/admin/newsletter_archi.php b/htdocs/admin/newsletter_archi.php index e31bebc..e208221 100644 --- a/htdocs/admin/newsletter_archi.php +++ b/htdocs/admin/newsletter_archi.php @@ -1,29 +1,12 @@ assign('title', 'Gestion des archives de la newsletter'); -switch ($_REQUEST['action']) { - case "update": - if (empty($_REQUEST['nl_id'])) { - $globals->db->query("insert into newsletter set date='{$_REQUEST['nl_date']}', " - ."titre='{$_REQUEST['nl_titre']}', text='{$_REQUEST['nl_text']}'"); - } else { - $globals->db->query("update newsletter set date='{$_REQUEST['nl_date']}', " - ."titre='{$_REQUEST['nl_titre']}', text='{$_REQUEST['nl_text']}' where id='{$_REQUEST['nl_id']}'"); - } - break; +$editor->describe('date', 'date', true); +$editor->describe('titre', 'titre', true); +$editor->describe('text', 'texte', false, 'textarea'); - case "edit": - $res = $globals->db->query("select id, date, titre, text from newsletter where id='{$_REQUEST['nl_id']}'"); - $page->assign('nl', mysql_fetch_assoc($res)); - break; - case "delete": - $globals->db->query("delete from newsletter where id='{$_REQUEST['nl_id']}'"); -} - -$sql = "SELECT id,date,titre FROM newsletter ORDER BY date DESC"; -$page->mysql_assign($sql, 'nl_list'); -$page->run(); +$editor->run(); ?> diff --git a/htdocs/css/default.css b/htdocs/css/default.css index 2ef908c..1c317a3 100644 --- a/htdocs/css/default.css +++ b/htdocs/css/default.css @@ -144,7 +144,7 @@ td.action { font-weight: bold; vertical-align: middle; } -td.action a { padding: 4px; } +td.action a { padding: 0px 2px 0px 2px; } /******************************************************************************* 4 Tableau de choix de skins @@ -458,4 +458,4 @@ div.item div.value { } } /* vim: set et ts=4 sts=4 sw=4: */ -/* $Id: default.css,v 1.33 2004-08-29 21:26:04 x2000habouzit Exp $ */ +/* $Id: default.css,v 1.34 2004-08-30 09:14:49 x2000habouzit Exp $ */ diff --git a/templates/admin/deces_promo.tpl b/templates/admin/deces_promo.tpl index 2174ca4..1bde71b 100644 --- a/templates/admin/deces_promo.tpl +++ b/templates/admin/deces_promo.tpl @@ -1,10 +1,10 @@ -{* $Id: deces_promo.tpl,v 1.3 2004-02-11 13:15:34 x2000habouzit Exp $ *} +{* $Id: deces_promo.tpl,v 1.4 2004-08-30 09:14:49 x2000habouzit Exp $ *}
- - + + - - + +
Promotion : {dynamic} @@ -12,14 +12,13 @@ {/dynamic}
- @@ -36,7 +35,8 @@ {/foreach} {/dynamic} - diff --git a/templates/admin/evenements.tpl b/templates/admin/evenements.tpl index edb7a66..da52b14 100644 --- a/templates/admin/evenements.tpl +++ b/templates/admin/evenements.tpl @@ -1,4 +1,4 @@ -{* $Id: evenements.tpl,v 1.3 2004-07-19 13:35:35 x2000habouzit Exp $ *} +{* $Id: evenements.tpl,v 1.4 2004-08-30 09:14:49 x2000habouzit Exp $ *} {dynamic} @@ -11,10 +11,6 @@ {/if} -{foreach from=$err item=e} -

{$e|nl2br}

-{/foreach} - {if $mode} {include file="include/form.evenement.tpl"} @@ -25,7 +21,7 @@
Nom
+ +
@@ -33,6 +29,7 @@ diff --git a/templates/admin/homonymes.tpl b/templates/admin/homonymes.tpl index 208ffd2..85bdf5f 100644 --- a/templates/admin/homonymes.tpl +++ b/templates/admin/homonymes.tpl @@ -1,4 +1,4 @@ -{* $Id: homonymes.tpl,v 1.3 2004-08-26 14:44:43 x2000habouzit Exp $ *} +{* $Id: homonymes.tpl,v 1.4 2004-08-30 09:14:49 x2000habouzit Exp $ *}
Gestion des homonymes @@ -42,11 +42,11 @@
diff --git a/templates/admin/index.tpl b/templates/admin/index.tpl index 6f57ad3..b5423e8 100644 --- a/templates/admin/index.tpl +++ b/templates/admin/index.tpl @@ -1,112 +1,106 @@ -{* $Id: index.tpl,v 1.3 2004-08-26 12:31:16 x2000habouzit Exp $ *} +{* $Id: index.tpl,v 1.4 2004-08-30 09:14:49 x2000habouzit Exp $ *}
Administration Polytechnique.org
- Posté par {$ev.prenom} {$ev.nom} (X{$ev.promo}) + Posté par {$ev.prenom} {$ev.nom} (X{$ev.promo}) lui écrire
{$ev.titre}
{$ev.texte|nl2br}
+
Création : {$ev.creation_date}
{if $ev.fvalide} Validation : {$ev.validation_date}
@@ -44,21 +41,23 @@
- - - - {if $ev.farch} - - {else} - - {if $ev.fvalide} - - - {else} - - {/if} - - {/if} + +
+ + + {if $ev.farch} + + {else} + + {if $ev.fvalide} + + + {else} + + {/if} + + {/if} +
{$user.date} - fiche + fiche edit {if $user.alias eq $login} - mailer - corriger + mailer + corriger {/if}
- - - - + + + +
Système
- Postfix : - Blacklist   |   - Permissions   |   - Retards -
- Statistiques : - Système   |   - Logs Postfix   |   - Webalizer -
- Sécurité : - Logs des sessions   |   - Logs utilisateur   |   - Actions -
Système
+ Postfix : + Blacklist   |   + Permissions   |   + Retards +
+ Statistiques : + Système   |   + Logs Postfix   |   + Webalizer +
+ Sécurité : + Logs des sessions   |   + Actions +

- - - - - - - - - + + + + + + + + +
Contenu du site
- Utilisateurs : - Gestion/SU   |   - Identification   |   - Homonymes   |   - Marketing   |   - AX/X.org   |   - Décès   |   - Comptes POP -
- Infos dynamiques : - Coupures   |   - Événements   |   - X.net   |   - Point Gamma -
- Champs profil : - Formations   |   - Binets   |   - Groupes X   |   - Skins -
- Newsletter : - Préparation   |   - Archives   |   - Adresses en panne -
- Administrer : - Auth Groupes X  |   - Listes -
- Valider demandes : - Valider -   |   - Événements -
- Forums : - FAQs -
- Trésorerie : - Comptes -   |   - Paiements -
Contenu du site
+ Utilisateurs : + Gestion/SU/Logs   |   + Homonymes   |   + AX/X.org   |   + Décès +
+ Infos dynamiques : + Coupures   |   + Événements +
+ Champs profil : + Formations   |   + Binets   |   + Groupes X   |   + Skins +
+ Newsletter : + Préparation   |   + Archives   |   + Adresses en panne +
+ Administrer : + Auth Groupes X  |   + Listes +
+ Valider demandes : + Valider +   |   + Événements +
+ Forums : + FAQs +
+ Trésorerie : + Comptes +   |   + Paiements +

- - + + - - + + - +
Développement
Développement
Trackers : - TRACKERS -   |   - TICKETS + TRACKERS +   |   + TICKETS
CVS : - ViewCVS   |   - DepView + ViewCVS   |   + DepView

- - + +
Gestion et entretien
- Reformatage Prenom NOM : - Table - auth_user_md5   |   - Table identification -
Gestion et entretien
+ Reformatage Prenom NOM : + Table + auth_user_md5   |   + Table identification +
{* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/admin/newsletter_archi.tpl b/templates/admin/newsletter_archi.tpl deleted file mode 100644 index fc2bd73..0000000 --- a/templates/admin/newsletter_archi.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{* $Id: newsletter_archi.tpl,v 1.1 2004-02-11 11:51:53 x2000habouzit Exp $ *} - -
- Gestion des archives de la newsletter -
- -{dynamic} - -{if $smarty.request.action eq 'edit'} - -{include file=include/form.newsletter.tpl form_title='modifier une newsletter' nl_id=$nl.id nl_date=$nl.date nl_titre=$nl.titre nl_text=$nl.text} - -{else} - -{include file=include/newsletter.list.tpl admin=1} -
-{include file=include/form.newsletter.tpl form_title='ajouter une newsletter' nl_id=0} - -{/if} - -{/dynamic} -{* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/admin/newsletter_prep.tpl b/templates/admin/newsletter_prep.tpl index 05e69ec..6fc36bd 100644 --- a/templates/admin/newsletter_prep.tpl +++ b/templates/admin/newsletter_prep.tpl @@ -1,4 +1,4 @@ -{* $Id: newsletter_prep.tpl,v 1.5 2004-08-26 14:44:43 x2000habouzit Exp $ *} +{* $Id: newsletter_prep.tpl,v 1.6 2004-08-30 09:14:49 x2000habouzit Exp $ *} {if $erreur} @@ -37,7 +37,6 @@
-
{elseif $is_lock}

{$id_lock} est en train d'éditer la newsletter depuis le @@ -51,27 +50,22 @@

-
{else}
Pas de lock sur le fichier, tu peux en prendre un.
-
-
envoyer la newsletter tel qu'elle.
-

-
{/if} diff --git a/templates/admin/postfix.common.tpl b/templates/admin/postfix.common.tpl index 062dfdc..4151f99 100644 --- a/templates/admin/postfix.common.tpl +++ b/templates/admin/postfix.common.tpl @@ -1,4 +1,4 @@ -{* $Id: postfix.common.tpl,v 1.5 2004-08-30 08:32:19 x2000habouzit Exp $ *} +{* $Id: postfix.common.tpl,v 1.6 2004-08-30 09:14:49 x2000habouzit Exp $ *} {dynamic}

{$erreur}

@@ -7,7 +7,7 @@ {$title} -page d'admin | +page d'admin | blacklist | permissions | mails retardés diff --git a/templates/include/form.evenement.tpl b/templates/include/form.evenement.tpl index 265ee85..0c3970d 100644 --- a/templates/include/form.evenement.tpl +++ b/templates/include/form.evenement.tpl @@ -1,7 +1,6 @@ -{* $Id: form.evenement.tpl,v 1.1 2004-07-19 13:35:36 x2000habouzit Exp $ *} +{* $Id: form.evenement.tpl,v 1.2 2004-08-30 09:14:50 x2000habouzit Exp $ *} - - +
@@ -18,8 +17,6 @@
Contenu du message
-
- @@ -53,7 +50,7 @@ @@ -63,9 +60,8 @@
Informations complémentaires
-
-
+
diff --git a/templates/include/form.newsletter.tpl b/templates/include/form.newsletter.tpl deleted file mode 100644 index 2377a0d..0000000 --- a/templates/include/form.newsletter.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{* $Id: form.newsletter.tpl,v 1.3 2004-02-11 13:30:37 x2000habouzit Exp $ *} - - - - - - - - - - - - - - - - - - - - - - -
- {$form_title} -
- date - - -
- titre - - -
- -
- -
- - -{* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/include/newsletter.list.tpl b/templates/include/newsletter.list.tpl index 0b02e14..90da24a 100644 --- a/templates/include/newsletter.list.tpl +++ b/templates/include/newsletter.list.tpl @@ -1,39 +1,35 @@ -{* $Id: newsletter.list.tpl,v 1.3 2004-08-24 23:06:05 x2000habouzit Exp $ *} +{* $Id: newsletter.list.tpl,v 1.4 2004-08-30 09:14:50 x2000habouzit Exp $ *} - - - - - -{foreach item=nl from=$nl_list} - - - - {if $admin} - - - {else} - - {/if} - -{/foreach} + + + + + + {foreach item=nl from=$nl_list} + + + + {if $admin} + + {else} + + {/if} + + {/foreach}
datetitre 
{$nl.date|date_format:"%Y-%m-%d"} - {$nl.titre} - -
- - - -
-
-
- - - -
-
-   -
datetitre 
{$nl.date|date_format:"%Y-%m-%d"} + {$nl.titre} + +
+
+ + + + +
+
+
+   +
{* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/login.tpl b/templates/login.tpl index afb5b41..0cbc224 100644 --- a/templates/login.tpl +++ b/templates/login.tpl @@ -1,4 +1,4 @@ -{* $Id: login.tpl,v 1.7 2004-08-29 16:02:39 x2000habouzit Exp $ *} +{* $Id: login.tpl,v 1.8 2004-08-30 09:14:49 x2000habouzit Exp $ *} {if $date}
@@ -63,11 +63,11 @@ - +
{$ev.titre|nl2br}{$ev.titre|nl2br}
- {$ev.texte|nl2br} + {$ev.texte|smarty:nodefaults|nl2br}

Annonce proposée par -- 2.1.4