/trunk/serveur/bibliotheque/classes/eflore_macro_element.class.php |
---|
1,5 → 1,5 |
<? |
<?php |
class macroElement implements iMacroElement{ |
protected $identifiantblockdedonnees; |
9,20 → 9,18 |
protected $collectionblockdedonnees; |
protected $idRes; |
function __construct($aConn,$aParentDataBlock,$identifiant) |
{ |
$this->connexion = $aConn; |
function __construct($aConn,$aParentDataBlock,$identifiant) |
{ |
$this->connexion = $aConn; |
$this->blockdedonneesParent = $aParentDataBlock; |
$this->identifiantblockdedonnees = $identifiant; |
$this->contexteRef = $this->blockdedonneesParent->recupererDonnees(); |
} |
} |
function construire() |
{ |
{ |
$sql=$this->getSQL(); |
if(!is_NULL($sql)) |
{ |
if(!is_NULL($sql)) { |
$this->openCursor($sql); |
while ($this->fetch()); |
$this->closeCursor(); |
40,30 → 38,27 |
function contruireparrecursivite() |
{ |
} |
function openCursor($sql) |
{ |
$res = mysql_query($sql,$this->connexion); |
if (!$res) echo mysql_errno() . ": " . mysql_error() . "\n"; |
$this->idRes= $res; |
$res = mysql_query($sql, $this->connexion); |
if (!$res) echo mysql_errno().': '.mysql_error()."\n"; |
$this->idRes = $res; |
$this->collectionblockdedonnees = new collectionblockdedonnees($this->identifiantblockdedonnees); |
$this->blockdedonneesParent->ajouterCollectionBlockFils($this->collectionblockdedonnees); |
} |
function fetch() |
{ |
{ |
$res=mysql_fetch_assoc($this->idRes); |
if (!$res) |
{} |
else |
{ |
if (!$res) { |
} else { |
//$this->blockdedonnees = new blockdedonnees($this->identifiantblockdedonnees); |
//$this->blockdedonnees->affecterDonnees($res); |
$this->collectionblockdedonnees->ajouterDonnees($res); |
$this->collectionblockdedonnees->ajouterDonnees($res); |
} |
return $res; |
} |
72,9 → 67,5 |
{ |
mysql_free_result($this->idRes); |
} |
} |
?> |
/trunk/serveur/bibliotheque/classes/eflore_groupe_macro_element.class.php |
---|
1,4 → 1,4 |
<? |
<?php |
require_once 'eflore_macro_element.class.php'; |
9,32 → 9,26 |
protected $newContexte; |
protected $dblock; |
function __construct($aConn) |
{ |
$this->connexion = $aConn; |
} |
function __construct($aConn) |
{ |
$this->connexion = $aConn; |
} |
function contruire() |
{ |
} |
function contruire() |
{ |
} |
function recupererBlockDeDonnees() |
{ |
return $this->dblock; |
} |
function macroElementFactory($macroElementName,$parentDataBlock) |
{ |
require_once EFSE_CHEMIN_MV_MACRO.$macroElementName.'.php'; |
$aMacroElement = new $macroElementName($this->connexion,$parentDataBlock,$macroElementName); |
return $aMacroElement; |
} |
} |
?> |
/trunk/serveur/eflore_mv/modeles/macro_elements/NOM_SELECTION.php |
---|
9,8 → 9,8 |
if(!empty($contexte['radical']) and !empty($contexte['rang']) ) { |
return |
'SELECT nom.*, intitule.eni_intitule_nom |
FROM eflore_nom_intitule as intitule, eflore_nom as nom |
WHERE intitule.eni_intitule_nom like "%'.$contexte['radical'].'%" |
FROM eflore_nom_intitule AS intitule, eflore_nom AS nom |
WHERE intitule.eni_intitule_nom LIKE "%'.$contexte['radical'].'%" |
AND nom.en_id_nom = intitule.eni_id_nom |
AND nom.en_ce_rang = '.$contexte['rang']; |
} |
20,8 → 20,8 |
if(!empty($contexte['radical']) ) { |
return |
'SELECT nom.*, intitule.eni_intitule_nom |
FROM eflore_nom_intitule as intitule, eflore_nom as nom |
WHERE intitule.eni_intitule_nom like "%'.$contexte['radical'].'%" |
FROM eflore_nom_intitule AS intitule, eflore_nom AS nom |
WHERE intitule.eni_intitule_nom LIKE "%'.$contexte['radical'].'%" |
AND nom.en_id_nom = intitule.eni_id_nom'; |
} |
} |