Moved HasLanding to HasPublic. More explicit.

This commit is contained in:
Rooty 2021-04-01 00:39:35 +02:00
parent 879edad242
commit fa3fd6fd88
12 changed files with 43 additions and 53 deletions

View File

@ -40,7 +40,7 @@ txtNodeTypereg = "Type de structure"
NodeEntry_typereg = "Type de structure" NodeEntry_typereg = "Type de structure"
txtNodeDomain = "FQDN du domaine" txtNodeDomain = "FQDN du domaine"
NodeEntry_domain ="FQDN du domaine" NodeEntry_domain ="FQDN du domaine"
txtHasLandingPage = "Dispose d'une Landing Page" txtHasPublicPage = "Dispose d'une Landing Page"
TxtPictoNode = "Image de l'espace" TxtPictoNode = "Image de l'espace"
txtNodeName = "Nom de l'espace" txtNodeName = "Nom de l'espace"
txtNodeTemplate = "Choisissez l'habillage pour l'espace" txtNodeTemplate = "Choisissez l'habillage pour l'espace"

View File

@ -81,8 +81,8 @@
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-lg fa-home"></i></span> <span class="input-group-text"><i class="fa fa-lg fa-home"></i></span>
</div> </div>
<!-- <mx:checker id="node_haslanding" id="node_haslanding" class="check"/> --> <!-- <mx:checker id="node_haspublic" id="node_haspublic" class="check"/> -->
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_haslanding"> <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>

View File

@ -102,7 +102,7 @@
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-lg fa-home"></i></span> <span class="input-group-text"><i class="fa fa-lg fa-home"></i></span>
</div> </div>
<input data-toggle="toggle" data-style="float-right" data-onstyle="success" data-offstyle="danger" data-size="mini" type="checkbox" name="node_haslanding"<mx:text id="node_haslanding_value"/>> <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> </div>
</div> </div>

View File

@ -253,7 +253,7 @@ CREATE TABLE `{_PREFIX_}node` (
`node_icone` varchar(200) NOT NULL DEFAULT '', `node_icone` varchar(200) NOT NULL DEFAULT '',
`node_template` varchar(100) NOT NULL DEFAULT '', `node_template` varchar(100) NOT NULL DEFAULT '',
`node_domain` varchar(128) NOT NULL, `node_domain` varchar(128) NOT NULL,
`node_haslanding` enum('on','off') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'off', `node_haspublic` enum('on','off') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'off',
`node_ctype` enum('default','gaming','asso') DEFAULT 'default', `node_ctype` enum('default','gaming','asso') DEFAULT 'default',
`node_ctypereg` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `node_ctypereg` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`node_usergroupid` int(3) DEFAULT 0, `node_usergroupid` int(3) DEFAULT 0,

View File

@ -361,7 +361,7 @@ function execAdmin()
$Node->setCType( ((isset($_POST["NodeEntry_type"])&&$_POST["NodeEntry_type"]!="#")?($_POST["NodeEntry_type"]):"default") ); $Node->setCType( ((isset($_POST["NodeEntry_type"])&&$_POST["NodeEntry_type"]!="#")?($_POST["NodeEntry_type"]):"default") );
$Node->setCTypereg( ((isset($_POST["NodeEntry_typereg"]))?($_POST["NodeEntry_typereg"]):"") ); $Node->setCTypereg( ((isset($_POST["NodeEntry_typereg"]))?($_POST["NodeEntry_typereg"]):"") );
$Node->setDomain( ((isset($_POST["NodeEntry_domain"]))?($_POST["NodeEntry_domain"]):"") ); $Node->setDomain( ((isset($_POST["NodeEntry_domain"]))?($_POST["NodeEntry_domain"]):"") );
$Node->SetHasLanding( ((isset($_POST["haslanding"]))?($_POST["haslanding"]):0) ); $Node->SetHasPublic( ((isset($_POST["haspublic"]))?($_POST["haspublic"]):0) );
$Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") ); $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") );
// Récupération de la template!!! // Récupération de la template!!!

View File

