-suppression de la creation de l'objet $db dans les pages
-amelioration de la generation de cartes adherents -amelioration de la page de configuration adherents -rajout d'un "cheat code" dans la page const.php pour avoir l'affichage de toutes les contantes (meme celles ayant visible=0) -legere modification du menu des pages adherents
This commit is contained in:
parent
689d0eb54c
commit
6f61fdb9dd
@ -691,7 +691,8 @@ class Adherent
|
|||||||
$mdpass=md5($this->pass);
|
$mdpass=md5($this->pass);
|
||||||
$htpass=crypt($this->pass,initialiser_sel());
|
$htpass=crypt($this->pass,initialiser_sel());
|
||||||
$query = "INSERT INTO spip_auteurs (nom, email, login, pass, htpass, alea_futur, statut) VALUES(\"".$this->prenom." ".$this->nom."\",\"".$this->email."\",\"".$this->login."\",\"$mdpass\",\"$htpass\",FLOOR(32000*RAND()),\"1comite\")";
|
$query = "INSERT INTO spip_auteurs (nom, email, login, pass, htpass, alea_futur, statut) VALUES(\"".$this->prenom." ".$this->nom."\",\"".$this->email."\",\"".$this->login."\",\"$mdpass\",\"$htpass\",FLOOR(32000*RAND()),\"1comite\")";
|
||||||
$mydb=new Db('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
// $mydb=new Db('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
||||||
|
$mydb=new DoliDb('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
||||||
$result = $mydb->query($query);
|
$result = $mydb->query($query);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -721,7 +722,7 @@ class Adherent
|
|||||||
defined('MAIN_SPIP_DB') && MAIN_SPIP_DB != ''
|
defined('MAIN_SPIP_DB') && MAIN_SPIP_DB != ''
|
||||||
){
|
){
|
||||||
$query = "DELETE FROM spip_auteurs WHERE login='".$this->login."'";
|
$query = "DELETE FROM spip_auteurs WHERE login='".$this->login."'";
|
||||||
$mydb=new Db('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
$mydb=new DoliDb('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
||||||
$result = $mydb->query($query);
|
$result = $mydb->query($query);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -751,7 +752,7 @@ class Adherent
|
|||||||
defined('MAIN_SPIP_DB') && MAIN_SPIP_DB != ''
|
defined('MAIN_SPIP_DB') && MAIN_SPIP_DB != ''
|
||||||
){
|
){
|
||||||
$query = "SELECT login FROM spip_auteurs WHERE login='".$this->login."'";
|
$query = "SELECT login FROM spip_auteurs WHERE login='".$this->login."'";
|
||||||
$mydb=new Db('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
$mydb=new DoliDb('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
||||||
$result = $mydb->query($query);
|
$result = $mydb->query($query);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|||||||
@ -178,7 +178,8 @@ class PDF_card extends FPDF {
|
|||||||
'height'=>54,
|
'height'=>54,
|
||||||
'font-size'=>10,
|
'font-size'=>10,
|
||||||
'logo1'=>'logo1.jpg',
|
'logo1'=>'logo1.jpg',
|
||||||
'logo2'=>'logo2.png')
|
'logo2'=>'logo2.jpg',
|
||||||
|
'fond'=>'fond.jpg')
|
||||||
);
|
);
|
||||||
|
|
||||||
// convert units (in to mm, mm to in)
|
// convert units (in to mm, mm to in)
|
||||||
@ -264,12 +265,16 @@ class PDF_card extends FPDF {
|
|||||||
if ($this->_Avery_Name == "CARD") {
|
if ($this->_Avery_Name == "CARD") {
|
||||||
$Tformat=$this->_Avery_Labels["CARD"];
|
$Tformat=$this->_Avery_Labels["CARD"];
|
||||||
$this->_Pointille($_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,1,25);
|
$this->_Pointille($_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,1,25);
|
||||||
|
if($Tformat['fond'] != '' and file_exists($Tformat['fond'])){
|
||||||
|
$this->image($Tformat['fond'],$_PosX,$_PosY,$this->_Width,$this->_Height);
|
||||||
|
}
|
||||||
if($Tformat['logo1'] != '' and file_exists($Tformat['logo1'])){
|
if($Tformat['logo1'] != '' and file_exists($Tformat['logo1'])){
|
||||||
$this->image($Tformat['logo1'],$_PosX+$this->_Width-21,$_PosY+1,20,20);
|
$this->image($Tformat['logo1'],$_PosX+$this->_Width-21,$_PosY+1,20,20);
|
||||||
}
|
}
|
||||||
if($Tformat['logo2'] != '' and file_exists($Tformat['logo2'])){
|
if($Tformat['logo2'] != '' and file_exists($Tformat['logo2'])){
|
||||||
$this->image($Tformat['logo2'],$_PosX+$this->_Width-21,$_PosY+25,20,20);
|
$this->image($Tformat['logo2'],$_PosX+$this->_Width-21,$_PosY+25,20,20);
|
||||||
}
|
}
|
||||||
|
|
||||||
//$this->image('logo1.jpg',$_PosX+$this->_Width-21,$_PosY+1,20);
|
//$this->image('logo1.jpg',$_PosX+$this->_Width-21,$_PosY+1,20);
|
||||||
if ($header!=''){
|
if ($header!=''){
|
||||||
$this->SetXY($_PosX, $_PosY+1);
|
$this->SetXY($_PosX, $_PosY+1);
|
||||||
|
|||||||
@ -54,7 +54,7 @@ if (!isset($annee)){
|
|||||||
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin, adresse,cp,ville,pays, t.libelle as type";
|
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin, adresse,cp,ville,pays, t.libelle as type";
|
||||||
$sql .= " , d.email";
|
$sql .= " , d.email";
|
||||||
$sql .= " FROM llx_adherent as d, llx_adherent_type as t";
|
$sql .= " FROM llx_adherent as d, llx_adherent_type as t";
|
||||||
$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1";
|
$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1 AND datefin > now()";
|
||||||
$sql .= " ORDER BY d.rowid ASC ";
|
$sql .= " ORDER BY d.rowid ASC ";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -38,7 +38,7 @@ function llxHeader($head = "") {
|
|||||||
$menu->add_submenu("liste.php?statut=-1","Adhésions à valider");
|
$menu->add_submenu("liste.php?statut=-1","Adhésions à valider");
|
||||||
|
|
||||||
$menu->add_submenu("liste.php?statut=0","Adhésions résiliées");
|
$menu->add_submenu("liste.php?statut=0","Adhésions résiliées");
|
||||||
|
$menu->add_submenu("cartes/carte.php","Cartes d'adhérents");
|
||||||
if ($user->admin)
|
if ($user->admin)
|
||||||
{
|
{
|
||||||
$menu->add("fiche.php?action=create","Nouvel adhérent");
|
$menu->add("fiche.php?action=create","Nouvel adhérent");
|
||||||
@ -55,6 +55,7 @@ function llxHeader($head = "") {
|
|||||||
$menu->add("index.php","Configuration");
|
$menu->add("index.php","Configuration");
|
||||||
$menu->add_submenu("type.php","Type d'adhérent");
|
$menu->add_submenu("type.php","Type d'adhérent");
|
||||||
$menu->add_submenu("options.php","Champs optionnels");
|
$menu->add_submenu("options.php","Champs optionnels");
|
||||||
|
$menu->add_submenu("/admin/adherent.php","Constantes");
|
||||||
}
|
}
|
||||||
|
|
||||||
left_menu($menu->liste);
|
left_menu($menu->liste);
|
||||||
|
|||||||
@ -36,6 +36,30 @@ $main_use_glasnost_auto = MAIN_USE_GLASNOST_AUTO;
|
|||||||
$main_use_spip = MAIN_USE_SPIP;
|
$main_use_spip = MAIN_USE_SPIP;
|
||||||
$main_use_spip_auto = MAIN_USE_SPIP_AUTO;
|
$main_use_spip_auto = MAIN_USE_SPIP_AUTO;
|
||||||
|
|
||||||
|
$typeconst=array('yesno','texte','chaine');
|
||||||
|
$var=True;
|
||||||
|
|
||||||
|
if ($HTTP_POST_VARS["action"] == 'update' || $HTTP_POST_VARS["action"] == 'add')
|
||||||
|
{
|
||||||
|
if (isset($HTTP_POST_VARS["consttype"]) && $HTTP_POST_VARS["consttype"] != ''){
|
||||||
|
$sql = "REPLACE INTO llx_const SET name='".$_POST["constname"]."', value = '".$HTTP_POST_VARS["constvalue"]."',note='".$HTTP_POST_VARS["constnote"]."', type='".$typeconst[$HTTP_POST_VARS["consttype"]]."',visible=0";
|
||||||
|
}else{
|
||||||
|
$sql = "REPLACE INTO llx_const SET name='".$_POST["constname"]."', value = '".$HTTP_POST_VARS["constvalue"]."',note='".$HTTP_POST_VARS["constnote"]."',visible=0";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($db->query($sql))
|
||||||
|
{
|
||||||
|
Header("Location: adherent.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if (!$result)
|
||||||
|
{
|
||||||
|
print $db->error();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
@ -60,152 +84,196 @@ if ($action == 'unset')
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PDF
|
* Interface de configuration de certaines variables de la partie adherent
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print_titre("Gestion des adhérents : Configurations de parametres");
|
print_titre("Gestion des adhérents : Configurations de parametres");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mailman
|
||||||
|
*/
|
||||||
print '<table border="1" cellpadding="3" cellspacing="0">';
|
print '<table border="1" cellpadding="3" cellspacing="0">';
|
||||||
print '<TR class="liste_titre"><td colspan="4">Modules externes</td></tr>';
|
print "<tr $bc[$var] class=value><td>Mailman</td><td>Système de mailing listes";
|
||||||
print '<TR class="liste_titre">';
|
|
||||||
print '<td>Nom</td>';
|
|
||||||
print '<td>Info</td>';
|
|
||||||
print '<td align="center">Activé</td>';
|
|
||||||
print '<td> </td>';
|
|
||||||
print "</TR>\n";
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>Mailman</td><td>Système de mailing listes';
|
|
||||||
print '</td><td align="center">';
|
print '</td><td align="center">';
|
||||||
|
|
||||||
if ($main_use_mailman == 1)
|
if (defined("MAIN_USE_MAILMAN") && MAIN_USE_MAILMAN == 1)
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
}
|
print "</td><td>\n";
|
||||||
else
|
|
||||||
{
|
|
||||||
print " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</td><td>\n";
|
|
||||||
|
|
||||||
if ($main_use_mailman == 0)
|
|
||||||
{
|
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=MAIN_USE_MAILMAN">activer</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=MAIN_USE_MAILMAN">désactiver</a>';
|
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=MAIN_USE_MAILMAN">désactiver</a>';
|
||||||
}
|
print '</td></tr>';
|
||||||
print '</td></tr>';
|
print '</table>';
|
||||||
|
// Edition des varibales globales rattache au theme Mailman
|
||||||
print '<tr><td>Glasnost</td><td>Système de vote en ligne';
|
$constantes=array('MAIN_MAILMAN_LISTS',
|
||||||
print '</td><td align="center">';
|
'MAIN_MAILMAN_UNSUB_URL',
|
||||||
|
'MAIN_MAILMAN_URL'
|
||||||
if ($main_use_glasnost == 1)
|
);
|
||||||
{
|
form_constantes($constantes);
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print " ";
|
print " ";
|
||||||
|
print "</td><td>\n";
|
||||||
|
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=MAIN_USE_MAILMAN">activer</a>';
|
||||||
|
print '</td></tr>';
|
||||||
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</td><td>\n";
|
print "<HR><BR>\n";
|
||||||
|
/*
|
||||||
if ($main_use_glasnost == 0)
|
* Spip
|
||||||
{
|
*/
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=MAIN_USE_GLASNOST">activer</a>';
|
$var=!$var;
|
||||||
}
|
print '<table border="1" cellpadding="3" cellspacing="0">';
|
||||||
else
|
print "<tr $bc[$var] class=value><td>Spip</td><td>Système de publication en ligne";
|
||||||
{
|
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=MAIN_USE_GLASNOST">désactiver</a>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>Glasnost Auto</td><td>Inscription automatique dans Glasnost';
|
|
||||||
print '</td><td align="center">';
|
print '</td><td align="center">';
|
||||||
|
|
||||||
if (MAIN_USE_GLASNOST_AUTO == 1)
|
if (defined("MAIN_USE_SPIP") && MAIN_USE_SPIP == 1)
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
}
|
print "</td><td>\n";
|
||||||
else
|
|
||||||
{
|
|
||||||
print " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</td><td>\n";
|
|
||||||
|
|
||||||
if (MAIN_USE_GLASNOST == 0)
|
|
||||||
{
|
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=MAIN_USE_GLASNOST_AUTO">activer</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=MAIN_USE_GLASNOST_AUTO">désactiver</a>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>Spip</td><td>Système de publication';
|
|
||||||
print '</td><td align="center">';
|
|
||||||
|
|
||||||
if ($main_use_spip == 1)
|
|
||||||
{
|
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</td><td>\n";
|
|
||||||
|
|
||||||
if ($main_use_spip == 0)
|
|
||||||
{
|
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=MAIN_USE_SPIP">activer</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=MAIN_USE_SPIP">désactiver</a>';
|
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=MAIN_USE_SPIP">désactiver</a>';
|
||||||
}
|
print '</td></tr>';
|
||||||
print '</td></tr>';
|
print '</table>';
|
||||||
|
// Edition des varibales globales rattache au theme Mailman
|
||||||
|
$constantes=array('MAIN_USE_SPIP_AUTO',
|
||||||
print '<tr><td>Spip Auto</td><td>Inscription automatique dans SPIP';
|
'MAIN_SPIP_SERVEUR',
|
||||||
print '</td><td align="center">';
|
'MAIN_SPIP_DB',
|
||||||
|
'MAIN_SPIP_USER',
|
||||||
if ($main_use_spip_auto == 1)
|
'MAIN_SPIP_PASS'
|
||||||
{
|
);
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
form_constantes($constantes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print " ";
|
print " ";
|
||||||
|
print "</td><td>\n";
|
||||||
|
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=MAIN_USE_SPIP">activer</a>';
|
||||||
|
print '</td></tr>';
|
||||||
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</td><td>\n";
|
print "<HR><BR>\n";
|
||||||
|
/*
|
||||||
|
* Glasnost
|
||||||
|
*/
|
||||||
|
$var=!$var;
|
||||||
|
print '<table border="1" cellpadding="3" cellspacing="0">';
|
||||||
|
print "<tr $bc[$var] class=value><td>Glasnost</td><td>Système de vote en ligne";
|
||||||
|
print '</td><td align="center">';
|
||||||
|
|
||||||
if ($main_use_spip_auto == 0)
|
if (defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST == 1)
|
||||||
{
|
{
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=MAIN_USE_SPIP_AUTO">activer</a>';
|
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
|
print "</td><td>\n";
|
||||||
|
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=MAIN_USE_GLASNOST">désactiver</a>';
|
||||||
|
print '</td></tr>';
|
||||||
|
print '</table>';
|
||||||
|
// Edition des varibales globales rattache au theme Mailman
|
||||||
|
$constantes=array('MAIN_USE_GLASNOST_AUTO',
|
||||||
|
'MAIN_GLASNOST_SERVEUR',
|
||||||
|
'MAIN_GLASNOST_USER',
|
||||||
|
'MAIN_GLASNOST_PASS'
|
||||||
|
);
|
||||||
|
form_constantes($constantes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=MAIN_USE_SPIP_AUTO">désactiver</a>';
|
print " ";
|
||||||
|
print "</td><td>\n";
|
||||||
|
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=MAIN_USE_GLASNOST">activer</a>';
|
||||||
|
print '</td></tr>';
|
||||||
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<HR><BR>\n";
|
||||||
|
$var=!$var;
|
||||||
|
/*
|
||||||
|
* Edition des varibales globales non rattache a un theme specifique
|
||||||
|
*/
|
||||||
|
print '<table border="1" cellpadding="3" cellspacing="0">';
|
||||||
|
print "<tr $bc[$var] class=value><td>Variables globales</td><td>Variables globales non rattachées a un thème";
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
$constantes=array('ADH_TEXT_NEW_ADH',
|
||||||
|
'MAIN_MAIL_COTIS_SUBJECT',
|
||||||
|
'MAIN_MAIL_COTIS',
|
||||||
|
'MAIN_MAIL_EDIT_SUBJECT',
|
||||||
|
'MAIN_MAIL_EDIT',
|
||||||
|
'MAIN_MAIL_NEW_SUBJECT',
|
||||||
|
'MAIN_MAIL_NEW',
|
||||||
|
'MAIN_MAIL_RESIL_SUBJECT',
|
||||||
|
'MAIN_MAIL_RESIL',
|
||||||
|
'MAIN_MAIL_VALID_SUBJECT',
|
||||||
|
'MAIN_MAIL_VALID',
|
||||||
|
'MAIN_MAIL_FROM'
|
||||||
|
);
|
||||||
|
form_constantes($constantes);
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
function form_constantes($tableau){
|
||||||
|
// Variables globales
|
||||||
|
global $db,$bc;
|
||||||
|
$form = new Form($db);
|
||||||
|
print '<table border="1" cellpadding="3" cellspacing="0">';
|
||||||
|
print '<TR class="liste_titre">';
|
||||||
|
print '<TD>Description</TD>';
|
||||||
|
print '<TD>Valeur</TD>';
|
||||||
|
print '<TD>Type</TD>';
|
||||||
|
//print '<TD>Note</TD>';
|
||||||
|
print "<TD>Action</TD>";
|
||||||
|
print "</TR>\n";
|
||||||
|
$var=True;
|
||||||
|
|
||||||
|
foreach($tableau as $const){
|
||||||
|
$sql = "SELECT rowid, name, value, type, note FROM llx_const WHERE name='$const'";
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if ($result && ($db->num_rows() == 1)) {
|
||||||
|
$obj = $db->fetch_object(0);
|
||||||
|
$var=!$var;
|
||||||
|
print '<form action="'.$PHP_SELF.'" method="POST">';
|
||||||
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||||
|
print '<input type="hidden" name="constname" value="'.$obj->name.'">';
|
||||||
|
print '<input type="hidden" name="constnote" value="'.stripslashes(nl2br($obj->note)).'">';
|
||||||
|
|
||||||
|
print "<tr $bc[$var] class=value><td>".stripslashes(nl2br($obj->note))."</td>\n";
|
||||||
|
|
||||||
|
print '<td>';
|
||||||
|
if ($obj->type == 'yesno')
|
||||||
|
{
|
||||||
|
$form->selectyesnonum('constvalue',$obj->value);
|
||||||
|
print '</td><td>';
|
||||||
|
$form->select_array('consttype',array('yesno','texte','chaine'),0);
|
||||||
|
}
|
||||||
|
elseif ($obj->type == 'texte')
|
||||||
|
{
|
||||||
|
print '<textarea name="constvalue" cols="35" rows="5"wrap="soft">';
|
||||||
|
print $obj->value;
|
||||||
|
print "</textarea>\n";
|
||||||
|
print '</td><td>';
|
||||||
|
$form->select_array('consttype',array('yesno','texte','chaine'),1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<input type="text" size="30" name="constvalue" value="'.stripslashes($obj->value).'">';
|
||||||
|
print '</td><td>';
|
||||||
|
$form->select_array('consttype',array('yesno','texte','chaine'),2);
|
||||||
|
}
|
||||||
|
print '</td><td>';
|
||||||
|
|
||||||
|
// print '<input type="text" size="15" name="constnote" value="'.stripslashes(nl2br($obj->note)).'">';
|
||||||
|
// print '</td><td>';
|
||||||
|
print '<input type="Submit" value="Update" name="Button"><BR>';
|
||||||
|
print '<a href="'.$PHP_SELF.'?name=$const&action=unset">Delete</a>';
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</table>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -68,7 +68,11 @@ if ($user->admin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT rowid, name, value, type, note FROM llx_const WHERE visible = 1 ORDER BY name ASC";
|
if ($all==1){
|
||||||
|
$sql = "SELECT rowid, name, value, type, note FROM llx_const ORDER BY name ASC";
|
||||||
|
}else{
|
||||||
|
$sql = "SELECT rowid, name, value, type, note FROM llx_const WHERE visible = 1 ORDER BY name ASC";
|
||||||
|
}
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -23,7 +23,7 @@ require("./pre.inc.php");
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$db = new Db();
|
//$db = new Db();
|
||||||
|
|
||||||
print_titre("Gestion des adhesions a l'association");
|
print_titre("Gestion des adhesions a l'association");
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ require($GLOBALS["DOCUMENT_ROOT"]."/adherent_type.class.php");
|
|||||||
require($GLOBALS["DOCUMENT_ROOT"]."/adherents/adherent_options.class.php");
|
require($GLOBALS["DOCUMENT_ROOT"]."/adherents/adherent_options.class.php");
|
||||||
|
|
||||||
|
|
||||||
$db = new Db();
|
//$db = new Db();
|
||||||
$adho = new AdherentOptions($db);
|
$adho = new AdherentOptions($db);
|
||||||
$errmsg='';
|
$errmsg='';
|
||||||
$num=0;
|
$num=0;
|
||||||
@ -135,6 +135,10 @@ if ($errmsg != ''){
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_titre("Nouvel adhérent");
|
print_titre("Nouvel adhérent");
|
||||||
|
if (defined("ADH_TEXT_NEW_ADH") && ADH_TEXT_NEW_ADH !=''){
|
||||||
|
print ADH_TEXT_NEW_ADH;
|
||||||
|
print "<BR>\n";
|
||||||
|
}
|
||||||
print '<ul>';
|
print '<ul>';
|
||||||
print '<li> Les champs Commencant par un <FONT COLOR="red">*</FONT> sont obligatoire';
|
print '<li> Les champs Commencant par un <FONT COLOR="red">*</FONT> sont obligatoire';
|
||||||
print '<li> Les champs Commencant par un <FONT COLOR="blue">*</FONT> seront affiche sur la liste publique des membres. Si vous ne souhaite pas cela <b>DECOCHEZ</b> la case public ci dessous';
|
print '<li> Les champs Commencant par un <FONT COLOR="blue">*</FONT> seront affiche sur la liste publique des membres. Si vous ne souhaite pas cela <b>DECOCHEZ</b> la case public ci dessous';
|
||||||
|
|||||||
@ -24,7 +24,7 @@ require($GLOBALS["DOCUMENT_ROOT"]."/adherent.class.php");
|
|||||||
require($GLOBALS["DOCUMENT_ROOT"]."/adherent_type.class.php");
|
require($GLOBALS["DOCUMENT_ROOT"]."/adherent_type.class.php");
|
||||||
require($GLOBALS["DOCUMENT_ROOT"]."/adherents/adherent_options.class.php");
|
require($GLOBALS["DOCUMENT_ROOT"]."/adherents/adherent_options.class.php");
|
||||||
|
|
||||||
$db = new Db();
|
//$db = new Db();
|
||||||
$adho = new AdherentOptions($db);
|
$adho = new AdherentOptions($db);
|
||||||
|
|
||||||
$errmsg='';
|
$errmsg='';
|
||||||
|
|||||||
@ -28,7 +28,7 @@ require($GLOBALS["DOCUMENT_ROOT"]."/paiement.class.php");
|
|||||||
require($GLOBALS["DOCUMENT_ROOT"]."/adherents/adherent_options.class.php");
|
require($GLOBALS["DOCUMENT_ROOT"]."/adherents/adherent_options.class.php");
|
||||||
|
|
||||||
|
|
||||||
$db = new Db();
|
//$db = new Db();
|
||||||
$adho = new AdherentOptions($db);
|
$adho = new AdherentOptions($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|||||||
@ -24,7 +24,7 @@ require("./pre.inc.php");
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$db = new Db();
|
//$db = new Db();
|
||||||
|
|
||||||
if ($sortorder == "") { $sortorder="ASC"; }
|
if ($sortorder == "") { $sortorder="ASC"; }
|
||||||
if ($sortfield == "") { $sortfield="nom"; }
|
if ($sortfield == "") { $sortfield="nom"; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user