Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 35 → Rev 36

/trunk/serveur/eflore_mv/modeles/groupes_macro_elements/selectionnoms.php
1,36 → 1,36
<?php
class selectionnoms extends groupeMacroElement {
function __construct($aConn)
function __construct($une_connexion)
{
parent::__construct($aConn);
parent::__construct($une_connexion);
}
function construire()
{
$this->dblock= new blockdedonnees('FICHE_LISTE_NOMS');
$this->dblock = new blockdedonnees('FICHE_LISTE_NOMS');
if (array_key_exists('radical',$_REQUEST)) {
$this->dblock->ajouterDonnee('radical',$_REQUEST['radical']);
if (array_key_exists('radical', $_REQUEST)) {
$this->dblock->ajouterDonnee('radical', $_REQUEST['radical']);
}
if (array_key_exists('rang',$_REQUEST)) {
$this->dblock->ajouterDonnee('rang',$_REQUEST['rang']);
$this->dblock->ajouterDonnee('rang', $_REQUEST['rang']);
}
$this->buildContext();
$this->addMacroElement();
}
$this->construireContexte();
$this->ajouterMacroElement();
}
function buildContext()
function construireContexte()
{
}
function addMacroElement()
function ajouterMacroElement()
{
/*balise:NOM_SELECTION*/
$aMacroElement = $this->macroElementFactory('NOM_SELECTION',$this->dblock);
$aMacroElement->construire();
/*balise:NOM_SELECTION*/
$un_macro_element = $this->macroElementFactory('NOM_SELECTION', $this->dblock);
$un_macro_element->construire();
}
}
/trunk/serveur/eflore_mv/vues/default_html.php
1,15 → 1,16
<?php
class default_html implements iVue {
protected $leBlock;
protected $le_block;
function __construct($unBlock)
function __construct($un_block)
{
$this->leBlock = $unBlock;
$this->le_block = $un_block;
}
function serialiser()
{
$this->leBlock->afficher();
$this->le_block->afficher();
}
}
?>
/trunk/serveur/bibliotheque/interfaces/eflore_model.interface.php
1,6 → 1,6
<?
<?php
interface iModel {
function __construct($aConn);
function __construct($une_connexion);
function contruire();
function recupererBlockDeDonnees();
};
/trunk/serveur/bibliotheque/interfaces/eflore_vue.interface.php
1,6 → 1,6
<?
<?php
interface iVue {
function __construct($unBlock);
function __construct($un_block);
function serialiser();
};
?>
/trunk/serveur/bibliotheque/classes/eflore_collection_block_de_donnees.class.php
1,4 → 1,4
<?
<?php
 