@ -105,7 +105,7 @@ Class AdminNode extends CoordinationObj
// $checked0=True; // $checked0=True;
// } // }
// $GLOBALS['SYSTEM_TEMPLATE']->MxCheckerField("node_haslanding", "radio", "optList", 0, $checked0); // $GLOBALS['SYSTEM_TEMPLATE']->MxCheckerField("node_haspublic", "radio", "optList", 0, $checked0);
/* Creation du Tree d'admin */ /* Creation du Tree d'admin */
$myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($nodeId); $myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($nodeId);
@ -211,7 +211,7 @@ Class AdminNode extends CoordinationObj
$Node->setCType( ( (isset($_POST["node_ctype"]) && ($_POST["node_ctype"]!="") )?($_POST["node_ctype"]):"default") ); $Node->setCType( ( (isset($_POST["node_ctype"]) && ($_POST["node_ctype"]!="") )?($_POST["node_ctype"]):"default") );
$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->setHasLanding( ((isset($_POST["node_haslanding"]))?($_POST["node_haslanding"]):'off') ); $Node->setHasPublic( ((isset($_POST["node_haspublic"]))?($_POST["node_haspublic"]):'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
@ -376,7 +376,7 @@ Class AdminNode extends CoordinationObj
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.ctype", "text", "node_ctype", htmlentitiesconv($Node->getCType()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeType"), ENT_QUOTES)."\"", getMessage("txtNodeType")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.ctype", "text", "node_ctype", htmlentitiesconv($Node->getCType()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeType"), ENT_QUOTES)."\"", getMessage("txtNodeType"));
$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.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"]->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_haslanding_value", ($Node->getHasLanding()!="on")?"":" checked"); $GLOBALS['SYSTEM_TEMPLATE']->MxText("ToHidde.node_haspublic_value", ($Node->getHasPublic()!="on")?"":" checked");
/* fin template */ /* fin template */
for ($i=0; $i<count($tab);$i++) for ($i=0; $i<count($tab);$i++)
@ -469,7 +469,7 @@ Class AdminNode extends CoordinationObj
$Node->setCType( ((isset($_POST["node_ctype"]))?(htmlentitiesconv($_POST["node_ctype"])):"default") ); $Node->setCType( ((isset($_POST["node_ctype"]))?(htmlentitiesconv($_POST["node_ctype"])):"default") );
$Node->setCTypereg( ((isset($_POST["node_ctypereg"]))?(htmlentitiesconv($_POST["node_ctypereg"])):"") ); $Node->setCTypereg( ((isset($_POST["node_ctypereg"]))?(htmlentitiesconv($_POST["node_ctypereg"])):"") );
$Node->setDomain( ((isset($_POST["node_domain"]))?(htmlentitiesconv($_POST["node_domain"])):"") ); $Node->setDomain( ((isset($_POST["node_domain"]))?(htmlentitiesconv($_POST["node_domain"])):"") );
$Node->setHasLanding( ((isset($_POST["node_haslanding"]))?($_POST["node_haslanding"]):'off') ); $Node->setHasPublic( ((isset($_POST["node_haspublic"]))?($_POST["node_haspublic"]):'off') );
// $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") ); // $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") );
// var_dump($Node); // var_dump($Node);

View File

