Added ListPublic community setting. Added RegisterEnable community setting.

This commit is contained in:
Rooty 2021-09-13 09:56:41 +02:00
parent be7067689d
commit cffac24889
9 changed files with 162 additions and 71 deletions

View File

@ -35,10 +35,11 @@ TxtTemplateChoiceNode = "Template de l'espace"
TxtTemplateAvailNode = "Template(s) disponible(s) pour l'espace :" TxtTemplateAvailNode = "Template(s) disponible(s) pour l'espace :"
txtCommunityIcon = "Icône de la communauté" txtCommunityIcon = "Icône de la communauté"
txtNodeEntryName = "Nom de la communauté" txtNodeEntryName = "Nom de la communauté"
txtHasPublicPage = "Page publique" txtCommHasPublicPage = "Page publique"
comm_haspublicpage_sEnabled = "Activé" comm_haspublicpage_sEnabled = "Activé"
user_haspublicpage_sDisabled = "Désactivé" user_haspublicpage_sDisabled = "Désactivé"
txtCommPublicList = "Liste publique" txtCommPublicList = "Liste publique"
txtCommRegisterEnable = "Inscription"
comm_public_sEnabled = "Activé" comm_public_sEnabled = "Activé"
user_public_sDisabled = "Désactivé" user_public_sDisabled = "Désactivé"
TxtNodeIn = "Créer dans l'espace" TxtNodeIn = "Créer dans l'espace"

View File

@ -5,10 +5,6 @@
<div class="input-group col-xs-12 col-sm-3 col-lg-10 justify-content-center"> <div class="input-group col-xs-12 col-sm-3 col-lg-10 justify-content-center">
<span class="text-center"><h3><mx:text id="etape1"/><mx:text id="double_dots"/><mx:text id="generalInformation"/></h3></span> <span class="text-center"><h3><mx:text id="etape1"/><mx:text id="double_dots"/><mx:text id="generalInformation"/></h3></span>
</div> </div>
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommPublicList"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success font-weight-bold" data-on="<mx:text id="comm_public_sEnabled"/>" data-offstyle="danger font-weight-bold" data-off="<mx:text id="user_public_sDisabled"/>" data-size="mini" type="checkbox" name="commlistpublic">
</div> </div>
<div class="card-body"> <div class="card-body">
@ -27,14 +23,8 @@
<mx:formField id="NodeEntry_name"/> <mx:formField id="NodeEntry_name"/>
</div> </div>
</mx:bloc id="blocName"> </mx:bloc id="blocName">
<div class="input-group col-xs-12 col-sm-8 col-lg-4 justify-content-center">
<div class="input-group-prepend toggle-compub">
<span class="input-group-text"><mx:text id="txtHasPublicPage"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success font-weight-bold" data-on="<mx:text id="comm_haspublicpage_sEnabled"/>" data-offstyle="danger font-weight-bold" data-off="<mx:text id="user_haspublicpage_sDisabled"/>" data-size="mini" type="checkbox" name="haspublicpage">
</div>
</div> </div>
<div class="row mb-0 w-100"> <div class="row mb-1 w-100">
<div class="input-group col-xs-12 col-sm-8 col-lg-4 justify-content-center"> <div class="input-group col-xs-12 col-sm-8 col-lg-4 justify-content-center">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-lg fa-group"></i></span> <span class="input-group-text"><i class="fa fa-lg fa-group"></i></span>
@ -54,6 +44,26 @@
<mx:formField id="NodeEntry_domain"/> <mx:formField id="NodeEntry_domain"/>
</div> </div>
</div> </div>
<div class="row mb-0 w-100">
<div class="input-group col-xs-12 col-sm-8 col-lg-4 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommHasPublicPage"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="haspublicpage">
</div>
<div class="input-group col-xs-12 col-sm-8 col-lg-4 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommPublicList"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="commlistpublic">
</div>
<div class="input-group col-xs-12 col-sm-8 col-lg-4 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommRegisterEnable"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="commregisterenable">
</div>
</div>
</div> </div>
</div> </div>

View File

