-
-
diff --git a/data/template/lcube6/object_coordination/home/formlecture.mxt b/data/template/lcube6/object_coordination/home/formlecture.mxt
index 0850b20..bf76514 100755
--- a/data/template/lcube6/object_coordination/home/formlecture.mxt
+++ b/data/template/lcube6/object_coordination/home/formlecture.mxt
@@ -8,7 +8,7 @@
diff --git a/lib/object_coordination/community/community.php b/lib/object_coordination/community/community.php
new file mode 100755
index 0000000..538c3a6
--- /dev/null
+++ b/lib/object_coordination/community/community.php
@@ -0,0 +1,740 @@
+
+* @since 2020/12/12
+* @version 0.1
+* @link www.qware.fr
+* @package object_coordination
+* @subpackage Community
+* @copyright Copyleft 2020
+*/
+
+if ( !defined('SYSTEM_IN') )
+{
+ die("Hacking attempt");
+}
+
+/**
+* Classe Community
+*
+* Classe d'affichage des communautés et des inscriptions
+* @package object_coordination
+* @subpackage Community
+*/
+
+Class Community extends CoordinationObj
+{
+/**
+* Function affichant en lecture seule les communautés pour la page publique de Qware
+* @access public
+* @return chaine chaine html
+*/
+ function actionLecture()
+ {
+ global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
+
+ /*Récupération des messages utilisateurs*/
+ addMessageFile("user.ini");
+
+ /* gestion du lib en fonction de la langue courante */
+ $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
+ $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
+ /* fin récupération des codes par defaut */
+
+ /* On inclus la template (voir package.template.php) */
+ WithBlocPath("Community", "actionLecture");
+
+ $tab = $GLOBALS['SYSTEM_MANAGER']['NODE']->getInstanceFromIdPere(1);
+
+ for ($i=0; $i
getLibelle($currentCode);
+ $key = $tab[$i]->getId();
+ if ($lib=="")
+ {
+ $lib=$tabNode[$i]->getLibelle($defaultCode);
+ }
+ $tabNode[$i][0]= $key;
+ $tabNode[$i][1]= $lib;
+ }
+
+ krsort($tabNode);
+ reset($tabNode);
+
+ $idNode = $msg =""; //On fixe à rien l'identifiant du noeud par défaut
+ /* On teste si l'id de communauté est passé (méthode GET ou POST) */
+ if(isset($_REQUEST['param']))
+ {
+ //On masque le texte d'intro affiché par défaut à partir de message
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComTextdefault","");
+
+ //Si aucune valeur, on demande à l'utilisateur de choisir une communauté
+ if(!$_REQUEST['param'])
+ {
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText", getMessage("selectCom"));
+ $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "selectCom";
+ $msg= "selectCom";
+ }
+ else //Sinon on récupère la valeur
+ {
+ $idNode = $_REQUEST['param'];
+ }
+ }
+
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlReturn", htmlentitiesconv($GLOBALS['CONF_PAGE_EXECUTION']."?id=".$GLOBALS['SYSTEM_USER_SESSION']->id."&system=navigationNode&navigationNodeId=".$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId));
+
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->GetId(), "Community", "actionLecture", $msg));
+
+ //Initialisation des compteurs
+ $j =1;
+ $c =1;
+ $nbPrint=0;
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.ClassName","cadre1");
+ //Parcours des noeuds
+ for($i= (count($tabNode)-1);$i>0;$i--)
+ {
+ if ($tabNode[$i][0] != 2 && $tabNode[$i][0] != 3)
+ {
+ if( $nbPrint < 12)
+ {
+ //Affiche la communauté dans la langue courante et formate l'url pour le lien vers le détail
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.col.node",$tabNode[$i][1]);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.urlget",formatUrl($this->getId(), "Community", "actionLecture", "", $tabNode[$i][0]));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("ligne.col.imgPath", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']);
+
+ switch($c)
+ {
+ case 1 :
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","cadre1");
+ break;
+ case 2 :
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","cadre2");
+ break;
+ default :
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","cadre3");
+ break;
+ }
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne.col", "loop");
+ $j++;
+ $nbPrint++;
+ if ($j==5)
+ {
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne", "loop");
+ $c++;
+ $j=1;
+ }
+ }
+
+ //On récupère le nom de la communauté dans la langue courante
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynode", $tabNode[$i][1]);
+
+ if($tabNode[$i][0] == $idNode) //si le noeud de la boucle égale celui sélectionné
+ {
+ //On récupère le texte du noeud choisi par l'internaute
+// $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$idNode;
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$idNode." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId();
+ var_dump($sql);
+ # Exécution de Requete
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+
+ # Teste si il y a des enregistrements
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
+ {
+ $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
+// $text = $list['text_resume'];
+ $text = $list['textentrynode_resume'];
+ //On masque le texte d'intro affiché par défaut à partir de message
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComTextdefault", "");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $text);
+ }
+
+ # Destruction des éléments
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
+ #Affichage des contenus
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText",$tabNode[$i][1]);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("bloc1.entrynodeid",$tabNode[$i][0]);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynodeselected"," selected='selected' ");
+ $url_inscrire = formatUrl($this->GetId(),"Community","formlecture","",$tabNode[$i][0]);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("inscrire", "button", "ok", getMessage("registerCom"), " onclick=\"javascript:window.location.href='$url_inscrire';\"");
+ }
+ else
+ {
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("bloc1.entrynodeid",$tabNode[$i][0]);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynodeselected","");
+ }
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("bloc1", "loop");
+ }
+ }
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne", "loop");
+ ExitBloc();
+ return "";
+ }
+
+/**
+* Function affichant le texte de présentation détaillé pour le noeud d'entrée une fois authentifié
+* @access public
+* @return chaine chaine vide
+*/
+ function actionAccueil()
+ {
+ global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
+
+ /*Récupération des messages utilisateurs*/
+ addMessageFile("user.ini");
+
+ /* gestion du lib en fonction de la langue courante */
+ $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
+ $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
+ /* fin récupération des codes par defaut */
+
+ /* On inclus la template (voir package.template.php) */
+ WithBlocPath("Community", "actionAccueil");
+
+ //Récupération de l'identifiant de la communauté : methode en fin de page
+ $nodeId = $this->recupCommunauty();
+
+ if(is_numeric($nodeId)) //si le noeud existe
+ {
+ //On récupère le texte du noeud choisi par l'internaute
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
+ # Exécution de Requete
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+
+ # Teste si il y a des enregistrements
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
+ {
+ $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
+ $text = $list['text'];
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textAccueil",$text);
+ }else{
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textAccueil",getMessage("NoText"));
+ }
+
+ # Destruction des éléments
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
+ }
+ ExitBloc();
+ return "";
+ }
+
+
+
+/**
+* Function permettant de rafficher le contenu pour modification dans la bd
+* @access public
+* @return chaine chaine html
+*/
+ function actionAdmin()
+ {
+
+ /* On inclus la template (voir package.template.php) */
+ WithBlocPath("Community", "actionAdmin");
+
+ global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
+
+
+ /* gestion du lib en fonction de la langue courante */
+ $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
+ $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
+ /* fin récupération des codes par defaut */
+
+ //Récupération de l'identifiant de la communauté : methode en fin de page
+ $nodeId = $this->recupCommunauty();
+
+ $url=$SCRIPT_NAME;
+ $url=addIdToUrl($url); //Ajoute l'identifiant de navigation à l'url
+ /* fin de l'url générale */
+
+ # Requete sur identifiant de l objet de coordination correspondant
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
+ # Exécution de Requete
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+
+
+ # Teste si il y a des enregistrements
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
+ {
+ $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
+ $text = $list['text'];
+ $text_resume = $list['text_resume'];
+ }
+ else
+ {
+ $text = $text_resume = "";
+ }
+
+ # Récupération des étiquette du formulaire
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("libelle", getMessage("textinfo"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"Community","execAdmin"));
+
+
+ # Destruction des éléments
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
+
+ $wysiwyg = new wysi("text_resume", "fmtextinfo", $text_resume, "fck", "100%","200", ""); //Récupération du Webword
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $wysiwyg->Display());
+
+ $wysiwyg = new wysi("text", "fmtextinfo", $text, "fck", "99%","400", ""); //Récupération du Webword
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("wysiwyg", $wysiwyg->Display());
+
+ ExitBloc();
+ return "";
+ }
+
+/**
+* Function permettant de modifier le contenu dans la bd et redirection(traitement)
+* @access public
+* @return chaine chaine vide
+*/
+ function execAdmin()
+ {
+ global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
+
+ //Récupération de l'identifiant de la communauté : methode en fin de page
+ $nodeId = $this->recupCommunauty();
+
+ # Requete sur identifiant de l objet de coordination correspondant
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
+ # Exécution de Requete
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+
+
+ # Teste si il y a des enregistrements
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
+ {
+ # Requete sur identifiant de l objet de coordination correspondant
+ $sql="UPDATE ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode SET text='".$_POST['text']."',text_resume='".$_POST['text_resume']."' WHERE node_id=".$nodeId;
+
+ # Exécution de Requete
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ }
+ else
+ {
+ # Requete sur identifiant de l objet de coordination correspondant
+ $sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode (text, text_resume, node_id) VALUES ('".$_POST['text']."','".$_POST['text_resume']."',".$nodeId.")";
+
+ # Exécution de Requete
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ }
+
+ # Destruction des éléments
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
+
+ # Redirection vers le formulaire
+ systemRedirect(formatUrl($this->getId(),"Community","actionAdmin","datamodified"));
+ return "";
+ }
+
+
+/**
+* Function permettant d'afficher le formulaire de pré-inscription pour enregistrement dans la bd
+* @access public
+* @param tableau
+* @return chaine chaine html
+*/
+ function formLecture($tabPOST="")
+ {
+ global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
+
+ /*Récupération des messages utilisateurs*/
+ addMessageFile("user.ini");
+ addMessageFile("subscriptions.ini");
+ addMessageFile("adminaccounting.ini");
+
+ /* gestion du lib en fonction de la langue courante */
+ $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
+ $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
+ /* fin récupération des codes par defaut */
+
+ // titlPageInscription + ComText
+ mxPageTitle("titlPageInscription");
+
+ $arrayCallCss = array();
+ $arrayCallCss[] = "data/css/bootstrap-datepicker/1.9.0/bootstrap-datepicker3.min.css";
+ mxCallCss($arrayCallCss);
+
+ $arrayCallJs = array();
+ $arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/bootstrap-datepicker.min.js";
+ $arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/locales/bootstrap-datepicker.fr.min.js";
+ mxCallJs($arrayCallJs);
+
+ $arrayRawJs[] = "\$(document).ready(function(){ $('.datepicker').datepicker(); });";
+ mxRawJs($arrayRawJs);
+
+ /* On inclus la template (voir package.template.php) */
+ WithBlocPath("Community", "formlecture");
+
+ if(isset($_GET['param']))
+ {
+ $myNoeud = $GLOBALS['SYSTEM_MANAGER']['NODE']->createInstance($_GET['param']);
+ $libmyNoeud = $myNoeud->getLibelle($currentCode);
+ $messageInscriptionNoeud = " : ".$libmyNoeud;
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("messageInscriptionNoeud", $messageInscriptionNoeud);
+ }
+ # Récupération des étiquette du formulaire
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"Community","execLecture","",$_GET['param']));
+
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlReturn",formatUrl($this->getId(),"Community","actionLecture"));
+ # Affichage des champs de formulaire pour l'inscription
+ if(!$tabPOST)
+ {
+ $titre = array(getMessage("mr"),getMessage("mrs"), getMessage("miss"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title", "", $titre, getMessage("user_title"), "", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipSelectTitle"), ENT_QUOTES)."\"");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipFirstName"), ENT_QUOTES)."\"", getMessage("user_first_name"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipLastName"), ENT_QUOTES)."\"", getMessage("user_last_name"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipLogin"), ENT_QUOTES)."\"", getMessage("user_login"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "email", "user_mail", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipCourriel"), ENT_QUOTES)."\"", getMessage("user_mail"));
+
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipPassword"), ENT_QUOTES)."\"", getMessage("user_password"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipPassword2"), ENT_QUOTES)."\"", getMessage("user_password"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", "jj/mm/aaaa", "class=\"form\" required=\"true\" data-provide=\"datepicker\" data-date-format=\"dd/mm/yyyy\" data-date-language=\"fr\" title=\"".htmlspecialchars(getMessage("tipBirthDate"), ENT_QUOTES)."\"", getMessage("user_birthdate"));
+
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserMsn"), ENT_QUOTES)."\"", getMessage("user_msn"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserJabber"), ENT_QUOTES)."\"", getMessage("user_jabber"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserFacebook"), ENT_QUOTES)."\"", getMessage("user_facebook"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserMastodon"), ENT_QUOTES)."\"", getMessage("user_mastodon"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserWebsite"), ENT_QUOTES)."\"", getMessage("user_website"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalCode"), ENT_QUOTES)."\"", getMessage("user_postal_code"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."\"", getMessage("user_postal_address"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "text", "user_postal_addressmand", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."\"", getMessage("user_postal_address"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipCity"), ENT_QUOTES)."\"", getMessage("user_city"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipState"), ENT_QUOTES)."\"", getMessage("user_state"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipCountry"), ENT_QUOTES)."\"", getMessage("user_country"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipTel"), ENT_QUOTES)."\"", getMessage("user_tel"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipFax"), ENT_QUOTES)."\"", getMessage("user_fax"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipIAccept"), ENT_QUOTES)."\"");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipAcceptSubscriptionForm"), ENT_QUOTES)."\"");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
+ if( file_exists($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc") )
+ {
+ $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
+ } else
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", htmlspecialchars(getMessage("textNoCharte")));
+ }
+ else // On raffiche les données saisies par l'utilisateur
+ {
+ $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title",$_POST['user_title'], $titre, "", "");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", $_POST['user_first_name']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", $_POST['user_last_name']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", $_POST['user_login']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $_POST['user_mail']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", $_POST['user_birthdate']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", $_POST['user_msn']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", $_POST['user_jabber']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", $_POST['user_facebook']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", $_POST['user_mastodon']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", $_POST['user_website']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", $_POST['user_postal_code']);
+
+ if( isset($_POST['user_postal_adress']) )
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", $_POST['user_postal_adress']);
+ else
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", $_POST['user_postal_addressmand']);
+
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adressmand", "text", "user_postal_adressmand", $_POST['user_postal_adressmand']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", $_POST['user_city']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", $_POST['user_state']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", $_POST['user_country']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", $_POST['user_tel']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", $_POST['user_fax']);
+
+ if( isset($_POST["charteSite"]) && $_POST["charteSite"] == 1 )
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "checked=checked");
+ else
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "");
+
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
+ $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
+ }
+ ExitBloc();
+ return "";
+
+ }
+
+/**
+* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
+* @access public
+* @return chaine chaine vide
+*/
+ function execLecture()
+ {
+ global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
+
+ /* gestion du lib en fonction de la langue courante */
+ $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
+ $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
+ /* fin récupération des codes par defaut */
+
+ /*Récupération des messages utilisateurs*/
+ addMessageFile("user.ini");
+ //On vide la chaine de vérification des champs obligatoires
+ $chaine = "";
+
+ if($_POST)
+ {
+ foreach($_POST as $cle=>$val)
+ {
+ // echo "cle = ".$cle." val =".$val."
";
+ if($val=="" && ($cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country"))
+ {
+ $chaine .= getMessage($cle).", ";
+ }
+ }
+ if($chaine!="")
+ {
+ $chaine .= getMessage('obligatory');
+ }
+ }
+
+/*
+* Olivier case du chemin.... :-(
+* 22/06/05
+*/
+ //Si certains champs sont manquants pour l'inscription
+ if ($chaine != "")
+ {
+ $GLOBALS["SYSTEM_CONTROL"]->messageSystem = $chaine;
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/Community/formlecture.mxt");
+ $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
+ $this->formLecture($_POST);
+ return "";
+ }
+ else
+ {
+ if($_POST["user_password"] != $_POST["user_password2"])
+ {
+ $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "password_error";
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/Community/formlecture.mxt");
+ $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
+ $this->formLecture($_POST);
+ return "";
+ }
+
+ }
+/*
+* Olivier DEVAINE 13/01/05 -> plus besoin de la charte
+*/
+// if(isset($_POST['user_chart']))
+// {
+ /*Inclusion de la librairie UserManagerDb pour effectuer l'insertion et la vérif dans la table sys_user_temp*/
+ include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/User/ressource/usermanagerdb.php");
+ //Création de l'objet
+ $MyManager=new UserManagerDb();
+ //On fixe la table par la méthode getTable
+ $MyManager->setTable("sys_user_temp");
+
+ /*Inclusion de la librairie NodeGroupUserManagerDb pour effectuer l'insertion dans la table sys_node_group_user_temp*/
+ include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/NodeGroupUser/ressource/nodegroupusermanagerdb.php");
+ //Création de l'objet
+ $MyNodeGroupUser=new NodeGroupUserManagerDb();
+ //On fixe la table par la méthode getTable
+ $MyNodeGroupUser->setTable("sys_node_group_user_temp");
+
+ # Teste si il y a des enregistrements sur MyManager (table temporaire) ou sur la table des comptes
+ if (($MyManager->checkValid($_POST["user_login"], $_POST["user_password"]) != 0) || ($GLOBALS['SYSTEM_MANAGER']['USER']->checkValid($_POST["user_login"], $_POST["user_password"]) != 0))
+ {
+ $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "user_exist";
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/Community/formlecture.mxt");
+ $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
+ $this->formLecture($_POST);
+ // systemRedirect(formatUrl($this->getId(),"Community","formLecture","user_exist"));
+ }
+ else
+ {
+ //On créé un nouvel objet User pour effectuer l'insertion de chaque champs
+ $MyUser=new User();
+
+ $MyUser->setTitle($_POST['user_title']);
+ $MyUser->setFirstName($_POST['user_first_name']);
+ $MyUser->setLastName($_POST['user_last_name']);
+ $MyUser->setLogin($_POST['user_login']);
+ $MyUser->setPassword($_POST['user_password']);
+ $MyUser->setMail($_POST['user_mail']);
+ $MyUser->setPostalAddress($_POST['user_postal_address']);
+ $MyUser->setPostalCode($_POST['user_postal_code']);
+ $MyUser->setCity($_POST['user_city']);
+ $MyUser->setState($_POST['user_state']);
+ $MyUser->setCountry($_POST['user_country']);
+ $MyUser->setOrganisation($_POST['user_organisation']);
+ $MyUser->setTel($_POST['user_tel']);
+ $MyUser->setFax($_POST['user_fax']);
+ $MyUser->setComment($_POST['user_comment']);
+ //On enregistre les paramètres
+ $ObjUsersave = $MyManager->saveInstance($MyUser);
+
+ //Insertion du noeud temporaire de l'utilisateur
+ //Champs concernés : user_id, group_id, node_id, is_node_only, is_forbidden
+ $MyNodeUser =new NodeGroupUser();
+ $MyNodeUser->setUserId($ObjUsersave->getId());
+ if(isset($_GET['param']))
+ {
+ $MyNodeUser->setNodeId($_GET['param']);
+ }
+ $MyNodeUser->setGroupId(0);
+ $MyNodeUser->setIsForbidden(0);
+ $MyNodeUser->setIsNodeOnly(0);
+
+ //on enregistre les paramètres
+ $test = $MyNodeGroupUser->saveInstance($MyNodeUser);
+
+ /*Indexation dans le moteur de recherche*/
+ if (includePackage("search.php")){
+ $status=1;
+ Search::addSearch("¶m=".$ObjUsersave->getId(), "usertemp", array("actionManageRegister"=>"actionManageRegister"), $MyUser->getFirstName()." ".$MyUser->getLastName(), $MyUser->getMail()." ".$MyUser->getTel(), "", $status, 0, 0, 0, $_GET['param']);
+ /*On récupère l'oid de l'objet dans les droits selon le nid de la communauté*/
+ /*$oidObj = Search::getOidFromNameAndNode("usertemp", $_GET['param']);
+ if($oidObj != 0)
+ {
+ Search::addSearch("¶m=".$ObjUsersave->getId(), "usertemp", array("actionManageRegister"=>"actionManageRegister"), $MyUser->getFirstName()." ".$MyUser->getLastName(), $MyUser->getMail()." ".$MyUser->getTel(), "", $status, $oidObj);
+ }*/
+ }
+
+ # Redirection vers le formulaire
+ systemRedirect(absoluteUrl("user_subscribe",$_GET['param']));
+ }
+// }
+// else //si la Charte n'est pas validée
+// {
+// $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "chartnessaryaccept";
+// $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/Community/formLecture.mxt");
+// $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
+// $this->formLecture($_POST);
+// }
+ return "";
+ }
+
+
+
+/**
+* Function permettant de modifier le contenu dans la bd et redirection
+* @access private
+* @return chaine entier noeud de configuration
+*/
+ function recupCommunauty()
+ {
+ /* Récupération de la communauté courante */
+ $myEntryNode =$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId; /* Noeud d'entrée de l'utilisateur */
+ $myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($myEntryNode); /* Récupération du Tree correspondant */
+
+ $nodeId=NULL;
+ for ($i=0; $itabFather); $i++)
+ {
+ if ($myTree->tabFather[$i]->getIdPere()==1)
+ {
+ $nodeId=$myTree->tabFather[$i]->getId();
+ break;
+ }
+ }
+ if (is_null($nodeId))
+ {
+ systemRedirect( $GLOBALS["CONF_PAGE_EXECUTION"] );
+ }
+ /* -- Fin Recup Communauté */
+ return $nodeId;
+ }
+
+ function recupCommunityByDomain($domain)
+ {
+ /* Récupération de la communauté courante */
+ $myEntryNode =$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId; /* Noeud d'entrée de l'utilisateur */
+ $myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($myEntryNode); /* Récupération du Tree correspondant */
+
+ $nodeId=NULL;
+ for ($i=0; $itabFather); $i++)
+ {
+ if( ($myTree->tabFather[$i]->getIdPere()==1) )
+ {
+ $nodeId=$myTree->tabFather[$i]->getId();
+ break;
+ }
+ }
+ if (is_null($nodeId))
+ {
+ systemRedirect( $GLOBALS["CONF_PAGE_EXECUTION"] );
+ }
+ /* -- Fin Recup Communauté */
+ return $nodeId;
+ }
+
+ /**
+ * getAllRow4Export : recupere tous les enregistrements utilisé par l'objet de coordination
+ * le tableau est constiué de la nom_du_champ=valeur_du_champ
+ * Si aucune données n'est à exporter, la méthode return null
+ * @access public
+ * @return tableau associatif
+ */
+ function getAllRow4Export(){
+ $nodeId = $this->recupCommunauty();
+ $datas = array();
+
+ if(is_numeric($nodeId)){
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0){
+ $dataReturn = array();
+ while($list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow())
+ $dataReturn[]=$list;
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
+
+ $datas[0]["tableName"]=DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode";
+ $datas[0]["datas"]=$dataReturn;
+ return $datas;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * setAllRow4Import : Insert les donnes en provenance du tableau associatif
+ * le tableau est constiué de la nom_du_champ=valeur_du_champ
+ * Si les enregistrements se sont bien sauvegardés, return true
+ * @access public
+ * @param boolean
+ */
+ function setAllRow4Import($tableau){
+ $nodeId = $this->recupCommunauty();
+
+ if(is_numeric($nodeId)){
+ $sql="DELETE FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ }
+
+ for($j=0;$j < count($tableau);$j++){
+ $tableName = $tableau[$j]["tableName"];
+ $tableElem = $tableau[$j]["datas"];
+
+ for($i=0;$i $value){
+ if(!is_numeric($key)){
+ (!isset($set))?$set=$key:$set.=",".$key;
+ (!isset($values))?$values="'".$value."'":$values.=",'".$value."'";
+ }
+ }
+ $sql = "INSERT INTO ".$tableName." (".$set.") VALUES(".$values.")";
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/lib/object_coordination/home/home.php b/lib/object_coordination/home/home.php
index 236ac7e..a9b3ba3 100755
--- a/lib/object_coordination/home/home.php
+++ b/lib/object_coordination/home/home.php
@@ -2,8 +2,8 @@
/**------------------------------------------------
*
-* Rooty, 2018
-*
+* Granilim (C) 2004-2006, Limousin expansion
+* Limousin expansion contact@granilim.org
* This software is protected by copyright, please
* read the file COPYRIGHT.
* This program is distributed in the hope that it
@@ -16,11 +16,11 @@
*
* @author Initiance
* @since 2004/06/07
-* @version 0.3
-* @link www.rooty.me
+* @version 0.1
+* @link www.granilim.org
* @package object_coordination
* @subpackage Home
-* @copyright Copyright © 2009-2018, Rooty
+* @copyright Copyright © 2004-2006, Limousin expansion
*/
/**
@@ -45,19 +45,22 @@ if ( !defined('SYSTEM_IN') )
Class Home extends CoordinationObj
{
-
+ function tabeCreate()
+ {
+ $tabPictoTabe = array("eye","cogs");
+ $tabTabe = array("TxtTabeView","TxtTabeAdmin");
+ $tabAction = array(array("lectureAdmin"), array("actionAdmin"));
+ $tabUrlTabe = array(formatUrl($this->getId(), "TextInfo", "lectureAdmin"),formatUrl($this->getId(), "TextInfo", "actionAdmin"));
+ printTabeAdmin("TabeB", $tabTabe, $tabUrlTabe, $tabPictoTabe, $tabAction);
+ }
/**
-* Function affichant en lecture seule les communautés pour la page d'authentification de granilim
+* Function affichant en lecture seule le contenu
* @access public
-* @return chaine chaine html
+* @return chaine chaine vide
*/
-
function actionLecture()
{
- //On surcharge la template principale
-// $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/main.mxt");
-// $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
-// $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe();
+ $text = getMessage("NoText");
/*Récupération des messages utilisateurs*/
addMessageFile("user.ini");
@@ -66,256 +69,107 @@ Class Home extends CoordinationObj
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* fin récupération des codes par defaut */
-
- mxPageTitle("titlPageSelectCommunities");
-// $arrayCallCss = array();
-// $arrayCallCss[] = "";
-// mxCallCss($arrayCallCss);
-//
-// $arrayCallJs = array();
-// $arrayCallJs[] = "s";
-// mxCallJs($arrayCallJs);
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "actionLecture");
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
- $tab = $GLOBALS['SYSTEM_MANAGER']['NODE']->getInstanceFromIdPere(1);
-// array_multisort($tab[0], SORT_DESC, SORT_STRING,
-
- for ($i=0; $igetLibelle($currentCode);
- $key = $tab[$i]->getId();
- if ($lib=="")
- {
- $lib=$tabNode[$i]->getLibelle($defaultCode);
- }
- $tabNode[$i][0]= $key;
- $tabNode[$i][1]= $lib;
- }
+ $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/textinfo/".$_SERVER["HTTP_HOST"]."-landingpage.mxt");
- krsort($tabNode);
- reset($tabNode);
-
- $idNode = $msg =""; //On fixe à rien l'identifiant du noeud par défaut
- /* On teste si l'id de communauté est passé (méthode GET ou POST) */
- if(isset($_REQUEST['param']))
- {
- //On masque le texte d'intro affiché par défaut à partir de message
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComTextdefault","");
+ $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
+ $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe();
+
+
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("faviconlink", "data/image/communities/".$_SERVER["HTTP_HOST"].".ico?v4");
+
+ $url =$_SERVER['SCRIPT_NAME'];
+ $url.="?system=authSession";
+ $url=addIdToUrl($url);
+
+ $tabObject =$this->getObjectSon(eid());
+ for ($i=0; $igetClassName()=="home")
+ {
+ $urlArray["id"]=$tabObject[$i][1]->getId();
+ }
+ }
+
+ /* Création de l'URL pour nouveau compte */
+ $urlNewAccount = $_SERVER['SCRIPT_NAME'];
+ $urlNewAccount.= "?system=authNewAccount";
+ $urlNewAccount = addIdToUrl($urlNewAccount);
+
+ $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionNewAccount", formatUrl($urlArray["id"], "Home", "formLecture", "", recupCommunity()));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionNewSubscription", formatUrl($urlArray["id"], "Home", "formLectureAdh", "", recupCommunity()));
- //Si aucune valeur, on demande à l'utilisateur de choisir une communauté
- if(!$_REQUEST['param'])
+ /* Création de l'URL pour rappel du mot de passe */
+ $urlForgotPassword = $_SERVER['SCRIPT_NAME'];
+// $urlForgotPassword.= "?system=authForgotPassword";
+ $urlForgotPassword.= "?msg=forgotPasswordTempDisabled";
+ $urlForgotPassword = addIdToUrl($urlForgotPassword);
+
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("pageTitleHome", $GLOBALS['SYSTEM_TEMPLATE_DEFAULT_TITLE']." ".$GLOBALS['SYSTEM_TEMPLATE_DEFAULT_DESCRIPTION']." - Accueil");
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("ogTitle", $GLOBALS['SYSTEM_TEMPLATE_DEFAULT_TITLE']);
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("ogDescription", $GLOBALS['SYSTEM_TEMPLATE_DEFAULT_DESCRIPTION']);
+
+// $GLOBALS['SYSTEM_TEMPLATE']->MxImage("pictoAuth", $GLOBALS['CONF_DATA_PATH']."data/template/".$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/authorise.png");
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("auth", getMessage("UserPrintAuth"));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("LOGIN", getMessage("UserPrintLogin"));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxFormField("login", "text", "login", "", "title='".getMessage("tipUserPrintLogin")."'");
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("PASSWORD", getMessage("UserPrintPassword"));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxFormField("password", "password", "password", "", "title='".getMessage("tipUserPrintPassword")."'");
+ $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionNewAccount", $urlNewAccount);
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("NEWACCOUNT", getMessage("UserPrintNewAccount"));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("NEWSUBSCRIPTION", getMessage("UserPrintNewSubscription"));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionForgotPassword", $urlForgotPassword);
+ $GLOBALS['SYSTEM_TEMPLATE']->MxText("FORGOTPASSWORD", getMessage("UserPrintForgotPassword"));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionLogin", $url);
+ $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("BtnEnter", getMessage("UserPrintEnter"));
+ $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("titleButton", getMessage("tipUserPrintEnter"));
+// $data=$GLOBALS['SYSTEM_TEMPLATE']->MxWrite();
+
+// $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo WHERE textinfo_id=".$this->getId();
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunityPublic()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId();
+ # Execution de Requete (utilisation de la connexion systeme)
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+
+ # Teste si il y a des enregistrements
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
{
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("linkImageComm","delete");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText",getMessage("selectCom"));
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "selectCom";
- $msg= "selectCom";
- }
- else //Sinon on récupère la valeur
- {
- $idNode = $_REQUEST['param'];
-
+ $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
+// $text = stripslashes($View['textinfo_text_'.$currentCode]);
+ $text = stripslashes($View['textentrynode_text']);
+ # Destruction des resultats
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
+ }else{
+ $text = getMessage("NoText");
}
+
+ # On affecte a la template le texte pour la balise MxText (Template Principale)
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text", $text);
} else {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText",getMessage("selectCom"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("linkImageComm","delete");
- }
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlReturn", htmlentitiesconv($GLOBALS['CONF_PAGE_EXECUTION']."?id=".$GLOBALS['SYSTEM_USER_SESSION']->id."&system=navigationNode&navigationNodeId=".$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId));
-
- //$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlReturn",formatUrl($this->GetId(),"textinfo","actionlectureinfo"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction",formatUrl($this->GetId(),"Home","actionLecture",$msg));
-
- //Initialisation des compteurs
- $j =1;
-// $c =1;
- $nbPrint=0;
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.ClassName","cadre1");
- //Parcours des noeuds
- for($i=0;$i<(count($tabNode));$i++)
- {
- //Permet d'exclure un node_id de communauté de la liste d'enregistrement
- if ($tabNode[$i][0] != 2 && $tabNode[$i][0] != 3)
+ mxPageTitle($GLOBALS['SYSTEM_TEMPLATE_DEFAULT_TITLE']);
+
+ /* On inclus la template (voir package.template.php) */
+ withBlocPath("TextInfo", "actionLectureInfo");
+
+ # Requete sur identifiant de l'objet de coordination correspondant
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunityPublic()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId();
+ # Execution de Requete (utilisation de la connexion systeme)
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ # Teste si il y a des enregistrements
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
{
- if( $nbPrint < 12)
- {
- //Affiche la communauté dans la langue courante et formate l'url pour le lien vers le détail
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.col.node",$tabNode[$i][1]);
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.urlget",formatUrl($this->getId(),"Home","actionLecture","",$tabNode[$i][0]));
-// $GLOBALS['SYSTEM_TEMPLATE']->MxText("ligne.col.imgPath", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']);
-
-// switch($c)
-// {
-// case 1 :
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","cadre1");
-// break;
-// case 2 :
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","cadre2");
-// break;
-// default :
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","cadre3");
-// break;
-// }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne.col", "loop");
- $j++;
- $nbPrint++;
- if ($j==5)
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne", "loop");
- $c++;
- $j=1;
- }
- //Changement de la classe des communauté pour faire varié le fond
-/* $k=$j;
- $couleur=1;
- if(($k%4)==0)
- {
- $couleur++;
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.ClassName","cadre".$couleur);*/
- }
-
- //On récupère le nom de la communauté dans la langue courante
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynode",$tabNode[$i][1]);
-
- if($tabNode[$i][0] == $idNode) //si le noeud de la boucle égale celui sélectionné
- {
- //On récupère le texte du noeud choisi par l'internaute
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$idNode;
- # Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = $list['textentrynode_resume'];
- //On masque le texte d'intro affiché par défaut à partir de message
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComTextdefault","");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $text);
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_text",$text);
- }
-
-
- # Destruction des éléments
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
- #Affichage des contenus
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText",$tabNode[$i][1]); // linkImageComm
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("linkImageComm".".ComText",$tabNode[$i][1]);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("bloc1.entrynodeid",$tabNode[$i][0]);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynodeselected"," selected='selected' ");
- $url_inscrire = formatUrl($this->GetId(),"Home","formlecture", "", $tabNode[$i][0]);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("inscrire", "button", "ok", getMessage("registerCom"), " onclick=\"javascript:window.location.href='$url_inscrire';\"");
- }
- else
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("bloc1.entrynodeid",$tabNode[$i][0]);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynodeselected","");
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("bloc1", "loop");
+ $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
+// $text = stripslashes($View['textinfo_text_'.$currentCode]);
+ $text = stripslashes($View['textentrynode_text']);
+ # Destruction des resultats
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
}
+
+ # On affecte a la template le texte pour la balise MxText (Template Principale)
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text", $text);
}
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne", "loop");
-// ExitBloc();
return "";
-
- //print_r($tab);
-/* http://www.granilim.org/
- function cmp($a, $b)
- {
- if ($GLOBALS["TMP_TAB"][$a]->getId() == $GLOBALS["TMP_TAB"][$b]->getId()) {
- return 0;
- }
- return ($GLOBALS["TMP_TAB"][$a]->getId() > $GLOBALS["TMP_TAB"][$b]->getId()) ? -1 : 1;
- }
-
- $GLOBALS["TMP_TAB"]=&$tab;
- uksort($tab, "cmp");
- reset($tab);
- //echo "
";
- //print_r($tab);
-
- for($i=0;$igetId()."
";
-
- if ($tab[$i]->getId() != 2 && $tab[$i]->getId() != 3)
- {
- if( $i > (count($tab)-12) )
- {
- //Affiche la communauté dans la langue courante et formate l'url pour le lien vers le détail
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.col.node",$tab[$i]->getLibelle($currentCode));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.urlget",formatUrl($this->getId(),"Home","actionLecture","",$tab[$i]->getId()));
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("ligne.col.imgPath", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']);
-
- switch($c)
- {
- case 1 :
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","#99CCFF");
- break;
- case 2 :
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","#9999CC");
- break;
- default :
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.col.color","#6999CC");
- break;
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne.col", "loop");
-
- $j++;
- if ($j==5)
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne", "loop");
- $c++;
- $j=1;
- }
- }
-
- //On récupère le nom de la communauté dans la langue courante
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynode",$tab[$i]->getLibelle($currentCode));
-
- if($tab[$i]->getId() == $idNode) //si le noeud de la boucle égale celui sélectionné
- {
- //On récupère le texte du noeud choisi par l'internaute
- $sql="SELECT * FROM object_textentrynode WHERE node_id=".$idNode;
- # Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = $list['text_resume'];
- //On masque le texte d'intro affiché par défaut à partir de message
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComTextdefault","");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume",$text);
- }
-
-
- # Destruction des éléments
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
- #Affichage des contenus
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText",$tab[$i]->getLibelle($currentCode));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("bloc1.entrynodeid",$tab[$i]->getId());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynodeselected"," SELECTED");
- $url_inscrire = formatUrl($this->GetId(),"Home","formLecture","",$tab[$i]->getId());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("inscrire", "button", "ok", getMessage("registerCom"), "class='BUTTON' onclick=\"javascript:window.location.href='$url_inscrire';\"");
- }
- else
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("bloc1.entrynodeid",$tab[$i]->getId());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynodeselected","");
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("bloc1", "loop");
- }
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("ligne", "loop");
- ExitBloc();
- return "";*/
}
/**
@@ -340,45 +194,29 @@ Class Home extends CoordinationObj
/* fin récupération des codes par defaut */
//Récupération de l'identifiant de la communauté : methode en fin de page
- $nodeId = $this->recupCommunauty("id");
-
- if( isset($_POST["rules"]) && $_POST["rules"]==1 )
- {
- $GLOBALS["SYSTEM_MANAGER"]["USER"]->updateCharteStatus($GLOBALS["SYSTEM_USER_SESSION"]->user->getId());
- $GLOBALS["SYSTEM_USER_SESSION"]->user->updateCharteStatus(1);
-
- }
+ $nodeId = $this->recupCommunauty();
if(is_numeric($nodeId)) //si le noeud existe
{
//On récupère le texte du noeud choisi par l'internaute
$sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
- # Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ # Exécution de Requete
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = $list['textentrynode_text'];
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textAccueil",$text);
- }else{
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textAccueil",getMessage("NoText"));
- }
-
- if( $GLOBALS["SYSTEM_USER_SESSION"]->user->getCharteStatus() == 0)
+ # Teste si il y a des enregistrements
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
{
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textCharteLegion",file_get_contents('data/message/fr/charte_'.$nodeId.'.inc'));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("loadcharte",".load()");
- } else {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("loadcharte","");
+ $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
+ $text = $list['text'];
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textAccueil",$text);
+ }else{
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textAccueil",getMessage("NoText"));
}
# Destruction des éléments
$GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
}
ExitBloc();
-
return "";
}
@@ -391,248 +229,63 @@ Class Home extends CoordinationObj
*/
function actionAdmin()
{
-
- /* On inclus la template (voir package.template.php) */
-// WithBlocPath("Home", "actionAdmin");
-//
-// global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
-//
-//
-// /* gestion du lib en fonction de la langue courante */
-// $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
-// $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
-// /* fin récupération des codes par defaut */
-//
-// //Récupération de l'identifiant de la communauté : methode en fin de page
-// $nodeId = $this->recupCommunauty();
-//
-// $url=$SCRIPT_NAME;
-// $url=addIdToUrl($url); //Ajoute l'identifiant de navigation à l'url
-// /* fin de l'url générale */
-//
-// # Requete sur identifiant de l objet de coordination correspondant
-// $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
-// # Exécution de Requete
-// $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-//
-//
-// # Teste si il y a des enregistrements
-// if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
-// {
-// $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
-// $text = $list['textentrynode_text'];
-// $text_resume = $list['textentrynode_resume'];
-// }
-// else
-// {
-// $text = $text_resume = "";
-// }
-//
-// # Récupération des étiquette du formulaire
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("libelle", getMessage("textinfo"));
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"Home","execAdmin"));
-//
-//
-// # Destruction des éléments
-// $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult($result);
-//
-// $wysiwyg = new wysi("text_resume", "fmtextinfo", $text_resume, "fck", "100%","200", ""); //Récupération du Webword
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $wysiwyg->Display());
-//
-// $wysiwyg = new wysi("text", "fmtextinfo", $text, "fck", "99%","400", ""); //Récupération du Webword
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("wysiwyg", $wysiwyg->Display());
-//
-// ExitBloc();
-// return "";
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
- /* On inclus la template (voir package.template.php) */
-
/*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
+// addMessageFile("user.ini");
/* gestion du lib en fonction de la langue courante */
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* fin récupération des codes par defaut */
- mxPageTitle("pagetitle");
+ mxPageTitle("actionAdminTitlePage");
- if( $GLOBALS["SYSTEM_USER_SESSION"]->getObjectIdByLabel(array(nid(), 'ComendatoreNews')) )
- {
- $arrayCallCss = array();
- $arrayCallCss[] = "data/template/".$GLOBALS["SYSTEM_USER_SESSION"]->getCurrentTemplate()."/object_coordination/comendatorenews/comendatorenews.css";
- mxCallCss($arrayCallCss);
- }
+ /* Instanciation du wysiwyg */
+ $wysiResume = new Wysi("contentResumeInfos", "postTextInfos", "fr_FR", "", "summernote");
+ $wysiResume->includeDependancy();
-// $arrayCallCss = array();
-// $arrayCallCss[] = "";
-// mxCallCss($arrayCallCss);
-//
-// $arrayCallJs = array();
-// $arrayCallJs[] = "s";
-// mxCallJs($arrayCallJs);
-
- WithBlocPath("Home", "actionAdmin");
-// $this->cssPath="data/template/".$GLOBALS["SYSTEM_USER_SESSION"]->getCurrentTemplate()."/object_coordination/comendatorenews/comendatorenews.css";
-// if( !is_file( $this->cssPath ) )
-// $this->cssPath="data/template/default/object_coordination/comendatorenews/comendatorenews.css";
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("csspath",$this->cssPath);
+ $wysiText = new Wysi("contentTextInfos", "postTextInfos", "fr_FR", "", "summernote");
+ $wysiText->includeRawJs();
+
+ //$this->tabeCreate();
+ $text =getMessage("NoText");
- # On récupère la liste des objets pour le noeud
-// var_dump($GLOBALS["SYSTEM_USER_SESSION"]->getObjectIdByLabel(array(nid(), 'ComendatoreNews')));
-// $objIdForum = $GLOBALS["SYSTEM_USER_SESSION"]->getObjectIdByLabel(array(nid(), 'NHSystemesForum'));
-// $objIdNews = $GLOBALS["SYSTEM_USER_SESSION"]->getObjectIdByLabel(array(nid(), 'ComendatoreNews'));
+ /* On inclus la template (voir package.template.php) */
+ withBlocPath("Home", "actionAdmin");
- $text = getMessage("NoText");
- $this->communityID=$this->recupCommunautyByDomain($_SERVER['SERVER_NAME']);
- $this->communityLib=$this->recupCommunauty('lib',$this->communityID,$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode());
- //Récupération de l'identifiant de la communauté : methode en fin de page
- $nodeId = $this->recupCommunauty("id");
-
- if( isset($_POST["rules"]) && $_POST["rules"]==1 )
- {
- $GLOBALS["SYSTEM_MANAGER"]["USER"]->updateCharteStatus($GLOBALS["SYSTEM_USER_SESSION"]->user->getId());
- $GLOBALS["SYSTEM_USER_SESSION"]->user->updateCharteStatus(1);
-
- }
+ /* creation des onglets */
+ $this->tabeCreate();
# Requete sur identifiant de l objet de coordination correspondant
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
- # Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunityPublic()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId();
+ # Execution de Requete
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = $list['textentrynode_text'];
- $text_resume = $list['textentrynode_resume'];
- }
- else
- {
- $text = $text_resume = "";
- }
-
- # Récupération des étiquette du formulaire
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("libelle", getMessage("textinfo"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"Home","execAdmin"));
-
-
- # Destruction des éléments
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult($result);
-
-// $wysiwyg = new wysi("text_resume", "fmtextinfo", $text_resume, "fck", "100%","200", ""); //Récupération du Webword
- $wysiwyg = new Wysi("text_resume", "fmtextinfo", "fr_FR", "", $pref="summernote");
- $wysiwyg->includeDependancy();
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $wysiwyg->Display());
-
-// $wysiwyg = new wysi("text", "fmtextinfo", $text, "fck", "99%","400", ""); //Récupération du Webword
- $wysiwyg = new Wysi("text", "fmtextinfo", "fr_FR", "", $pref="summernote");
- $wysiwyg->includeDependancy();
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("wysiwyg", $wysiwyg->Display());
-
- if( $GLOBALS["SYSTEM_USER_SESSION"]->getObjectIdByLabel(array(nid(), 'ComendatoreNews')) )
+ # Teste si il y a des enregistrements
+ if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
{
- # Requete sur identifiant de l'objet de coordination correspondant
- includeDep("comendatorenews/comendatorenewsmanager.php");
- $newsmanager = new ComendatoreNewsManager;
- $lastnews = $newsmanager->getLastXNewsByComId(8, "all", $this->communityID, $this->communityLib, $currentCode);
-
- includeDep("nhsystemesforum/nhsystemesforummanager.php");
- $subjectmanager = new NHSystemesForumManager($GLOBALS["SYSTEM_USER_SESSION"]->getObjectIdByLabel(array(nid(), 'LCubeForum')), 2, 2, 2);
- $lastactivethreads = $subjectmanager->getLastsForumSubjects(8);
-
- if( $GLOBALS["SYSTEM_USER_SESSION"]->user->getCharteStatus() == 0)
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocCharte".".textCharteLegion",file_get_contents('data/message/'.$currentCode.'/rules_'.$_SERVER["HTTP_HOST"].'.inc'));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocCharte".".loadcharte",".load()");
- } else {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocCharte", "delete");
- }
-
- if( $lastnews )
- {
- for ($i=0; $iMxText("slideshow".".slideshowlastnewsthreads".".newsBloc".".lastnews".".lastnewsdate", $dateFShortNews, "","");
- $chainsUtils = new Chaine($lastnews[$i][5]);
- $title = $chainsUtils->chainCut(58);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("slideshow".".slideshowlastnewsthreads".".newsBloc".".lastnews".".lastnewstitle", $title, "","");
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("slideshow".".slideshowlastnewsthreads".".newsBloc".".lastnews".".newslink", "#");
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("slideshow".".slideshowlastnewsthreads".".newsBloc".".lastnews", "loop");
- }
- for ($i=0; $i<(count($lastnews) >= 8 ? 8 : count($lastnews)); $i++)
- {
- if( is_file("data/image/icons/news/".$lastnews[$i][4] ) )
- $GLOBALS['SYSTEM_TEMPLATE']->MxImage("news".".iconBloc".".icon", "data/image/icons/news/".$lastnews[$i][4], $lastnews[$i][5], "", 32);
- else
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("news".".iconBloc", "delete");
- if( $currentCode == "fr" ) {
- setlocale(LC_TIME, "fr_FR");
- // $dateFLongNews = date("F, jS H:i",$lastnews[$i][2]);
- $dateFLongNews = utf8_encode(strftime( "%a %d %b, %H:%M" , $lastnews[$i][2] ));
- } else
- $dateFLongNews = date("F, jS g:ia",$lastnews[$i][2]);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("news".".newsdate", $dateFLongNews, "","");
- $chainsUtils = new Chaine($lastnews[$i][5]);
- $title = $chainsUtils->chainCut(58);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("news".".newstitle", $title, "","");
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("news".".newslink", "#");
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("news".".newscontent", $lastnews[$i][6], "","");
- $nbComments = $newsmanager->getNumberComment($lastnews[$i][0]);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("news".".lblnewscomments", $nbComments > 1?getMessage("lblnewscomments"):getMessage("lblnewscomment"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("news".".newscomments", $nbComments > 0?$nbComments:getMessage("lblnonewscomments"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("news".".lblnewscommentslink", getMessage("lblnewscommentslink"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("news", "loop");
- }
- } else {
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("slideshow".".slideshowlastnewsthreads".".newsBloc", "delete");
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("news", "delete");
- }
-
- if( isset($lastactivethreads) && $lastactivethreads != '' ) {
- for ($i=0; $iMxText("slideshow".".slideshowlastnewsthreads".".threadsBloc".".activethreads".".activethreadsdate", date("m/d H:i",$lastactivethreads[$i][6]), "","");
- $chainsUtils = new Chaine($lastactivethreads[$i][2]);
- $title = $chainsUtils->chainCut(58);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("slideshow".".slideshowlastnewsthreads".".threadsBloc".".activethreads".".activethreadstitle", $title, "","");
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("slideshow".".slideshowlastnewsthreads".".threadsBloc".".activethreads".".threadlink", formatUrl($objIdForum,"NHSystemesForum","adminViewSubject")."&c=".$lastactivethreads[$i][13]."&r=".$lastactivethreads[$i][12]."&s=".$lastactivethreads[$i][0]);
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("slideshow".".slideshowlastnewsthreads".".threadsBloc".".activethreads", "loop");
- }
- } else {
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("slideshow".".slideshowlastnewsthreads".".threadsBloc", "delete");
- }
+ # On récupère les données en variable
+ $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
+ if($View['textentrynode_resume'] != "")
+ $resume = $View['textentrynode_resume'];
+ if($View['textentrynode_text'] != "")
+ $text = $View['textentrynode_text'];
+ # Destruction des resultats
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
+ } else {
+ $text = getMessage("");
}
-// $lastmovies = array();
-// $lastmovies[0][2] = "01/20 7:48am";
-// $lastmovies[0][4] = "First down of Morchok heroic !";
-// $lastmovies[1][2] = "01/21 19:48am";
-// $lastmovies[1][4] = "Second down of Morchok heroic !";
- if( isset($lastmovies) ) {
- for ($i=0; $iMxText("slideshow".".slideshowlastmovies".".moviesBloc".".lastmovies".".lastmoviesdate", date("F, jS g:ia",$lastnews[$i][2]), "","");
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("slideshow".".slideshowlastmovies".".moviesBloc".".lastmovies".".lastmoviestitle", $lastmovies[$i][4], "","");
-// $nbMsg = $newsmanager->getNumberComment($lastnews[$i][0]);
-//
-// $GLOBALS['SYSTEM_TEMPLATE']->MxText("slideshow".".slideshowlastmovies."."lastmovies".".lblmoviemsgs", $nbMsg > 1?getMessage("lblmoviemsgs"):getMessage("lblmoviemsg"));
-// $GLOBALS['SYSTEM_TEMPLATE']->MxText("slideshow".".slideshowlastmovies."."lastmovies".".lblmoviemsgs", $nbMsg > 0?$nbMsg:getMessage("lblnomoviemsg"));
-// $GLOBALS['SYSTEM_TEMPLATE']->MxText("slideshow".".slideshowlastmovies."."lastmovies".".lblmoviecommentslink", getMessage("lblmoviecommentslink"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("slideshow".".slideshowlastmovies".".moviesBloc".".lastmovies", "loop");
- }
- } else
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("slideshow".".slideshowlastmovies", "delete");
+ // Résumé de la communauté
+ $wysiResume->SetContent($resume);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("wysiResume", $wysiResume->Display());
+
+ // Texte complet de la communauté
+ $wysiText->SetContent($text);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("wysiText", $wysiText->Display());
- return "";
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("currentLang", $currentCode);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(), "Home", "execAdmin"));
+ return "";
}
/**
@@ -642,1222 +295,38 @@ Class Home extends CoordinationObj
*/
function execAdmin()
{
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
-
- //Récupération de l'identifiant de la communauté : methode en fin de page
- $nodeId = $this->recupCommunauty();
+ global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
# Requete sur identifiant de l objet de coordination correspondant
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId;
+ $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunityPublic()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId();
# Exécution de Requete
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
# Teste si il y a des enregistrements
if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
+ {
# Requete sur identifiant de l objet de coordination correspondant
- $sql="UPDATE ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode SET textentrynode_text='".$_POST['text']."',textentrynode_resume='".$_POST['text_resume']."' WHERE node_id=".$nodeId;
-
+ $sql="UPDATE ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode SET textentrynode_text='".$_POST['contentTextInfos']."', textentrynode_resume='".$_POST['contentResumeInfos']."' WHERE node_id=".recupCommunityByDomain($_SERVER["HTTP_HOST"])." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId();
# Exécution de Requete
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
}
else
{
# Requete sur identifiant de l objet de coordination correspondant
- $sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode (node_id, textentrynode_resume, textentrynode_text) VALUES ('".$nodeId."','".$_POST['text_resume']."','".$_POST['text']."')";
+ $sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode (textentrynode_text, textentrynode_resume, node_id, langue_id) VALUES ('".$_POST['contentTextInfos']."','".$_POST['contentResumeInfos']."',".recupCommunityPublic().",".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId().")";
# Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
+ $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
}
# Destruction des éléments
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult($result);
+ $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
# Redirection vers le formulaire
- systemRedirect(formatUrl($this->getId(),"Home","actionAdmin","datamodified"));
+ systemRedirect(formatUrl($this->getId(),"Home", "actionAdmin", "datamodified"));
return "";
}
-
-/**
-* Function permettant d'afficher le formulaire de pré-inscription pour enregistrement dans la bd
-* @access public
-* @param tableau
-* @return chaine chaine html
-*/
- function formLecture($tabPOST="", $errorInfo="")
- {
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
- $_SESSION['redirect']=$_SERVER['REQUEST_URI'];
-// var_dump($_POST);
-// phpinfo();
-
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscriptions.ini");
- addMessageFile("adminaccounting.ini");
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- // titlPageInscription + ComText
- mxPageTitle("titlPageInscription");
-
- $arrayCallCss = array();
- $arrayCallCss[] = "data/css/bootstrap-datepicker/1.9.0/bootstrap-datepicker3.min.css";
- mxCallCss($arrayCallCss);
-
- $arrayCallJs = array();
- $arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/bootstrap-datepicker.min.js";
- $arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/locales/bootstrap-datepicker.fr.min.js";
- mxCallJs($arrayCallJs);
-
- $arrayRawJs[] = "\$(document).ready(function(){ $('.datepicker').datepicker(); });";
- mxRawJs($arrayRawJs);
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "formlecture");
-
- if(isset($_GET['param']) && (is_numeric($_GET['param'])))
- {
- $myNoeud = $GLOBALS['SYSTEM_MANAGER']['NODE']->createInstance($_GET['param']);
- $libmyNoeud = $myNoeud->getLibelle($currentCode);
- $messageInscriptionNoeud = " : ".$libmyNoeud;
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("messageInscriptionNoeud", $messageInscriptionNoeud);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText", $libmyNoeud);
-
- //On récupère le texte du noeud choisi par l'internaute
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$_GET['param'];
- # Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = $list['textentrynode_resume'];
- //On masque le texte d'intro affiché par défaut à partir de message
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $text);
- }
- # Destruction des éléments
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
-
- $tabObject =$this->getObjectSon(eid());
- if (($this->recupCommunauty("ctype") == "asso") && (count($tabObject) >> 0) )
- {
- for ($i=0; $igetClassName()=="CorporateInfos")
- {
- $urlArray["id"]=$tabObject[$i][1]->getId();
- $urlArray["classname"]=$tabObject[$i][0]->getClassName();
-// $urlArray["methodname"]=$tabObject[$i][0]->getMethodName();
- }
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkStatuts", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","2"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkRegInt", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","3"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkChartConf", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","4"));
- }
- }
- # Récupération des étiquette du formulaire
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("WarnNotSubs", htmlspecialchars(getMessage("WarnNotSubs1")).$libmyNoeud.htmlspecialchars(getMessage("WarnNotSubs2")));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"Home","execLecture","",$_GET['param']));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlReturn",formatUrl($this->getId(),"Home","actionLecture"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlQaptcha", formatUrl($this->getId(),"Home","formLectureQaptcha"));
-
- includeBO("subscriptions/subscriptionsforms.php");
- $subscriptionsforms = new SubscriptionsForms();
- $allSubscriptionsForms = $subscriptionsforms->doLoadAllSubscriptionsForms();
-
-// var_dump($allSubscriptionsForms);
-
-// $arrPaymentMethods = array();
-// $arrPaymentMethods["money"]="Liquide";
-// $arrPaymentMethods["check"]="Chèque";
-// if( (is_file("lib/object_business/paypal/paypal.php")) )
-// $arrPaymentMethods["paypal"]="paypal";
-
- includeBO("payments/payments.php");
- $paymentMethods = new Payments();
- $arrPaymentMethods = $paymentMethods->getListSolutions();
-
- # Affichage des champs de formulaire pour l'inscription
- if(!$tabPOST)
- {
- $titre = array(getMessage("mr"),getMessage("mrs"), getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title", "", $titre, getMessage("user_title"), "", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipSelectTitle"), ENT_QUOTES)."\"");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipFirstName"), ENT_QUOTES)."\"", getMessage("user_first_name"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipLastName"), ENT_QUOTES)."\"", getMessage("user_last_name"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipLogin"), ENT_QUOTES)."\"", getMessage("user_login"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "email", "user_mail", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipCourriel"), ENT_QUOTES)."\"", getMessage("user_mail"));
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipPassword"), ENT_QUOTES)."\"", getMessage("user_password"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipPassword2"), ENT_QUOTES)."\"", getMessage("user_password"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", "jj/mm/aaaa", "class=\"form\" required=\"true\" data-provide=\"datepicker\" data-date-format=\"dd/mm/yyyy\" data-date-language=\"fr\" title=\"".htmlspecialchars(getMessage("tipBirthDate"), ENT_QUOTES)."\"", getMessage("user_birthdate"));
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserMsn"), ENT_QUOTES)."\"", getMessage("user_msn"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserJabber"), ENT_QUOTES)."\"", getMessage("user_jabber"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserFacebook"), ENT_QUOTES)."\"", getMessage("user_facebook"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserMastodon"), ENT_QUOTES)."\"", getMessage("user_mastodon"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserWebsite"), ENT_QUOTES)."\"", getMessage("user_website"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalCode"), ENT_QUOTES)."\"", getMessage("user_postal_code"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."\"", getMessage("user_postal_address"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "text", "user_postal_addressmand", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."\"", getMessage("user_postal_address"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipCity"), ENT_QUOTES)."\"", getMessage("user_city"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipState"), ENT_QUOTES)."\"", getMessage("user_state"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipCountry"), ENT_QUOTES)."\"", getMessage("user_country"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipTel"), ENT_QUOTES)."\"", getMessage("user_tel"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipFax"), ENT_QUOTES)."\"", getMessage("user_fax"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipIAccept"), ENT_QUOTES)."\"");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipAcceptSubscriptionForm"), ENT_QUOTES)."\"");
-// for ($i=0; $iMxText("blocSubscriptionsForms".".subscriptionsforms".".name", getMessage($allSubscriptionsForms[$i]["subscription_type"]));
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".subscriptionsforms".".amount", $allSubscriptionsForms[$i]["subscription_amount"]);
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "", "");
-// $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocSubscriptionsForms".".subscriptionsforms", "loop");
-// }
-// foreach( $arrPaymentMethods as $key => $value )
-// {
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".paymentMethods".".name", getMessage("lblPayMtd_".$key));
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "", "");
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocSubscriptionsForms".".paymentMethods", "loop");
-// }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
- if( file_exists($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc") )
- {
- $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
- } else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", htmlspecialchars(getMessage("textNoCharte")));
- }
- else // On raffiche les données saisies par l'utilisateur
- {
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title",$_POST['user_title'], $titre, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", $_POST['user_first_name']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", $_POST['user_last_name']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", $_POST['user_login']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $_POST['user_mail']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", $_POST['user_birthdate']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", $_POST['user_msn']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", $_POST['user_jabber']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", $_POST['user_facebook']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", $_POST['user_mastodon']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", $_POST['user_website']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", $_POST['user_postal_code']);
- if( isset($_POST['user_postal_adress']) )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", $_POST['user_postal_adress']);
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", $_POST['user_postal_addressmand']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adressmand", "text", "user_postal_adressmand", $_POST['user_postal_adressmand']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", $_POST['user_city']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", $_POST['user_state']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", $_POST['user_country']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", $_POST['user_tel']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", $_POST['user_fax']);
- if( isset($_POST["charteSite"]) && $_POST["charteSite"] == 1 )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "checked=checked");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "");
-// if( $_POST["subscriptionform"] == 1 )
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "cheched=checked");
-// else
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "");
-// for ($i=0; $iMxText("blocSubscriptionsForms".".subscriptionsforms".".name", getMessage($allSubscriptionsForms[$i]["subscription_type"]));
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".subscriptionsforms".".amount", $allSubscriptionsForms[$i]["subscription_amount"]);
-// if( isset($allSubscriptionsForms[$i]["subscription_type"]) && $_POST["subscriptiontype"] == $allSubscriptionsForms[$i]["subscription_type"] )
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "checked=checked", "");
-// else
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "", "");
-// $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocSubscriptionsForms".".subscriptionsforms", "loop");
-// }
-// foreach( $arrPaymentMethods as $key => $value )
-// {
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".paymentMethods".".name", getMessage("lblPayMtd_".$key));
-// if( isset($_POST["paymentMethod"]) && $_POST["paymentMethod"] == $key )
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "checked=checked", "");
-// else
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "", "");
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocSubscriptionsForms".".paymentMethods", "loop");
-// }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
- $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
- }
- ExitBloc();
- return "";
- }
-
-/**
-* Function permettant d'afficher le formulaire d'adhésion pour enregistrement dans la bd
-* @access public
-* @param tableau
-* @return chaine chaine html
-*/
- function formLectureAdh($tabPOST="")
- {
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
- $_SESSION['redirect']=$_SERVER['REQUEST_URI'];
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "formlectureadh");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscriptions.ini");
- addMessageFile("adminaccounting.ini");
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("titlPageSubscription", getMessage("titlPageSubscription"));
-
- if(isset($_GET['param']) && (is_numeric($_GET['param'])))
- {
- $myNoeud = $GLOBALS['SYSTEM_MANAGER']['NODE']->createInstance($_GET['param']);
- $libmyNoeud = $myNoeud->getLibelle($currentCode);
-// $messageInscriptionNoeud = " : ".$libmyNoeud;
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("messageInscriptionNoeud", $libmyNoeud);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText", $libmyNoeud);
-
- //On récupère le texte du noeud choisi par l'internaute
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$_GET['param'];
- # Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = $list['textentrynode_resume'];
- //On masque le texte d'intro affiché par défaut à partir de message
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $text);
- }
- # Destruction des éléments
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
-
- $tabObject =$this->getObjectSon(eid());
- if (($this->recupCommunauty("ctype") == "asso") && (count($tabObject) >> 0) )
- {
- for ($i=0; $igetClassName()=="CorporateInfos")
- {
- $urlArray["id"]=$tabObject[$i][1]->getId();
- $urlArray["classname"]=$tabObject[$i][0]->getClassName();
- }
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("linkAdhPart", formatUrl($this->getId(),"Home","formLectureAdhPart","",$_GET['param']));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("linkAdhSoc", formatUrl($this->getId(),"Home","formLectureAdhSoc","",$_GET['param']));
- }
- }
-
- ExitBloc();
- return "";
- }
-
-/**
-* Function permettant d'afficher le formulaire d'adhésion pour enregistrement dans la bd
-* @access public
-* @param tableau
-* @return chaine chaine html
-*/
- function formLectureAdhPart($tabPOST="")
- {
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
- $_SESSION['redirect']=$_SERVER['REQUEST_URI'];
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "formlectureadhpart");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscriptions.ini");
- addMessageFile("adminaccounting.ini");
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("titlPageSubscriptionPart", getMessage("titlPageSubscriptionPart"));
-
- if(isset($_GET['param']) && (is_numeric($_GET['param'])))
- {
- $myNoeud = $GLOBALS['SYSTEM_MANAGER']['NODE']->createInstance($_GET['param']);
- $libmyNoeud = $myNoeud->getLibelle($currentCode);
-// $messageInscriptionNoeud = " : ".$libmyNoeud;
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("messageInscriptionNoeud", $libmyNoeud);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText", $libmyNoeud);
-
- //On récupère le texte du noeud choisi par l'internaute
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$_GET['param'];
- # Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = $list['textentrynode_resume'];
- //On masque le texte d'intro affiché par défaut à partir de message
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $text);
- }
- # Destruction des éléments
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
-
- $tabObject =$this->getObjectSon(eid());
- if (($this->recupCommunauty("ctype") == "asso") && (count($tabObject) >> 0) )
- {
- for ($i=0; $igetClassName()=="CorporateInfos")
- {
- $urlArray["id"]=$tabObject[$i][1]->getId();
- $urlArray["classname"]=$tabObject[$i][0]->getClassName();
-// $urlArray["methodname"]=$tabObject[$i][0]->getMethodName();
- }
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkStatuts", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","2"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLStatuts", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/2014-LCube-Statuts-000001.pdf");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkRegInt", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","3"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLRegInt", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkChartConf", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","4"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLChartConf", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/charte de confidentialité.pdf");
- }
- }
- # Récupération des étiquette du formulaire
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"Home","execLectureAdhPart","",$_GET['param']));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlReturn",formatUrl($this->getId(),"Home","formLectureAdh","",$_GET['param']));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlQaptcha", formatUrl($this->getId(),"Home","formLectureQaptcha"));
-
- includeBO("subscriptions/subscriptionsforms.php");
- $subscriptionsforms = new SubscriptionsForms();
- $allSubscriptionsForms = $subscriptionsforms->doLoadAllSubscriptionsFormsPart();
-
- includeBO("payments/payments.php");
- $paymentMethods = new Payments();
- $arrPaymentMethods = $paymentMethods->getListSolutions();
-
- # Affichage des champs de formulaire pour l'inscription
- if($GLOBALS["SYSTEM_USER_SESSION"]->user->getId()==$GLOBALS["SYSTEM_DEFAULT_USER_GUEST"])
- {
- if(!$tabPOST)
- {
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title","", $titre, "", "", "", "title='".htmlspecialchars(getMessage("tipSelectTitle"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", "", "title='".htmlspecialchars(getMessage("tipFirstName"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", "", "title='".htmlspecialchars(getMessage("tipLastName"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", "", "title='".htmlspecialchars(getMessage("tipLogin"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "", "title='".htmlspecialchars(getMessage("tipPassword"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "", "title='".htmlspecialchars(getMessage("tipPassword2"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", "", "title='".htmlspecialchars(getMessage("tipCourriel"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", "jj/mm/aaaa", "title='".htmlspecialchars(getMessage("tipBirthDate"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", "", "title='".htmlspecialchars(getMessage("tipUserMsn"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", "", "title='".htmlspecialchars(getMessage("tipUserJabber"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", "", "title='".htmlspecialchars(getMessage("tipUserFacebook"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", "", "title='".htmlspecialchars(getMessage("tipUserMastodon"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", "", "title='".htmlspecialchars(getMessage("tipUserWebsite"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", "", "title='".htmlspecialchars(getMessage("tipPostalCode"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_address", "textarea", "user_postal_address", "", "title='".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "textarea", "user_postal_addressmand", "", "title='".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", "", "title='".htmlspecialchars(getMessage("tipCity"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", "", "title='".htmlspecialchars(getMessage("tipState"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", "", "title='".htmlspecialchars(getMessage("tipCountry"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", "", "title='".htmlspecialchars(getMessage("tipTel"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", "", "title='".htmlspecialchars(getMessage("tipFax"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1,"", "title='".htmlspecialchars(getMessage("tipIAccept"), ENT_QUOTES)."'");
- // $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1,"", "title='".htmlspecialchars(getMessage("tipAcceptSubscriptionForm"), ENT_QUOTES)."'");
-
- for ($i=0; $iMxText("blocSubscriptionsForms".".subscriptionsforms".".name", getMessage($allSubscriptionsForms[$i]["subscription_type"]));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".subscriptionsforms".".amount", $allSubscriptionsForms[$i]["subscription_amount"]);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "", "");
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocSubscriptionsForms".".subscriptionsforms", "loop");
- }
- foreach( $arrPaymentMethods as $key => $value )
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".paymentMethods".".name", getMessage("lblPayMtd_".$key));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocSubscriptionsForms".".paymentMethods", "loop");
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
- $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
- } else {
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title",$_POST['user_title'], $titre, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", $_POST['user_first_name']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", $_POST['user_last_name']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", $_POST['user_login']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $_POST['user_mail']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", $_POST['user_birthdate']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", $_POST['user_msn']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", $_POST['user_jabber']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", $_POST['user_facebook']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", $_POST['user_mastodon']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", $_POST['user_website']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", $_POST['user_postal_code']);
- if( isset($_POST['user_postal_address']) )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_address", "textarea", "user_postal_address", $_POST['user_postal_address']);
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_address", "textarea", "user_postal_address", $_POST['user_postal_addressmand']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "textarea", "user_postal_addressmand", $_POST['user_postal_addressmand']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", $_POST['user_city']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", $_POST['user_state']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", $_POST['user_country']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", $_POST['user_tel']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", $_POST['user_fax']);
- if( isset($_POST["charteSite"]) && $_POST["charteSite"] == 1 )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "checked=checked");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "");
- // if( $_POST["subscriptionform"] == 1 )
- // $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "cheched=checked");
- // else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "");
- for ($i=0; $iMxText("blocSubscriptionsForms".".subscriptionsforms".".name", getMessage($allSubscriptionsForms[$i]["subscription_type"]));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".subscriptionsforms".".amount", $allSubscriptionsForms[$i]["subscription_amount"]);
- if( isset($allSubscriptionsForms[$i]["subscription_type"]) && $_POST["subscriptiontype"] == $allSubscriptionsForms[$i]["subscription_type"] )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "checked=checked", "");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "", "");
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocSubscriptionsForms".".subscriptionsforms", "loop");
- }
- foreach( $arrPaymentMethods as $key => $value )
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".paymentMethods".".name", getMessage("lblPayMtd_".$key));
- if( isset($_POST["paymentMethod"]) && $_POST["paymentMethod"] == $key )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "checked=checked", "");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocSubscriptionsForms".".paymentMethods", "loop");
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
- $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
- }
-
- }
- else // On raffiche les données saisies par l'utilisateur
- {
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title",$GLOBALS["SYSTEM_USER_SESSION"]->user->getTitle(), $titre, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFirstName());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", $GLOBALS["SYSTEM_USER_SESSION"]->user->getLastName());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", $GLOBALS["SYSTEM_USER_SESSION"]->user->getLogin());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPassword());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPassword());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $GLOBALS["SYSTEM_USER_SESSION"]->user->getMail());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", $GLOBALS["SYSTEM_USER_SESSION"]->user->getBirthDate());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", $GLOBALS["SYSTEM_USER_SESSION"]->user->getMsn());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", $GLOBALS["SYSTEM_USER_SESSION"]->user->getJabber());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFacebook());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", $GLOBALS["SYSTEM_USER_SESSION"]->user->getMastodon());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", $GLOBALS["SYSTEM_USER_SESSION"]->user->getWebsite());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalCode());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_address", "textarea", "user_postal_address", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalAddress());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "textarea", "user_postal_addressmand", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalAddress());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", $GLOBALS["SYSTEM_USER_SESSION"]->user->getCity());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", $GLOBALS["SYSTEM_USER_SESSION"]->user->getState());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", $GLOBALS["SYSTEM_USER_SESSION"]->user->getCountry());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", $GLOBALS["SYSTEM_USER_SESSION"]->user->getTel());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFax());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "", "title='".htmlspecialchars(getMessage("tipIAccept"), ENT_QUOTES)."'");
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "checked=checked");
- for ($i=0; $iMxText("blocSubscriptionsForms".".subscriptionsforms".".name", getMessage($allSubscriptionsForms[$i]["subscription_type"]));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".subscriptionsforms".".amount", $allSubscriptionsForms[$i]["subscription_amount"]);
- if( isset($allSubscriptionsForms[$i]["subscription_type"]) && $_POST["subscriptiontype"] == $allSubscriptionsForms[$i]["subscription_type"] )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "checked=checked", "");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "", "");
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocSubscriptionsForms".".subscriptionsforms", "loop");
- }
- foreach( $arrPaymentMethods as $key => $value )
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".paymentMethods".".name", getMessage("lblPayMtd_".$key));
- if( isset($_POST["paymentMethod"]) && $_POST["paymentMethod"] == $key )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "checked=checked", "");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocSubscriptionsForms".".paymentMethods", "loop");
- }
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "checked=checked", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
- $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
- }
- ExitBloc();
- return "";
- }
-
-/**
-* Function permettant d'afficher le formulaire d'adhésion pour enregistrement dans la bd
-* @access public
-* @param tableau
-* @return chaine chaine html
-*/
- function formLectureAdhSoc($tabPOST="")
- {
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
- $_SESSION['redirect']=$_SERVER['REQUEST_URI'];
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "formlectureadhsoc");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscriptions.ini");
- addMessageFile("adminaccounting.ini");
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("titlPageSubscriptionSoc", getMessage("titlPageSubscriptionSoc"));
-
- if(isset($_GET['param']) && (is_numeric($_GET['param'])))
- {
- $myNoeud = $GLOBALS['SYSTEM_MANAGER']['NODE']->createInstance($_GET['param']);
- $libmyNoeud = $myNoeud->getLibelle($currentCode);
-// $messageInscriptionNoeud = " : ".$libmyNoeud;
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("messageInscriptionNoeud", $libmyNoeud);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText", $libmyNoeud);
-
- //On récupère le texte du noeud choisi par l'internaute
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$_GET['param'];
- # Exécution de Requete
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = $list['textentrynode_resume'];
- //On masque le texte d'intro affiché par défaut à partir de message
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text_resume", $text);
- }
- # Destruction des éléments
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
-
- $tabObject =$this->getObjectSon(eid());
- if (($this->recupCommunauty("ctype") == "asso") && (count($tabObject) >> 0) )
- {
- for ($i=0; $igetClassName()=="CorporateInfos")
- {
- $urlArray["id"]=$tabObject[$i][1]->getId();
- $urlArray["classname"]=$tabObject[$i][0]->getClassName();
-// $urlArray["methodname"]=$tabObject[$i][0]->getMethodName();
- }
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkStatuts", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","2"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLStatuts", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/2014-LCube-Statuts-000001.pdf");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkRegInt", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","3"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLRegInt", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkChartConf", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","4"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLChartConf", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/charte de confidentialité.pdf");
- }
- }
- # Récupération des étiquette du formulaire
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"Home","execLectureAdhStruct","",$_GET['param']));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlReturn",formatUrl($this->getId(),"Home","formLectureAdh","",$_GET['param']));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlQaptcha", formatUrl($this->getId(),"Home","formLectureQaptcha"));
-
- includeBO("subscriptions/subscriptionsforms.php");
- $subscriptionsforms = new SubscriptionsForms();
- $allSubscriptionsForms = $subscriptionsforms->doLoadAllSubscriptionsFormsStruct();
-
- includeBO("payments/payments.php");
- $paymentMethods = new Payments();
- $arrPaymentMethods = $paymentMethods->getListSolutions();
-
- # Affichage des champs de formulaire pour l'inscription
- if($GLOBALS["SYSTEM_USER_SESSION"]->user->getId()==$GLOBALS["SYSTEM_DEFAULT_USER_GUEST"])
- {
- if(!$tabPOST)
- {
- // TODO : TEMPORAIRE - CLASSE DE GESTION A CREER
- $structtype = array("SARL", "SA", "SASU", "EURL", "EIRL", "Association 1901", "Association 1848", "En création");
- // INFORMATIONS DE LA STRUCTURE
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_denomination", "text", "struct_denomination", "", "title='".htmlspecialchars(getMessage("tipStructDenomination"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("struct_type", "struct_type","", $structtype, "", "", "", "title='".htmlspecialchars(getMessage("tipSelectStructType"), ENT_QUOTES)."'");
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_postal_address", "textarea", "struct_postal_address", "", "title='".htmlspecialchars(getMessage("tipStructPostalAddress"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_postal_code", "text", "struct_postal_code", "", "title='".htmlspecialchars(getMessage("tipStructCode"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_city", "text", "struct_city", "", "title='".htmlspecialchars(getMessage("tipStructCity"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_state", "text", "struct_state", "", "title='".htmlspecialchars(getMessage("tipStructState"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_country", "text", "struct_country", "", "title='".htmlspecialchars(getMessage("tipStructCountry"), ENT_QUOTES)."'");
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_siret", "text", "struct_siret", "", "title='".htmlspecialchars(getMessage("tipStructSiret"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_tva", "text", "struct_tva", "", "title='".htmlspecialchars(getMessage("tipStructTva"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_tel", "text", "struct_tel", "", "title='".htmlspecialchars(getMessage("tipStructTel"), ENT_QUOTES)."'");
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_website", "text", "struct_website", "", "title='".htmlspecialchars(getMessage("tipStructWebsite"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_mail", "text", "struct_mail", "", "title='".htmlspecialchars(getMessage("tipStructCourriel"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_facebook", "text", "struct_facebook", "", "title='".htmlspecialchars(getMessage("tipStructFacebook"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_mastodon", "text", "struct_mastodon", "", "title='".htmlspecialchars(getMessage("tipStructMastodon"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_twitter", "text", "struct_twitter", "", "title='".htmlspecialchars(getMessage("tipStructTwitter"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_google", "text", "struct_google", "", "title='".htmlspecialchars(getMessage("tipStructGoogle"), ENT_QUOTES)."'");
- // INFORMATIONS DU RESPONSABLE DE LA STRUCTURE
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title","", $titre, "", "", "", "title='".htmlspecialchars(getMessage("tipSelectTitle"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", "", "title='".htmlspecialchars(getMessage("tipFirstName"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", "", "title='".htmlspecialchars(getMessage("tipLastName"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", "", "title='".htmlspecialchars(getMessage("tipLogin"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "", "title='".htmlspecialchars(getMessage("tipPassword"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "", "title='".htmlspecialchars(getMessage("tipPassword2"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", "", "title='".htmlspecialchars(getMessage("tipCourriel"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", "jj/mm/aaaa", "title='".htmlspecialchars(getMessage("tipBirthDate"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", "", "title='".htmlspecialchars(getMessage("tipPostalCode"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_address", "textarea", "user_postal_address", "", "title='".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "textarea", "user_postal_addressmand", "", "title='".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", "", "title='".htmlspecialchars(getMessage("tipCity"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", "", "title='".htmlspecialchars(getMessage("tipState"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", "", "title='".htmlspecialchars(getMessage("tipCountry"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", "", "title='".htmlspecialchars(getMessage("tipUserMsn"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", "", "title='".htmlspecialchars(getMessage("tipUserJabber"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", "", "title='".htmlspecialchars(getMessage("tipUserFacebook"), ENT_QUOTES)."'");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", "", "title='".htmlspecialchars(getMessage("tipUserMastodon"), ENT_QUOTES)."'");
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1,"", "title='".htmlspecialchars(getMessage("tipIAccept"), ENT_QUOTES)."'");
- // $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1,"", "title='".htmlspecialchars(getMessage("tipAcceptSubscriptionForm"), ENT_QUOTES)."'");
-
- for ($i=0; $iMxText("blocSubscriptionsForms".".subscriptionsforms".".name", getMessage($allSubscriptionsForms[$i]["subscription_type"]));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".subscriptionsforms".".amount", $allSubscriptionsForms[$i]["subscription_amount"]);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "", "");
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocSubscriptionsForms".".subscriptionsforms", "loop");
- }
- foreach( $arrPaymentMethods as $key => $value )
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".paymentMethods".".name", getMessage("lblPayMtd_".$key));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocSubscriptionsForms".".paymentMethods", "loop");
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
- $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
- } else {
- // INFORMATIONS DE LA STRUCTURE
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_denomination", "text", "struct_denomination", $_POST['$struct_denomination']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("struct_type", "struct_type", $_POST['$struct_type'], $structtype, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_postal_address", "textarea", "struct_postal_address", $_POST['$struct_postal_address']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_postal_code", "text", "struct_postal_code", $_POST['$struct_postal_code']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_city", "text", "struct_city", $_POST['$struct_city']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_state", "text", "struct_state", $_POST['$struct_state']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_country", "text", "struct_country", $_POST['$struct_country']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_siret", "text", "struct_siret", $_POST['$struct_siret']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_tva", "text", "struct_tva", $_POST['$struct_tva']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_tel", "text", "struct_tel", $_POST['$struct_tel']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_website", "text", "struct_website", $_POST['$struct_website']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_mail", "text", "struct_mail", $_POST['$struct_mail']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_facebook", "text", "struct_facebook", $_POST['$struct_facebook']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_mastodon", "text", "struct_mastodon", $_POST['$struct_mastodon']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_twitter", "text", "struct_twitter", $_POST['$struct_twitter']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_google", "text", "struct_google", $_POST['$struct_google']);
- // INFORMATIONS DU RESPONSABLE DE LA STRUCTURE
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title",$_POST['user_title'], $titre, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", $_POST['user_first_name']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", $_POST['user_last_name']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", $_POST['user_login']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $_POST['user_mail']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", $_POST['user_birthdate']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", $_POST['user_msn']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", $_POST['user_jabber']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", $_POST['user_facebook']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", $_POST['user_mastodon']);
-
- if( isset($_POST["charteSite"]) && $_POST["charteSite"] == 1 )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "checked=checked");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "");
- // if( $_POST["subscriptionform"] == 1 )
- // $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "cheched=checked");
- // else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "");
- for ($i=0; $iMxText("blocSubscriptionsForms".".subscriptionsforms".".name", getMessage($allSubscriptionsForms[$i]["subscription_type"]));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".subscriptionsforms".".amount", $allSubscriptionsForms[$i]["subscription_amount"]);
- if( isset($allSubscriptionsForms[$i]["subscription_type"]) && $_POST["subscriptiontype"] == $allSubscriptionsForms[$i]["subscription_type"] )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "checked=checked", "");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "", "");
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocSubscriptionsForms".".subscriptionsforms", "loop");
- }
- foreach( $arrPaymentMethods as $key => $value )
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".paymentMethods".".name", getMessage("lblPayMtd_".$key));
- if( isset($_POST["paymentMethod"]) && $_POST["paymentMethod"] == $key )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "checked=checked", "");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocSubscriptionsForms".".paymentMethods", "loop");
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
- $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
- }
-
- }
- else // On raffiche les données saisies par l'utilisateur
- {
- // On charge la lib de gestion des entités
- includeBO("entities/entities.php");
- $entity = new Entities();
- $userEntity = $entityforms->doLoadEntityByUser($GLOBALS["SYSTEM_USER_SESSION"]->user->getId());
-
- // INFORMATIONS DE LA STRUCTURE
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_denomination", "text", "struct_denomination", $_POST['struct_denomination']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("struct_type", "struct_type", $_POST['struct_type'], $structtype, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_postal_address", "textarea", "struct_postal_address", $_POST['struct_postal_address']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_postal_code", "text", "struct_postal_code", $_POST['struct_postal_code']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_city", "text", "struct_city", $_POST['struct_city']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_state", "text", "struct_state", $_POST['struct_state']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_country", "text", "struct_country", $_POST['struct_country']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_siret", "text", "struct_siret", $_POST['struct_siret']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_tva", "text", "struct_tva", $_POST['struct_tva']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_tel", "text", "struct_tel", $_POST['struct_tel']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_website", "text", "struct_website", $_POST['struct_website']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_mail", "text", "struct_mail", $_POST['struct_mail']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_facebook", "text", "struct_facebook", $_POST['struct_facebook']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_mastodon", "text", "struct_mastodon", $_POST['struct_mastodon']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_twitter", "text", "struct_twitter", $_POST['struct_twitter']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("struct_google", "text", "struct_google", $_POST['struct_google']);
- // INFORMATIONS DU RESPONSABLE DE LA STRUCTURE
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title",$_POST['user_title'], $titre, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", $_POST['user_first_name']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", $_POST['user_last_name']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", $_POST['user_login']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $_POST['user_mail']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", $_POST['user_birthdate']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", $_POST['user_msn']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", $_POST['user_jabber']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", $_POST['user_facebook']);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", $_POST['user_mastodon']);
- // INFORMATIONS DU RESPONSABLE DE LA STRUCTURE
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title",$GLOBALS["SYSTEM_USER_SESSION"]->user->getTitle(), $titre, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFirstName());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", $GLOBALS["SYSTEM_USER_SESSION"]->user->getLastName());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", $GLOBALS["SYSTEM_USER_SESSION"]->user->getLogin());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPassword());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPassword());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $GLOBALS["SYSTEM_USER_SESSION"]->user->getMail());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", $GLOBALS["SYSTEM_USER_SESSION"]->user->getBirthDate());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", $GLOBALS["SYSTEM_USER_SESSION"]->user->getMsn());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", $GLOBALS["SYSTEM_USER_SESSION"]->user->getJabber());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFacebook());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", $GLOBALS["SYSTEM_USER_SESSION"]->user->getMastodon());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", $GLOBALS["SYSTEM_USER_SESSION"]->user->getWebsite());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalCode());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_address", "textarea", "user_postal_address", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalAddress());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "textarea", "user_postal_addressmand", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalAddress());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", $GLOBALS["SYSTEM_USER_SESSION"]->user->getCity());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", $GLOBALS["SYSTEM_USER_SESSION"]->user->getState());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", $GLOBALS["SYSTEM_USER_SESSION"]->user->getCountry());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", $GLOBALS["SYSTEM_USER_SESSION"]->user->getTel());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFax());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "", "title='".htmlspecialchars(getMessage("tipIAccept"), ENT_QUOTES)."'");
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "checked=checked");
- for ($i=0; $iMxText("blocSubscriptionsForms".".subscriptionsforms".".name", getMessage($allSubscriptionsForms[$i]["subscription_type"]));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".subscriptionsforms".".amount", $allSubscriptionsForms[$i]["subscription_amount"]);
- if( isset($allSubscriptionsForms[$i]["subscription_type"]) && $_POST["subscriptiontype"] == $allSubscriptionsForms[$i]["subscription_type"] )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "checked=checked", "");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionsforms".".value", "radio", "subscriptiontype", $allSubscriptionsForms[$i]["subscription_type"], "", "");
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocSubscriptionsForms".".subscriptionsforms", "loop");
- }
- foreach( $arrPaymentMethods as $key => $value )
- {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocSubscriptionsForms".".paymentMethods".".name", getMessage("lblPayMtd_".$key));
- if( isset($_POST["paymentMethod"]) && $_POST["paymentMethod"] == $key )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "checked=checked", "");
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".paymentMethods".".value", "radio", "paymentMethod", $key, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("blocSubscriptionsForms".".paymentMethods", "loop");
- }
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "checked=checked", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'");
- $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll());
- }
- ExitBloc();
- return "";
- }
-
- public function formLectureQaptcha()
- {
-
- $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/mygamecharacters/ajaxdata.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
- $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe(true);
-
- $aResponse['error'] = false;
-
- if(isset($_POST['action']) && isset($_POST['qaptcha_key']))
- {
- $_SESSION['qaptcha_key'] = false;
-
- if(htmlentities($_POST['action'], ENT_QUOTES, 'UTF-8') == 'qaptcha')
- {
- $_SESSION['qaptcha_key'] = $_POST['qaptcha_key'];
- echo json_encode($aResponse);
- }
- else
- {
- $aResponse['error'] = true;
- echo json_encode($aResponse);
- }
- }
- else
- {
- $aResponse['error'] = true;
- echo json_encode($aResponse);
- }
- }
-
- public function execFormLecture()
- {
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- if($_GET["type"] == "user_first_name"){
- if( strlen($_GET["user_first_name"])==0 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxFirstNameUndefined"));
- $this->printMXJson($returnValue, $returnMessage);
- }
- elseif( strlen($_GET["user_first_name"])<3 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxFirstNameTooShort"));
- $this->printMXJson($returnValue, $returnMessage);
- }
- elseif( strlen($_GET["user_first_name"])>64 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxFirstNameTooLong"));
- $this->printMXJson($returnValue, $returnMessage);
- }
- else {
- $bolean = checkDataChars($_GET["user_first_name"], "/[\/:*!,?§%µ¤£~«<>|°{}1234567890]/");
- if( $bolean == false ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxFirstNameBadChars"));
- $this->printMXJson($returnValue, $returnMessage);
- } else {
- $returnValue = 1;
- $returnMessage = "Identifiant valide !";
- $this->printMXJson($returnValue, $returnMessage);
- }
- }
- }
- if($_GET["type"] == "user_last_name"){
- if( strlen($_GET["user_last_name"])==0 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxLastNameUndefined"));
- $this->printMXJson($returnValue, $returnMessage);
- }
- elseif( strlen($_GET["user_last_name"])<3 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxLastNameTooShort"));
- $this->printMXJson($returnValue, $returnMessage);
- }
- elseif( strlen($_GET["user_last_name"])>64 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxLastNameTooLong"));
- $this->printMXJson($returnValue, $returnMessage);
- }
- else {
- $bolean = checkDataChars($_GET["user_last_name"], "/[\/:*!,?§%µ¤£~«<>|°{}1234567890]/");
- if( $bolean == false ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxLastNameBadChars"));
- $this->printMXJson($returnValue, $returnMessage);
- } else {
- $returnValue = 1;
- $returnMessage = "Identifiant valide !";
- $this->printMXJson($returnValue, $returnMessage);
- }
- }
- }
- if($_GET["type"] == "login"){
-
- /*Inclusion de la librairie UserManagerDb pour effectuer l'insertion et la vérif dans la table sys_user_temp*/
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php");
- //Création de l'objet
- $MyManager=new UserManagerDb();
- //On fixe la table par la méthode getTable
- $MyManager->setTable("sys_object_user_temp");
-
- /*Inclusion de la librairie NodeGroupUserManagerDb pour effectuer l'insertion dans la table sys_node_group_user_temp*/
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php");
- //Création de l'objet
- $MyNodeGroupUser=new NodeGroupUserManagerDb();
- //On fixe la table par la méthode getTable
- $MyNodeGroupUser->setTable("sys_object_node_group_user_temp");
-
- if( strlen($_GET["login"])==0 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxLoginUndefined"));
- $this->printMXJson($returnValue, $returnMessage);
- }
-
- elseif( strlen($_GET["login"])<4 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxLoginTooShort"));
- $this->printMXJson($returnValue, $returnMessage);
- }
-
- elseif( strlen($_GET["login"])>48 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxLoginTooLong"));
- $this->printMXJson($returnValue, $returnMessage);
- }
-
- else {
- $bolean = checkDataChars($_GET["login"], "/[\/:*!,?§%µ¤£~«<>|°{}]/");
- if( $bolean == false || $MyManager->checkLoginExist($_GET["login"]) || $GLOBALS['SYSTEM_MANAGER']['USER']->checkLoginExist($_GET["login"]) ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxLoginBadChars"));
- $this->printMXJson($returnValue, $returnMessage);
- } else {
- $returnValue = 1;
- $returnMessage = "Identifiant valide !";
- $this->printMXJson($returnValue, $returnMessage);
- }
- }
- }
- if($_GET["type"] == "user_passwords"){
-
- if( strlen($_GET["user_password"])==0 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxUserPasswordUndefined"));
- $this->printMXJson($returnValue, $returnMessage);
- }
-
- elseif( strlen($_GET["user_password2"])==0 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxUserPassword2Undefined"));
- $this->printMXJson($returnValue, $returnMessage);
- }
-
- elseif( strlen($_GET["user_password"])<7 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxUserPasswordTooShort"));
- $this->printMXJson($returnValue, $returnMessage);
- }
-
- elseif( $_GET["user_password"] != $_GET["user_password2"] ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxUserPasswordCheckFailed"));
- $this->printMXJson($returnValue, $returnMessage);
- }
-
- else {
- $returnValue = 1;
- $returnMessage = "Mot de passe valide !";
- $this->printMXJson($returnValue, $returnMessage);
- }
- }
- if($_GET["type"] == "user_mail"){
-
- if( strlen($_GET["user_mail"])==0 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxCourrielUndefined"));
- $this->printMXJson($returnValue, $returnMessage);
- }
- else {
- $result = checkMail($_GET["user_mail"]);
- if( $result != "Valide"){
- $returnValue = 0;
- $returnMessage = $result;
- $this->printMXJson($returnValue, $returnMessage);
- } else {
- $returnValue = 1;
- $returnMessage = "Adresse courriel valide !";
- $this->printMXJson($returnValue, $returnMessage);
- }
- }
- }
- if($_GET["type"] == "user_birthdate"){
-
- if( strlen($_GET["user_birthdate"])==0 ){
- $returnValue = 0;
- $returnMessage = htmlspecialchars(getMessage("ajaxBirthDateUndefined"));
- $this->printMXJson($returnValue, $returnMessage);
- }
- else {
- $bolean = preg_match('/^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})$/', $_GET["user_birthdate"]);
- if( $bolean == false ){
- $returnValue = 0;
- $returnMessage = "Date invalide !";
- $this->printMXJson($returnValue, $returnMessage);
- } else {
- $returnValue = 1;
- $returnMessage = "Date valide !";
- $this->printMXJson($returnValue, $returnMessage);
- }
- }
- }
- }
-
- public function execQaptcha()
- {
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- // check if $_SESSION['qaptcha_key'] created with AJAX exists
- if(isset($_SESSION['qaptcha_key']) && !empty($_SESSION['qaptcha_key']))
- {
- $myVar = $_SESSION['qaptcha_key'];
-
- // check if the random input created exists and is empty
- if(isset($_POST[''.$myVar.'']) && empty($_POST[''.$myVar.'']))
- {
- /* Headers XML */
- header("Content-type: text/plain");
- header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
- header("Pragma: no-cache");
-
- /* Appel du modèle mxt spécifique à l'affichage des catégories/rubriques */
- $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/qaptcha.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
- $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe(true);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("return", var_dump($_POST));
- }
- else
- {
- /* Headers XML */
- header("Content-type: text/plain");
- header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
- header("Pragma: no-cache");
-
- /* Appel du modèle mxt spécifique à l'affichage des catégories/rubriques */
- $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/qaptcha.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
- $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe(true);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("return", $_POST);
- }
- }
- unset($_SESSION['qaptcha_key']);
- }
-
-/**
-* Fonction de sortie Modelixe en Json
-*/
- function printMXJson($returnValue, $returnMessage)
- {
- /* Headers XML */
- header("Content-type: text/plain");
- header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
- header("Pragma: no-cache");
-
- /* Appel du modèle mxt spécifique à l'affichage des catégories/rubriques */
- $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/checkform.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
- $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe(true);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("returnValue", $returnValue);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("returnMessage", $returnMessage);
- }
-
-/**
-*
-*/
- public function execFormLectureCities()
- {
- /* Headers XML */
- header("Content-type: text/plain");
- header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
- header("Pragma: no-cache");
-
- /* Appel du modèle mxt spécifique à l'affichage des catégories/rubriques */
- $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/livecompletion.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
- $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe(true);
-
- $hostname = DATA_SOURCE_SQL_SERVER;
- $username = DATA_SOURCE_SQL_USER;
- $password = DATA_SOURCE_SQL_PASSWORD;
- $dbname = DATA_SOURCE_SQL_DATABASE;
-
- mysql_connect( $hostname, $username, $password ) or die ( 'Erro ao tentar conectar ao banco de dados.' );
- mysql_select_db( $dbname );
-
- if( isset( $_REQUEST['query'] ) && $_REQUEST['query'] != "" )
- {
- $q = mysql_real_escape_string( $_REQUEST['query'] );
-
- if( isset( $_REQUEST['identifier'] ) && $_REQUEST['identifier'] == "user_city")
- {
- $sqlCityNames = "SELECT * FROM sys_datas_villes where locate('$q',nom) > 0 order by locate('$q',nom) limit 10";
- $r = mysql_query( $sqlCityNames );
- if ( $r )
- {
- $returnValue = ''."\n";
- while( $l = mysql_fetch_array( $r ) )
- {
- $p = $l['nom'];
- $sqlDepNames = "SELECT * FROM sys_datas_departements where `id_departement`=".$l['id_departement']." limit 1";
- $sqlDepNamesResult = mysql_query( $sqlDepNames );
- while( $depNames = mysql_fetch_array( $sqlDepNamesResult ) )
- {
- $depName = $depNames["nom_departement"];
- $sqlRegNames = "SELECT * FROM sys_datas_regions where `id_region`=".$depNames['id_region']." limit 1";
- $sqlRegNamesResult = mysql_query( $sqlRegNames );
- while( $regNames = mysql_fetch_array( $sqlRegNamesResult ) )
- {
- $regName = $regNames["nom_region"];
- }
- }
- $p = preg_replace('/(' . $q . ')/i', '$1', $p);
- $returnValue .= "\t".'- '.utf8_encode( $p ).'
'."\n";
- }
- $returnValue .= '
';
- }
- }
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("return", $returnValue);
- }
-
/**
* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
* @access public
@@ -1865,53 +334,34 @@ Class Home extends CoordinationObj
*/
function execLecture()
{
- if (!checkProvenance("formLecture") && !checkProvenance("execlecture") && !checkProvenance("inscription")) {
- redirect("http://www.noob.com/"); die("Hacking attempt");
- }
+ global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
+ /* gestion du lib en fonction de la langue courante */
+ $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
+ $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
+ /* fin récupération des codes par defaut */
- $subscriptionrequest = ( isset($_POST["subscriptionform"]) && $_POST["subscriptionform"] == 1)?true:false;
+ /*Récupération des messages utilisateurs*/
+ addMessageFile("user.ini");
+ //On vide la chaine de vérification des champs obligatoires
+ $chaine = "";
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
+ if($_POST)
+ {
+ foreach($_POST as $cle=>$val)
+ {
+ // echo "cle = ".$cle." val =".$val."
";
+ if($val=="" && ($cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country"))
+ {
+ $chaine .= getMessage($cle).", ";
+ }
+ }
+ if($chaine!="")
+ {
+ $chaine .= getMessage('obligatory');
+ }
+ }
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscribestatus.ini");
- //On vide la chaine de vérification des champs obligatoires
- $chaine = "";
-
- if($_POST && !$subscriptionrequest)
- {
- foreach($_POST as $cle=>$val)
- {
- if($val=="" && ($cle !="user_birthdate" && $cle !="user_msn" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_mastodon" && $cle !="user_website" && $cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country" && $cle !="user_state" && $cle !="user_postal_address" && $cle !="user_postal_addressmand" && $cle!="user_tel" && $cle!=$_SESSION['qaptcha_key']))
- {
- $chaine .= getMessage($cle).", ";
- }
- }
- if($chaine!="")
- {
- $chaine .= getMessage('obligatory');
- }
- } elseif ($_POST && $subscriptionrequest) {
- foreach($_POST as $cle=>$val)
- {
- if($val=="" && ($cle !="user_msn" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_mastodon" && $cle !="user_website" && $cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country" && $cle !="user_state" && $cle !="user_postal_address" && $cle!="user_tel" && $cle!=$_SESSION['qaptcha_key']))
- {
- $chaine .= getMessage($cle).", ";
- }
- }
- if( $_POST["user_birthdate"]=="jj/mm/aaa" )
- $chaine .= getMessage("user_birthdate").", ";
- if($chaine!="")
- {
- $chaine .= getMessage('obligatory');
- }
- }
/*
* Olivier case du chemin.... :-(
* 22/06/05
@@ -1924,7 +374,9 @@ Class Home extends CoordinationObj
$GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
$this->formLecture($_POST);
return "";
- } else {
+ }
+ else
+ {
if($_POST["user_password"] != $_POST["user_password2"])
{
$GLOBALS["SYSTEM_CONTROL"]->messageSystem = "password_error";
@@ -1933,249 +385,38 @@ Class Home extends CoordinationObj
$this->formLecture($_POST);
return "";
}
+
}
-
- if( isset($_POST['charteSite']) )
- {
- /*Inclusion de la librairie UserManagerDb pour effectuer l'insertion et la vérif dans la table sys_user_temp*/
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php");
- //Création de l'objet
- $MyManager=new UserManagerDb();
- //On fixe la table par la méthode getTable
- $MyManager->setTable("sys_object_user_temp");
-
- /*Inclusion de la librairie NodeGroupUserManagerDb pour effectuer l'insertion dans la table sys_node_group_user_temp*/
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php");
- //Création de l'objet
- $MyNodeGroupUser=new NodeGroupUserManagerDb();
- //On fixe la table par la méthode getTable
- $MyNodeGroupUser->setTable("sys_object_node_group_user_temp");
-
- # Teste si il y a des enregistrements sur MyManager (table temporaire) ou sur la table des comptes
- # $GLOBALS['SYSTEM_MANAGER']['USER']->checkLoginExist($_GET["login"])
- if (($MyManager->checkValid($_POST["user_login"], $_POST["user_password"]) != 0) || ($GLOBALS['SYSTEM_MANAGER']['USER']->checkValid($_POST["user_login"], $_POST["user_password"]) != 0))
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "user_exist";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlecture.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLecture($_POST);
- } elseif (($MyManager->checkLoginExist($_POST["user_login"]) != 0) || ($GLOBALS['SYSTEM_MANAGER']['USER']->checkLoginExist($_POST["user_login"]) != 0)) {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "user_exist";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlecture.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLecture($_POST);
- } else {
- //On créé un nouvel objet User pour effectuer l'insertion de chaque champs
- $MyUser=new User();
-
- $MyUser->setTitle($_POST['user_title']);
- $MyUser->setFirstName($_POST['user_first_name']);
- $MyUser->setLastName($_POST['user_last_name']);
- $MyUser->setLogin($_POST['user_login']);
- $MyUser->setPassword($_POST['user_password']);
- $MyUser->setMail($_POST['user_mail']);
- $MyUser->setBirthDate($_POST['user_birthdate']);
- $MyUser->setMsn($_POST['user_msn']);
- $MyUser->setJabber($_POST['user_jabber']);
- $MyUser->setFacebook($_POST['user_facebook']);
- $MyUser->setMastodon($_POST['user_mastodon']);
- $MyUser->setWebsite($_POST['user_website']);
-// $MyUser->setPostalAddress($_POST['user_postal_address']);
- $MyUser->setPostalCode($_POST['user_postal_code']);
- $MyUser->setCity($_POST['user_city']);
- $MyUser->setState($_POST['user_state']);
- $MyUser->setCountry($_POST['user_country']);
-// $MyUser->setOrganisation($_POST['user_organisation']);
- $MyUser->setTel($_POST['user_tel']);
-// $MyUser->setFax($_POST['user_fax']);
-// $MyUser->setComment($_POST['user_comment']);
-
- if( !$subscriptionrequest ) {
- $MyUser->setPostalAddress($_POST['user_postal_address']);
- //On enregistre les paramètres
- $ObjUsersave = $MyManager->saveInstance($MyUser);
-
- //Insertion du noeud temporaire de l'utilisateur
- //Champs concernés : user_id, group_id, node_id, is_node_only, is_forbidden
- $MyNodeUser =new NodeGroupUser();
- $MyNodeUser->setUserId($ObjUsersave->getId());
-
- if(isset($_GET['param']))
- {
- $MyNodeUser->setNodeId($_GET['param']);
- }
-// if($subscriptionrequest)
-// $MyNodeUser->setGroupId($this->recupCommunauty("subsgroup"));
-// else
- $MyNodeUser->setGroupId($this->recupCommunauty("usergroup"));
-
- // $MyNodeUser->setIsForbidden(0);
- // $MyNodeUser->setIsNodeOnly(0);
-
- //on enregistre les paramètres
- $test = $MyNodeGroupUser->saveInstance($MyNodeUser);
-
- require_once('lib/package/class.phpmailer.phpmailer.php');
- $address = $_POST['user_mail'];
-
- try {
- $mail = new PHPMailer(true);
- $body = file_get_contents('lib/package/phpmailer/templates/preinscription_139.html');
-// $body = eregi_replace("[\]",'',$body);
-// $v = preg_quote($body, '/');
-// $body = preg_replace("/[\\]/i",'',$body);
-// $body = preg_replace("/$v/", '', $body);
- $body = str_replace("<#NOM#>",$_POST['user_first_name'],$body);
- $body = str_replace("<#PRENOM#>",$_POST['user_last_name'],$body);
- $body = str_replace("<#IDENTIFIANT#>",$_POST['user_login'],$body);
- $body = str_replace("<#PASSWORD#>",$_POST['user_password'],$body);
- $body = str_replace("<#MAIL#>",$_POST['user_mail'],$body);
- $mail->isMail();
- $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
- $mail->AddReplyTo($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->SetFrom($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->AddAddress($address, $_POST['user_first_name']);
- $mail->AddBCC($this->recupCommunauty("mailnode"), "");
- $mail->Subject = "Votre pre-inscription sur le site web ".$_SERVER['SERVER_NAME'];
- $mail->AddAttachment("data/image/communities/".$_GET['param']."_logo.png"); // attachment
- $mail->isHTML(true);
- $mail->Body = utf8_decode($body);
-// $mail->AltBody = 'Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !';
-
- $mail->send();
- systemRedirect(formatUrl($this->getId(), "Home", "lectureInscSuccess"));
- } catch (Exception $e) {
- $this->formLecture($_POST, $mail->ErrorInfo);
-// echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
- }
- } elseif( $subscriptionrequest ) {
- $this->processSubscription($MyUser);
- }
- }
- } else //si la/les Charte(s) n'est pas validée
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "chartnessaryaccept";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlecture.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLecture($_POST);
- }
- return "";
- }
-
-/**
-* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
-* @access public
-* @return chaine chaine vide
-*/
- function execLectureAdhPart()
- {
- if (!checkProvenance("formLectureAdhPart") && !checkProvenance("execLectureAdhPart")) {
- redirect("http://www.noob.com/"); die("Hacking attempt");
- }
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
- $subscriptionrequest = ( isset($_POST["subscriptionform"]) && $_POST["subscriptionform"] == 1)?true:false;
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscribestatus.ini");
- //On vide la chaine de vérification des champs obligatoires
- $chaine = "";
-
- if($_POST && !$subscriptionrequest)
- {
-// echo "Inscription simple
";
- foreach($_POST as $cle=>$val)
- {
-// echo $cle."\t".$val;
- if($val=="" && ($cle !="user_birthdate" && $cle !="user_msn" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_mastodon" && $cle !="user_website" && $cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country" && $cle !="user_state" && $cle !="user_postal_address" && $cle !="user_postal_addressmand" && $cle!="user_tel" && $cle!=$_SESSION['qaptcha_key']))
- {
- $chaine .= getMessage($cle).", ";
-// echo " obligatoire
";
- }
- }
- if($chaine!="")
- {
- $chaine .= getMessage('obligatory');
- }
- } elseif ($_POST && $subscriptionrequest) {
-// echo "Inscription avec adhésion
";
- foreach($_POST as $cle=>$val)
- {
-// echo $cle."\t".$val."
";
- if($val=="" && ($cle !="user_msn" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_mastodon" && $cle !="user_website" && $cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country" && $cle !="user_state" && $cle !="user_postal_address" && $cle!="user_tel" && $cle!=$_SESSION['qaptcha_key']))
- {
- $chaine .= getMessage($cle).", ";
- }
- }
- if( $_POST["user_birthdate"]=="jj/mm/aaa" )
- $chaine .= getMessage("user_birthdate").", ";
- if($chaine!="")
- {
- $chaine .= getMessage('obligatory');
- }
- }
/*
-* Olivier case du chemin.... :-(
-* 22/06/05
+* Olivier DEVAINE 13/01/05 -> plus besoin de la charte
*/
- //Si certains champs sont manquants pour l'inscription
- if ($chaine != "")
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = $chaine;
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlectureadh.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdh($_POST);
- return "";
- }
- else
- {
- if($_POST["user_password"] != $_POST["user_password2"])
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "password_error";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlectureadh.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdh($_POST);
- return "";
- }
-
- }
-
- if( isset($_POST['charteSite']) )
- {
+// if(isset($_POST['user_chart']))
+// {
/*Inclusion de la librairie UserManagerDb pour effectuer l'insertion et la vérif dans la table sys_user_temp*/
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php");
+ include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/User/ressource/usermanagerdb.php");
//Création de l'objet
$MyManager=new UserManagerDb();
//On fixe la table par la méthode getTable
- $MyManager->setTable("sys_object_user_temp");
+ $MyManager->setTable("sys_user_temp");
/*Inclusion de la librairie NodeGroupUserManagerDb pour effectuer l'insertion dans la table sys_node_group_user_temp*/
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php");
+ include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/NodeGroupUser/ressource/nodegroupusermanagerdb.php");
//Création de l'objet
$MyNodeGroupUser=new NodeGroupUserManagerDb();
//On fixe la table par la méthode getTable
- $MyNodeGroupUser->setTable("sys_object_node_group_user_temp");
+ $MyNodeGroupUser->setTable("sys_node_group_user_temp");
# Teste si il y a des enregistrements sur MyManager (table temporaire) ou sur la table des comptes
if (($MyManager->checkValid($_POST["user_login"], $_POST["user_password"]) != 0) || ($GLOBALS['SYSTEM_MANAGER']['USER']->checkValid($_POST["user_login"], $_POST["user_password"]) != 0))
{
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "user_exist";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlectureadh.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdh($_POST);
- } elseif (($MyManager->checkLoginExist($_POST["user_login"]) != 0) || ($GLOBALS['SYSTEM_MANAGER']['USER']->checkLoginExist($_POST["user_login"]) != 0)) {
$GLOBALS["SYSTEM_CONTROL"]->messageSystem = "user_exist";
$GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlecture.mxt");
$GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
$this->formLecture($_POST);
- } else {
+ // systemRedirect(formatUrl($this->getId(),"Home","formLecture","user_exist"));
+ }
+ else
+ {
//On créé un nouvel objet User pour effectuer l'insertion de chaque champs
$MyUser=new User();
@@ -2185,1350 +426,59 @@ Class Home extends CoordinationObj
$MyUser->setLogin($_POST['user_login']);
$MyUser->setPassword($_POST['user_password']);
$MyUser->setMail($_POST['user_mail']);
- $MyUser->setBirthDate($_POST['user_birthdate']);
- $MyUser->setMsn($_POST['user_msn']);
- $MyUser->setJabber($_POST['user_jabber']);
- $MyUser->setFacebook($_POST['user_facebook']);
- $MyUser->setMastodon($_POST['user_mastodon']);
- $MyUser->setWebsite($_POST['user_website']);
-// $MyUser->setPostalAddress($_POST['user_postal_address']);
+ $MyUser->setPostalAddress($_POST['user_postal_address']);
$MyUser->setPostalCode($_POST['user_postal_code']);
$MyUser->setCity($_POST['user_city']);
$MyUser->setState($_POST['user_state']);
$MyUser->setCountry($_POST['user_country']);
-// $MyUser->setOrganisation($_POST['user_organisation']);
+ $MyUser->setOrganisation($_POST['user_organisation']);
$MyUser->setTel($_POST['user_tel']);
-// $MyUser->setFax($_POST['user_fax']);
-// $MyUser->setComment($_POST['user_comment']);
-
- if( !$subscriptionrequest ) {
- $MyUser->setPostalAddress($_POST['user_postal_address']);
- //On enregistre les paramètres
- $ObjUsersave = $MyManager->saveInstance($MyUser);
+ $MyUser->setFax($_POST['user_fax']);
+ $MyUser->setComment($_POST['user_comment']);
+ //On enregistre les paramètres
+ $ObjUsersave = $MyManager->saveInstance($MyUser);
- //Insertion du noeud temporaire de l'utilisateur
- //Champs concernés : user_id, group_id, node_id, is_node_only, is_forbidden
- $MyNodeUser =new NodeGroupUser();
- $MyNodeUser->setUserId($ObjUsersave->getId());
-
- if(isset($_GET['param']))
- {
- $MyNodeUser->setNodeId($_GET['param']);
- }
-// if($subscriptionrequest)
-// $MyNodeUser->setGroupId($this->recupCommunauty("subsgroup"));
-// else
- $MyNodeUser->setGroupId($this->recupCommunauty("usergroup"));
-
- // $MyNodeUser->setIsForbidden(0);
- // $MyNodeUser->setIsNodeOnly(0);
-
- //on enregistre les paramètres
- $test = $MyNodeGroupUser->saveInstance($MyNodeUser);
-
-// require_once('lib/package/class.phpmailer.php');
-// $address = $_POST['user_mail'];
-//
-// $mail = new PHPMailer(); // defaults to using php "mail()"
-// $body = file_get_contents('lib/package/phpmailer/templates/preinscription_'.$_GET['param'].'.html');
-// $body = eregi_replace("[\]",'',$body);
-// $body = str_replace("<#NOM#>",$_POST['user_first_name'],$body);
-// $body = str_replace("<#PRENOM#>",$_POST['user_last_name'],$body);
-// $body = str_replace("<#IDENTIFIANT#>",$_POST['user_login'],$body);
-// $body = str_replace("<#PASSWORD#>",$_POST['user_password'],$body);
-// $body = str_replace("<#MAIL#>",$_POST['user_mail'],$body);
-// $mail->isMail();
-// $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
-// $mail->AddReplyTo($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
-// $mail->SetFrom($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
-// $mail->AddAddress($address, $_POST['user_first_name']);
-// $mail->AddBCC($this->recupCommunauty("mailnode"), "");
-// $mail->Subject = "Votre inscription sur le site web ".$_SERVER['SERVER_NAME'];
-// // $mail->AltBody = "Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !";
-// $mail->MsgHTML(utf8_decode($body));
-// $mail->AddAttachment("data/image/communities/".$_GET['param']."_logo.png"); // attachment
-//
-// if(!$mail->Send()) {
-// // systemRedirect(absoluteUrl("user_preinsc_error", $_GET['param']));
-// $this->formLectureAdh($_POST);
-// } else {
-// // systemRedirect(absoluteUrl("user_preinsc_success",$_GET['param']));
-// systemRedirect(formatUrl($this->getId(), "Home", "lectureInscSuccess"));
-// }
-
- require_once('lib/package/class.phpmailer.phpmailer.php');
- $address = $_POST['user_mail'];
-
- try {
- $mail = new PHPMailer(true);
- $body = file_get_contents('lib/package/phpmailer/templates/preinscription_139.html');
-// $body = eregi_replace("[\]",'',$body);
-// $v = preg_quote($body, '/');
-// $body = preg_replace("/[\\]/i",'',$body);
-// $body = preg_replace("/$v/", '', $body);
- $body = str_replace("<#NOM#>",$_POST['user_first_name'],$body);
- $body = str_replace("<#PRENOM#>",$_POST['user_last_name'],$body);
- $body = str_replace("<#IDENTIFIANT#>",$_POST['user_login'],$body);
- $body = str_replace("<#PASSWORD#>",$_POST['user_password'],$body);
- $body = str_replace("<#MAIL#>",$_POST['user_mail'],$body);
- $mail->isMail();
- $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
- $mail->AddReplyTo($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->SetFrom($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->AddAddress($address, $_POST['user_first_name']);
- $mail->AddBCC($this->recupCommunauty("mailnode"), "");
- $mail->Subject = "Votre inscription sur le site web ".$_SERVER['SERVER_NAME'];
- $mail->AddAttachment("data/image/communities/".$_GET['param']."_logo.png"); // attachment
- $mail->isHTML(true);
- $mail->Body = utf8_decode($body);
-// $mail->AltBody = 'Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !';
-
- $mail->send();
- systemRedirect(formatUrl($this->getId(), "Home", "lectureInscSuccess"));
- } catch (Exception $e) {
- $this->formLectureAdh($_POST);
-// echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
- }
-
- } elseif( $subscriptionrequest ) {
- $this->processSubscription($MyUser);
+ //Insertion du noeud temporaire de l'utilisateur
+ //Champs concernés : user_id, group_id, node_id, is_node_only, is_forbidden
+ $MyNodeUser =new NodeGroupUser();
+ $MyNodeUser->setUserId($ObjUsersave->getId());
+ if(isset($_GET['param']))
+ {
+ $MyNodeUser->setNodeId($_GET['param']);
}
+ $MyNodeUser->setGroupId(0);
+ $MyNodeUser->setIsForbidden(0);
+ $MyNodeUser->setIsNodeOnly(0);
+
+ //on enregistre les paramètres
+ $test = $MyNodeGroupUser->saveInstance($MyNodeUser);
+
+ /*Indexation dans le moteur de recherche*/
+ if (includePackage("search.php")){
+ $status=1;
+ Search::addSearch("¶m=".$ObjUsersave->getId(), "usertemp", array("actionManageRegister"=>"actionManageRegister"), $MyUser->getFirstName()." ".$MyUser->getLastName(), $MyUser->getMail()." ".$MyUser->getTel(), "", $status, 0, 0, 0, $_GET['param']);
+ /*On récupère l'oid de l'objet dans les droits selon le nid de la communauté*/
+ /*$oidObj = Search::getOidFromNameAndNode("usertemp", $_GET['param']);
+ if($oidObj != 0)
+ {
+ Search::addSearch("¶m=".$ObjUsersave->getId(), "usertemp", array("actionManageRegister"=>"actionManageRegister"), $MyUser->getFirstName()." ".$MyUser->getLastName(), $MyUser->getMail()." ".$MyUser->getTel(), "", $status, $oidObj);
+ }*/
+ }
+
+ # Redirection vers le formulaire
+ systemRedirect(absoluteUrl("user_subscribe",$_GET['param']));
}
- }
- else //si la/les Charte(s) n'est pas validée
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "chartnessaryaccept";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlectureadh.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdh($_POST);
- }
+// }
+// else //si la Charte n'est pas validée
+// {
+// $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "chartnessaryaccept";
+// $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formLecture.mxt");
+// $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
+// $this->formLecture($_POST);
+// }
return "";
}
-/**
-* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
-* @access public
-* @return chaine chaine vide
-*/
- function execLectureAdhStruct()
- {
- if (!checkProvenance("formLectureAdhSoc") && !checkProvenance("execLectureAdhSoc")) {
- redirect("http://www.noob.com/"); die("Hacking attempt");
- }
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
-// var_dump($_POST);
-
- $subscriptionrequest = ( isset($_POST["subscriptionform"]) && $_POST["subscriptionform"] == 1)?true:false;
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscribestatus.ini");
- //On vide la chaine de vérification des champs obligatoires
- $chaine = "";
-
- if($_POST && !$subscriptionrequest)
- {
-// echo "Inscription simple
";
- foreach($_POST as $cle=>$val)
- {
-// echo $cle."\t".$val;
- if($val=="" && ($cle !="struct_country" && $cle !="struct_siret" && $cle !="struct_tva" && $cle !="struct_website" && $cle !="struct_facebook" && $cle !="struct_mastodon" && $cle !="struct_twitter" && $cle !="struct_google" && $cle !="user_birthdate" && $cle !="user_msn" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_google" && $cle !="user_website" && $cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country" && $cle !="user_state" && $cle !="user_postal_address" && $cle !="user_postal_addressmand" && $cle!="user_tel" && $cle!=$_SESSION['qaptcha_key']))
- {
- $chaine .= getMessage($cle).", ";
-// echo " obligatoire
";
- }
- }
- if($chaine!="")
- {
- $chaine .= getMessage('obligatory');
- }
- } elseif ($_POST && $subscriptionrequest) {
-// echo "Inscription avec adhésion
";
- foreach($_POST as $cle=>$val)
- {
-// echo $cle."\t".$val."
";
- if($val=="" && ($cle !="struct_country" && $cle !="struct_siret" && $cle !="struct_tva" && $cle !="struct_website" && $cle !="struct_facebook" && $cle !="struct_mastodon" && $cle !="struct_twitter" && $cle !="struct_google" && $cle !="user_msn" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_google" && $cle !="user_website" && $cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country" && $cle !="user_state" && $cle !="user_postal_address" && $cle !="user_postal_addressmand" && $cle!="user_tel" && $cle!=$_SESSION['qaptcha_key']))
- {
- $chaine .= getMessage($cle).", ";
- }
- }
- if( $_POST["user_birthdate"]=="jj/mm/aaa" )
- $chaine .= getMessage("user_birthdate").", ";
- if($chaine!="")
- {
- $chaine .= getMessage('obligatory');
- }
- }
-/*
-* Olivier case du chemin.... :-(
-* 22/06/05
-*/
- //Si certains champs sont manquants pour l'inscription
- if ($chaine != "")
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = $chaine;
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlectureadhsoc.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdhSoc($_POST);
- return "";
- }
- else
- {
- if($_POST["user_password"] != $_POST["user_password2"])
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "password_error";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlectureadhsoc.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdhSoc($_POST);
- return "";
- }
-
- }
-
- if( isset($_POST['charteSite']) )
- {
- /*Inclusion de la librairie UserManagerDb pour effectuer l'insertion et la vérif dans la table sys_user_temp*/
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php");
- //Création de l'objet
- $MyManager=new UserManagerDb();
- //On fixe la table par la méthode getTable
- $MyManager->setTable("sys_object_user_temp");
-
- /*Inclusion de la librairie NodeGroupUserManagerDb pour effectuer l'insertion dans la table sys_node_group_user_temp*/
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php");
- //Création de l'objet
- $MyNodeGroupUser=new NodeGroupUserManagerDb();
- //On fixe la table par la méthode getTable
- $MyNodeGroupUser->setTable("sys_object_node_group_user_temp");
-
- includeBO("entities/entities.php");
- $entity = new Entities();
-// $arrPaymentMethods = $paymentMethods->getListSolutions();
-
- # Teste si il y a des enregistrements sur MyManager (table temporaire) ou sur la table des comptes
- if (($MyManager->checkValid($_POST["user_login"], $_POST["user_password"]) != 0) || ($GLOBALS['SYSTEM_MANAGER']['USER']->checkValid($_POST["user_login"], $_POST["user_password"]) != 0))
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "user_exist";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlectureadhsoc.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdhSoc($_POST);
- } elseif (($MyManager->checkLoginExist($_POST["user_login"]) != 0) || ($GLOBALS['SYSTEM_MANAGER']['USER']->checkLoginExist($_POST["user_login"]) != 0)) {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "user_exist";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlecturesoc.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdhSoc($_POST);
- } else {
- //On créé un nouvel objet User pour effectuer l'insertion de chaque champs
- $MyUser=new User();
- $MyUser->setTitle($_POST['user_title']);
- $MyUser->setFirstName($_POST['user_first_name']);
- $MyUser->setLastName($_POST['user_last_name']);
- $MyUser->setLogin($_POST['user_login']);
- $MyUser->setPassword($_POST['user_password']);
- $MyUser->setMail($_POST['user_mail']);
- $MyUser->setBirthDate($_POST['user_birthdate']);
- $MyUser->setMsn($_POST['user_msn']);
- $MyUser->setJabber($_POST['user_jabber']);
- $MyUser->setFacebook($_POST['user_facebook']);
- $MyUser->setFacebook($_POST['user_mastodon']);
-// $MyUser->setWebsite($_POST['user_website']);
-// $MyUser->setPostalAddress($_POST['user_postal_address']);
- $MyUser->setPostalCode($_POST['user_postal_code']);
- $MyUser->setCity($_POST['user_city']);
- $MyUser->setState($_POST['user_state']);
- $MyUser->setCountry($_POST['user_country']);
-// $MyUser->setOrganisation($_POST['user_organisation']);
-// $MyUser->setTel($_POST['user_tel']);
-// $MyUser->setFax($_POST['user_fax']);
-// $MyUser->setComment($_POST['user_comment']);
-
- $entity->setCommunityId($this->recupCommunauty("id"));
- $entity->setEntityType($_POST['struct_type']);
- $entity->setEntityLibelle($_POST['struct_denomination']);
-// $entity->setEntitySubscriptionDate($_POST['']);
-// $entity->setEntityPaymentDate($_POST['']);
- $entity->setEntitySubscriptionStatus('pending');
- $entity->setEntitySubscriptionNumber($entity->makeEntitySubscriptionNumber());
- $entity->setEntitySubscriptionCode($entity->makeEntitySubscriptionCode());
-
-// var_dump($entity);
-
- if( !$subscriptionrequest ) {
- $MyUser->setPostalAddress($_POST['user_postal_address']);
- //On enregistre les paramètres
- $ObjUsersave = $MyManager->saveInstance($MyUser);
-
- //Insertion du noeud temporaire de l'utilisateur
- //Champs concernés : user_id, group_id, node_id, is_node_only, is_forbidden
- $MyNodeUser =new NodeGroupUser();
- $MyNodeUser->setUserId($ObjUsersave->getId());
-
- if(isset($_GET['param']))
- {
- $MyNodeUser->setNodeId($_GET['param']);
- }
-// if($subscriptionrequest)
-// $MyNodeUser->setGroupId($this->recupCommunauty("subsgroup"));
-// else
- $MyNodeUser->setGroupId($this->recupCommunauty("usergroup"));
-
- // $MyNodeUser->setIsForbidden(0);
- // $MyNodeUser->setIsNodeOnly(0);
-
- //on enregistre les paramètres
- $test = $MyNodeGroupUser->saveInstance($MyNodeUser);
-
-// require_once('lib/package/class.phpmailer.php');
-// $address = $_POST['user_mail'];
-//
-// $mail = new PHPMailer(); // defaults to using php "mail()"
-// $body = file_get_contents('lib/package/phpmailer/templates/preinscriptionstruct_'.$_GET['param'].'.html');
-// $body = eregi_replace("[\]",'',$body);
-// $body = str_replace("<#NOM#>",$_POST['user_first_name'],$body);
-// $body = str_replace("<#PRENOM#>",$_POST['user_last_name'],$body);
-// $body = str_replace("<#IDENTIFIANT#>",$_POST['user_login'],$body);
-// $body = str_replace("<#PASSWORD#>",$_POST['user_password'],$body);
-// $body = str_replace("<#MAIL#>",$_POST['user_mail'],$body);
-// $mail->isMail();
-// $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
-// $mail->AddReplyTo($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
-// $mail->SetFrom($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
-// $mail->AddAddress($address, $_POST['user_first_name']);
-// $mail->AddBCC($this->recupCommunauty("mailnode"), "");
-// $mail->Subject = "Votre inscription sur le site web ".$_SERVER['SERVER_NAME'];
-// // $mail->AltBody = "Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !";
-// $mail->MsgHTML(utf8_decode($body));
-// $mail->AddAttachment("data/image/communities/".$_GET['param']."_logo.png"); // attachment
-//
-// if(!$mail->Send()) {
-// // systemRedirect(absoluteUrl("user_preinsc_error", $_GET['param']));
-// $this->formLectureAdhSoc($_POST);
-// } else {
-// // systemRedirect(absoluteUrl("user_preinsc_success",$_GET['param']));
-// systemRedirect(formatUrl($this->getId(), "Home", "lectureInscSuccessSoc"));
-// }
-
- require_once('lib/package/class.phpmailer.phpmailer.php');
- $address = $_POST['user_mail'];
-
- try {
- $mail = new PHPMailer(true);
- $body = file_get_contents('lib/package/phpmailer/templates/preinscriptionstruct_'.$_GET['param'].'.html');
-// $body = eregi_replace("[\]",'',$body);
-// $v = preg_quote($body, '/');
-// $body = preg_replace("/[\\]/i",'',$body);
-// $body = preg_replace("/$v/", '', $body);
- $body = str_replace("<#NOM#>",$_POST['user_first_name'],$body);
- $body = str_replace("<#PRENOM#>",$_POST['user_last_name'],$body);
- $body = str_replace("<#IDENTIFIANT#>",$_POST['user_login'],$body);
- $body = str_replace("<#PASSWORD#>",$_POST['user_password'],$body);
- $body = str_replace("<#MAIL#>",$_POST['user_mail'],$body);
- $mail->isMail();
- $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
- $mail->AddReplyTo($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->SetFrom($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->AddAddress($address, $_POST['user_first_name']);
- $mail->AddBCC($this->recupCommunauty("mailnode"), "");
- $mail->Subject = "Votre inscription sur le site web ".$_SERVER['SERVER_NAME'];
- $mail->AddAttachment("data/image/communities/".$_GET['param']."_logo.png"); // attachment
- $mail->isHTML(true);
- $mail->Body = utf8_decode($body);
-// $mail->AltBody = 'Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !';
-
- $mail->send();
- systemRedirect(formatUrl($this->getId(), "Home", "lectureInscSuccessSoc"));
- } catch (Exception $e) {
- $this->formLectureAdhSoc($_POST);
-// echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
- }
-
- } elseif( $subscriptionrequest ) {
- $this->processSubscriptionSoc($MyUser);
- }
- }
- }
- else //si la/les Charte(s) n'est pas validée
- {
- $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "chartnessaryaccept";
- $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/home/formlectureadhsoc.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative");
- $this->formLectureAdhSoc($_POST);
- }
- return "";
- }
-
-/**
-* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
-* @access public
-* @return chaine chaine vide
-*/
- function processSubscription($MyUser)
- {
- if (!checkProvenance("formLecture") && !checkProvenance("execlecture") && !checkProvenance("inscription")) {
- redirect("http://www.noob.com/"); die("Hacking attempt");
- }
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
-
- $subscriptionrequest = ( isset($_POST["subscriptionform"]) && $_POST["subscriptionform"] == 1)?true:false;
- $user_subscription_type = ( isset($_POST["subscriptiontype"]) && $_POST["subscriptiontype"] != "")?$_POST["subscriptiontype"]:false;
- $user_subscription_date = ( isset($_POST["subscriptiondate"]) && $_POST["subscriptiondate"] != "")?$_POST["subscriptiondate"]:time();
- $user_subscription_status = ( isset($_POST["subscriptionstatus"]) && $_POST["subscriptionstatus"] != "")?$_POST["subscriptionstatus"]:"progress";
- $user_subscription_payment_method = ( isset($_POST["paymentMethod"]) && $_POST["paymentMethod"] != "")?$_POST["paymentMethod"]:false;
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "processsubscription");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscriptions.ini");
-
- $MyUser->setPostalAddress($_POST['user_postal_addressmand']);
-// $MyUser->setBirthDate($_POST['user_birthdate']);
- //On enregistre l'objet Utilisateur
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php");
- //Création de l'objet
- $MyManager=new UserManagerDb();
- //On fixe la table par la méthode getTable
- $MyManager->setTable("sys_object_user_temp");
- $ObjUsersave = $MyManager->saveInstance($MyUser);
-
- //Insertion du noeud temporaire de l'utilisateur
- //Champs concernés : user_id, group_id, node_id, is_node_only, is_forbidden
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php");
- //Création de l'objet
- $MyNodeGroupUser=new NodeGroupUserManagerDb();
- //On fixe la table par la méthode getTable
- $MyNodeGroupUser->setTable("sys_object_node_group_user_temp");
- $MyNodeUser =new NodeGroupUser();
- $MyNodeUser->setUserId($ObjUsersave->getId());
-
- if(isset($_GET['param']))
- {
- $MyNodeUser->setNodeId($_GET['param']);
- }
- if($subscriptionrequest)
- $MyNodeUser->setGroupId($this->recupCommunauty("subsgroup"));
- else
- $MyNodeUser->setGroupId($this->recupCommunauty("usergroup"));
-
- //on enregistre les paramètres
- $test = $MyNodeGroupUser->saveInstance($MyNodeUser);
-
- // On insère les données d'adhésion avec le status 'progress'
- includeBO("subscriptions/subscriptions.php");
- $subscription = new Subscriptions;
- $user_subscription_number = $subscription->makeUserSubscriptionNumber();
- $recSubscription = $subscription->doInsert($ObjUsersave->getId(), $this->recupCommunauty("id"), $user_subscription_type, getMessage($user_subscription_type)." ".$ObjUsersave->getLogin(), $user_subscription_date, "", $user_subscription_status, $user_subscription_number);
-
- includeBO("subscriptions/subscriptionsforms.php");
- $subscriptionsforms = new SubscriptionsForms();
- $subscriptionform = $subscriptionsforms->doLoadFromType($user_subscription_type);
-
- /* PAYPAL REVERSE CALCULATION
- /* A = (B + C) / 1 - (D / 100)
- /* WHERE
- /* A = $totalPrice = The amount to charge
- /* B = $totalItems = The net amount you wish to receive after PayPal charges
- /* C = $fixedFee = The PayPal fixed transaction fee (France - 0.25)
- /* D = $percentFee = The PayPal percentage fee (France - 3.4%)
- */
-
-// $fixedFee = 0.25;
-// $percentFee = 3.4;
-
-// $totalPrice = ($subscriptionform["subscription_amount"]+$fixedFee)/(1 - $percentFee / 100);
-// $totalFee = ($totalPrice * ($percentFee / 100)) + $fixedFee;
-
-// calcTotalAmount($subscriptionform["subscription_amount"])
-
- if( $user_subscription_payment_method ) {
- switch ($user_subscription_payment_method) {
- case "paypal":
- includeBO("paypal/paypal.php");
- $paypal = new Paypal();
-// $payment_solution = "paypal";
- $totalAmount = $subscriptionform["subscription_amount"];
- $feeAmount = $paypal->calcFeeAmount($subscriptionform["subscription_amount"]);
- break;
- case "money":
-// $payment_solution = "onsite";
- $totalAmount = $subscriptionform["subscription_amount"];
- $feeAmount = 0.00;
- break;
- case "check":
-// $payment_solution = "onsite";
- $totalAmount = $subscriptionform["subscription_amount"];
- $feeAmount = 0.00;
- break;
- case "transfer":
-// $payment_solution = "onsite";
- $totalAmount = $subscriptionform["subscription_amount"];
- $feeAmount = 0.00;
- break;
- case "bankonline":
-// $payment_solution = "bankonline";
- $totalAmount = $subscriptionform["subscription_amount"];
- $feeAmount = 0.00;
- break;
- default:
- $user_subscription_payment_method = "other";
- $totalAmount = $subscriptionform["subscription_amount"];
- $feeAmount = 0.00;
- break;
- }
- }
-
- includeBO("payments/payments.php");
- $payment = new Payments();
- $recPayment = $payment->doInsert("", $this->recupCommunauty("id"), $ObjUsersave->getId(), "in", "", "", $user_subscription_date, $user_subscription_type, $totalAmount, $feeAmount, "", "", "", $user_subscription_payment_method, "progress");
-
- $tabObject =$this->getObjectSon(eid());
- if (($this->recupCommunauty("ctype") == "asso") && (count($tabObject) >> 0) )
- {
- for ($i=0; $igetClassName()=="CorporateInfos")
- {
- $urlArray["id"]=$tabObject[$i][1]->getId();
- $urlArray["classname"]=$tabObject[$i][0]->getClassName();
- }
- }
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkStatuts", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","2"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLStatuts", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/2014-LCube-Statuts-000001.pdf");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkRegInt", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","3"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLRegInt", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkChartConf", formatUrl($urlArray["id"],$urlArray["classname"],"actionLectureInfo","","4"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("blocSubscriptionsForms".".linkDLChartConf", "data/upload/".$this->recupCommunauty("id")."/HomeFiles/Documents/charte de confidentialité.pdf");
- }
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("CommName", $this->recupCommunauty("lib", $currentCode));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"Home","lectureProcessPayment","",$recPayment));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlCancel",formatUrl($this->getId(),"Home","lectureResultPayment","",$recPayment));
-
-// $GLOBALS['SYSTEM_TEMPLATE']->MxImage("iconSuccessInsc", "./data/template/".$GLOBALS["SYSTEM_USER_SESSION"]->getCurrentTemplate()."/media/picto/assessments-300x300.png", "", 128);
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("pictoLinkStepOK", "./data/template/".$GLOBALS["SYSTEM_USER_SESSION"]->getCurrentTemplate()."/media/picto/StepOK.png");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("pictoLinkStepNO", "./data/template/".$GLOBALS["SYSTEM_USER_SESSION"]->getCurrentTemplate()."/media/picto/StepNO.png");
-// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("altText", "Félicitations : Votre compte est créé !");
- }
-
-/**
-* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
-* @access public
-* @return chaine chaine vide
-*/
- function lectureProcessPayment()
- {
-// if (!checkProvenance("processSubscription")) {
-// redirect("http://www.noob.com/"); die("Hacking attempt");
-// }
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
- if(isset($_GET['param']))
- {
- $paymentId = $_GET['param'];
- }
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- addMessageFile("subscriptions.ini");
-
- includeBO("payments/payments.php");
- $payment = new Payments();
- $curPayment = $payment->doLoadFromId($paymentId);
-
- includeBO("subscriptions/subscriptionsforms.php");
- $subscriptionsforms = new SubscriptionsForms();
- $subscriptionform = $subscriptionsforms->doLoadFromType($curPayment["payment_libelle"]);
-
- if( $curPayment["payment_solution"] == "paypal" ) {
- includeBO("paypal/paypal.php");
- $paypal = new Paypal();
-
- $lien_cancel = formatUrl($this->getId(),"Home","lectureResultPayment","","annule");
- $lien_accepted = formatUrl($this->getId(),"Home","lectureResultPayment","","accepte");
-
- $options = array(
- 'PAYMENTREQUEST_0_DESC' => getMessage($curPayment["payment_libelle"]).' ('.$subscriptionform["subscription_amount"].' €uros + '.$curPayment["payment_fee_amount"].'€ commission Paypal)',
- // 'HDRIMG' => 'https://www.fab-l3.org/data/images/communities/139_logo_paypal.png',
- // 'LOGOIMG' => 'http://www.fab-l3.org/data/images/communities/139_logo_paypal.png',
- 'NOSHIPPING' => 1,
- 'L_PAYMENTREQUEST_0_NAMEm' => getMessage($curPayment["payment_libelle"]),
- 'L_PAYMENTREQUEST_0_QTYm' => 1,
- 'PAYMENTREQUEST_0_CUSTOM' => $curPayment["payment_id"]
- );
-
- $valeur = $paypal->SetExpressCheckout($lien_cancel, $lien_accepted, $curPayment["payment_amount"], $options);
- $_GET['token'] = $valeur['TOKEN']; // recu par paypal
- } elseif( $curPayment["payment_solution"] == "money" ) {
- $this->lectureResultMoney($paymentId);
- } elseif( $curPayment["payment_solution"] == "check" ) {
- $this->lectureResultCheck($paymentId);
- }
- }
-
-/**
-* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
-* @access public
-* @return chaine chaine vide
-*/
- function lectureResultPayment($paymentId=null)
- {
-// if (!checkProvenance("processSubscription")) {
-// redirect("http://www.noob.com/"); die("Hacking attempt");
-// }
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "processresultpayment");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscriptions.ini");
- addMessageFile("adminaccounting.ini");
-
- if( isset($_GET["PayerID"]) ) {
- includeBO("paypal/paypal.php");
- $paypal = new Paypal();
- $details_paypal = $paypal->getExpressCheckoutDetails($_GET['token']);
- $paymentId = $details_paypal["PAYMENTREQUEST_0_CUSTOM"];
- }
-
- includeBO("payments/payments.php");
- $payment = new Payments();
- $curPayment = $payment->doLoadFromId($paymentId);
-
- includeBO("subscriptions/subscriptions.php");
- $subscription = new Subscriptions();
- $curSubscription = $subscription->doLoadFromUserId($curPayment["payment_user_id"]);
-
- if( $paymentId && $curPayment["payment_solution"] == "paypal" ) {
-
- if(isset($_GET['amp;param']) && $_GET['amp;param'] == 'accepte' && isset($_GET['token']) && strlen($_GET['token']) && isset($_GET['PayerID']) && strlen($_GET['PayerID']))
- {
- // $details_paypal = $paypal->getExpressCheckoutDetails($_GET['token']);
- $result = $paypal->DoExpressCheckoutPayment(htmlentities($details_paypal["TOKEN"]), $details_paypal["PAYMENTREQUEST_0_CUSTOM"], $details_paypal["AMT"], $details_paypal["PAYERID"]);
-
- if($result['error']) {
- $result = $result['error']['message']."
".$result['error']['internal_message']."
".$result['error']['code'];
- $saveUser = false;
- $paymentDate = false;
- $token = false;
- $transId = false;
- $actionPaymentDate = mktime(0, 1, 0, 1, 1, 1970);
- $actionSubscriptionStatus = "cancelled";
- $actionPaymentStatus = "cancel";
- } else {
- $result = "Paiement validé par Paypal !";
- $saveUser = true;
- $paymentDate = time();
- $token = $details_paypal["TOKEN"];
- $transId = $details_paypal["TOKEN"];
- $actionPaymentDate = time();
- $actionSubscriptionStatus = "validated";
- $actionPaymentStatus = "done";
- }
- }
- } elseif( $paymentId && $curPayment["payment_solution"] == "money" ) {
- $result = "Paiement sur site en liquide !";
- $saveUser = true;
- $paymentDate = false;
- $token = false;
- $transId = false;
- $actionPaymentDate = mktime(0, 1, 0, 1, 1, 1970);
- $actionSubscriptionStatus = "validated";
- $actionPaymentStatus = "progress";
- } elseif( $paymentId && $curPayment["payment_solution"] == "check" ) {
- $result = "Paiement en chèque par envoi postal ou sur site !";
- $saveUser = true;
- $paymentDate = false;
- $token = false;
- $transId = false;
- $actionPaymentDate = mktime(0, 1, 0, 1, 1, 1970);
- $actionSubscriptionStatus = "validated";
- $actionPaymentStatus = "progress";
- } elseif( isset($_GET['param']) && $_GET['param'] == 'annule' ) {
- $result = "Paiement annulé !";
- $saveUser = false;
- $paymentDate = false;
- $token = false;
- $transId = false;
- $actionPaymentDate = mktime(0, 1, 0, 1, 1, 1970);
- $actionSubscriptionStatus = "cancelled";
- $actionPaymentStatus = "cancel";
- }
-
- $nodeId = $this->recupCommunauty('id');
- $tabUserIdTemp = $curPayment["payment_user_id"];
-
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php");
- $MyUserManagerTemp=new UserManagerDb();
- $MyUserManagerTemp->setTable(DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."user_temp");
-
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php");
- $MyNodeGroupUserManager=new NodeGroupUserManagerDb();
- $MyNodeGroupUserManager->setTable(DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."node_group_user_temp");
-
- $objUserTemp = $MyUserManagerTemp->createInstance($tabUserIdTemp);
- $tabNodeGroupUser=$MyNodeGroupUserManager->getInstanceFromUserId($objUserTemp->getId(), array() );
-
- if( $saveUser ) {
- if (count($tabNodeGroupUser)==1)
- {
- if ( $nodeId==$tabNodeGroupUser[0]->getNodeId() )
- {
- $actionPaymenDate = time();
- $userTempId = $objUserTemp->getId();/*Récuperation de l'id de l'utilisateur temporaire pour l'indexation*/
- $objUserTemp = $MyUserManagerTemp->deleteInstance($objUserTemp); //ca marche : suppression de l'enregistrement
- $MyNodeGroupUserManager->deleteInstance($tabNodeGroupUser[0]);
-
- $objUser=$GLOBALS["SYSTEM_MANAGER"]["USER"]->insertInstance($objUserTemp);
- $objGroupUser=new GroupUser();
- $objGroupUser->setUserId($objUser->getId());
- if( $paymentId && ($curPayment["payment_solution"] == "check" || $curPayment["payment_solution"] == "money") )
- $objGroupUser->setGroupId($this->recupCommunauty('subsgrouptemp'));
- else
- $objGroupUser->setGroupId($this->recupCommunauty('subsgroup'));
-
- $objGroupUser=$GLOBALS["SYSTEM_MANAGER"]["GROUP_USER"]->insertInstance($objGroupUser);
-
- includeBO("owncloud/owncloud.php");
- $owncloudCall = new Owncloud();
- $regUserOwncloud = $owncloudCall->createUserOC($objUser->getLogin(), $objUser->getLastName()." ".$objUser->getFirstName(), $objUser->getPassword());
-
-// includeBO("subscriptions/subscriptions.php");
-// $subscription = new Subscriptions;
- $recSubscription = $subscription->doUpdateAfterPayment($userTempId, $objUser->getId(), $actionPaymentDate, $actionSubscriptionStatus, $curSubscription["user_subscription_number"]);
-
- $updatePayment = $payment->doUpdateAfterPayment($paymentId, $objUser->getId(), $actionPaymentDate, $actionPaymentStatus);
-
-// require_once('lib/package/class.phpmailer.php');
-// $address = $objUser->getMail();
-//
-// $mail = new PHPMailer(); // defaults to using php "mail()"
-// $body = file_get_contents('lib/package/phpmailer/templates/subscription-confirmed_'.$this->recupCommunauty("id").'.html');
-// $body = eregi_replace("[\]", '', $body);
-// $body = str_replace("<#WEBSITEURL#>", "http://".$_SERVER['SERVER_NAME'], $body);
-// $body = str_replace("<#IDENTIFIANT#>", $objUser->getLogin(), $body);
-// $body = str_replace("<#COMMUNITY#>", $this->recupCommunauty("lib", $currentCode), $body);
-// $body = str_replace("<#NOM#>", $objUser->getFirstName(), $body);
-// $body = str_replace("<#PRENOM#>", $objUser->getLastName(), $body);
-// $body = str_replace("<#PASSWORD#>", $objUser->getPassword(), $body);
-// $body = str_replace("<#MAIL#>", $objUser->getMail(), $body);
-// $body = str_replace("<#SUBSNUMBER#>", $curSubscription["user_subscription_number"], $body);
-// $body = str_replace("<#SUBSDATE#>", mktimetodate($curSubscription["user_subscription_date"], "d/m/Y - H:i"), $body);
-// $body = str_replace("<#SUBSTYPE#>", getMessage($curSubscription["user_subscription_type"]), $body);
-// $body = str_replace("<#PAYMETHOD#>", $curPayment["payment_solution"], $body);
-// if( $paymentDate )
-// $body = str_replace("<#PAYDATE#>", mktimetodate($actionPaymentDate, "d/m/Y - H:i"), $body);
-// else
-// $body = str_replace("<#PAYDATE#>", "À régler", $body);
-// if( $transId )
-// $body = str_replace("<#PAYTRANSID#>", $transId, $body);
-// else
-// $body = str_replace("<#PAYTRANSID#>", "Aucun", $body);
-// $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
-// $mail->AddReplyTo($this->recupCommunauty("mailnode"), $this->recupCommunauty("lib", $currentCode));
-// $mail->SetFrom($this->recupCommunauty("mailnode"), $this->recupCommunauty("lib", $currentCode));
-// $mail->AddAddress($address, $objUser->getFirstName());
-// $mail->AddBCC($this->recupCommunauty("mailnode"), "");
-// $mail->Subject = utf8_decode("Votre adhesion à ".$this->recupCommunauty("lib", $currentCode));
-// // $mail->AltBody = "Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !";
-// $mail->MsgHTML(utf8_decode($body));
-// $mail->AddAttachment("data/image/communities/".$this->recupCommunauty("id")."_logo.png"); // attachment
-//
-// $sentMail = $mail->Send();
-
- require_once('lib/package/class.phpmailer.phpmailer.php');
- $address = $objUser->getMail();
-
- try {
- $mail = new PHPMailer(true);
- $body = file_get_contents('lib/package/phpmailer/templates/subscription-confirmed_'.$this->recupCommunauty("id").'.html');
-// $body = eregi_replace("[\]",'',$body);
-// $v = preg_quote($body, '/');
-// $body = preg_replace("/[\\]/i",'',$body);
-// $body = preg_replace("/$v/", '', $body);
- $body = str_replace("<#WEBSITEURL#>", "http://".$_SERVER['SERVER_NAME'], $body);
- $body = str_replace("<#IDENTIFIANT#>", $objUser->getLogin(), $body);
- $body = str_replace("<#COMMUNITY#>", $this->recupCommunauty("lib", $currentCode), $body);
- $body = str_replace("<#NOM#>", $objUser->getFirstName(), $body);
- $body = str_replace("<#PRENOM#>", $objUser->getLastName(), $body);
- $body = str_replace("<#PASSWORD#>", $objUser->getPassword(), $body);
- $body = str_replace("<#MAIL#>", $objUser->getMail(), $body);
- $body = str_replace("<#SUBSNUMBER#>", $curSubscription["user_subscription_number"], $body);
- $body = str_replace("<#SUBSDATE#>", mktimetodate($curSubscription["user_subscription_date"], "d/m/Y - H:i"), $body);
- $body = str_replace("<#SUBSTYPE#>", getMessage($curSubscription["user_subscription_type"]), $body);
- $body = str_replace("<#PAYMETHOD#>", $curPayment["payment_solution"], $body);
- if( $paymentDate )
- $body = str_replace("<#PAYDATE#>", mktimetodate($actionPaymentDate, "d/m/Y - H:i"), $body);
- else
- $body = str_replace("<#PAYDATE#>", "À régler", $body);
- if( $transId )
- $body = str_replace("<#PAYTRANSID#>", $transId, $body);
- else
- $body = str_replace("<#PAYTRANSID#>", "Aucun", $body);
- $mail->isMail();
- $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
- $mail->AddReplyTo($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->SetFrom($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->AddAddress($address, $objUser->getFirstName());
- $mail->AddBCC($this->recupCommunauty("mailnode"), "");
- $mail->Subject = utf8_decode("Votre adhesion à ".$this->recupCommunauty("lib", $currentCode));
- $mail->AddAttachment("data/image/communities/".$this->recupCommunauty("id")."_logo.png"); // attachment
- $mail->isHTML(true);
- $mail->Body = utf8_decode($body);
-// $mail->AltBody = 'Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !';
-
- $mail->send();
- } catch (Exception $e) {
-// echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
- }
- }else{
- /* le compte ne correspond pas à la communauté ?! */
- }
- }else{
- /* Intégritée des comptes temporaires corrompue */
- }
- } else {
- if (count($tabNodeGroupUser)==1)
- {
- if ( $nodeId==$tabNodeGroupUser[0]->getNodeId() )
- {
-// $userTempId = $objUserTemp->getId();/*Récuperation de l'id de l'utilisateur temporaire pour l'indexation*/
-
- //On supprime le compte de la table temporaire
- $objUserTemp = $MyUserManagerTemp->deleteInstance($objUserTemp); //ca marche : suppression de l'enregistrement
- //On supprime le noeud temporaire du compte
- $MyNodeGroupUserManager->deleteInstance($tabNodeGroupUser[0]);
- //Insertion de l'objet dans la table user
-// $objUser=$GLOBALS["SYSTEM_MANAGER"]["USER"]->insertInstance($objUserTemp);
-// $objGroupUser=new GroupUser();
-// $objGroupUser->setUserId($objUser->getId());
-// $objGroupUser->setGroupId($_POST["id_Group"]);
-// $objGroupUser=$GLOBALS["SYSTEM_MANAGER"]["GROUP_USER"]->insertInstance($objGroupUser);
- }else{
- /* le compte ne correspond pas à la communauté ?! */
- }
- }else{
- /* Intégritée des comptes temporaires corrompue */
- }
- }
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("pictoLinkStepOK", "./data/template/".$GLOBALS["SYSTEM_USER_SESSION"]->getCurrentTemplate()."/media/picto/StepOK.png");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("pictoLinkStepOK", "./data/template/".$GLOBALS["SYSTEM_USER_SESSION"]->getCurrentTemplate()."/media/picto/StepOK.png");
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("CommName", $this->recupCommunauty("lib", $currentCode));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("result", $result);
- }
-
-/**
-* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
-* @access public
-* @return chaine chaine vide
-*/
- function lectureResultMoney($paymentId=null)
- {
-// if (!checkProvenance("processSubscription")) {
-// redirect("http://www.noob.com/"); die("Hacking attempt");
-// }
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "processresultmoney");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscriptions.ini");
- addMessageFile("adminaccounting.ini");
-
- includeBO("payments/payments.php");
- $payment = new Payments();
- $curPayment = $payment->doLoadFromId($paymentId);
-
- includeBO("subscriptions/subscriptions.php");
- $subscription = new Subscriptions();
- $curSubscription = $subscription->doLoadFromUserId($curPayment["payment_user_id"]);
-
-
- $result = "Paiement sur site en liquide !";
- $saveUser = true;
- $paymentDate = false;
- $token = false;
- $transId = false;
- $actionPaymentDate = mktime(0, 1, 0, 1, 1, 1970);
- $actionSubscriptionStatus = "validated";
- $actionPaymentStatus = "progress";
-
- $nodeId = $this->recupCommunauty('id');
- $tabUserIdTemp = $curPayment["payment_user_id"];
-
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php");
- $MyUserManagerTemp=new UserManagerDb();
- $MyUserManagerTemp->setTable(DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."user_temp");
-
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php");
- $MyNodeGroupUserManager=new NodeGroupUserManagerDb();
- $MyNodeGroupUserManager->setTable(DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."node_group_user_temp");
-
- $objUserTemp = $MyUserManagerTemp->createInstance($tabUserIdTemp);
- $tabNodeGroupUser=$MyNodeGroupUserManager->getInstanceFromUserId($objUserTemp->getId(), array() );
-
- if( $saveUser ) {
- if (count($tabNodeGroupUser)==1)
- {
- if ( $nodeId==$tabNodeGroupUser[0]->getNodeId() )
- {
- $actionPaymenDate = time();
- $userTempId = $objUserTemp->getId();/*Récuperation de l'id de l'utilisateur temporaire pour l'indexation*/
- $objUserTemp = $MyUserManagerTemp->deleteInstance($objUserTemp); //ca marche : suppression de l'enregistrement
- $MyNodeGroupUserManager->deleteInstance($tabNodeGroupUser[0]);
-
- $objUser=$GLOBALS["SYSTEM_MANAGER"]["USER"]->insertInstance($objUserTemp);
- $objGroupUser=new GroupUser();
- $objGroupUser->setUserId($objUser->getId());
- $objGroupUser->setGroupId($this->recupCommunauty('subsgrouptemp'));
-
- $objGroupUser=$GLOBALS["SYSTEM_MANAGER"]["GROUP_USER"]->insertInstance($objGroupUser);
-
- $recSubscription = $subscription->doUpdateAfterPayment($userTempId, $objUser->getId(), $actionPaymentDate, $actionSubscriptionStatus, $curSubscription["user_subscription_number"]);
-
- $updatePayment = $payment->doUpdateAfterPayment($paymentId, $objUser->getId(), $actionPaymentDate, $actionPaymentStatus);
-
-// require_once('lib/package/class.phpmailer.php');
-// $address = $objUser->getMail();
-//
-// $mail = new PHPMailer(); // defaults to using php "mail()"
-// $body = file_get_contents('lib/package/phpmailer/templates/subscription-temp_'.$this->recupCommunauty("id").'.html');
-// $body = eregi_replace("[\]", '', $body);
-// $body = str_replace("<#WEBSITEURL#>", "http://".$_SERVER['SERVER_NAME'], $body);
-// $body = str_replace("<#IDENTIFIANT#>", $objUser->getLogin(), $body);
-// $body = str_replace("<#COMMUNITY#>", $this->recupCommunauty("lib", $currentCode), $body);
-// $body = str_replace("<#NOM#>", $objUser->getFirstName(), $body);
-// $body = str_replace("<#PRENOM#>", $objUser->getLastName(), $body);
-// $body = str_replace("<#PASSWORD#>", $objUser->getPassword(), $body);
-// $body = str_replace("<#MAIL#>", $objUser->getMail(), $body);
-// $body = str_replace("<#SUBSNUMBER#>", $curSubscription["user_subscription_number"], $body);
-// $body = str_replace("<#SUBSDATE#>", mktimetodate($curSubscription["user_subscription_date"], "d/m/Y - H:i"), $body);
-// $body = str_replace("<#SUBSTYPE#>", getMessage($curSubscription["user_subscription_type"]), $body);
-// if( $paymentDate )
-// $body = str_replace("<#PAYDATE#>", mktimetodate($actionPaymentDate, "d/m/Y - H:i"), $body);
-// else {
-// $body = str_replace("<#PAYDATE#>", "À régler", $body);
-// $body = str_replace("<#PAYMETHOD#>", $curPayment["payment_solution"], $body);
-// }
-// if( $transId )
-// $body = str_replace("<#PAYTRANSID#>", $transId, $body);
-// else
-// $body = str_replace("<#PAYTRANSID#>", "Aucun", $body);
-// $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
-// $mail->AddReplyTo($this->recupCommunauty("mailnode"), $this->recupCommunauty("lib", $currentCode));
-// $mail->SetFrom($this->recupCommunauty("mailnode"), $this->recupCommunauty("lib", $currentCode));
-// $mail->AddAddress($address, $objUser->getFirstName());
-// $mail->AddBCC($this->recupCommunauty("mailnode"), "");
-// $mail->Subject = "Votre adhesion à ".$this->recupCommunauty("lib", $currentCode);
-// // $mail->AltBody = "Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !";
-// $mail->MsgHTML(utf8_decode($body));
-// $mail->AddAttachment("data/image/communities/".$this->recupCommunauty("id")."_logo.png"); // attachment
-//
-// $sentMail = $mail->Send();
-
- require_once('lib/package/class.phpmailer.phpmailer.php');
- $address = $objUser->getMail();
-
- try {
- $mail = new PHPMailer(true);
- $body = file_get_contents('lib/package/phpmailer/templates/subscription-temp_'.$this->recupCommunauty("id").'.html');
-// $body = eregi_replace("[\]",'',$body);
-// $v = preg_quote($body, '/');
-// $body = preg_replace("/[\\]/i",'',$body);
-// $body = preg_replace("/$v/", '', $body);
- $body = str_replace("<#WEBSITEURL#>", "http://".$_SERVER['SERVER_NAME'], $body);
- $body = str_replace("<#IDENTIFIANT#>", $objUser->getLogin(), $body);
- $body = str_replace("<#COMMUNITY#>", $this->recupCommunauty("lib", $currentCode), $body);
- $body = str_replace("<#NOM#>", $objUser->getFirstName(), $body);
- $body = str_replace("<#PRENOM#>", $objUser->getLastName(), $body);
- $body = str_replace("<#PASSWORD#>", $objUser->getPassword(), $body);
- $body = str_replace("<#MAIL#>", $objUser->getMail(), $body);
- $body = str_replace("<#SUBSNUMBER#>", $curSubscription["user_subscription_number"], $body);
- $body = str_replace("<#SUBSDATE#>", mktimetodate($curSubscription["user_subscription_date"], "d/m/Y - H:i"), $body);
- $body = str_replace("<#SUBSTYPE#>", getMessage($curSubscription["user_subscription_type"]), $body);
- if( $paymentDate )
- $body = str_replace("<#PAYDATE#>", mktimetodate($actionPaymentDate, "d/m/Y - H:i"), $body);
- else {
- $body = str_replace("<#PAYDATE#>", "À régler", $body);
- $body = str_replace("<#PAYMETHOD#>", $curPayment["payment_solution"], $body);
- }
- if( $transId )
- $body = str_replace("<#PAYTRANSID#>", $transId, $body);
- else
- $body = str_replace("<#PAYTRANSID#>", "Aucun", $body);
- $mail->isMail();
- $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
- $mail->AddReplyTo($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->SetFrom($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->AddAddress($address, $objUser->getFirstName());
- $mail->AddBCC($this->recupCommunauty("mailnode"), "");
- $mail->Subject = utf8_decode("Votre adhesion à ".$this->recupCommunauty("lib", $currentCode));
- $mail->AddAttachment("data/image/communities/".$this->recupCommunauty("id")."_logo.png"); // attachment
- $mail->isHTML(true);
- $mail->Body = utf8_decode($body);
-// $mail->AltBody = 'Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !';
-
- $mail->send();
- } catch (Exception $e) {
-// echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
- }
- }else{
- /* le compte ne correspond pas à la communauté ?! */
- }
- }else{
- /* Intégritée des comptes temporaires corrompue */
- }
- } else {
- if (count($tabNodeGroupUser)==1)
- {
- if ( $nodeId==$tabNodeGroupUser[0]->getNodeId() )
- {
-// $userTempId = $objUserTemp->getId();/*Récuperation de l'id de l'utilisateur temporaire pour l'indexation*/
-
- //On supprime le compte de la table temporaire
- $objUserTemp = $MyUserManagerTemp->deleteInstance($objUserTemp); //ca marche : suppression de l'enregistrement
- //On supprime le noeud temporaire du compte
- $MyNodeGroupUserManager->deleteInstance($tabNodeGroupUser[0]);
- //Insertion de l'objet dans la table user
-// $objUser=$GLOBALS["SYSTEM_MANAGER"]["USER"]->insertInstance($objUserTemp);
-// $objGroupUser=new GroupUser();
-// $objGroupUser->setUserId($objUser->getId());
-// $objGroupUser->setGroupId($_POST["id_Group"]);
-// $objGroupUser=$GLOBALS["SYSTEM_MANAGER"]["GROUP_USER"]->insertInstance($objGroupUser);
- }else{
- /* le compte ne correspond pas à la communauté ?! */
- }
- }else{
- /* Intégritée des comptes temporaires corrompue */
- }
- }
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("result", $result);
- }
-
-/**
-* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
-* @access public
-* @return chaine chaine vide
-*/
- function lectureResultCheck($paymentId=null)
- {
-// if (!checkProvenance("processSubscription")) {
-// redirect("http://www.noob.com/"); die("Hacking attempt");
-// }
-
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "processresultcheck");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
- addMessageFile("subscriptions.ini");
- addMessageFile("adminaccounting.ini");
-
- includeBO("payments/payments.php");
- $payment = new Payments();
- $curPayment = $payment->doLoadFromId($paymentId);
-
- includeBO("subscriptions/subscriptions.php");
- $subscription = new Subscriptions();
- $curSubscription = $subscription->doLoadFromUserId($curPayment["payment_user_id"]);
-
-
- $result = "Paiement en chèque par envoi postal ou sur site !";
- $saveUser = true;
- $paymentDate = false;
- $token = false;
- $transId = false;
- $actionPaymentDate = mktime(0, 1, 0, 1, 1, 1970);
- $actionSubscriptionStatus = "validated";
- $actionPaymentStatus = "progress";
-
- $nodeId = $this->recupCommunauty('id');
- $tabUserIdTemp = $curPayment["payment_user_id"];
-
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php");
- $MyUserManagerTemp=new UserManagerDb();
- $MyUserManagerTemp->setTable(DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."user_temp");
-
- include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php");
- $MyNodeGroupUserManager=new NodeGroupUserManagerDb();
- $MyNodeGroupUserManager->setTable(DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."node_group_user_temp");
-
- $objUserTemp = $MyUserManagerTemp->createInstance($tabUserIdTemp);
- $tabNodeGroupUser=$MyNodeGroupUserManager->getInstanceFromUserId($objUserTemp->getId(), array() );
-
- if( $saveUser ) {
- if (count($tabNodeGroupUser)==1)
- {
- if ( $nodeId==$tabNodeGroupUser[0]->getNodeId() )
- {
- $actionPaymenDate = time();
- $userTempId = $objUserTemp->getId();/*Récuperation de l'id de l'utilisateur temporaire pour l'indexation*/
- $objUserTemp = $MyUserManagerTemp->deleteInstance($objUserTemp); //ca marche : suppression de l'enregistrement
- $MyNodeGroupUserManager->deleteInstance($tabNodeGroupUser[0]);
-
- $objUser=$GLOBALS["SYSTEM_MANAGER"]["USER"]->insertInstance($objUserTemp);
- $objGroupUser=new GroupUser();
- $objGroupUser->setUserId($objUser->getId());
- $objGroupUser->setGroupId($this->recupCommunauty('subsgrouptemp'));
-
- $objGroupUser=$GLOBALS["SYSTEM_MANAGER"]["GROUP_USER"]->insertInstance($objGroupUser);
-
- $recSubscription = $subscription->doUpdateAfterPayment($userTempId, $objUser->getId(), $actionPaymentDate, $actionSubscriptionStatus, $curSubscription["user_subscription_number"]);
-
- $updatePayment = $payment->doUpdateAfterPayment($paymentId, $objUser->getId(), $actionPaymentDate, $actionPaymentStatus);
-
-// require_once('lib/package/class.phpmailer.php');
-// $address = $objUser->getMail();
-//
-// $mail = new PHPMailer(); // defaults to using php "mail()"
-// $body = file_get_contents('lib/package/phpmailer/templates/subscription-temp_'.$this->recupCommunauty("id").'.html');
-// $body = eregi_replace("[\]", '', $body);
-// $body = str_replace("<#WEBSITEURL#>", "http://".$_SERVER['SERVER_NAME'], $body);
-// $body = str_replace("<#IDENTIFIANT#>", $objUser->getLogin(), $body);
-// $body = str_replace("<#COMMUNITY#>", $this->recupCommunauty("lib", $currentCode), $body);
-// $body = str_replace("<#NOM#>", $objUser->getFirstName(), $body);
-// $body = str_replace("<#PRENOM#>", $objUser->getLastName(), $body);
-// $body = str_replace("<#PASSWORD#>", $objUser->getPassword(), $body);
-// $body = str_replace("<#MAIL#>", $objUser->getMail(), $body);
-// $body = str_replace("<#SUBSNUMBER#>", $curSubscription["user_subscription_number"], $body);
-// $body = str_replace("<#SUBSDATE#>", mktimetodate($curSubscription["user_subscription_date"], "d/m/Y - H:i"), $body);
-// $body = str_replace("<#SUBSTYPE#>", getMessage($curSubscription["user_subscription_type"]), $body);
-// if( $paymentDate )
-// $body = str_replace("<#PAYDATE#>", mktimetodate($actionPaymentDate, "d/m/Y - H:i"), $body);
-// else {
-// $body = str_replace("<#PAYDATE#>", "À régler", $body);
-// $body = str_replace("<#PAYMETHOD#>", $curPayment["payment_solution"], $body);
-// }
-// if( $transId )
-// $body = str_replace("<#PAYTRANSID#>", $transId, $body);
-// else
-// $body = str_replace("<#PAYTRANSID#>", "Aucun", $body);
-// $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
-// $mail->AddReplyTo($this->recupCommunauty("mailnode"), $this->recupCommunauty("lib", $currentCode));
-// $mail->SetFrom($this->recupCommunauty("mailnode"), $this->recupCommunauty("lib", $currentCode));
-// $mail->AddAddress($address, $objUser->getFirstName());
-// $mail->AddBCC($this->recupCommunauty("mailnode"), "");
-// $mail->Subject = "Votre adhesion à ".$this->recupCommunauty("lib", $currentCode);
-// // $mail->AltBody = "Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !";
-// $mail->MsgHTML(utf8_decode($body));
-// $mail->AddAttachment("data/image/communities/".$this->recupCommunauty("id")."_logo.png"); // attachment
-//
-// $sentMail = $mail->Send();
-
- require_once('lib/package/class.phpmailer.phpmailer.php');
- $address = $objUser->getMail();
-
- try {
- $mail = new PHPMailer(true);
- $body = file_get_contents('lib/package/phpmailer/templates/subscription-temp_'.$this->recupCommunauty("id").'.html');
-// $body = eregi_replace("[\]",'',$body);
-// $v = preg_quote($body, '/');
-// $body = preg_replace("/[\\]/i",'',$body);
-// $body = preg_replace("/$v/", '', $body);
- $body = str_replace("<#WEBSITEURL#>", "http://".$_SERVER['SERVER_NAME'], $body);
- $body = str_replace("<#IDENTIFIANT#>", $objUser->getLogin(), $body);
- $body = str_replace("<#COMMUNITY#>", $this->recupCommunauty("lib", $currentCode), $body);
- $body = str_replace("<#NOM#>", $objUser->getFirstName(), $body);
- $body = str_replace("<#PRENOM#>", $objUser->getLastName(), $body);
- $body = str_replace("<#PASSWORD#>", $objUser->getPassword(), $body);
- $body = str_replace("<#MAIL#>", $objUser->getMail(), $body);
- $body = str_replace("<#SUBSNUMBER#>", $curSubscription["user_subscription_number"], $body);
- $body = str_replace("<#SUBSDATE#>", mktimetodate($curSubscription["user_subscription_date"], "d/m/Y - H:i"), $body);
- $body = str_replace("<#SUBSTYPE#>", getMessage($curSubscription["user_subscription_type"]), $body);
- if( $paymentDate )
- $body = str_replace("<#PAYDATE#>", mktimetodate($actionPaymentDate, "d/m/Y - H:i"), $body);
- else {
- $body = str_replace("<#PAYDATE#>", "À régler", $body);
- $body = str_replace("<#PAYMETHOD#>", $curPayment["payment_solution"], $body);
- }
- if( $transId )
- $body = str_replace("<#PAYTRANSID#>", $transId, $body);
- else
- $body = str_replace("<#PAYTRANSID#>", "Aucun", $body);
- $mail->isMail();
- $mail->setLanguage(strtolower($currentCode), 'lib/package/phpmailer/language/');
- $mail->AddReplyTo($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->SetFrom($this->recupCommunauty("mailnode"),$this->recupCommunauty("lib", $currentCode));
- $mail->AddAddress($address, $objUser->getFirstName());
- $mail->AddBCC($this->recupCommunauty("mailnode"), "");
- $mail->Subject = utf8_decode("Votre adhesion à ".$this->recupCommunauty("lib", $currentCode));
- $mail->AddAttachment("data/image/communities/".$this->recupCommunauty("id")."_logo.png"); // attachment
- $mail->isHTML(true);
- $mail->Body = utf8_decode($body);
-// $mail->AltBody = 'Pour pouvoir afficher correctement le message, veuillez utiliser un client de courriels compatible HTML !';
-
- $mail->send();
- } catch (Exception $e) {
-// echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
- }
- }else{
- /* le compte ne correspond pas à la communauté ?! */
- }
- }else{
- /* Intégritée des comptes temporaires corrompue */
- }
- } else {
- if (count($tabNodeGroupUser)==1)
- {
- if ( $nodeId==$tabNodeGroupUser[0]->getNodeId() )
- {
-// $userTempId = $objUserTemp->getId();/*Récuperation de l'id de l'utilisateur temporaire pour l'indexation*/
-
- //On supprime le compte de la table temporaire
- $objUserTemp = $MyUserManagerTemp->deleteInstance($objUserTemp); //ca marche : suppression de l'enregistrement
- //On supprime le noeud temporaire du compte
- $MyNodeGroupUserManager->deleteInstance($tabNodeGroupUser[0]);
- //Insertion de l'objet dans la table user
-// $objUser=$GLOBALS["SYSTEM_MANAGER"]["USER"]->insertInstance($objUserTemp);
-// $objGroupUser=new GroupUser();
-// $objGroupUser->setUserId($objUser->getId());
-// $objGroupUser->setGroupId($_POST["id_Group"]);
-// $objGroupUser=$GLOBALS["SYSTEM_MANAGER"]["GROUP_USER"]->insertInstance($objGroupUser);
- }else{
- /* le compte ne correspond pas à la communauté ?! */
- }
- }else{
- /* Intégritée des comptes temporaires corrompue */
- }
- }
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("result", $result);
- }
-
-/**
-* Function permettant de controler les doublons, d'inscrire dans la bd et redirection avec message
-* @access public
-* @return chaine chaine vide
-*/
- function lectureInscSuccess()
- {
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH;
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("Home", "lectureInscSuccess");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxImage("iconSuccessInsc", "data/template/".$GLOBALS["SYSTEM_USER_SESSION"]->getCurrentTemplate()."/media/picto/assessments-300x300.png", "", 128);
- }
-
-/**
-* recupere les fils d'un noeud depuis le noeud principal
-* @access public
-*/
- private function getObjectSon($nodeId)
- {
- $tab=$GLOBALS["SYSTEM_CONTROL"]->getListObjectForNavigation($nodeId);
- return $tab;
- }
-
- /**
-* Function permettant de modifier le contenu dans la bd et redirection
-* @access private
-* @return chaine entier noeud de configuration
-*/
- function recupCommunauty($get='id',$langcode="fr")
- {
- /* Récupération de la communauté courante */
- $myEntryNode =$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId; /* Noeud d'entrée de l'utilisateur */
- $myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($myEntryNode); /* Récupération du Tree correspondant */
-
- $nodeId=NULL;
- for ($i=0; $itabFather); $i++)
- {
- if ($myTree->tabFather[$i]->getIdPere()==1)
- {
- if( $get == 'id' ) { $nodeId=$myTree->tabFather[$i]->getId();}
- elseif( $get == 'ctype' ) { $nodeId=$myTree->tabFather[$i]->getCType();}
- elseif( $get == 'lib' ) {$nodeId=$myTree->tabFather[$i]->getLibelle($langcode);}
- elseif( $get == 'usergroup' ) {$nodeId=$myTree->tabFather[$i]->getUserGroupId();}
- elseif( $get == 'subsgroup' ) {$nodeId=$myTree->tabFather[$i]->getSubsGroupId();}
- elseif( $get == 'subsgrouptemp' ) {$nodeId=$myTree->tabFather[$i]->getSubsGroupTempId();}
- elseif( $get == 'mailnode' ) {$nodeId=$myTree->tabFather[$i]->getMailNode();}
-
- break;
- }
- }
- if (is_null($nodeId))
- {
- systemRedirect( $GLOBALS["CONF_PAGE_EXECUTION"] );
- }
- /* -- Fin Recup Communauté */
- return $nodeId;
- }
-
- /**
-* Function permettant de modifier le contenu dans la bd et redirection
-* @access private
-* @return chaine entier noeud de configuration
-*/
- function recupCommunautyByDomain($domain)
- {
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX."node_domains WHERE node_domain='".$domain."';";
-
- # Execution de Requete (utilisation de la connexion systeme)
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $view = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $nodeId = stripslashes($view['node_id']);
- # Destruction des resultats
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
- } else {
- $nodeId = false;
- }
-// }
- /* -- Fin Recup Communauté */
- return $nodeId;
- }
-
/**
* getAllRow4Export : recupere tous les enregistrements utilisé par l'objet de coordination
* le tableau est constiué de la nom_du_champ=valeur_du_champ
@@ -3593,4 +543,34 @@ Class Home extends CoordinationObj
return true;
}
}
+/**
+* Function permettant de verifié la validité d'un mail saisi
+* @access public
+* @return chaine chaine code message
+*/
+
+ function verifie_email($email){
+ $email = strtolower($email);
+
+ if (strlen($email) < 6){ return "$email : Email trop court";}
+ if (strlen($email) > 255) {return "$email : Email trop long";}
+ if (!ereg("@", $email)){ return "$email : Le email n'a pas d'arobase
+(@)";}
+ if (preg_match_all("/([^a-zA-Z0-9_\@\.\-])/i", $email, $trouve))
+ {
+ return "$email : caractère(s) interdit(s) dans un email
+(".implode(", ", $trouve[0]).").";
+ }
+ if (!preg_match("/^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,
+4}\$/i", $email))
+ {
+ return "$email : ce n'est pas un la forme d'un email.";
+ }
+ list($compte, $domaine)=split("@", $email, 2);
+ if (!checkdnsrr($domaine, "MX")){
+ return "$email : Ce domaine ($domaine) n'accepte pas les
+emails";
+ }
+ return "$email : Valide !";
+}
?>
diff --git a/lib/object_coordination/textinfo/textinfo.php b/lib/object_coordination/textinfo/textinfo.php
index e5bd0bf..d00d115 100755
--- a/lib/object_coordination/textinfo/textinfo.php
+++ b/lib/object_coordination/textinfo/textinfo.php
@@ -60,301 +60,6 @@ Class TextInfo extends CoordinationObj
printTabeAdmin("TabeB", $tabTabe, $tabUrlTabe, $tabPictoTabe, $tabAction);
}
-/**
-* Function affichant en lecture seule le contenu
-* @access public
-* @return chaine chaine vide
-*/
- function actionLectureInfo()
- {
- $text = getMessage("NoText");
-
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- //Récupération de l'identifiant de la communauté : methode en fin de page
- $nodeId = $this->recupCommunauty("id");
-
- if( isset($_POST["rules"]) && $_POST["rules"]==1 )
- {
- $GLOBALS["SYSTEM_MANAGER"]["USER"]->updateCharteStatus($GLOBALS["SYSTEM_USER_SESSION"]->user->getId());
- $GLOBALS["SYSTEM_USER_SESSION"]->user->updateCharteStatus(1);
-
- }
-
- if (file_exists($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/textinfo/".$_SERVER["HTTP_HOST"]."-landingpage.mxt"))
- {
- $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/textinfo/".$_SERVER["HTTP_HOST"]."-landingpage.mxt");
-
- $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
- $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe();
-
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("faviconlink", "data/image/communities/".$_SERVER["HTTP_HOST"].".ico?v4");
-
- $url =$_SERVER['SCRIPT_NAME'];
- $url.="?system=authSession";
- $url=addIdToUrl($url);
-
- $tabObject =$this->getObjectSon(eid());
- for ($i=0; $igetClassName()=="home")
- {
- $urlArray["id"]=$tabObject[$i][1]->getId();
- }
- }
-
- /* Création de l'URL pour nouveau compte */
- $urlNewAccount = $_SERVER['SCRIPT_NAME'];
- $urlNewAccount.= "?system=authNewAccount";
- $urlNewAccount = addIdToUrl($urlNewAccount);
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionNewAccount", formatUrl($urlArray["id"],"Home","formLecture","",$this->recupCommunauty()));
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionNewSubscription", formatUrl($urlArray["id"],"Home","formLectureAdh","",$this->recupCommunauty()));
-
- /* Création de l'URL pour rappel du mot de passe */
- $urlForgotPassword = $_SERVER['SCRIPT_NAME'];
-// $urlForgotPassword.= "?system=authForgotPassword";
- $urlForgotPassword.= "?msg=forgotPasswordTempDisabled";
- $urlForgotPassword = addIdToUrl($urlForgotPassword);
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("pageTitleHome", $GLOBALS['SYSTEM_TEMPLATE_DEFAULT_TITLE']." ".$GLOBALS['SYSTEM_TEMPLATE_DEFAULT_DESCRIPTION']." - Accueil");
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("ogTitle", $GLOBALS['SYSTEM_TEMPLATE_DEFAULT_TITLE']);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("ogDescription", $GLOBALS['SYSTEM_TEMPLATE_DEFAULT_DESCRIPTION']);
-
-// $GLOBALS['SYSTEM_TEMPLATE']->MxImage("pictoAuth", $GLOBALS['CONF_DATA_PATH']."data/template/".$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/authorise.png");
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("auth", getMessage("UserPrintAuth"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("LOGIN", getMessage("UserPrintLogin"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxFormField("login", "text", "login", "", "title='".getMessage("tipUserPrintLogin")."'");
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("PASSWORD", getMessage("UserPrintPassword"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxFormField("password", "password", "password", "", "title='".getMessage("tipUserPrintPassword")."'");
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionNewAccount", $urlNewAccount);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("NEWACCOUNT", getMessage("UserPrintNewAccount"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("NEWSUBSCRIPTION", getMessage("UserPrintNewSubscription"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionForgotPassword", $urlForgotPassword);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("FORGOTPASSWORD", getMessage("UserPrintForgotPassword"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionLogin", $url);
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("BtnEnter", getMessage("UserPrintEnter"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("titleButton", getMessage("tipUserPrintEnter"));
-// $data=$GLOBALS['SYSTEM_TEMPLATE']->MxWrite();
-
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo WHERE textinfo_id=".$this->getId();
- # Execution de Requete (utilisation de la connexion systeme)
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = stripslashes($View['textinfo_text_'.$currentCode]);
- # Destruction des resultats
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
- }else{
- $text = getMessage("NoText");
- }
-
- # On affecte a la template le texte pour la balise MxText (Template Principale)
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text", $text);
- } else {
- mxPageTitle($GLOBALS['SYSTEM_TEMPLATE_DEFAULT_TITLE']);
- /* On inclus la template (voir package.template.php) */
- withBlocPath("TextInfo", "actionLectureInfo");
- # Requete sur identifiant de l'objet de coordination correspondant
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo WHERE textinfo_id=".$this->getId();
- # Execution de Requete (utilisation de la connexion systeme)
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $text = stripslashes($View['textinfo_text_'.$currentCode]);
- # Destruction des resultats
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
- }else{
- $text = getMessage("NoText");
- }
-
- if( $GLOBALS["SYSTEM_USER_SESSION"]->user->getCharteStatus() == 0)
- {
- if( file_exists('data/message/fr/charte_'.$nodeId.'.inc') )
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textCharteUtilisation",file_get_contents('data/message/fr/charte_'.$nodeId.'.inc'));
- else
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("textCharteUtilisation",file_get_contents('data/message/fr/charte.inc'));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("loadcharte",".load()");
- } else {
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("loadcharte","");
- }
-
- # On affecte a la template le texte pour la balise MxText (Template Principale)
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text", $text);
- }
- return "";
- }
-
-/**
- * Méthode de l'outil News permettant de gérer les News
- *
- * @access public
- */
- public function lectureInfoViewNews()
- {
-
- //--- Dépendances ---
- //--- Fichier de messages de l'outil
- addMessageFile("comendatorenews.ini");
- withBlocPath("comendatorenews", "guestView");
-
- // chemin du fichier de template
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("csspath", $this->cssPath);
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par défaut */
-
- $newsId= isset($_GET["param"])?$_GET["param"]:0;
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("currentLang", $currentCode);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("ajaxGetNews", formatUrl($this->getId(),"ComendatoreNews","actionGuest"));
-
-// $newstype = $GLOBALS["SYSTEM_USER_SESSION"]->user->getId() == 1?"public":"all";
- $objIdNews = true;
- $text = getMessage("NoText");
- # Requete sur identifiant de l'objet de coordination correspondant
- if ($objIdNews) {
- includeDep("comendatorenews/comendatorenewsmanager.php");
- $newsmanager = new ComendatoreNewsManager;
- $shownews = $newsmanager->getNewsbyId($newsId, $currentCode);
- } else
- $shownews = false;
-
-// var_dump($shownews);
- if( $shownews )
- {
-// for ($i=0; $i<(count($lastnews) >= 8 ? 8 : count($lastnews)); $i++)
-// for ($i=0; $i<(count($shownews)); $i++)
-// {
- if( is_file("data/image/icons/news/".$shownews[4] ) )
- $GLOBALS['SYSTEM_TEMPLATE']->MxImage("iconBloc".".icon", "data/image/icons/news/".$shownews[4], $shownews[5], "", 32);
- else
- $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("iconBloc", "delete");
-
- if( $currentCode == "fr" ) {
- setlocale(LC_TIME, "fr_FR");
- $dateFLongNews = utf8_encode(strftime( "%a %d %b, %H:%M" , $shownews[3] ));
- $chainsUtils = new Chaine($shownews[5]);
- $title = $chainsUtils->chainCut(75);
- $content = $shownews[6];
- } else {
- $dateFLongNews = date("F, jS g:ia",$shownews[3]);
- $chainsUtils = new Chaine($shownews[7]);
- $title = $chainsUtils->chainCut(75);
- $content = $shownews[8];
- }
-
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("pageTitleNews", $GLOBALS['SYSTEM_TEMPLATE_DEFAULT_TITLE']." - ".$title);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("newsdate", $dateFLongNews, "","");
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("newsId", $shownews[0], "","");
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("newstitle", $title, "","");
-// $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut(newslink", "#");
-
-// $GLOBALS['SYSTEM_TEMPLATE']->MxText("news".".newscontent", str_replace('adminJsonFM',$methodRight, $content), "","");
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("newscontent", str_replace( array('http://', 'https://'), protocol(), $content), "","");
- $nbComments = $newsmanager->getNumberComment($shownews[0]);
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("lblnewscomments", getMessage("lblnewscomments"));
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("dataRefUrl", formatUrl($this->getId(), "ComendatoreNews", "actionGuest", "", $shownews[0]));
-// $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("news", "loop");
-// }
- } else {
-// $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("slideshow".".slideshowlastnewsthreads".".newsBloc", "delete");
-// $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("news", "delete");
- }
- }
-
- /**
-* Function permettant d'afficher le formulaire de pré-inscription pour enregistrement dans la bd
-* @access public
-* @param tableau
-* @return chaine chaine html
-*/
-function lectureInfoSubscribe()
- {
- global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
-
- /* On inclus la template (voir package.template.php) */
- WithBlocPath("TextInfo", "lectureinfosubscribe");
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
- if(isset($_GET['param']))
- {
- $myNoeud = $GLOBALS['SYSTEM_MANAGER']['NODE']->createInstance($_GET['param']);
- $libmyNoeud = $myNoeud->getLibelle($currentCode);
- $messageInscriptionNoeud = " : ".$libmyNoeud;
- $GLOBALS['SYSTEM_TEMPLATE']->MxText("messageInscriptionNoeud", $messageInscriptionNoeud);
- }
- # Récupération des étiquette du formulaire
- $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"TextInfo","execSubscribe","",$_GET['param']));
-
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("urlQaptcha", formatUrl($this->getId(),"TextInfo","formLectureQaptcha"));
- # Affichage des champs de formulaire pour l'adhésion
-
- $titre = array(getMessage("mr"),getMessage("mrs"),getMessage("miss"));
- $GLOBALS["SYSTEM_TEMPLATE"]->MxSelect("user_title", "user_title", $GLOBALS["SYSTEM_USER_SESSION"]->user->getTitle(), $titre, "", "");
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_first_name", "text", "user_first_name", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFirstName());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", $GLOBALS["SYSTEM_USER_SESSION"]->user->getLastName());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", $GLOBALS["SYSTEM_USER_SESSION"]->user->getLogin());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $GLOBALS["SYSTEM_USER_SESSION"]->user->getMail());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalCode());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_address", "textarea", "user_postal_address", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalAddress());
- $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", $GLOBALS["SYSTEM_USER_SESSION"]->user->getCity());
-
- return "";
- }
-
- public function formLectureQaptcha()
- {
-
- $GLOBALS["SYSTEM_TEMPLATE"] = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/mygamecharacters/ajaxdata.mxt");
- $GLOBALS["SYSTEM_TEMPLATE"]->SetMxFileParameter($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR'].$GLOBALS['SYSTEM_TEMPLATE_CONF']);
- $GLOBALS["SYSTEM_TEMPLATE"]->SetModeliXe(true);
-
- $aResponse['error'] = false;
-
- if(isset($_POST['action']) && isset($_POST['qaptcha_key']))
- {
- $_SESSION['qaptcha_key'] = false;
-
- if(htmlentities($_POST['action'], ENT_QUOTES, 'UTF-8') == 'qaptcha')
- {
- $_SESSION['qaptcha_key'] = $_POST['qaptcha_key'];
- echo json_encode($aResponse);
- }
- else
- {
- $aResponse['error'] = true;
- echo json_encode($aResponse);
- }
- }
- else
- {
- $aResponse['error'] = true;
- echo json_encode($aResponse);
- }
- }
-
/**
* Function permettant de rafficher le contenu pour modification dans la bd
* @access public
@@ -375,18 +80,16 @@ function lectureInfoSubscribe()
/* Instanciation du wysiwyg */
$wysiwyg = new Wysi("contentTextInfos", "postTextInfos", "fr_FR", "", $pref="summernote");
$wysiwyg->includeDependancy();
-
+
+ //$this->tabeCreate();
$text =getMessage("NoText");
/* On inclus la template (voir package.template.php) */
withBlocPath("TextInfo", "actionAdmin");
-
+
/* creation des onglets */
$this->tabeCreate();
- //Récupération de l'identifiant de la communauté : methode en fin de page
- $nodeId = $this->recupCommunauty("id");
-
# Requete sur identifiant de l objet de coordination correspondant
$sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo WHERE textinfo_id=".$this->getId();
# Execution de Requete
@@ -411,7 +114,6 @@ function lectureInfoSubscribe()
}else{
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("wysiwyg",getMessage("NoText"));
}
-
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("currentLang", $currentCode);
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"TextInfo","execAdmin"));
@@ -425,25 +127,12 @@ function lectureInfoSubscribe()
*/
function lectureAdmin()
{
- /*Récupération des messages utilisateurs*/
- addMessageFile("user.ini");
-
- mxPageTitle("actionAdminTitlePage");
-
-// $arrayCallJs = array();
-// $arrayCallJs[] = "./lib/package/wysi/ckeditor-4.6/ckeditor.js";
-// mxCallJs($arrayCallJs);
-
+ //$this->tabeCreate();
$text =getMessage("NoText");
/* On inclus la template (voir package.template.php) */
withBlocPath("TextInfo", "lectureAdmin");
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
-
/* creation des onglets */
$this->tabeCreate();
@@ -456,10 +145,10 @@ function lectureInfoSubscribe()
if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
{
$View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- if($View['textinfo_text_'.$currentCode] != "")
- $text = stripslashes($View['textinfo_text_'.$currentCode]);
+ if($View['textinfo_text'] != "")
+ $text = stripslashes($View['textinfo_text']);
}
- $GLOBALS["SYSTEM_TEMPLATE"]->MxText("wysiwyg", $text);
+ $GLOBALS["SYSTEM_TEMPLATE"]->MxText("text", $text);
return "";
}
@@ -471,12 +160,7 @@ function lectureInfoSubscribe()
*/
function execAdmin()
{
- $text=(isset($_POST['contentTextInfos']))?$_POST['contentTextInfos']:"";
-
- /* gestion du lib en fonction de la langue courante */
- $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
- $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
- /* fin récupération des codes par defaut */
+ $text=(isset($_POST['text']))?$_POST['text']:"";
# Requete sur identifiant de l objet de coordination correspondant
$sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo WHERE textinfo_id=".$this->getId();
@@ -487,12 +171,13 @@ function lectureInfoSubscribe()
if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()==0)
{
# Requete sur identifiant de l objet de coordination correspondant
- $sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo (textinfo_id, textinfo_text_".$currentCode.") VALUES (".$this->getId().", '".$text."')";
+ $sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo (textinfo_id, textinfo_text) VALUES (".$this->getId().", '".$text."')";
# Execution de Requete
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
- }else{
+ }
+ else{
# Requete sur identifiant de l objet de coordination correspondant
- $sql="UPDATE ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo SET textinfo_text_".$currentCode."='".$text."' WHERE textinfo_id=".$this->getId();
+ $sql="UPDATE ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo SET textinfo_text='".$text."' WHERE textinfo_id=".$this->getId();
# Execution de Requete
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
}
@@ -534,8 +219,8 @@ function lectureInfoSubscribe()
$sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo WHERE textinfo_id=".$this->getId()."";
# Execution de Requete
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-// $methods=array("actionLectureInfo"=>"actionLectureInfo","actionAdmin"=>array("lectureAdmin","actionAdmin"));
-// Search::delSearch("&oid=".$this->getId(), $this->getContentType(), $methods);
+ $methods=array("actionLectureInfo"=>"actionLectureInfo","actionAdmin"=>array("lectureAdmin","actionAdmin"));
+ Search::delSearch("&oid=".$this->getId(), $this->getContentType(), $methods);
return "TxtDeleteOk";
}
@@ -615,123 +300,6 @@ function lectureInfoSubscribe()
}
return true;
}
-
-/**
-* recupere les fils d'un noeud depuis le noeud principal
-* @access public
-*/
- private function getObjectSon($nodeId)
- {
- $tab=$GLOBALS["SYSTEM_CONTROL"]->getListObjectForNavigation($nodeId);
- return $tab;
- }
-
- /**
-* Function permettant de modifier le contenu dans la bd et redirection
-* @access private
-* @return chaine entier noeud de configuration
-*/
- function recupCommunauty($get='id',$langcode="fr")
- {
- /* Récupération de la communauté courante */
- $myEntryNode =$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId; /* Noeud d'entrée de l'utilisateur */
- $myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($myEntryNode); /* Récupération du Tree correspondant */
-
- $nodeId=NULL;
- for ($i=0; $itabFather); $i++)
- {
- if ($myTree->tabFather[$i]->getIdPere()==1)
- {
- if( $get == 'id' ) { $nodeId=$myTree->tabFather[$i]->getId();}
- elseif( $get == 'ctype' ) { $nodeId=$myTree->tabFather[$i]->getCType();}
- elseif( $get == 'lib' ) {$nodeId=$myTree->tabFather[$i]->getLibelle($langcode);}
- elseif( $get == 'usergroup' ) {$nodeId=$myTree->tabFather[$i]->getUserGroupId();}
- elseif( $get == 'subsgroup' ) {$nodeId=$myTree->tabFather[$i]->getSubsGroupId();}
- elseif( $get == 'subsgrouptemp' ) {$nodeId=$myTree->tabFather[$i]->getSubsGroupTempId();}
- elseif( $get == 'mailnode' ) {$nodeId=$myTree->tabFather[$i]->getMailNode();}
-
- break;
- }
- }
- if (is_null($nodeId))
- {
- systemRedirect( $GLOBALS["CONF_PAGE_EXECUTION"] );
- }
- /* -- Fin Recup Communauté */
- return $nodeId;
- }
-
-/**
-* Function permettant de modifier le contenu dans la bd et redirection
-* @access private
-* @return chaine entier noeud de configuration
-*/
- function recupCommunautyByDomain($domain, $get='id', $langcode="")
- {
- $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX."node WHERE node_domain='".$domain."';";
- # Execution de Requete (utilisation de la connexion systeme)
-// var_dump($domain);
-// var_dump($sql);
- $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
-
- # Teste si il y a des enregistrements
- if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
- {
- $view = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
- $entryId = stripslashes($view['node_id']);
- # Destruction des resultats
- $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
- $myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($entryId);
-
- $nodeId=NULL;
- for ($i=0; $itabFather); $i++)
- {
- if ($myTree->tabFather[$i]->getIdPere()==1)
- {
- if( $get == 'id' ) { $nodeId=$myTree->tabFather[$i]->getId();}
- elseif( $get == 'lib' ) {$nodeId=$myTree->tabFather[$i]->getLibelle($langcode);}
- break;
- }
- }
- if (is_null($nodeId))
- {
- systemRedirect( $GLOBALS["CONF_PAGE_EXECUTION"] );
- }
- }
- /* -- Fin Recup Communauté */
-// var_dump("RecupCommunity : ".$nodeId);
- return $nodeId;
- }
-
- /**
-* Function permettant de modifier le contenu dans la bd et redirection
-* @access private
-* @return chaine entier noeud de configuration
-*/
-// function recupCommunautyByDomain($domain,$get="id",$langcode="")
-// {
-// /* Récupération de la communauté courante */
-// $myEntryNode =$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId; /* Noeud d'entrée de l'utilisateur */
-// $myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($myEntryNode); /* Récupération du Tree correspondant */
-//
-// $nodeId=NULL;
-// for ($i=0; $itabFather); $i++)
-// {
-// if ($myTree->tabFather[$i]->getIdPere()==1)
-// {
-// if( $get == 'id' ) { $nodeId=$myTree->tabFather[$i]->getId();}
-// elseif( $get == 'lib' ) {$nodeId=$myTree->tabFather[$i]->getLibelle($langcode);}
-// break;
-// }
-// }
-// if (is_null($nodeId))
-// {
-// systemRedirect( $GLOBALS["CONF_PAGE_EXECUTION"] );
-// }
-// /* -- Fin Recup Communauté */
-// // var_dump("RecupCommunity : ".$nodeId);
-// return $nodeId;
-// }
}
/**
@@ -880,7 +448,7 @@ var $title="";
}
$tab["rssDescription"]=$description;
- $tab["rssLink"]="http://www.fab-l3.org";
+ $tab["rssLink"]="http://www.granilim.org";
return $tab;
}