class collectionblockdedonnees{
37,7 → 37,7
function recupererIdentifiant()
{
return $this->identifiant;
return $this->identifiant;
}
function recupererErreur()
/trunk/serveur/bibliotheque/classes/eflore_macro_element.class.php
9,10 → 9,10
protected $collectionblockdedonnees;
protected $idRes;
function __construct($aConn,$aParentDataBlock,$identifiant)
function __construct($une_connexion, $un_block_données_parent, $identifiant)
{
$this->connexion = $aConn;
$this->blockdedonneesParent = $aParentDataBlock;
$this->connexion = $une_connexion;
$this->blockdedonneesParent = $un_block_donn;
$this->identifiantblockdedonnees = $identifiant;
$this->contexteRef = $this->blockdedonneesParent->recupererDonnees();
}
19,8 → 19,8
function construire()
{
$sql=$this->getSQL();
if(!is_NULL($sql)) {
$sql = $this->getSQL();
if(!is_null($sql)) {
$this->openCursor($sql);
while ($this->fetch());
$this->closeCursor();
27,7 → 27,7
}
}
function contruireparrecursiviteplate()
function contruireParRecursivitePlate()
{
construire();
36,7 → 36,7
construire();
}
function contruireparrecursivite()
function contruireParRecursivite()
{
}
52,7 → 52,7
function fetch()
{
$res=mysql_fetch_assoc($this->idRes);
$res = mysql_fetch_assoc($this->idRes);
if (!$res) {
} else {
/trunk/serveur/bibliotheque/classes/eflore_groupe_macro_element.class.php
9,9 → 9,9
protected $newContexte;
protected $dblock;
function __construct($aConn)
function __construct($une_connexion)
{
$this->connexion = $aConn;
$this->connexion = $une_connexion;
}
function contruire()
24,11 → 24,11
return $this->dblock;
}
function macroElementFactory($macroElementName,$parentDataBlock)
function macroElementFactory($macro_element_nom, $block_donnees_parent)
{
require_once EFSE_CHEMIN_MV_MACRO.$macroElementName.'.php';
$aMacroElement = new $macroElementName($this->connexion,$parentDataBlock,$macroElementName);
return $aMacroElement;
require_once EFSE_CHEMIN_MV_MACRO.$macro_element_nom.'.php';
$un_macro_element = new $macro_element_nom($this->connexion, $block_donnees_parent, $macro_element_nom);
return $un_macro_element;
}
}
?>
/trunk/serveur/bibliotheque/classes/eflore_block_de_donnees.class.php
1,6 → 1,6
<?
<?php
 
class blockdedonnees{
class blockdedonnees {
protected $identifiant;
protected $donnees;
7,20 → 7,20
protected $collectionBlocksfils;
protected $erreur;
function __construct($identifiant)
{
$this->identifiant = $identifiant;
$this->donnees = array();
$this->collectionBlocksfils = array();
}
function __construct($identifiant)
{
$this->identifiant = $identifiant;
$this->donnees = array();
$this->collectionBlocksfils = array();
}
function affecterIdentifiant($identifiant)
{
function affecterIdentifiant($identifiant)
{
$this->identifiant = $identifiant;
}
function affecterDonnees($donnees)
{
function affecterDonnees($donnees)
{
$this->donnees = $donnees;
}
29,7 → 29,7
return $this->donnees;
}
function ajouterDonnee($clef,$valeur)
function ajouterDonnee($clef, $valeur)
{
$this->donnees["$clef"] = $valeur;
}
49,52 → 49,43
return $this->blocksfils;
}
function ajouterCollectionBlockFils($collectionBlock)
function ajouterCollectionBlockFils($collection_block)
{
array_push($this->collectionBlocksfils,$collectionBlock);
array_push($this->collectionBlocksfils, $collection_block);
}
function afficherPattern($chemin,$fonction)
function afficherPattern($chemin, $fonction)
{
if($chemin==$this->identifiant)
{
}
else
{
$etape_chemin = explode('>',$chemin);
if($chemin==$etape_chemin[0])
{
for($i=0;$i<count($this->collectionBlocksfils);$i++)
{
$collection =$this->collectionBlocksfils[$i];
if ($collection->recupererIdentifiant()==$etape_chemin[1])
{
if ($chemin == $this->identifiant) {
} else {
$etape_chemin = explode('>', $chemin);
if($chemin == $etape_chemin[0]) {
for($i = 0; $i < count($this->collectionBlocksfils); $i++) {
$collection = $this->collectionBlocksfils[$i];
if ($collection->recupererIdentifiant() == $etape_chemin[1]) {
array_shift($etape_chemin);
afficherPattern(implode('>',$etape_chemin),$fonction);
}
afficherPattern(implode('>', $etape_chemin), $fonction);
}
}
}
}
}
}
function afficher()
{
echo "<OL>";
echo '<ol>';
foreach($this->donnees as $key => $value)
{
echo "<li>$key:$value ";
echo '<li>'.$key.' : '.$value;
}
echo "</OL>";
for($i=0;$i<count($this->collectionBlocksfils);$i++)
{
$collection =$this->collectionBlocksfils[$i];
echo "<OL>";
echo '</ol>';
for($i = 0; $i < count($this->collectionBlocksfils); $i++) {
$collection = $this->collectionBlocksfils[$i];
echo '<ol>';
$collection->afficher();
echo "</OL>";
echo '</ol>';
}
}
 
}
 
?>
/trunk/serveur/eflore_serveur.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: eflore_serveur.php,v 1.2 2004-12-16 22:07:35 fred Exp $
// CVS : $Id: eflore_serveur.php,v 1.3 2004-12-21 19:06:59 jpm Exp $
/**
* Fichier principal d'eFlore-Serveur
*
35,7 → 35,7
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2004-12-16 22:07:35 $
*@version $Revision: 1.3 $ $Date: 2004-12-21 19:06:59 $
// +------------------------------------------------------------------------------------------------------+
*/
 
54,65 → 54,67
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$key = $_REQUEST['key'];
$cle = $_REQUEST['key'];
/* Lecture du fichier donnant la carte des services disponibles */
$fichierServicesMap = fopen(EFSE_FICHIER_MAP,"r");
while($donnee = fscanf($fichierServicesMap, "%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
if ($key == $keyName) {
runService($serviceName,$viewName,$schema,$ratio,$style);
$fichier_services_map = fopen(EFSE_FICHIER_MAP, 'r');
while($donnee = fscanf($fichier_services_map, "%s\t%s\t%s\t%s\t%s\t%s", $cle_nom, $service_nom, $vue_nom, $schema, $ratio, $style)) {
if ($cle == $cle_nom) {
lancerService($service_nom, $vue_nom, $schema, $ratio, $style);
}
}
fclose($fichierServicesMap);
fclose($fichier_services_map);
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function runService($serviceName, $viewName, $schema, $ratio, $style)
function lancerService($service_nom, $vue_nom, $schema, $ratio, $style)
{
$aConn = '';
$dataBlock = '';
$aModel = fabriquerModel($serviceName);
if ($aModel != null) {
$aModel->construire();
$dataBlock = $aModel->recupererBlockDeDonnees();
$donnees_block = '';
$un_modele = fabriquerModele($service_nom);
if ($un_modele != null) {
$un_modele->construire();
$donnees_block = $un_modele->recupererBlockDeDonnees();
}
$uneVue = fabriquerVue($viewName, $dataBlock);
if ($uneVue != null) {
$uneVue->serialiser();
$une_vue = fabriquerVue($vue_nom, $donnees_block);
if ($une_vue != null) {
$une_vue->serialiser();
}
}
 
function fabriquerModel($modelName)
function fabriquerModele($modele_nom)
{
require_once EFSE_CHEMIN_MV_MACRO_GROUPE.$modelName.'.php';
$aConn = donneConnexionBaseDeDonnees();
$aModel = new $modelName($aConn);
return $aModel;
require_once EFSE_CHEMIN_MV_MACRO_GROUPE.$modele_nom.'.php';
$une_connexion = donnerConnexionBaseDeDonnees();
$un_modele = new $modele_nom($une_connexion);
return $un_modele;
}
 
function fabriquerVue($viewName,$block)
function fabriquerVue($vue_nom, $donnees)
{
require_once EFSE_CHEMIN_MV_VUE.$viewName.'.php';
$uneVue = new $viewName($block);
return $uneVue;
require_once EFSE_CHEMIN_MV_VUE.$vue_nom.'.php';
$une_vue = new $vue_nom($donnees);
return $une_vue;
}
 
function donneConnexionBaseDeDonnees() {
if (!$linkid = mysql_connect(EFSE_BDD_SERVEUR, EFSE_BDD_UTILISATEUR, EFSE_BDD_MOT_DE_PASSE)) {
function donnerConnexionBaseDeDonnees() {
if (!$link_id = mysql_connect(EFSE_BDD_SERVEUR, EFSE_BDD_UTILISATEUR, EFSE_BDD_MOT_DE_PASSE)) {
echo '<ERREUR>';
echo 'Impossible d\'établir de connexion à'.EFSE_BDD_SERVEUR;
echo '</ERREUR>';
exit(0);
}
mysql_select_db(EFSE_BDD_NOM, $linkid);
return $linkid;
mysql_select_db(EFSE_BDD_NOM, $link_id);
return $link_id;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2004/12/16 22:07:35 fred
* correction du numéro de version de PHP
*
* Revision 1.1.1.1 2004/12/16 12:24:36 jpm
* Importation initiale eFlore v1.1 et serveur.
*