smarter
authorx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 07:48:40 +0000 (07:48 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 07:48:40 +0000 (07:48 +0000)
htdocs/listes/trombi.php
htdocs/mescontacts.php
htdocs/trombipromo.php
include/trombi.inc.php

index 34f5e18..32b9c5e 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: trombi.php,v 1.11 2004-11-02 06:46:49 x2000habouzit Exp $
+        $Id: trombi.php,v 1.12 2004-11-02 07:48:40 x2000habouzit Exp $
  ***************************************************************************/
 
 if(empty($_REQUEST['liste'])) header('Location: index.php');
@@ -76,7 +76,6 @@ if(is_array($owners)) {
     $page->assign_by_ref('owners',  $moderos);
     
     $trombi = new Trombi('getList');
-    $trombi->showPromo();
     $page->assign_by_ref('trombi',$trombi);
 } else
     $page->assign('no_list',true);
index e6fe45c..69f1cf6 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: mescontacts.php,v 1.24 2004-11-02 06:46:48 x2000habouzit Exp $
+        $Id: mescontacts.php,v 1.25 2004-11-02 07:48:40 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -82,7 +82,6 @@ if(isset($_GET['trombi'])) {
     
     $trombi = new Trombi('getList');
     $trombi->setNbRows(4);
-    $trombi->showPromo();
     $page->assign_by_ref('trombi',$trombi);
 } else {
     $sql = "SELECT contact AS id,
index 59bbce4..6b3ae8c 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: trombipromo.php,v 1.7 2004-10-28 20:28:41 x2000habouzit Exp $
+        $Id: trombipromo.php,v 1.8 2004-11-02 07:48:40 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -60,6 +60,7 @@ if(isset($_REQUEST['xpromo'])) {
        $page->assign('erreur', "Promotion incorrecte (saisir au format YYYY). Recommence.");
     } else {
        $trombi = new Trombi('getList');
+       $trombi->hidePromo();
        $trombi->setAdmin();
        $page->assign_by_ref('trombi',$trombi);
     }
index 5290c33..dc37f4a 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
- $Id: trombi.inc.php,v 1.3 2004-11-02 06:46:49 x2000habouzit Exp $
+ $Id: trombi.inc.php,v 1.4 2004-11-02 07:48:41 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once('xorg.plugin.inc.php');
@@ -27,11 +27,11 @@ class Trombi extends XOrgPlugin {
     var $_get_vars = Array('offset');
     var $limit = 24;
     var $admin = false;
-    var $showpromo = false;
+    var $showpromo = true;
 
     function setNbRows($row) { $this->limit = $row*3; }
     function setAdmin() { $this->admin = true; }
-    function showPromo() { $this->showpromo = true; }
+    function hidePromo() { $this->showpromo = false; }
     
     function show() {
        /* this point is nasty...  but since show() is called from the template ...