@ -67,6 +67,28 @@
<mx:formField id="ctypereg"/> <mx:formField id="ctypereg"/>
</div> </div>
</div> </div>
<div class="row mb-2">
<div class="input-group col-xs-12 col-sm-8 col-lg-4 p-0 m-0 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommHasPublicPage"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_haspublic">
</div>
<div class="input-group col-xs-12 col-sm-8 col-lg-4 p-0 m-0 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommPublicList"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_listpublic">
</div>
<div class="input-group col-xs-12 col-sm-8 col-lg-4 p-0 m-0 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommRegisterEnable"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_registerenable">
</div>
</div>
</div> </div>
</div> </div>
<div class="card card-content-half-r"> <div class="card card-content-half-r">
@ -85,12 +107,6 @@
<mx:image id="screenTemplate" id="screenTemplate"/> <mx:image id="screenTemplate" id="screenTemplate"/>
</div> </div>
</div> </div>
<div class="input-group col-xs-12 col-sm-8 col-lg-2 p-0 m-0" style="height: 35px;">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-lg fa-home"></i></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_haspublic">
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -29,7 +29,7 @@
</form> </form>
<form id="modifNode" name="modifNode" role="form" class="form text-center px-0" method="post" mXattribut="action:urlAction"> <form id="modifNode" name="modifNode" role="form" class="form-inline text-center px-0" method="post" mXattribut="action:urlAction">
<input type="hidden" name="node_Id1" mXattribut="value:nodeHiddenUpdate" class="hidden"/> <input type="hidden" name="node_Id1" mXattribut="value:nodeHiddenUpdate" class="hidden"/>
<mx:bloc id="ToHidde"> <mx:bloc id="ToHidde">
<div class="card w-100 border-0"> <div class="card w-100 border-0">
@ -39,7 +39,7 @@
<div class="card-body"> <div class="card-body">
<div class="row mb-2"> <div class="row mb-2">
<mx:bloc id="blocName"> <mx:bloc id="blocName">
<div class="input-group col-xs-12 col-sm-8 col-lg-6 p-0 m-0"> <div class="input-group col-xs-12 col-sm-8 col-lg-3 p-0 m-0">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-lg fa-indent mr-2"></i><span class="fa"><span class="text-danger"> *</span></span></span> <span class="input-group-text"><i class="fa fa-lg fa-indent mr-2"></i><span class="fa"><span class="text-danger"> *</span></span></span>
</div> </div>
@ -49,6 +49,26 @@
</div> </div>
</div> </div>
</mx:bloc id="blocName"> </mx:bloc id="blocName">
<mx:bloc id="blocHeadValues">
<div class="input-group col-xs-12 col-sm-8 col-lg-3 p-0 m-0 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommHasPublicPage"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_haspublicpage"<mx:text id="node_haspublicpage_value"/>>
</div>
<div class="input-group col-xs-12 col-sm-8 col-lg-3 p-0 m-0 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommPublicList"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_listpublic"<mx:text id="node_listpublic_value"/>>
</div>
<div class="input-group col-xs-12 col-sm-8 col-lg-3 p-0 m-0 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><mx:text id="txtCommRegisterEnable"/></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_registerenable"<mx:text id="node_registerenable_value"/>>
</div>
</mx:bloc id="blocHeadValues">
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="input-group col-xs-12 col-sm-8 col-lg-6 p-0 m-0"> <div class="input-group col-xs-12 col-sm-8 col-lg-6 p-0 m-0">
@ -82,6 +102,7 @@
</div> </div>
</div> </div>
</div> </div>
<mx:bloc id="blocFootValues">
<div class="row"> <div class="row">
<div class="input-group col-xs-12 col-sm-8 col-lg-3 p-0 m-0"> <div class="input-group col-xs-12 col-sm-8 col-lg-3 p-0 m-0">
<div class="input-group-prepend"> <div class="input-group-prepend">
@ -101,13 +122,8 @@
</div> </div>
<mx:formField id="domain"/> <mx:formField id="domain"/>
</div> </div>
<div class="input-group col-xs-12 col-sm-8 col-lg-3 p-0 m-0 justify-content-center">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-lg fa-home"></i></span>
</div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_haspublic"<mx:text id="node_haspublic_value"/>>
</div>
</div> </div>
</mx:bloc id="blocFootValues">
</div> </div>
<mx:bloc id="blocSettings"> <mx:bloc id="blocSettings">

View File

