git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-565
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
new_skinned_page('xnet/apropos.tpl', AUTH_PUBLIC);
$page->run();
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
new_skinned_page('xnet/article12.tpl', AUTH_PUBLIC);
$page->run();
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
new_skinned_page('xnet/article16.tpl', AUTH_PUBLIC);
$page->run();
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
new_skinned_page('xnet/creation-groupex.tpl', AUTH_PUBLIC);
$page->run();
a img { border: none; }
img { vertical-align: middle; }
-td { vertical-align: middle; }
+td { vertical-align: top; }
h1 { font-size: 150%; }
h2 { font-size: 135%; }
margin-right: auto;
}
+tr#top td {
+ vertical-align: middle;
+}
+
td#credits {
text-align: center;
font-size: 90%;
***************************************************************************/
table#liste td.fourth {
- vertical-align: top;
width: 25%;
}
div.cat {
background: #d0c198;
- width: 180px;
- padding: 2px;
- margin: 6px 0px;
text-align: center;
font-weight: bold;
font-size: 90%;
+ padding: 2px;
+ width: 180px;
+ margin: 4px 0px;
}
div.sel { background-color: #5c81aa; color: #d0c198; }
--- /dev/null
+<?php
+
+require 'xnet.inc.php';
+
+new_skinned_page('xnet/groupe/asso.tpl', AUTH_PUBLIC);
+if (!$globals->asso('id')) {
+ header("Location: ../");
+}
+$page->setType(strtolower($globals->asso('cat')));
+$page->assign('asso', $globals->asso());
+
+// Sélection de toutes les associations ayant la même catégorie et le même domaine que l'activité sélectionnée
+$gps = $globals->xdb->iterator(
+ "SELECT diminutif, nom
+ FROM groupex.asso
+ WHERE cat = {?} AND dom = {?}
+ ORDER BY nom", $globals->asso('cat'), $globals->asso('dom'));
+$page->assign('gps', $gps);
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+$res = $globals->xdb->query("SELECT logo, logo_mime FROM groupex.asso WHERE id = {?}", $globals->asso('id'));
+list($logo, $logo_mime) = $res->fetchOneRow();
+
+if (!empty($logo)) {
+ header("Content-type: $mime");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified:" . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Pragma: no-cache");
+ echo $logo;
+} else {
+ header("Content-type: image/jpeg");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified:" . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Pragma: no-cache");
+ readfile("../images/dflt_carre.jpg");
+}
+
+?>
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
if (!($cat = Get::get('cat'))) {
header("Location:index.php");
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
new_skinned_page('xnet/index.tpl', AUTH_PUBLIC);
$page->run();
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
if (logged()) {
header("Location: index.php");
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
new_skinned_page('xnet/manuel.tpl', AUTH_PUBLIC);
$page->run();
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
new_skinned_page('xnet/plan.tpl', AUTH_PUBLIC);
$page->setType('plan');
<?php
require 'xnet.inc.php';
- require 'xnet/page.inc.php';
new_skinned_page('xnet/services.tpl', AUTH_PUBLIC);
$page->run();
function _new_page($type, $tpl_name, $min_auth, $admin=false)
{
global $page,$globals;
- require_once("xorg/page.inc.php");
+ require_once("xnet/page.inc.php");
if (!empty($admin)) {
$page = new XnetAdmin($tpl_name, $type);
} else switch($min_auth) {
}
$globals->xdb =& new XOrgDB;
}
+
+ function asso($key=null)
+ {
+ static $aid = null;
+ if ($aid === null) {
+ $gp = basename(dirname($_SERVER['PHP_SELF']));
+ $res = $this->xdb->query('SELECT a.*, d.nom AS domnom
+ FROM groupex.asso AS a
+ LEFT JOIN groupex.dom AS d ON d.id = a.dom
+ WHERE diminutif = {?}', $gp);
+ if (!($aid = $res->fetchOneAssoc())) {
+ $aid = array();
+ }
+ }
+ if (empty($key)) {
+ return $aid;
+ } elseif ( isset($aid[$key]) ) {
+ return $aid[$key];
+ } else {
+ return null;
+ }
+ }
}
// }}}
function setType($type)
{
- $this->assign('xnet_type', $type);
+ $this->assign('xnet_type', strtolower($type));
}
// }}}
--- /dev/null
+{***************************************************************************
+ * 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="content" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="menu">
+ </td>
+ <td>
+ <table style="width: 100%">
+ <tr>
+ <td colspan="2">
+ <h1>
+ <a class="s" href="../groupes.php?cat={$asso.cat}">{$asso.cat}</a>
+ {if $asso.dom}>
+ <a class="s" href="../groupes.php?cat={$asso.cat}&dom={$asso.dom}">{$asso.domnom}</a>
+ {/if}
+ > {$asso.nom} : Accueil
+ </h1>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {if $asso.site}
+ <a href="{$asso.site}"><img src='getlogo.php' alt="LOGO" /></a>
+ {else}
+ <img src='getlogo.php' alt="LOGO" />
+ {/if}
+
+ {if $asso.site}
+ <p class="descr">
+ <strong>Site Web:</strong> <a href="{$asso.site}">{$asso.site}</a>
+ </p>
+ {/if}
+
+ {if $asso.resp && $asso.mail}
+ <p class="descr">
+ <strong>Contact:</strong> {mailto address=$asso.mail text=$asso.resp encode=javascript}
+ </p>
+ {elseif $asso.resp}
+ <p class="descr">
+ <strong>Contact:</strong> {$asso.resp}
+ </p>
+ {/if}
+
+ {if $asso.forum}
+ <p class="descr">
+ <strong>Forum:</strong>
+ <a href="https://www.polytechnique.org/banana/thread.php?group={$asso.forum}">par le web</a> ou
+ <a href="news://ssl.polytechnique.org/{$asso.forum}">par nntp</a>
+ </p>
+ {/if}
+
+ <strong>TODO: INSCRIPTION</strong>
+
+ {if $asso.ax}
+ <p class="descr">
+ <strong>groupe agrée par l'AX</strong>
+ </p>
+ {/if}
+
+ <div>
+ {$asso.descr|smarty:nodefaults}
+ </div>
+ </td>
+ <td>
+ {iterate from=$gps item=g}
+ <div class="cat">
+ <a href="../{$g.diminutif}/asso.php">{$g.nom}</a>
+ </div>
+ {/iterate}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
{if $gps}
{iterate from=$gps item=g}
<table style="float: left;" cellspacing="2" cellpadding="0">
- <tr><td class="oval{if $hasdom}2{/if}"><a href="...">{$g.nom}</a></td></tr>
+ <tr><td class="oval{if $hasdom}2{/if}"><a href="{rel}/{$g.diminutif}/asso.php">{$g.nom}</a></td></tr>
</table>
{/iterate}
{else}
<table id="content" cellpadding="0" cellspacing="0">
<tr>
- <td>
+ <td style="vertical-align: middle;">
<img src="images/parfait.jpg" width="459" height="200" alt="Logo des groupes" />
</td>
<table id="layout" cellspacing="0" cellpadding="0">
{if $xnet_type}
- <tr>
+ <tr id="top">
<td>
<a href="{rel}/index.php"><img src="{rel}/images/asso-montants.png" alt="Logo Assos" /></a>
</td>
</td>
</tr>
{else}
- <tr>
+ <tr id="top">
<td>
<img src="images/logo.png" alt="LOGO Assos" />
</td>