x.net/plan.php
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Sun, 17 Apr 2005 21:37:35 +0000 (21:37 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:33 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-554

htdocs.net/css/xnet.css
htdocs.net/login.php [new file with mode: 0644]
htdocs.net/plan.php [new file with mode: 0644]
include/xnet/page.inc.php
templates/xnet/plan.tpl [new file with mode: 0644]
templates/xnet/skin.tpl

index ebb3355..083a523 100644 (file)
@@ -39,6 +39,7 @@ a, a:link, a:visited     { text-decoration: none ; color: #5c81aa; }
 
 a img { border: none; }
 img   { vertical-align: middle; }
+td    { vertical-align: top; }
 
 /***************************************************************************
  * DEBUG
@@ -73,17 +74,12 @@ td#credits {
     font-weight: bold;
 }
 
-td#perso {
-    vertical-align: top;
-}
-
 td#perso ul {
     font-weight: bold;
     font-size: 90%;
 }
 
 td#search {
-    vertical-align: top;
     text-align: right;
 }
 
@@ -116,6 +112,46 @@ table.links a {
     font-weight: bold;
 }
 
+td.oval {
+    color: #d0c198;
+    background: url("../images/oval.png") no-repeat top center;
+    height: 50px;
+    text-align: center;
+    vertical-align: middle !important;
+    font-weight: bold;
+    width: 200px;
+}
+td.oval a { color: #d0c198; }
+
+
+/***************************************************************************
+ * Special pages
+ ***************************************************************************/
+
+
+table#liste td.listec a {
+    display: block;
+    text-align: center;
+}
+
+table#liste td.liste a {
+    display: block;
+    text-align: right;
+}
+
+table#liste td.liste a.cat {
+    background: #d0c198;
+    margin: 15px 0px 10px 0px;
+    padding: 3px;
+    text-align: center;
+    font-weight: bold;
+    font-size: 90%;
+}
+
+table#liste td.liste a:hover, table#liste td.listec a:hover {
+    background: #d0c198;
+}
+
 /***************************************************************************
  ***************************************************************************/
 
@@ -155,16 +191,6 @@ td.pres {
     text-align: center;
     width: 210px;
 }
