Look: Uniformize look
This commit is contained in:
parent
954d08d82d
commit
d4eefc0823
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,11 +19,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/adherents/type.php
|
* \file htdocs/adherents/type.php
|
||||||
\ingroup adherent
|
* \ingroup adherent
|
||||||
\brief Page de configuration des types d'adhérents
|
* \brief Page de configuration des types d'adh<EFBFBD>rents
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
|
||||||
@ -37,12 +37,12 @@ $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if ($user->rights->adherent->configurer && $_POST["action"] == 'add')
|
if ($user->rights->adherent->configurer && $_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
if ($_POST["button"] != $langs->trans("Cancel"))
|
if ($_POST["button"] != $langs->trans("Cancel"))
|
||||||
{
|
{
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
|
|
||||||
$adht->libelle = trim($_POST["libelle"]);
|
$adht->libelle = trim($_POST["libelle"]);
|
||||||
$adht->cotisation = trim($_POST["cotisation"]);
|
$adht->cotisation = trim($_POST["cotisation"]);
|
||||||
$adht->note = trim($_POST["comment"]);
|
$adht->note = trim($_POST["comment"]);
|
||||||
@ -71,7 +71,7 @@ if ($user->rights->adherent->configurer && $_POST["action"] == 'add')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->adherent->configurer && $_POST["action"] == 'update')
|
if ($user->rights->adherent->configurer && $_POST["action"] == 'update')
|
||||||
{
|
{
|
||||||
if ($_POST["button"] != $langs->trans("Cancel"))
|
if ($_POST["button"] != $langs->trans("Cancel"))
|
||||||
{
|
{
|
||||||
@ -82,12 +82,12 @@ if ($user->rights->adherent->configurer && $_POST["action"] == 'update')
|
|||||||
$adht->note = trim($_POST["comment"]);
|
$adht->note = trim($_POST["comment"]);
|
||||||
$adht->mail_valid = trim($_POST["mail_valid"]);
|
$adht->mail_valid = trim($_POST["mail_valid"]);
|
||||||
$adht->vote = trim($_POST["vote"]);
|
$adht->vote = trim($_POST["vote"]);
|
||||||
|
|
||||||
$adht->update($user->id);
|
$adht->update($user->id);
|
||||||
|
|
||||||
Header("Location: type.php?rowid=".$_POST["rowid"]);
|
Header("Location: type.php?rowid=".$_POST["rowid"]);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->adherent->configurer && $_GET["action"] == 'delete')
|
if ($user->rights->adherent->configurer && $_GET["action"] == 'delete')
|
||||||
@ -106,6 +106,9 @@ if ($user->rights->adherent->configurer && $_GET["action"] == 'commentaire')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
@ -113,28 +116,27 @@ $form=new Form($db);
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Liste des types d'adhérents */
|
/* Liste des types d'adh<EFBFBD>rents */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit')
|
if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit')
|
||||||
{
|
{
|
||||||
|
|
||||||
print_titre($langs->trans("MembersTypeSetup"));
|
print_fiche_titre($langs->trans("MembersTypeSetup"));
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Ref").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td>';
|
||||||
print '<td>'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
@ -142,7 +144,7 @@ if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit')
|
|||||||
print '<td align="center">'.$langs->trans("VoteAllowed").'</td>';
|
print '<td align="center">'.$langs->trans("VoteAllowed").'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
@ -184,15 +186,14 @@ if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Création d'un type adherent */
|
/* Cr<EFBFBD>ation d'un type adherent */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
if ($_GET["action"] == 'create')
|
if ($_GET["action"] == 'create')
|
||||||
{
|
{
|
||||||
$htmls = new Form($db);
|
$htmls = new Form($db);
|
||||||
|
|
||||||
print_titre($langs->trans("NewMemberType"));
|
print_fiche_titre($langs->trans("NewMemberType"));
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
if ($mesg) print '<div class="error">'.$mesg.'</div>';
|
if ($mesg) print '<div class="error">'.$mesg.'</div>';
|
||||||
|
|
||||||
@ -202,7 +203,7 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40"></td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||||
print $htmls->selectyesno("cotisation",1,1);
|
print $htmls->selectyesno("cotisation",1,1);
|
||||||
@ -235,7 +236,7 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Edition de la fiche */
|
/* Edition de la fiche */
|
||||||
@ -251,7 +252,7 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
|
|
||||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
||||||
$head[$h][1] = $langs->trans("Card");
|
$head[$h][1] = $langs->trans("Card");
|
||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
@ -261,30 +262,30 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="15%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td width="15%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->showrefnav($adht,'rowid');
|
print $form->showrefnav($adht,'rowid');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td width="15%">'.$langs->trans("Label").'</td><td>'.$adht->libelle.'</td></tr>';
|
print '<tr><td width="15%">'.$langs->trans("Label").'</td><td>'.$adht->libelle.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||||
print yn($adht->cotisation);
|
print yn($adht->cotisation);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||||
print yn($adht->vote);
|
print yn($adht->vote);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||||
print nl2br($adht->note)."</td></tr>";
|
print nl2br($adht->note)."</td></tr>";
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||||
print nl2br($adht->mail_valid)."</td></tr>";
|
print nl2br($adht->mail_valid)."</td></tr>";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -300,7 +301,7 @@ if ($rowid > 0)
|
|||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"type.php?action=edit&rowid=".$adht->id."\">".$langs->trans("Modify")."</a>";
|
print "<a class=\"butAction\" href=\"type.php?action=edit&rowid=".$adht->id."\">".$langs->trans("Modify")."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add
|
// Add
|
||||||
print "<a class=\"butAction\" href=\"fiche.php?action=create&typeid=".$adht->id."\">".$langs->trans("AddMember")."</a>";
|
print "<a class=\"butAction\" href=\"fiche.php?action=create&typeid=".$adht->id."\">".$langs->trans("AddMember")."</a>";
|
||||||
|
|
||||||
@ -309,21 +310,21 @@ if ($rowid > 0)
|
|||||||
{
|
{
|
||||||
print "<a class=\"butActionDelete\" href=\"type.php?action=delete&rowid=".$adht->id."\">".$langs->trans("DeleteType")."</a>";
|
print "<a class=\"butActionDelete\" href=\"type.php?action=delete&rowid=".$adht->id."\">".$langs->trans("DeleteType")."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'edit')
|
if ($_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
$htmls = new Form($db);
|
$htmls = new Form($db);
|
||||||
|
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
$adht->id = $rowid;
|
$adht->id = $rowid;
|
||||||
$adht->fetch($rowid);
|
$adht->fetch($rowid);
|
||||||
|
|
||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
|
|
||||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
||||||
$head[$h][1] = $langs->trans("Card");
|
$head[$h][1] = $langs->trans("Card");
|
||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
@ -337,22 +338,22 @@ if ($rowid > 0)
|
|||||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td width="15%">'.$langs->trans("Ref").'</td><td>'.$adht->id.'</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40" value="'.$adht->libelle.'"></td></tr>';
|
print '<tr><td width="15%">'.$langs->trans("Ref").'</td><td>'.$adht->id.'</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans("Label").'</td><td><input type="text" name="libelle" size="40" value="'.$adht->libelle.'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||||
print $htmls->selectyesno("cotisation",$adht->cotisation,1);
|
print $htmls->selectyesno("cotisation",$adht->cotisation,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||||
print $htmls->selectyesno("vote",$adht->vote,1);
|
print $htmls->selectyesno("vote",$adht->vote,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||||
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"90\" rows=\"3\">".$adht->note."</textarea></td></tr>";
|
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"90\" rows=\"3\">".$adht->note."</textarea></td></tr>";
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||||
if ($conf->fckeditor->enabled)
|
if ($conf->fckeditor->enabled)
|
||||||
{
|
{
|
||||||
@ -367,10 +368,10 @@ if ($rowid > 0)
|
|||||||
print '</textarea>';
|
print '</textarea>';
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></td></tr>';
|
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print "</form>";
|
print "</form>";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user