@ -249,17 +249,19 @@ CREATE TABLE `{_PREFIX_}langue` (
CREATE TABLE `{_PREFIX_}node` ( CREATE TABLE `{_PREFIX_}node` (
`node_id` int(4) UNSIGNED NOT NULL, `node_id` int(4) UNSIGNED NOT NULL,
`node_node_id` int(4) UNSIGNED NOT NULL DEFAULT 0, `node_node_id` int(4) UNSIGNED NOT NULL DEFAULT 0,
`node_libelle` text NOT NULL, `node_libelle` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`node_icone` varchar(200) NOT NULL DEFAULT '', `node_icone` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`node_template` varchar(100) NOT NULL DEFAULT '', `node_template` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`node_domain` varchar(128) NOT NULL, `node_domain` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`node_haspublic` enum('on','off') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'off', `node_haspublicpage` enum('on','off') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'off',
`node_ctype` enum('default','gaming','asso') DEFAULT 'default', `node_listpublic` enum('on','off') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'off',
`node_ctypereg` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `node_registerenable` enum('on','off') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'off',
`node_ctype` enum('default','blog','asso','steam','vitrine','ecommerce') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'default',
`node_ctypereg` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`node_usergroupid` int(3) DEFAULT 0, `node_usergroupid` int(3) DEFAULT 0,
`node_subsgroupid` int(3) DEFAULT 0, `node_subsgroupid` int(3) DEFAULT 0,
`node_subsgrouptempid` int(3) DEFAULT 0, `node_subsgrouptempid` int(3) DEFAULT 0,
`node_mailnode` varchar(128) DEFAULT NULL `node_mailnode` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
#-- -------------------------------------------------------- #-- --------------------------------------------------------
#-- #--

View File

@ -222,7 +222,8 @@ Class AdminNode extends CoordinationObj
$Node->setCTypereg( ((isset($_POST["node_ctypereg"]))?($_POST["node_ctypereg"]):"") ); $Node->setCTypereg( ((isset($_POST["node_ctypereg"]))?($_POST["node_ctypereg"]):"") );
$Node->setDomain( ((isset($_POST["node_domain"]))?($_POST["node_domain"]):"") ); $Node->setDomain( ((isset($_POST["node_domain"]))?($_POST["node_domain"]):"") );
$Node->setHasPublic( ((isset($_POST["node_haspublicpage"]))?($_POST["node_haspublicpage"]):'off') ); $Node->setHasPublic( ((isset($_POST["node_haspublicpage"]))?($_POST["node_haspublicpage"]):'off') );
$Node->setHasPublic( ((isset($_POST["node_listpublic"]))?($_POST["node_listpublic"]):'off') ); $Node->setListPublic( ((isset($_POST["node_listpublic"]))?($_POST["node_listpublic"]):'off') );
$Node->setRegisterEnable( ((isset($_POST["node_registerenable"]))?($_POST["node_registerenable"]):'off') );
// $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") ); // $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") );
# Variables de configuration de l'objet # Variables de configuration de l'objet
@ -384,13 +385,6 @@ Class AdminNode extends CoordinationObj
$GLOBALS['SYSTEM_TEMPLATE']->MxSelect("ToHidde.template", "template_name", $Node->getTemplate(), $tabTemplate, '', '', 'id="template"', "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeTemplate"), ENT_QUOTES)."\"", getMessage("txtNodeTemplate")); $GLOBALS['SYSTEM_TEMPLATE']->MxSelect("ToHidde.template", "template_name", $Node->getTemplate(), $tabTemplate, '', '', 'id="template"', "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeTemplate"), ENT_QUOTES)."\"", getMessage("txtNodeTemplate"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxImage("ToHidde.pictoObject", $GLOBALS['CONF_DATA_PATH']."data/image/icons/node/".$nodeIcone, getMessage("PreviewPicto")); $GLOBALS["SYSTEM_TEMPLATE"]->MxImage("ToHidde.pictoObject", $GLOBALS['CONF_DATA_PATH']."data/image/icons/node/".$nodeIcone, getMessage("PreviewPicto"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxImage("ToHidde.screenTemplate", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."preview.png", getMessage("PreviewTemplate")); $GLOBALS["SYSTEM_TEMPLATE"]->MxImage("ToHidde.screenTemplate", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."preview.png", getMessage("PreviewTemplate"));
// $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.ctype", "text", "node_ctype", htmlentitiesconv($Node->getCType()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeType"), ENT_QUOTES)."\"", getMessage("txtNodeType"));
printTabCommProfiles($selected=htmlentitiesconv($Node->getCType()), $MxBlocName="ToHidde.COMMPROFILES", $name="node_ctype");
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.ctypereg", "text", "node_ctypereg", htmlentitiesconv($Node->getCTypereg()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeTypereg"), ENT_QUOTES)."\"", getMessage("txtNodeTypereg"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.domain", "text", "node_domain", htmlentitiesconv($Node->getDomain()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeDomain"), ENT_QUOTES)."\"", getMessage("txtNodeDomain"));
$GLOBALS['SYSTEM_TEMPLATE']->MxText("ToHidde.node_haspublicpage_value", ($Node->getHasPublicPage()!="on")?"":" checked");
$GLOBALS['SYSTEM_TEMPLATE']->MxText("ToHidde.node_listpublic_value", ($Node->getListPublic()!="on")?"":" checked");
/* fin template */
for ($i=0; $i<count($tab);$i++) for ($i=0; $i<count($tab);$i++)
{ {
@ -408,10 +402,18 @@ Class AdminNode extends CoordinationObj
if(recupCommunity($node_Id1) === "3") $nodeCom = "2"; else $nodeCom = recupCommunity($node_Id1); if(recupCommunity($node_Id1) === "3") $nodeCom = "2"; else $nodeCom = recupCommunity($node_Id1);
// Génération des éléments du bloc des paramètres de communauté // Génération des éléments du bloc des paramètres de communauté
// Si le noeud courant n'est pas un noeud de communauté, on n'affiche pas certains paramètres
if( $node_Id1 === recupCommunity($nodeCom) ) if( $node_Id1 === recupCommunity($nodeCom) )
{ {
$NodeSettings=$GLOBALS["SYSTEM_MANAGER"]["NODESETTINGS"]->createInstance($nodeCom); $NodeSettings=$GLOBALS["SYSTEM_MANAGER"]["NODESETTINGS"]->createInstance($nodeCom);
printTabCommProfiles($selected=htmlentitiesconv($Node->getCType()), $MxBlocName="ToHidde.blocFootValues.COMMPROFILES", $name="node_ctype");
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocFootValues.ctypereg", "text", "node_ctypereg", htmlentitiesconv($Node->getCTypereg()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeTypereg"), ENT_QUOTES)."\"", getMessage("txtNodeTypereg"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocFootValues.domain", "text", "node_domain", htmlentitiesconv($Node->getDomain()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeDomain"), ENT_QUOTES)."\"", getMessage("txtNodeDomain"));
$GLOBALS['SYSTEM_TEMPLATE']->MxText("ToHidde.blocHeadValues.node_haspublicpage_value", ($Node->getHasPublicPage()!="on")?"":" checked");
$GLOBALS['SYSTEM_TEMPLATE']->MxText("ToHidde.blocHeadValues.node_listpublic_value", ($Node->getListPublic()!="on")?"":" checked");
$GLOBALS['SYSTEM_TEMPLATE']->MxText("ToHidde.blocHeadValues.node_registerenable_value", ($Node->getRegisterEnable()!="on")?"":" checked");
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_email", "text", "node_email", htmlentitiesconv($NodeSettings->getEmail()), "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipEmail"), ENT_QUOTES)."\"", getMessage("node_email")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_email", "text", "node_email", htmlentitiesconv($NodeSettings->getEmail()), "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipEmail"), ENT_QUOTES)."\"", getMessage("node_email"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_git", "text", "node_git", htmlentitiesconv($NodeSettings->getGit()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipGit"), ENT_QUOTES)."\"", getMessage("node_git")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_git", "text", "node_git", htmlentitiesconv($NodeSettings->getGit()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipGit"), ENT_QUOTES)."\"", getMessage("node_git"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_mastodon", "text", "node_mastodon", htmlentitiesconv($NodeSettings->getMastodon()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMastodon"), ENT_QUOTES)."\"", getMessage("node_mastodon")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_mastodon", "text", "node_mastodon", htmlentitiesconv($NodeSettings->getMastodon()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMastodon"), ENT_QUOTES)."\"", getMessage("node_mastodon"));
@ -422,7 +424,9 @@ Class AdminNode extends CoordinationObj
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_twitter", "text", "node_twitter", htmlentitiesconv($NodeSettings->getTwitter()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipTwitter"), ENT_QUOTES)."\"", getMessage("node_twitter")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_twitter", "text", "node_twitter", htmlentitiesconv($NodeSettings->getTwitter()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipTwitter"), ENT_QUOTES)."\"", getMessage("node_twitter"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_facebook", "text", "node_facebook", htmlentitiesconv($NodeSettings->getFacebook()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipFacebook"), ENT_QUOTES)."\"", getMessage("node_facebook")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_facebook", "text", "node_facebook", htmlentitiesconv($NodeSettings->getFacebook()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipFacebook"), ENT_QUOTES)."\"", getMessage("node_facebook"));
} else { } else {
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("ToHidde.blocHeadValues", "DELETE");
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("ToHidde.blocSettings", "DELETE"); $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("ToHidde.blocSettings", "DELETE");
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("ToHidde.blocFootValues", "DELETE");
} }
// Pour déplacer le Groupe // Pour déplacer le Groupe
@ -479,6 +483,7 @@ Class AdminNode extends CoordinationObj
function execUpdateAdmin() function execUpdateAdmin()
{ {
// var_dump($_POST); // var_dump($_POST);
// var_dump( ((isset($_POST["node_listpublic"]))?($_POST["node_listpublic"]):'off') );
// exit(); // exit();
$tabCodeLangue=array(); $tabCodeLangue=array();
$isValid=true; $isValid=true;
@ -502,6 +507,7 @@ Class AdminNode extends CoordinationObj
$Node->setDomain( ((isset($_POST["node_domain"]))?(htmlentitiesconv($_POST["node_domain"])):"") ); $Node->setDomain( ((isset($_POST["node_domain"]))?(htmlentitiesconv($_POST["node_domain"])):"") );
$Node->setHasPublicPage( ((isset($_POST["node_haspublicpage"]))?($_POST["node_haspublicpage"]):'off') ); $Node->setHasPublicPage( ((isset($_POST["node_haspublicpage"]))?($_POST["node_haspublicpage"]):'off') );
$Node->setListPublic( ((isset($_POST["node_listpublic"]))?($_POST["node_listpublic"]):'off') ); $Node->setListPublic( ((isset($_POST["node_listpublic"]))?($_POST["node_listpublic"]):'off') );
$Node->setRegisterEnable( ((isset($_POST["node_registerenable"]))?($_POST["node_registerenable"]):'off') );
// $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") ); // $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") );
if(recupCommunity($node_id) === "3") $nodeCom = "2"; else $nodeCom = recupCommunity($node_id); if(recupCommunity($node_id) === "3") $nodeCom = "2"; else $nodeCom = recupCommunity($node_id);
@ -546,7 +552,7 @@ Class AdminNode extends CoordinationObj
if ($node_id_pere!=0) if ($node_id_pere!=0)
{ {
$MyTree=$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($node_id); $MyTree=$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($node_id);
// Son pere ne peu pas ïżœre un de ses fils ou lui mïżœe !!! // Son pere ne peu pas être un de ses fils ou lui même !!!
if ( (in_array($node_id_pere, $MyTree->getSonArray())) && ($MyTree->getId()!=$node_id_pere) ) if ( (in_array($node_id_pere, $MyTree->getSonArray())) && ($MyTree->getId()!=$node_id_pere) )
{ {
$isValid=false; $isValid=false;

View File

@ -105,6 +105,12 @@ var $haspublicpage= 0;
*/ */
var $listpublic= 0; var $listpublic= 0;
/**
* @var chaine
* @desc chaine fqdn
*/
var $registerenable= 0;
/** /**
* @var chaine * @var chaine
* @desc chaine community type * @desc chaine community type
@ -353,6 +359,28 @@ var $mailnode= null;
return true; return true;
} }
/**
* "getteur" de l'attribut inscription activée.
* @access public
* @return chaine libelle du Noeud
*/
function getRegisterEnable()
{
return $this->registerenable;
}
/**
* "setteur" de l'attribut liste publique.
* @access public
* @param chaine libelle (pas de code Html)
* @return booleen
*/
function setRegisterEnable($registerenable)
{
$this->registerenable=$registerenable;
return true;
}
/** /**
* "getteur" de l'attribut type. * "getteur" de l'attribut type.
* @access public * @access public
@ -371,6 +399,12 @@ var $mailnode= null;
*/ */
function setCType($ctype) function setCType($ctype)
{ {
if (is_numeric($ctype))
return false;
if( $ctype =="#" )
$ctype="default";
$this->ctype=$ctype; $this->ctype=$ctype;
return true; return true;
} }
@ -492,7 +526,7 @@ var $mailnode= null;
* @param entier identifiant numérique du Node père * @param entier identifiant numérique du Node père
* @param chaine libelle du Node * @param chaine libelle du Node
*/ */
function doLoad($id, $idpere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doLoad($id, $idpere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
$this->setId($id); $this->setId($id);
$this->libelle->setSql($libelle); $this->libelle->setSql($libelle);
@ -502,6 +536,7 @@ var $mailnode= null;
$this->setDomain($domain); $this->setDomain($domain);
$this->setHasPublicPage($haspublicpage); $this->setHasPublicPage($haspublicpage);
$this->setListPublic($listpublic); $this->setListPublic($listpublic);
$this->setRegisterEnable($registerenable);
$this->setCType($ctype); $this->setCType($ctype);
$this->setCTypereg($ctypereg); $this->setCTypereg($ctypereg);
$this->setUserGroupId($usergroupid); $this->setUserGroupId($usergroupid);

View File

@ -126,7 +126,7 @@ class NodeManager extends Manager
* @abstract * @abstract
* @return entier * @return entier
*/ */
function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
return 0; /* entier */ return 0; /* entier */
} }
@ -143,7 +143,7 @@ class NodeManager extends Manager
* @abstract * @abstract
* @return entier * @return entier
*/ */
function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
return true; return true;
} }
@ -218,7 +218,7 @@ class NodeManager extends Manager
* @access private * @access private
* @return entier * @return entier
*/ */
function sourceInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function sourceInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
# Gestion d'un tableau intermediaire avec la reprise des elements # Gestion d'un tableau intermediaire avec la reprise des elements
if (!is_numeric($idPere)) if (!is_numeric($idPere))
@ -230,7 +230,7 @@ class NodeManager extends Manager
addError($systemError,$classe,$message, __line__, __file__); addError($systemError,$classe,$message, __line__, __file__);
return false; return false;
} }
return $this->doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode); return $this->doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode);
} }
/** /**
@ -244,7 +244,7 @@ class NodeManager extends Manager
* @access private * @access private
* @return booleen * @return booleen
*/ */
function sourceUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function sourceUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
# Gestion d'un tableau intermediaire avec la reprise des elements # Gestion d'un tableau intermediaire avec la reprise des elements
if (!Is_numeric($id) || !is_numeric($idPere)) if (!Is_numeric($id) || !is_numeric($idPere))
@ -257,7 +257,7 @@ class NodeManager extends Manager
return false; return false;
} }
return $this->doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode); return $this->doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode);
} }
/** /**
@ -332,7 +332,7 @@ class NodeManager extends Manager
if (is_array($tab) && isset($tab["id"]) && is_numeric($tab["id"])) if (is_array($tab) && isset($tab["id"]) && is_numeric($tab["id"]))
{ {
/* création et alimentation de l'objet */ /* création et alimentation de l'objet */
$return->doLoad($tab["id"], $tab["idpere"], $tab["libelle"], $tab["icone"], $tab["template"], $tab["domain"], $tab["haspublicpage"], $tab["listpublic"], $tab["ctype"], $tab["ctypereg"], $tab["usergroupid"], $tab["subsgroupid"], $tab["subsgrouptempid"], $tab["mailnode"]); $return->doLoad($tab["id"], $tab["idpere"], $tab["libelle"], $tab["icone"], $tab["template"], $tab["domain"], $tab["haspublicpage"], $tab["listpublic"], $tab["registerenable"], $tab["ctype"], $tab["ctypereg"], $tab["usergroupid"], $tab["subsgroupid"], $tab["subsgrouptempid"], $tab["mailnode"]);
}else{ }else{
$systemError=3; $systemError=3;
$classe="NodeManager"; $classe="NodeManager";
@ -368,7 +368,7 @@ class NodeManager extends Manager
for ($i=0; $i<count($tab); $i++) for ($i=0; $i<count($tab); $i++)
{ {
$return[$i]=new Node(); $return[$i]=new Node();
$return[$i]->doLoad($tab[$i]["id"], $tab[$i]["idpere"], $tab[$i]["libelle"], $tab[$i]["icone"], $tab[$i]["template"], $tab[$i]["domain"], $tab[$i]["haspublicpage"], $tab[$i]["listpublic"], $tab[$i]["ctype"], $tab[$i]["ctypereg"], $tab[$i]["usergroupid"], $tab[$i]["subsgroupid"], $tab[$i]["subsgrouptempid"], $tab[$i]["mailnode"]); $return[$i]->doLoad($tab[$i]["id"], $tab[$i]["idpere"], $tab[$i]["libelle"], $tab[$i]["icone"], $tab[$i]["template"], $tab[$i]["domain"], $tab[$i]["haspublicpage"], $tab[$i]["listpublic"], $tab[$i]["registerenable"], $tab[$i]["ctype"], $tab[$i]["ctypereg"], $tab[$i]["usergroupid"], $tab[$i]["subsgroupid"], $tab[$i]["subsgrouptempid"], $tab[$i]["mailnode"]);
} }
}else{ }else{
$systemError=3; $systemError=3;
@ -431,7 +431,7 @@ class NodeManager extends Manager
if ((strtolower(get_class($obj))=="node") && ($obj->isLoaded()==true)) if ((strtolower(get_class($obj))=="node") && ($obj->isLoaded()==true))
{ {
/* Récupération des infos */ /* Récupération des infos */
$id=$this->sourceUpdate($obj->getId(), $obj->getIdPere(), $obj->getXmlLibelle(), $obj->getIcone(), $obj->getTemplate(), $obj->getDomain(), $obj->getHasPublicPage(), $obj->getListPublic(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode()); $id=$this->sourceUpdate($obj->getId(), $obj->getIdPere(), $obj->getXmlLibelle(), $obj->getIcone(), $obj->getTemplate(), $obj->getDomain(), $obj->getHasPublicPage(), $obj->getListPublic(), $obj->getRegisterEnable(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode());
$this->CallSystemPlugin("__updateNode", $obj); $this->CallSystemPlugin("__updateNode", $obj);
return $obj; return $obj;
} }
@ -458,7 +458,7 @@ class NodeManager extends Manager
if ($obj->isLoaded()==false) if ($obj->isLoaded()==false)
{ {
/* Récupération des infos */ /* Récupération des infos */
$id=$this->sourceInsert($obj->getIdPere(), $obj->getXmlLibelle(), $obj->getIcone(), $obj->getTemplate(), $obj->getDomain(), $obj->getHasPublicPage(), $obj->getListPublic(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode()); $id=$this->sourceInsert($obj->getIdPere(), $obj->getXmlLibelle(), $obj->getIcone(), $obj->getTemplate(), $obj->getDomain(), $obj->getHasPublicPage(), $obj->getListPublic(), $obj->getRegisterEnable(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode());
$obj->setId($id); $obj->setId($id);
$this->CallSystemPlugin("__insertNode", $obj); $this->CallSystemPlugin("__insertNode", $obj);
return $obj; return $obj;

View File

@ -194,7 +194,7 @@ var $conn = null;
* @access private * @access private
* @return entier * @return entier
*/ */
function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
$sql="INSERT INTO ".$this->getTable()." (" $sql="INSERT INTO ".$this->getTable()." ("
.$this->getSqlName("idpere").", " .$this->getSqlName("idpere").", "
@ -204,13 +204,14 @@ var $conn = null;
.$this->getSqlName("domain").", " .$this->getSqlName("domain").", "
.$this->getSqlName("haspublicpage").", " .$this->getSqlName("haspublicpage").", "
.$this->getSqlName("listpublic").", " .$this->getSqlName("listpublic").", "
.$this->getSqlName("registerenable").", "
.$this->getSqlName("ctype").", " .$this->getSqlName("ctype").", "
.$this->getSqlName("ctypereg").", " .$this->getSqlName("ctypereg").", "
.$this->getSqlName("usergroupid").", " .$this->getSqlName("usergroupid").", "
.$this->getSqlName("subsgroupid").", " .$this->getSqlName("subsgroupid").", "
.$this->getSqlName("subsgrouptempid").", " .$this->getSqlName("subsgrouptempid").", "
.$this->getSqlName("mailnode").") VALUES ("; .$this->getSqlName("mailnode").") VALUES (";
$sql.="'".$idPere."', '".$libelle."', '".$icone."', '".$template."', '".$domain."', '".$haspublicpage."', '".$listpublic."', '".$ctype."', '".$ctypereg."', '".$usergroupid."', '".$subsgroupid."', '".$subsgrouptempid."', '".$mailnode."')"; $sql.="'".$idPere."', '".$libelle."', '".$icone."', '".$template."', '".$domain."', '".$haspublicpage."', '".$listpublic."', '".$registerenable."', '".$ctype."', '".$ctypereg."', '".$usergroupid."', '".$subsgroupid."', '".$subsgrouptempid."', '".$mailnode."')";
# Requete # Requete
$result=$this->conn->sql_query($sql); $result=$this->conn->sql_query($sql);
@ -238,7 +239,7 @@ var $conn = null;
* @access private * @access private
* @return booleen * @return booleen
*/ */
function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $registerenable, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
$sql="UPDATE ".$this->getTable()." SET " $sql="UPDATE ".$this->getTable()." SET "
.$this->getSqlName("id")."='".$id."', " .$this->getSqlName("id")."='".$id."', "
@ -249,6 +250,7 @@ var $conn = null;
.$this->getSqlName("domain")."='".$domain."', " .$this->getSqlName("domain")."='".$domain."', "
.$this->getSqlName("haspublicpage")."='".$haspublicpage."', " .$this->getSqlName("haspublicpage")."='".$haspublicpage."', "
.$this->getSqlName("listpublic")."='".$listpublic."', " .$this->getSqlName("listpublic")."='".$listpublic."', "
.$this->getSqlName("registerenable")."='".$registerenable."', "
.$this->getSqlName("ctype")."='".$ctype."', " .$this->getSqlName("ctype")."='".$ctype."', "
.$this->getSqlName("ctypereg")."='".$ctypereg."', " .$this->getSqlName("ctypereg")."='".$ctypereg."', "
.$this->getSqlName("usergroupid")."='".$usergroupid."', " .$this->getSqlName("usergroupid")."='".$usergroupid."', "
@ -350,11 +352,12 @@ var $conn = null;
$result["domain"] =$sqlArray[$this->getSqlName("domain")]; $result["domain"] =$sqlArray[$this->getSqlName("domain")];
$result["haspublicpage"] =$sqlArray[$this->getSqlName("haspublicpage")]; $result["haspublicpage"] =$sqlArray[$this->getSqlName("haspublicpage")];
$result["listpublic"] =$sqlArray[$this->getSqlName("listpublic")]; $result["listpublic"] =$sqlArray[$this->getSqlName("listpublic")];
$result["registerenable"] =$sqlArray[$this->getSqlName("registerenable")];
$result["ctype"] =$sqlArray[$this->getSqlName("ctype")]; $result["ctype"] =$sqlArray[$this->getSqlName("ctype")];
$result["ctypereg"] =$sqlArray[$this->getSqlName("ctypereg")]; $result["ctypereg"] =$sqlArray[$this->getSqlName("ctypereg")];
$result["usergroupid"] =$sqlArray[$this->getSqlName("usergroupid")]; $result["usergroupid"] =$sqlArray[$this->getSqlName("usergroupid")];
$result["subsgroupid"] =$sqlArray[$this->getSqlName("subsgroupid")]; $result["subsgroupid"] =$sqlArray[$this->getSqlName("subsgroupid")];
$result["subsgrouptempid"] =$sqlArray[$this->getSqlName("subsgrouptempid")]; $result["subsgrouptempid"] =$sqlArray[$this->getSqlName("subsgrouptempid")];
$result["mailnode"] =$sqlArray[$this->getSqlName("mailnode")]; $result["mailnode"] =$sqlArray[$this->getSqlName("mailnode")];
return $result; return $result;
} }
@ -380,13 +383,14 @@ var $conn = null;
$this->sqlAttributArray["icone"] ="node_icone"; $this->sqlAttributArray["icone"] ="node_icone";
$this->sqlAttributArray["template"] ="node_template"; $this->sqlAttributArray["template"] ="node_template";
$this->sqlAttributArray["domain"] ="node_domain"; $this->sqlAttributArray["domain"] ="node_domain";
$this->sqlAttributArray["haspublicpage"] ="node_haspublicpage"; $this->sqlAttributArray["haspublicpage"] ="node_haspublicpage";
$this->sqlAttributArray["listpublic"] ="node_listpublic"; $this->sqlAttributArray["listpublic"] ="node_listpublic";
$this->sqlAttributArray["registerenable"] ="node_registerenable";
$this->sqlAttributArray["ctype"] ="node_ctype"; $this->sqlAttributArray["ctype"] ="node_ctype";
$this->sqlAttributArray["ctypereg"] ="node_ctypereg"; $this->sqlAttributArray["ctypereg"] ="node_ctypereg";
$this->sqlAttributArray["usergroupid"] ="node_usergroupid"; $this->sqlAttributArray["usergroupid"] ="node_usergroupid";
$this->sqlAttributArray["subsgroupid"] ="node_subsgroupid"; $this->sqlAttributArray["subsgroupid"] ="node_subsgroupid";
$this->sqlAttributArray["subsgrouptempid"] ="node_subsgrouptempid"; $this->sqlAttributArray["subsgrouptempid"] ="node_subsgrouptempid";
$this->sqlAttributArray["mailnode"] ="node_mailnode"; $this->sqlAttributArray["mailnode"] ="node_mailnode";
return true; return true;
} }
@ -397,13 +401,14 @@ var $conn = null;
$this->sqlAttributArray["icone"] ="icone"; $this->sqlAttributArray["icone"] ="icone";
$this->sqlAttributArray["template"] ="template"; $this->sqlAttributArray["template"] ="template";
$this->sqlAttributArray["domain"] ="domain"; $this->sqlAttributArray["domain"] ="domain";
$this->sqlAttributArray["haspublicpage"] ="haspublicpage"; $this->sqlAttributArray["haspublicpage"] ="haspublicpage";
$this->sqlAttributArray["listpublic"] ="listpublic"; $this->sqlAttributArray["listpublic"] ="listpublic";
$this->sqlAttributArray["registerenable"] ="registerenable";
$this->sqlAttributArray["ctype"] ="ctype"; $this->sqlAttributArray["ctype"] ="ctype";
$this->sqlAttributArray["ctypereg"] ="ctypereg"; $this->sqlAttributArray["ctypereg"] ="ctypereg";
$this->sqlAttributArray["usergroupid"] ="usergroupid"; $this->sqlAttributArray["usergroupid"] ="usergroupid";
$this->sqlAttributArray["subsgroupid"] ="subsgroupid"; $this->sqlAttributArray["subsgroupid"] ="subsgroupid";
$this->sqlAttributArray["subsgrouptempid"] ="subsgrouptempid"; $this->sqlAttributArray["subsgrouptempid"] ="subsgrouptempid";
$this->sqlAttributArray["mailnode"] ="mailnode"; $this->sqlAttributArray["mailnode"] ="mailnode";
return true; return true;
} }