-td.presautres {
-    background-repeat: no-repeat;
-    background-image: url("images/oval.png");
-    background-position: top center;
-    font-size: 90%;
-    height: 50px;
-    text-align: center;
-    width: 200px;
-}
-
 td.pres2 {
     background-repeat: no-repeat;
     background-image: url("images/oval2.png");
@@ -188,16 +214,8 @@ td.choix1actif {
     text-decoration: none;
 }
 
-td.choix2 {
-    height: 20px;
-    background-color: #D0C198;
-    font-size: 85%;
-}
 td.choix2actif {
     height: 20px;
     background-color: #5C81AA;
     color:#D0C198;
 }
-div.choix2 {
-    text-align: center;
-}
diff --git a/htdocs.net/login.php b/htdocs.net/login.php
new file mode 100644 (file)
index 0000000..885e33f
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+    require 'xnet.inc.php';
+    require 'xnet/page.inc.php';
+
+    if (logged()) {
+        header("Location: index.php");
+    }
+
+    new_skinned_page('index.tpl', AUTH_MDP);
+    $page->run();
+?>
diff --git a/htdocs.net/plan.php b/htdocs.net/plan.php
new file mode 100644 (file)
index 0000000..f0439b7
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+    require 'xnet.inc.php';
+    require 'xnet/page.inc.php';
+
+    new_skinned_page('xnet/plan.tpl', AUTH_PUBLIC);
+    $page->setType('plan');
+
+    $res = $globals->xdb->iterator(
+            'SELECT  dom.id, dom.nom as domnom, asso.diminutif, asso.nom
+               FROM  groupex.dom
+         INNER JOIN  groupex.asso ON dom.id = asso.dom
+              WHERE  FIND_IN_SET("GroupesX", dom.cat) AND FIND_IN_SET("GroupesX", asso.cat)
+           ORDER BY  dom.nom, asso.nom');
+    $groupesx = array();
+    while ($tmp = $res->next()) { $groupesx[$tmp['id']][] = $tmp; }
+    $page->assign('groupesx', $groupesx);
+
+    $res = $globals->xdb->iterator(
+            'SELECT  dom.id, dom.nom as domnom, asso.diminutif, asso.nom
+               FROM  groupex.dom
+         INNER JOIN  groupex.asso ON dom.id = asso.dom
+              WHERE  FIND_IN_SET("Binets", dom.cat) AND FIND_IN_SET("Binets", asso.cat)
+           ORDER BY  dom.nom, asso.nom');
+    $binets = array();
+    while ($tmp = $res->next()) { $binets[$tmp['id']][] = $tmp; }
+    $page->assign('binets', $binets);
+
+    $res = $globals->xdb->iterator(
+            'SELECT  asso.diminutif, asso.nom
+               FROM  groupex.asso
+              WHERE  cat LIKE "%Promotions%"
+           ORDER BY  diminutif');
+    $page->assign('promos', $res);
+
+    $res = $globals->xdb->iterator(
+            'SELECT  asso.diminutif, asso.nom
+               FROM  groupex.asso
+              WHERE  FIND_IN_SET("Institutions", cat)
+           ORDER BY  diminutif');
+    $page->assign('inst', $res);
+
+    $page->run();
+?>
index 27cd4ab..85b21d8 100644 (file)
@@ -44,6 +44,14 @@ class XnetPage extends PlatalPage
     }
 
     // }}}
+    // {{{ function setType
+
+    function setType($type)
+    {
+        $this->assign('xnet_type', $type);
+    }
+
+    // }}}
 }
 
 // }}}
diff --git a/templates/xnet/plan.tpl b/templates/xnet/plan.tpl
new file mode 100644 (file)
index 0000000..313fb68
--- /dev/null
@@ -0,0 +1,91 @@
+{***************************************************************************
+ *  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                *
+ ***************************************************************************}
+
+<table id="liste">
+  <tr>
+    <td style="width: 25%">
+      <table>
+        <tr>
+          <td class="oval"><a href="groupes.php?cat=GroupesX">Groupes X</a></td>
+        </tr>
+        <tr>
+          <td class="liste">
+            {foreach from=$groupesx key=id item=dom}
+            <a class="cat" href="sommaire.php?cat=GroupesX&amp;dom={$id}">{$dom[0].domnom}</a>
+            {foreach from=$dom item=g}
+            <a href="{$g.diminutif}/asso.php">{$g.nom}</a>
+            {/foreach}
+            {/foreach}
+          </td>
+        </tr>
+      </table>
+    </td>
+
+    <td style="width: 25%">
+      <table>
+        <tr>
+          <td class="oval"><a href="groupes.php?cat=Binets">Binets</a></td>
+        </tr>
+        <tr>
+          <td class="liste">
+            {foreach from=$binets key=id item=dom}
+            <a class="cat" href="sommaire.php?cat=BinetsX&amp;dom={$id}">{$dom[0].domnom}</a>
+            {foreach from=$dom item=g}
+            <a href="{$g.diminutif}/asso.php">{$g.nom}</a>
+            {/foreach}
+            {/foreach}
+          </td>
+        </tr>
+      </table>
+    </td>
+
+    <td style="width: 25%">
+      <table>
+        <tr>
+          <td class="oval"><a href="groupes.php?cat=Promotions">Promotions</a></td>
+        </tr>
+        <tr>
+          <td class="listec">
+            {iterate from=$promos item=g}
+            <a href="{$g.diminutif}/asso.php">{$g.nom}</a>
+            {/iterate}
+          </td>
+        </tr>
+      </table>
+    </td>
+
+    <td style="width: 25%">
+      <table>
+        <tr>
+          <td class="oval"><a href="groupes.php?cat=Institutions">Institutions</a></td>
+        </tr>
+        <tr>
+          <td class="listec">
+            {iterate from=$inst item=g}
+            <a href="{$g.diminutif}/asso.php">{$g.nom}</a>
+            {/iterate}
+          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
index 0434ac8..65cd040 100644 (file)
     {include file=skin/common.bandeau.tpl}
 
     <table id="layout" cellspacing="0" cellpadding="0">
-      {if $type}
+      {if $xnet_type}
       <tr>
         <td>
           <a href="{rel}/index.php"><img src="{rel}/images/asso-montants.png" alt="Logo Assos" /></a>
         </td>
         <td>
-          <img src="{rel}/images/logo_{$type}.png" alt="Logo {$type}" width="106" height="96" />
+          <img src="{rel}/images/logo_{$xnet_type}.png" alt="Logo {$xnet_type}" width="106" height="96" />
         </td>
         <td colspan="2">
-          <img src="{rel}/images/texte_{$type}.jpg" alt="{$type}" width="490" height="96" />
+          <img src="{rel}/images/texte_{$xnet_type}.jpg" alt="{$xnet_type}" width="490" height="96" />
         </td>
       </tr>
       {else}