@ -128,10 +128,7 @@ Class Home extends CoordinationObj
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionLogin", $url); $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionLogin", $url);
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("BtnEnter", getMessage("UserPrintEnter")); $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("BtnEnter", getMessage("UserPrintEnter"));
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("titleButton", getMessage("tipUserPrintEnter")); $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();
$sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunity()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId(); $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunity()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId();
# Execution de Requete (utilisation de la connexion systeme) # Execution de Requete (utilisation de la connexion systeme)
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
@ -140,7 +137,6 @@ Class Home extends CoordinationObj
if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0) if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
{ {
$View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow(); $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
// $text = stripslashes($View['textinfo_text_'.$currentCode]);
$text = stripslashes($View['textentrynode_text']); $text = stripslashes($View['textentrynode_text']);
# Destruction des resultats # Destruction des resultats
$GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult(); $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
@ -157,7 +153,6 @@ Class Home extends CoordinationObj
withBlocPath("Home", "actionLectureInfo"); withBlocPath("Home", "actionLectureInfo");
# Requete sur identifiant de l'objet de coordination correspondant # 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();
$sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunity()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId(); $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunity()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId();
# Execution de Requete (utilisation de la connexion systeme) # Execution de Requete (utilisation de la connexion systeme)
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
@ -165,7 +160,6 @@ Class Home extends CoordinationObj
if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0) if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0)
{ {
$View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow(); $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
// $text = stripslashes($View['textinfo_text_'.$currentCode]);
$text = stripslashes($View['textentrynode_text']); $text = stripslashes($View['textentrynode_text']);
# Destruction des resultats # Destruction des resultats
$GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult(); $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();

View File

@ -97,7 +97,7 @@ var $domain= null;
* @var chaine * @var chaine
* @desc chaine fqdn * @desc chaine fqdn
*/ */
var $haslanding= 0; var $haspublic= 0;
/** /**
* @var chaine * @var chaine
@ -308,9 +308,9 @@ var $mailnode= null;
* @access public * @access public
* @return chaine libelle du Noeud * @return chaine libelle du Noeud
*/ */
function getHasLanding() function getHasPublic()
{ {
return $this->haslanding; return $this->haspublic;
} }
/** /**
@ -319,9 +319,9 @@ var $mailnode= null;
* @param chaine libelle (pas de code Html) * @param chaine libelle (pas de code Html)
* @return booleen * @return booleen
*/ */
function setHasLanding($haslanding) function setHasPublic($haspublic)
{ {
$this->haslanding=$haslanding; $this->haspublic=$haspublic;
return true; return true;
} }
@ -464,7 +464,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, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doLoad($id, $idpere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
$this->setId($id); $this->setId($id);
$this->libelle->setSql($libelle); $this->libelle->setSql($libelle);
@ -472,7 +472,7 @@ var $mailnode= null;
$this->setIcone($icone); $this->setIcone($icone);
$this->setTemplate($template); $this->setTemplate($template);
$this->setDomain($domain); $this->setDomain($domain);
$this->setHasLanding($haslanding); $this->setHasPublic($haspublic);
$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, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $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, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $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, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function sourceInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $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, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode); return $this->doInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $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, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function sourceUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $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, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode); return $this->doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $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["haslanding"], $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["haspublic"], $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]["haslanding"], $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]["haspublic"], $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->getHasLanding(), $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->getHasPublic(), $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->getHasLanding(), $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->getHasPublic(), $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, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
$sql="INSERT INTO ".$this->getTable()." (" $sql="INSERT INTO ".$this->getTable()." ("
.$this->getSqlName("idpere").", " .$this->getSqlName("idpere").", "
@ -202,14 +202,14 @@ var $conn = null;
.$this->getSqlName("icone").", " .$this->getSqlName("icone").", "
.$this->getSqlName("template").", " .$this->getSqlName("template").", "
.$this->getSqlName("domain").", " .$this->getSqlName("domain").", "
.$this->getSqlName("haslanding").", " .$this->getSqlName("haspublic").", "
.$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."', '".$haslanding."', '".$ctype."', '".$ctypereg."', '".$usergroupid."', '".$subsgroupid."', '".$subsgrouptempid."', '".$mailnode."')"; $sql.="'".$idPere."', '".$libelle."', '".$icone."', '".$template."', '".$domain."', '".$haspublic."', '".$ctype."', '".$ctypereg."', '".$usergroupid."', '".$subsgroupid."', '".$subsgrouptempid."', '".$mailnode."')";
# Requete # Requete
$result=$this->conn->sql_query($sql); $result=$this->conn->sql_query($sql);
@ -237,7 +237,7 @@ var $conn = null;
* @access private * @access private
* @return booleen * @return booleen
*/ */
function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{ {
$sql="UPDATE ".$this->getTable()." SET " $sql="UPDATE ".$this->getTable()." SET "
.$this->getSqlName("id")."='".$id."', " .$this->getSqlName("id")."='".$id."', "
@ -246,7 +246,7 @@ var $conn = null;
.$this->getSqlName("icone")."='".$icone."', " .$this->getSqlName("icone")."='".$icone."', "
.$this->getSqlName("template")."='".$template."', " .$this->getSqlName("template")."='".$template."', "
.$this->getSqlName("domain")."='".$domain."', " .$this->getSqlName("domain")."='".$domain."', "
.$this->getSqlName("haslanding")."='".$haslanding."', " .$this->getSqlName("haspublic")."='".$haspublic."', "
.$this->getSqlName("ctype")."='".$ctype."', " .$this->getSqlName("ctype")."='".$ctype."', "
.$this->getSqlName("ctypereg")."='".$ctypereg."', " .$this->getSqlName("ctypereg")."='".$ctypereg."', "
.$this->getSqlName("usergroupid")."='".$usergroupid."', " .$this->getSqlName("usergroupid")."='".$usergroupid."', "
@ -305,8 +305,8 @@ var $conn = null;
$sql = "SELECT * FROM ".$this->getTable()." WHERE ".$this->getSqlName("idpere")."=".$id; $sql = "SELECT * FROM ".$this->getTable()." WHERE ".$this->getSqlName("idpere")."=".$id;
// $sql.= " AND ".$this->getSqlName("domain")."=".$_SERVER["SERVER_NAME"]; // $sql.= " AND ".$this->getSqlName("domain")."=".$_SERVER["SERVER_NAME"];
if( $id >> 100 ) // if( $id >> 100 )
$sql.= " AND ".$this->getSqlName("domain")."=".$_SERVER["SERVER_NAME"]; // $sql.= " AND ".$this->getSqlName("domain")."=".$_SERVER["SERVER_NAME"];
# Requete # Requete
$result=$this->conn->sql_query($sql); $result=$this->conn->sql_query($sql);
@ -346,7 +346,7 @@ var $conn = null;
$result["icone"] =$sqlArray[$this->getSqlName("icone")]; $result["icone"] =$sqlArray[$this->getSqlName("icone")];
$result["template"] =$sqlArray[$this->getSqlName("template")]; $result["template"] =$sqlArray[$this->getSqlName("template")];
$result["domain"] =$sqlArray[$this->getSqlName("domain")]; $result["domain"] =$sqlArray[$this->getSqlName("domain")];
$result["haslanding"] =$sqlArray[$this->getSqlName("haslanding")]; $result["haspublic"] =$sqlArray[$this->getSqlName("haspublic")];
$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")];
@ -377,7 +377,7 @@ 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["haslanding"] ="node_haslanding"; $this->sqlAttributArray["haspublic"] ="node_haspublic";
$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";
@ -393,7 +393,7 @@ 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["haslanding"] ="haslanding"; $this->sqlAttributArray["haspublic"] ="haspublic";
$this->sqlAttributArray["ctype"] ="ctype"; $this->sqlAttributArray["ctype"] ="ctype";
$this->sqlAttributArray["ctypereg"] ="ctypereg"; $this->sqlAttributArray["ctypereg"] ="ctypereg";
$this->sqlAttributArray["usergroupid"] ="usergroupid"; $this->sqlAttributArray["usergroupid"] ="usergroupid";

View File

@ -235,17 +235,12 @@ var $tabTree = array();
$k=0; $k=0;
reset($this->tabTree); reset($this->tabTree);
// var_dump($this->tabTree);
foreach($this->tabTree as $Tree) foreach($this->tabTree as $Tree)
{ {
// var_dump("Tree ID: ".$Tree->getId());
// var_dump("Domain: ".$Tree->getDomain($Tree->getId()));
// var_dump("HOST: ".$_SERVER["HTTP_HOST"]);
if( $Tree->getDomain($Tree->getId()) === $_SERVER["HTTP_HOST"] ) if( $Tree->getDomain($Tree->getId()) === $_SERVER["HTTP_HOST"] )
$tab[]=$Tree->getId(); $tab[]=$Tree->getId();
} }
// var_dump($tab);
return array_values(array_unique($tab)); return array_values(array_unique($tab));
} }

View File

@ -506,13 +506,14 @@ function systemPrint($data)
$nodeId=NULL; $nodeId=NULL;
for ($i=0; $i<count($myTree->tabSon); $i++) for ($i=0; $i<count($myTree->tabSon); $i++)
{ {
if( ($myTree->tabSon[$i]->getIdPere()==1) AND ($myTree->tabSon[$i]->getHasLanding()=="on") ) // if( ($myTree->tabSon[$i]->getIdPere()==1) AND ($myTree->tabSon[$i]->getHasPublic()=="on") )
{ if( ($myTree->tabSon[$i]->getDomain()==$domain) AND ($myTree->tabSon[$i]->getHasPublic()=="on") )
if( $myTree->tabSon[$i]->getDomain()==$domain )
{ {
// if( $myTree->tabSon[$i]->getDomain()==$domain )
// {
$nodeId=$myTree->tabSon[$i]->getId(); $nodeId=$myTree->tabSon[$i]->getId();
break; break;
} // }
} }
} }
/* -- Fin Recup Communauté */ /* -- Fin Recup Communauté */