indentation du code
This commit is contained in:
parent
731743c6c9
commit
39d7ceb739
@ -91,9 +91,12 @@ class Adherent
|
|||||||
'/%PASS%/'
|
'/%PASS%/'
|
||||||
);
|
);
|
||||||
$infos = "Prenom : $this->prenom\nNom : $this->nom\nSociete : $this->societe\nAdresse : $this->adresse\nCP : $this->cp\nVille : $this->ville\nPays : $this->pays\nEmail : $this->email\nLogin : $this->login\nPassword : $this->pass\nDate de naissance : $this->naiss\nPhoto : $this->photo\n";
|
$infos = "Prenom : $this->prenom\nNom : $this->nom\nSociete : $this->societe\nAdresse : $this->adresse\nCP : $this->cp\nVille : $this->ville\nPays : $this->pays\nEmail : $this->email\nLogin : $this->login\nPassword : $this->pass\nDate de naissance : $this->naiss\nPhoto : $this->photo\n";
|
||||||
if ($this->public == 1){
|
if ($this->public == 1)
|
||||||
|
{
|
||||||
$infos.="Fiche Publique : Oui\n";
|
$infos.="Fiche Publique : Oui\n";
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$infos.="Fiche Publique : Non\n";
|
$infos.="Fiche Publique : Non\n";
|
||||||
}
|
}
|
||||||
$replace = array (
|
$replace = array (
|
||||||
@ -272,23 +275,22 @@ class Adherent
|
|||||||
Function update()
|
Function update()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$sql = "UPDATE llx_adherent SET ";
|
$sql = "UPDATE llx_adherent SET ";
|
||||||
$sql .= "prenom = '".$this->prenom ."'";
|
$sql .= "prenom = '".$this->prenom ."'";
|
||||||
$sql .= ",nom='".$this->nom."'";
|
$sql .= ",nom='" .$this->nom."'";
|
||||||
$sql .= ",societe='".$this->societe."'";
|
$sql .= ",societe='".$this->societe."'";
|
||||||
$sql .= ",adresse='".$this->adresse."'";
|
$sql .= ",adresse='".$this->adresse."'";
|
||||||
$sql .= ",cp='".$this->cp."'";
|
$sql .= ",cp='" .$this->cp."'";
|
||||||
$sql .= ",ville='".$this->ville."'";
|
$sql .= ",ville='" .$this->ville."'";
|
||||||
$sql .= ",pays='".$this->pays."'";
|
$sql .= ",pays='" .$this->pays."'";
|
||||||
$sql .= ",note='".$this->commentaire."'";
|
$sql .= ",note='" .$this->commentaire."'";
|
||||||
$sql .= ",email='".$this->email."'";
|
$sql .= ",email='" .$this->email."'";
|
||||||
$sql .= ",login='".$this->login."'";
|
$sql .= ",login='" .$this->login."'";
|
||||||
$sql .= ",pass='".$this->pass."'";
|
$sql .= ",pass='" .$this->pass."'";
|
||||||
$sql .= ",naiss='".$this->naiss."'";
|
$sql .= ",naiss='" .$this->naiss."'";
|
||||||
$sql .= ",photo='".$this->photo."'";
|
$sql .= ",photo='" .$this->photo."'";
|
||||||
$sql .= ",public='".$this->public."'";
|
$sql .= ",public='" .$this->public."'";
|
||||||
$sql .= ",statut=".$this->statut;
|
$sql .= ",statut=" .$this->statut;
|
||||||
$sql .= ",fk_adherent_type=".$this->typeid;
|
$sql .= ",fk_adherent_type=".$this->typeid;
|
||||||
$sql .= ",morphy='".$this->morphy."'";
|
$sql .= ",morphy='".$this->morphy."'";
|
||||||
|
|
||||||
@ -299,12 +301,15 @@ class Adherent
|
|||||||
if (!$result)
|
if (!$result)
|
||||||
{
|
{
|
||||||
print $this->db->error();
|
print $this->db->error();
|
||||||
print "<h2><br>$sql<br></h2>";
|
print "<br>$sql<br>";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(sizeof($this->array_options) > 0 ){
|
|
||||||
|
if (sizeof($this->array_options) > 0 )
|
||||||
|
{
|
||||||
$sql = "REPLACE INTO llx_adherent_options SET adhid = $this->id";
|
$sql = "REPLACE INTO llx_adherent_options SET adhid = $this->id";
|
||||||
foreach($this->array_options as $key => $value){
|
foreach($this->array_options as $key => $value)
|
||||||
|
{
|
||||||
// recupere le nom de l'attribut
|
// recupere le nom de l'attribut
|
||||||
$attr=substr($key,8);
|
$attr=substr($key,8);
|
||||||
$sql.=",$attr = '".$this->array_options[$key]."'";
|
$sql.=",$attr = '".$this->array_options[$key]."'";
|
||||||
@ -371,14 +376,19 @@ class Adherent
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/* Fetch adherent corresponding to login passed in argument */
|
/* Fetch adherent corresponding to login passed in argument */
|
||||||
Function fetch_login($login){
|
Function fetch_login($login)
|
||||||
|
{
|
||||||
$sql = "SELECT rowid FROM llx_adherent WHERE login='$login' LIMIT 1";
|
$sql = "SELECT rowid FROM llx_adherent WHERE login='$login' LIMIT 1";
|
||||||
if ( $this->db->query( $sql) ){
|
if ( $this->db->query( $sql) )
|
||||||
if ($this->db->num_rows()){
|
{
|
||||||
|
if ($this->db->num_rows())
|
||||||
|
{
|
||||||
$obj = $this->db->fetch_object(0);
|
$obj = $this->db->fetch_object(0);
|
||||||
$this->fetch($obj->rowid);
|
$this->fetch($obj->rowid);
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print $this->db->error();
|
print $this->db->error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -592,10 +602,12 @@ class Adherent
|
|||||||
// mailman
|
// mailman
|
||||||
if (defined("MAIN_USE_MAILMAN") && MAIN_USE_MAILMAN == 1)
|
if (defined("MAIN_USE_MAILMAN") && MAIN_USE_MAILMAN == 1)
|
||||||
{
|
{
|
||||||
if(!$this->add_to_mailman()){
|
if(!$this->add_to_mailman())
|
||||||
|
{
|
||||||
$err+=1;
|
$err+=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($adht->vote == 'yes' &&
|
if ($adht->vote == 'yes' &&
|
||||||
defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST ==1 &&
|
defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST ==1 &&
|
||||||
defined("MAIN_USE_GLASNOST_AUTO") && MAIN_USE_GLASNOST_AUTO ==1
|
defined("MAIN_USE_GLASNOST_AUTO") && MAIN_USE_GLASNOST_AUTO ==1
|
||||||
@ -1038,12 +1050,16 @@ class Adherent
|
|||||||
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$this->errorstr="Constantes de connection non definies";
|
$this->errorstr="Constantes de connection non definies";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function del_to_mailman()
|
Function del_to_mailman()
|
||||||
{
|
{
|
||||||
if (defined("MAIN_MAILMAN_UNSUB_URL") && MAIN_MAILMAN_UNSUB_URL != '' && defined("MAIN_MAILMAN_LISTS") && MAIN_MAILMAN_LISTS != '')
|
if (defined("MAIN_MAILMAN_UNSUB_URL") && MAIN_MAILMAN_UNSUB_URL != '' && defined("MAIN_MAILMAN_LISTS") && MAIN_MAILMAN_LISTS != '')
|
||||||
@ -1089,10 +1105,13 @@ class Adherent
|
|||||||
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$this->errorstr="Constantes de connection non definies";
|
$this->errorstr="Constantes de connection non definies";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user