/trunk/client/projet/squelettes/document.tpl.html |
---|
New file |
0,0 → 1,30 |
<h1><?= PROJET_PROJET ; ?> : <?= $projet->getTitre(); ?></h1> |
<div id="projet_bloc_action"> |
<?php if (!$loggue) : ?> |
<?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?> |
<?php endif; ?> |
<?php if ($loggue && $droits == PROJET_DROIT_AUCUN) : ?><?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?><br style="clear:both;" /><?php endif; ?> |
<?php if ($droits == PROJET_DROIT_EN_ATTENTE) : ?> |
<div id="projet_lien_login"> |
<a href="<?= $lien_login; ?>">En attente de validation</a> |
<p><?= $laius_inscription_modere; ?></p> |
</div> |
<?php endif; ?> |
</div> |
<?php if (!$loggue) : ?><br style="clear:left" /><?php endif; ?> |
<?= $bouton_desinscription_projet;?> |
<h2><?php echo PROJET_DOCUMENT_DU_PROJET; ?></h2> |
<?php if (!$pas_de_document) : ?> |
<!-- |
<a href="<?= $url_ajax; ?>">Affichage arborescent</a> |
<a href="<?= $url_classique; ?>">Affichage classique</a> |
--> |
<?php endif; ?> |
<?php if ($loggue && ($droits < PROJET_DROIT_AUCUN)) : ?> |
<?= $bouton_deposer_doc; ?> |
<?= $bouton_creer_repertoire; ?> |
<?php endif; ?> |
<?php echo $html_no_script; ?> |
<?php echo $html_document; ?> |
<br style="clear:both" /> |
/trunk/client/projet/squelettes/resume.tpl.html |
---|
New file |
0,0 → 1,36 |
<h1><?= PROJET_PROJET ; ?> : <?= $projet->getTitre(); ?></h1> |
<?php if (isset($message_retour)) echo $message_retour; ?> |
<div id="projet_bloc_action"> |
<?php if (!$loggue) : ?> |
<?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?> |
<!-- <div id="projet_ou">OU</div> |
<?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_login.tpl.html'; ?> --> |
<br style="clear:left;" /> |
<?php endif; ?> |
<?php if ($loggue && $droits == PROJET_DROIT_AUCUN) : ?><?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?><br style="clear:both;" /><?php endif; ?> |
<?php if ($droits == PROJET_DROIT_EN_ATTENTE) : ?> |
<div id="projet_lien_login"> |
<a href="<?= $lien_login; ?>">En attente de validation</a> |
<p><?= $laius_inscription_modere; ?></p> |
</div> |
<?php endif; ?> |
</div> |
<h2><?= PROJET_RESUME ;?></h2> |
<?= $bouton_resume; ?> |
<div><?= $resume; ?></div> |
<h2><?= PROJET_WIKI_ASSOCIE ; ?></h2> |
<?= $wiki_res ; ?> |
<?= $sortie_web ; ?> |
<h2><?= PROJET_DERNIERS_MESSAGES ; ?></h2> |
<?php if (!$avoir_liste_externe) echo $bouton_poster; ?><br /> |
<?= $liste_ext_res.$sortie_liste ; ?> |
<h2><?= PROJET_FICHIERS_RECENTS; ?></h2> |
<?= $bouton_deposer_doc; ?> |
<?= $vue_liste_document->toHTML('', '') ; ?> |
<br style="clear:both" /> |
<?= $bouton_desinscription_projet;?> |
/trunk/client/projet/squelettes/participants.tpl.html |
---|
New file |
0,0 → 1,81 |
<h1><?= PROJET_PROJET ; ?> : <?= $projet->getTitre(); ?></h1> |
<div id="projet_bloc_action"> |
<?php if (!$loggue) : ?> |
<?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?> |
<p><?php echo PROJET_TEXTE_PARTICIPANT_NON_IDENTIFIE; ?></p> |
</div> |
<?php else : ?> |
<?php if ($loggue && $droits == PROJET_DROIT_AUCUN) : ?> |
<?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?> |
<?php endif; ?> |
<?php if ($droits == PROJET_DROIT_EN_ATTENTE) : ?> |
<div id="projet_lien_login"> |
<a href="<?= $lien_login; ?>">En attente de validation</a> |
<p><?= $laius_inscription_modere; ?></p> |
</div> |
<?php endif; ?> |
</div> |
<br style="clear:left" /> |
<?= $bouton_desinscription_projet;?> |
<h2><?php echo $nombre_participants; ?> participants</h2> |
<?php if ($droits <= PROJET_DROIT_COORDINATEUR) : ?> |
<?php echo PROJET_NOUVEAU_UTILISATEUR_LAIUS ; ?> |
<form action="<?php echo $url; ?>" method="post"> |
<?php if (isset ($msg) && $msg != '') : ?> |
<div><?php echo $msg; ?></div> |
<?php endif; ?> |
<input type="text" name="mail_utilisateur" size="32" /> |
<input type="submit" value="<?php echo PROJET_NOUVEAU_UTILISATEUR; ?>" /> |
</form><br /> |
<?php endif; ?> |
<table class="table_cadre"> |
<tr> |
<th>Nom</th> |
<th>Prénom</th> |
<th>E mail</th> |
<th>Date d'inscription</th> |
<th>Statut</th> |
<th>Forum de discussion</th> |
<?php if ($droits <= PROJET_DROIT_COORDINATEUR) : ?><th>supprimer</th><?php endif; ?> |
</tr> |
<?php foreach ($info_utilisateur as $utilisateur) : ?> |
<tr class="<?php if ($pair) : ?>ligne_paire<?php $pair = false; ?><?php else : ?>ligne_impaire<?php $pair = true; ?><?php endif; ?>"<?php if ($utilisateur[5] == 1) : ?> style="font-weight:bold;"<?php endif; ?>> |
<td><?php echo $utilisateur[1] ;?></td> |
<td><?php echo $utilisateur[2] ;?></td> |
<td><a href="mailto:<?php echo $utilisateur[3] ;?>"><?php echo substr($utilisateur[3], 0, 10); ?>...</a></td> |
<td><?php echo $utilisateur[4] ;?></td> |
<td><?php if ($droits <= PROJET_DROIT_COORDINATEUR) : ?> |
<?php $this->_url->addQueryString ('id_utilisateur', $utilisateur[0]) ; ?> |
<form action="<?php echo $this->_url->getURL(); ?>" method="post"> |
<select name="statut" onchange="javascript:this.form.submit();"> |
<?php foreach ($statuts as $cle =>$element_statut) : ?> |
<option value="<?php echo $cle ;?>"<?php if ($cle == $utilisateur[5]) : ?> selected="selected"<?php endif; ?>><?php echo $element_statut; ?></option> |
<?php endforeach; ?> |
</select></form> |
<?php else : ?> |
<?php echo $statuts[$utilisateur[5]]; ?> |
<?php endif; ?> |
</td> |
<td><?php if ($droits <= PROJET_DROIT_COORDINATEUR) : ?> |
<form action="<?php echo $this->_url->getURL(); ?>" method="post"> |
<select name="inscription_liste" onchange="javascript:this.form.submit();"> |
<option value="0">Non inscrit</option>'; |
<option value="1"<?php echo ($utilisateur[6] ? ' selected="selected"': '');?>>Inscrit</option> |
</select></form> |
<?php else : ?> |
<?php echo $statuts_inscription_liste[$utilisateur[6]]; ?> |
<?php endif; ?> |
</td> |
<?php if ($droits <= PROJET_DROIT_COORDINATEUR) : ?> |
<td><?php $this->_url->addQueryString ('statut', 4); ?> |
<a href="<?php echo $this->_url->getURL(); ?>" onclick="javascript:return confirm('suprrimer ?');">supprimer</a> |
</td><?php $this->_url->removeQueryString ('statut'); ?> |
<?php endif; ?> |
</tr> |
<?php endforeach; ?> |
</table> |
<br style="clear:both" /> |
<?php endif; ?> |
/trunk/client/projet/squelettes/description.tpl.html |
---|
New file |
0,0 → 1,21 |
<h1><?= PROJET_PROJET ; ?> : <?= $projet->getTitre(); ?></h1> |
<div id="projet_bloc_action"> |
<?php if (!$loggue) : ?> |
<?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?> |
<?php endif; ?> |
<?php if ($loggue && $droits == PROJET_DROIT_AUCUN) : ?><?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?><br style="clear:both;" /><?php endif; ?> |
<?php if ($droits == PROJET_DROIT_EN_ATTENTE) : ?> |
<div id="projet_lien_login"> |
<a>En attente de validation</a> |
<p><?= $laius_inscription_modere; ?></p> |
</div> |
<?php endif; ?> |
</div> |
<h2><?= PROJET_RESUME ;?></h2> |
<?= $bouton_resume; ?><br style="clear:left;" /> |
<div><?= $projet->getResume(); ?></div> |
<h2>Description</h2> |
<div id="description_projet"><?= $projet->getDescription(); ?></div> |
<?= $bouton_desinscription_projet;?> |
<br style="clear:left;" /> |
/trunk/client/projet/squelettes/liste_projet.tpl.html |
---|
New file |
0,0 → 1,51 |
<h1>Liste des projets et forums de Tela Botanica</h1> |
<div id="projet_choix_mode"><?= $lien_interface_simple; ?> <?= $lien_interface_expert; ?></div> |
<div class="projet_recherche"><h2>Rechercher dans les projets</h2> |
<form action="<?= $url; ?>" method="get"> |
<fieldset> |
<input type="text" name="projet_recherche" id="projet_recherche" value="<?= $valeur_projet_recherche; ?>" /> |
<input type="submit" value="Ok" id="projet_recherche_submit" /> |
</fieldset> |
</form> |
</div> |
<hr /> |
<div class="information_projet"> |
<h2>Qu'est-ce qu'un projet ?</h2> |
C'est un espace où l'on peut échanger sur une thématique liée à la botanique. |
Vous disposez dans cet espace de divers outils. |
<ul> |
<li><a href="http://www.tela-botanica.org/page:informations_sur_les_projets#infoprojets_utiliser" title="Lien vers l'aide pour utiliser les outils">une liste de discussion (forum)</a></li> |
<li><a href="http://www.tela-botanica.org/page:informations_sur_les_projets#infoprojets_utiliser" title="Lien vers l'aide pour utiliser les outils">un wikini</a></li> |
<li><a href="http://www.tela-botanica.org/page:informations_sur_les_projets#infoprojets_utiliser" title="Lien vers l'aide pour utiliser les outils">un espace document</a></li> |
</ul> |
</div> |
<div id="cartouche_liste_projet"> |
<div id="projet_range">Projets <span class="nombre"><?= $range[0]; ?></span> à <span class="nombre"><?= $range[1]; ?></span> sur <span class="nombre"><?= $nombre_projets; ?></span></div> |
</div> |
<div id="projet_theme"> |
<h1>Thèmes - <?= $tableau_theme[$theme_selectionne]['label']; ?></h1> |
<ul> |
<?php foreach ($tableau_theme as $theme) : ?> |
<li><?php if ($theme['id'] == $theme_selectionne) : ?><strong><?php endif; ?> |
<a href="<?= $theme['lien']; ?>"><?= $theme['label']; ?></a> |
<?php if ($theme['id'] == $theme_selectionne) : ?></strong><?php endif; ?> |
( <?= $theme['nombre_projet']; ?> )</li> |
<?php endforeach ;?> |
</ul> |
</div> |
<div class="pager"><?= $links['all']; ?></div> |
<ul class="liste_projet"> |
<?php foreach ($tableau_donnees as $projet) : ?> |
<li> |
<h1><a href="<?= $projet['lien'] ;?>"><?= $projet['titre']; ?></a></h1> |
(<?= $projet['nombre_participants']; ?> participants) <span class="<?= $projet['classe_projet_activite']; ?>">(<?= $projet['activite']; ?>)</span><br /> |
<?= $projet['resume']; ?> |
<?= $projet['forum'] ; ?> |
<?php if ($projet['nombre_message']) : ?> |
( + <span class="nombre_message"><?php echo $projet['nombre_message']; ?> nouveaux messages</span> ) |
<?php endif; ?> |
</li> |
<?php endforeach ; ?> |
</ul> |
<div class="pager"><?= $links['all']; ?></div> |
/trunk/client/projet/squelettes/message.tpl.html |
---|
New file |
0,0 → 1,16 |
<h1><?= PROJET_PROJET ; ?> : <?= $projet->getTitre(); ?></h1> |
<?php if ($message != PROJET_MESSAGE_LISTE_PRIVEE) : ?> |
<h2>Adresse pour écrire au forum</h2> |
<a href="mailto:<?php echo $adresse_envoie; ?>"><?php echo $adresse_envoie; ?></a> |
<h2>Message N°<?= $numero_message; ?>/<?= $total_message; ?></h2> |
<?php echo $derniers_messages; ?> |
<?php echo $navigation; ?> |
<?php echo $message; ?> |
<?php else : ?> |
Cette liste est privée, vous devez vous inscrire pour y accéder. |
<?php endif; ?> |
<?php if ($avoir_liste_externe) : ?> |
<h2>Vers l'espace Yahoo !</h2> |
<?php echo $liste_ext_res; ?> |
<?php endif; ?> |
/trunk/client/projet/squelettes/boutons/bouton_login.tpl.html |
---|
New file |
0,0 → 1,5 |
<div id="projet_lien_login"><a> |
<img src="client/projet/images/identification.png" /> |
<span>S'identifier</span></a><br style="clear:both;" /> |
<!-- PAPYRUS_IDENTIFICATION --> |
</div> |
/trunk/client/projet/squelettes/boutons/bouton_inscription.tpl.html |
---|
New file |
0,0 → 1,17 |
<div id="projet_lien_inscription"><a<?php if ($lien_inscription != '#') : ?> href="<?= $lien_inscription; ?>"<?php endif; ?>> |
<img src="<?= PROJET_CHEMIN_APPLI; ?>images/inscription.png" alt="" /> |
<span><?= $label_url_inscription; ?></span> |
</a> |
</div><br style="clear:both" /> |
<?php if (!$loggue) : ?> |
<div id="projet_bloc_inscription"> |
<strong>Déjà membre de Tela Botanica, identifiez-vous :</strong> |
<!-- PAPYRUS_IDENTIFICATION --> |
<br /> |
<strong>Nouveau sur le site : <a href="http://www.tela-botanica.org/inscription">inscrivez-vous au réseau Tela Botanica</a></strong> |
</div> |
<script type="text/javascript"> |
$("#projet_bloc_inscription").css("display", "none"); |
</script> |
<?php endif; ?> |
/trunk/client/projet/squelettes/forum.tpl.html |
---|
New file |
0,0 → 1,43 |
<h1><?= PROJET_PROJET ; ?> : <?= $projet->getTitre(); ?></h1> |
<?php if (isset($message_retour)) echo $message_retour; ?> |
<?php if ($message != PROJET_MESSAGE_LISTE_PRIVEE) : ?> |
<div id="projet_bloc_action"> |
<?php if (!$loggue) : ?> |
<?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?> |
<br style="clear:left;" /> |
<?php endif; ?> |
<?php if ($loggue && $droits == PROJET_DROIT_AUCUN) : ?><?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?><br style="clear:both;" /><?php endif; ?> |
<?php if ($droits == PROJET_DROIT_EN_ATTENTE) : ?> |
<div id="projet_lien_login"> |
<a href="<?= $lien_login; ?>">En attente de validation</a> |
<p><?= $laius_inscription_modere; ?></p> |
</div> |
<?php endif; ?> |
</div> |
<h2>Adresse pour écrire au forum</h2> |
<a href="mailto:<?php echo $adresse_envoie; ?>"><?php echo $adresse_envoie; ?></a> |
<?php if ($avoir_liste_externe) : ?> |
<p class="information">La liste de discussion de ce projet est hébergée par Yahoo Groupes <img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/>. |
<br />Pour vous inscrire à cette liste : <a href="mailto:<?php echo $adresse_envoie; ?>"><?php echo $adresse_envoie; ?></a>.<br /> |
Une fois inscrit, vous pourrez envoyer des messages en utilisant l'adresse pour écrire au forum (liste de discussion).<br /> |
Pour plus d'information sur le fonctionnement des Yahoo Groupes, <a href="http://help.yahoo.com/l/fr/yahoo/groups/">http://help.yahoo.com/l/fr/yahoo/groups/</a>. |
</p> |
<?php endif; ?> |
<?php if ($loggue && ($droits < PROJET_DROIT_AUCUN) && !$avoir_liste_externe) echo $bouton_poster; ?> |
<br style="clear:left;" /> |
<h2>Tous les messages</h2> |
<?php echo $calendrier; ?> |
<h2>Les derniers messages</h2> |
<?php echo $derniers_messages; ?> |
<?php echo $navigation; ?> |
<?php echo $message; ?> |
<?php else : ?> |
Cette liste est privée, vous devez vous inscrire pour y accéder. |
<?php endif; ?> |
<?php if ($avoir_liste_externe) : ?> |
<h2>Vers l'espace Yahoo !</h2> |
<?php echo $liste_ext_res; ?> |
<?php endif; ?> |
<?php echo $bouton_desinscription_liste; ?> |
<br style="clear:left;" /> |
/trunk/client/projet/squelettes/liste_projet_expert.tpl.html |
---|
New file |
0,0 → 1,66 |
<h1>Liste des projets et forums de Tela Botanica</h1> |
<div id="projet_choix_mode"><?= $lien_interface_simple; ?> <?= $lien_interface_expert; ?></div> |
<h2><a href="javascript:animatedcollapse.toggle('legende');">Légende (ouvrir / fermer)</a></h2> |
<div id="legende"> |
A Chaque ligne du tableau correspond un projet, les différentes colonnes donnent des indications sur les projets. |
<h3>Les forums</h3> |
<p>L'icône <img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/> indique qu'un liste Yahoo ! est associée à ce projet. |
Le nombre entre parenthèses indique le nombre de messages échangé sur ce forum cette semaine.</p> |
<p>L'icône <img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica" /> indique un liste de discussion associée |
au projet et hébergée par Tela Botanica. Le nombre entre parenthèses indique le nombre de nouveaux messages de la semaine.</p> |
<h3>Lien vers les flux RSS</h3> |
Les flux RSS <img src="sites/commun/generique/images/rss.gif" alt="rss"/> (Ressource Site Summary), vous permettent de suivre les mises à jour des wikinis associés au projet. |
Tout comme les listes de discussion, le nombre entre parenthèses indique si des modifications ont eu lieu cette dernière semaine. |
<a href="http://fr.wikipedia.org/wiki/Flux_RSS"> Plus d'informations sur les flux RSS</a>. |
<h3>Le nombre de participants</h3> |
<p>Le nombre de participants est soit :</p> |
<ul><li>le nombre de participants au projet, si la liste de discussion associée est hébergée par Tela Botanica</li> |
<li>le nombre d'inscrits à la liste Yahoo!, si la liste est hébergée par Yahoo!</li> |
</ul> |
<p>Le nombre entre parenthès indique les nouveaux inscrits de la semaine.</p> |
<h3>L'activité</h3> |
<p>Le pourcentage d'activité est calculé à partir d'éléments de la dernière semaine :</p> |
<ul><li>Le nombre de messages échangés</li> |
<li>Les modifications sur les Wikinis</li> |
<li>Les nouveaux documents</li> |
<li>Les nouveaux inscrits au projet</li> |
</ul> |
<?php if ($loggue) : ?> |
<h3>Votre inscription</h3> |
<p>Lorsque vous êtes identifié sur le site de Tela Botanica, une colonne intitulée "Votre inscription" s'affiche. Elle permet de voir rapidement les projets auxquels vous êtes inscrit et votre statut dans ces projets :</p> |
<ul> |
<li>Une étoile verte <img src="http://www.tela-botanica.org/client/projet/icones/etoile_verte.png" alt="étoile verte" /> indique que vous êtes <b>Participant</b> à ce projet.</li> |
<li>Une étoile rouge <img src="http://www.tela-botanica.org/client/projet/icones/etoile_rouge.png" alt="étoile rouge" /> signale que vous êtes <b>Coordonnateur</b> de ce projet.</li> |
<li>Une étoile grise <img src="http://www.tela-botanica.org/client/projet/icones/etoile_grise.png" alt="étoile verte" /> signifie que vous avez demandé votre inscription à ce projet et que votre demande est <b>en attente de validation</b> par un modérateur.</li> |
</ul> |
<?php endif; ?> |
</div> |
<script type="text/javascript"> |
$("#legende").css("display", "none"); |
</script> |
<div id="cartouche_liste_projet"> |
<div id="projet_range">Projets <span class="nombre"><?= $range[0]; ?></span> à <span class="nombre"><?= $range[1]; ?></span> sur <span class="nombre"><?= $nombre_projets; ?></span></div> |
</div> |
<table class="table_cadre" id="table_projet" summary="Liste des projets"> |
<tr><th><a href="<?= $lien_tri_titre ; ?>" class="<?= $enteteTri['p_titre']->getClasse(); ?>">Titre</a></th><th>Forum</th><th>Wiki</th><th>RSS</th> |
<th><a href="<?= $lien_tri_doc;?>" class="<?= $enteteTri['ps_doc_derniere_semaine']->getClasse(); ?>">Documents</a></th> |
<th><a href="<?= $lien_tri_participants; ?>" class="<?= $enteteTri['ps_nombre_inscrit']->getClasse(); ?>">Participants</a></th> |
<th><a href="<?= $lien_tri_activite ; ?>" class="<?= $enteteTri['ps_pourcent']->getClasse(); ?>">Activité</a></th> |
<?php if ($loggue) : ?><th><a href="<?= $lien_tri_statut ; ?>" class="<?= $enteteTri['psu_id_statut']->getClasse(); ?>">Votre inscription</a></th><?php endif; ?> |
</tr> |
<?php foreach ($tableau_donnees as $projet) : ?> |
<tr <?php if ($pair) {echo ' class="ligne_paire"'; $pair = false; } else { echo 'class="ligne_impaire"'; $pair = true;} ?>> |
<td><a href="<?= $projet['lien'] ;?>"><?= $projet['titre']; ?></a></td> |
<td><?= $projet['forum'] ; ?><?php if ($projet['nombre_message']) : ?><span title="Nombres de messages échangés cette semaine">( + <?php echo $projet['nombre_message']; ?> )</span><?php endif; ?></td> |
<td><?= $projet['wikini'] ; ?></td> |
<td><?= $projet['wikini_rss'] ; ?></td> |
<td><?= $projet['document'] ; ?></td> |
<td><a href="<?= $projet['lien_participants'];?>"><?= $projet['nombre_participants'];?></a> <?= $projet['ps_nombre_inscrit_derniere_semaine']; ?></td> |
<td><?= $projet['activite'] ; ?></td> |
<?php if ($loggue) :?><td style="text-align:center;"><?php echo $projet['statut_icone']; ?></td><?php endif; ?> |
</tr> |
<?php endforeach ; ?> |
</table> |
/trunk/client/projet/squelettes/wikini.tpl.html |
---|
New file |
0,0 → 1,16 |
<h1><?= PROJET_PROJET ; ?> : <?= $projet->getTitre(); ?></h1> |
<div id="projet_bloc_action"> |
<?php if (!$loggue) : ?> |
<?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?> |
<?php endif; ?> |
<?php if ($loggue && $droits == PROJET_DROIT_AUCUN) : ?><?php include_once PROJET_CHEMIN_APPLI.'squelettes/boutons/bouton_inscription.tpl.html'; ?><br style="clear:both;" /><?php endif; ?> |
<?php if ($droits == PROJET_DROIT_EN_ATTENTE) : ?> |
<div id="projet_lien_login"> |
<a>En attente de validation</a> |
<p><?= $laius_inscription_modere; ?></p> |
</div> |
<?php endif; ?> |
</div> |
<br style="clear:left;" /> |
<?php echo $wiki_res; ?> |
/trunk/client/projet/images/bouton.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/images/bouton.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/images/bouton_survol.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/images/bouton_survol.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/images/identification.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/images/identification.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/images/inscription.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/images/inscription.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/images/piece_jointe.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/images/piece_jointe.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/presentation/tela_ergo.php |
---|
New file |
0,0 → 1,474 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU General Public | |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: tela_ergo.php,v 1.1 2008-08-25 15:00:28 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Fichier de presentation de la liste des projets pour Tela Botanica nouvelle version |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
define ('PROJET_VARIABLE_MODE_AFFICHAGE', 'projet_affichage'); |
define ('PROJET_VARIABLE_TRI', 'projet_tri'); |
define ('PROJET_VARIABLE_ORDRE_TRI', 'projet_ordre_tri'); |
define ('PROJET_VARIABLE_THEME', 'theme'); |
if (PROJET_UTILISE_TYPE && $this->_type != '') { |
$projetListe = projet::getProjetDuType($this->_type, $this->_db) ; |
if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ; |
} else { |
// Un tableau de tous les projets dans $projetListe |
//$projetListe = projet::getTousLesProjets($this->_db, $this->_projet_exclu) ; |
} |
$_SESSION['_PROJET_']['motif_recherche'] = ''; |
$url = $this->_url->getURL(); |
$loggue = $this->_auth->getAuth(); |
// Verification sur l ordre de tri et mise en place |
// du tri par defaut sur le titre |
$valeur_acceptable_tri = array ('p_titre', 'ps_pourcent', 'ps_nombre_inscrit', 'ps_doc_derniere_semaine', 'psu_id_statut'); // Securite |
if (isset($_GET[PROJET_VARIABLE_TRI]) && $_GET[PROJET_VARIABLE_TRI] != '' && in_array($_GET[PROJET_VARIABLE_TRI], $valeur_acceptable_tri)) { |
$tri = $_GET[PROJET_VARIABLE_TRI]; |
} else { |
$tri = 'p_titre'; |
} |
$valeur_acceptable_ordre_tri = array ('asc', 'desc'); // securite |
if (isset($_GET[PROJET_VARIABLE_ORDRE_TRI]) && $_GET[PROJET_VARIABLE_ORDRE_TRI] != '' |
&& in_array ($_GET[PROJET_VARIABLE_ORDRE_TRI], $valeur_acceptable_ordre_tri)) { |
$ordre_tri = $_GET[PROJET_VARIABLE_ORDRE_TRI]; |
} else { |
$ordre_tri = 'asc'; |
} |
// variable de session pour se rappeler des choix du visiteur |
if (!isset ($_GET[PROJET_VARIABLE_MODE_AFFICHAGE]) && isset($_SESSION['_PROJET_']['projet_affichage']) && ($_SESSION['_PROJET_']['projet_affichage'] == 'simple' || $_SESSION['_PROJET_']['projet_affichage'] == 'expert')) { |
$_GET[PROJET_VARIABLE_MODE_AFFICHAGE] = $_SESSION['_PROJET_']['projet_affichage']; |
} |
if (isset($_GET[PROJET_VARIABLE_MODE_AFFICHAGE]) && $_GET[PROJET_VARIABLE_MODE_AFFICHAGE] != '') { |
$_SESSION['_PROJET_']['projet_affichage'] = $_GET[PROJET_VARIABLE_MODE_AFFICHAGE]; |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') { |
$this->_url->addQueryString (PROJET_VARIABLE_MODE_AFFICHAGE, 'simple'); |
$lien_interface_simple = '[<a href="'.$this->_url->getURL().'">Affichage simple</a>]'; |
$this->_url->addQueryString (PROJET_VARIABLE_MODE_AFFICHAGE, 'expert'); |
$lien_interface_expert = ''; |
} else { |
$_SESSION['_PROJET_']['projet_affichage'] = 'simple'; |
$this->_url->addQueryString (PROJET_VARIABLE_MODE_AFFICHAGE, 'expert'); |
$lien_interface_simple = ''; |
$lien_interface_expert = '[<a href="'.$this->_url->getURL().'">Affichage expert</a>]'; |
} |
} else { |
$_SESSION['_PROJET_']['projet_affichage'] = 'simple'; |
$this->_url->addQueryString (PROJET_VARIABLE_MODE_AFFICHAGE, 'expert'); |
$lien_interface_simple = ''; |
$lien_interface_expert = '[<a href="'.$this->_url->getURL().'">Affichage expert</a>]'; |
} |
if ($_SESSION['_PROJET_']['projet_affichage'] != 'expert') { |
$ordre_tri = 'desc'; |
$tri = 'ps_pourcent'; |
} |
/** Affichage des themes de projets */ |
$requete_type = 'SELECT count( p_id ) AS nbe, pt_label_theme,pt_id_theme |
FROM projet, projet_avoir_theme, projet_theme |
WHERE p_id = pat_id_projet |
AND pat_id_theme = pt_id_theme and p_en_dormance=0 |
GROUP BY pt_id_theme'; |
$resultat_type = $GLOBALS['projet_db']->query($requete_type); |
if (DB::isError($resultat_type)) return $resultat_type->getMessage(); |
$tableau_theme = array(); |
$requete_nb_pj = 'select count(*) as nb from projet'; |
$nombre_total_projet = $GLOBALS['projet_db']->getOne($requete_nb_pj); |
// On ajoute le theme tous |
$tableau_theme[0]['label'] = 'Tous les projets'; |
$tableau_theme[0]['id'] = 0; |
$tableau_theme[0]['nombre_projet'] = $nombre_total_projet; |
$this->_url->removeQueryString(PROJET_VARIABLE_MODE_AFFICHAGE); |
$tableau_theme[0]['lien'] = $this->_url->getURL(); |
// Et le theme en dormance |
$requete_dormance = 'select count(p_id) as nb_p_dorman from projet where p_en_dormance=1'; |
$nb_p_dormant = $GLOBALS['projet_db']->getOne($requete_dormance); |
while ($ligne_type = $resultat_type->fetchRow(DB_FETCHMODE_OBJECT)) { |
$tableau_theme[$ligne_type->pt_id_theme]['label'] = $ligne_type->pt_label_theme; |
$tableau_theme[$ligne_type->pt_id_theme]['id'] = $ligne_type->pt_id_theme; |
$tableau_theme[$ligne_type->pt_id_theme]['nombre_projet'] = $ligne_type->nbe; |
$this->_url->addQueryString(PROJET_VARIABLE_THEME, $ligne_type->pt_id_theme); |
$tableau_theme[$ligne_type->pt_id_theme]['lien'] = $this->_url->getURL(); |
} |
$tableau_theme[9]['label'] = 'En dormance'; |
$tableau_theme[9]['id'] = 9; |
$tableau_theme[9]['nombre_projet'] = $nb_p_dormant; |
$this->_url->addQueryString(PROJET_VARIABLE_THEME, 9); |
$tableau_theme[9]['lien'] = $this->_url->getURL(); |
$this->_url->removeQueryString(PROJET_VARIABLE_THEME); |
// Contruction de la requete, soit avec le moteur de recherche |
// soit la liste des projets |
if (isset($_GET['projet_recherche']) && $_GET['projet_recherche'] != '') { |
$_SESSION['_PROJET_']['motif_recherche'] = $_GET['projet_recherche']; |
include_once 'papyrus/applettes/moteur_recherche/bibliotheque/more_recherche.class.php'; |
include_once 'papyrus/applettes/moteur_recherche/bibliotheque/more_recherche_projet.class.php'; |
$moteur = new More_Recherche($_SESSION['_PROJET_']['motif_recherche']); |
$recherche_projet = new More_Recherche_Projet($_SESSION['_PROJET_']['motif_recherche']); |
$moteur->ajouterRecherche($recherche_projet); |
$resultats = $moteur->rechercherMotif(); |
// $chaine_id_projet contient une liste d identifiant separer par une virgule |
if (!empty($resultats)) { |
$chaine_id_projet = ''; |
foreach ($resultats as $projet) { |
$chaine_id_projet .= $projet['id'].','; |
} |
$chaine_id_projet = substr($chaine_id_projet, 0, -1); |
$where_recherche = ' where p_id in ('.$chaine_id_projet.')'; |
$valeur_projet_recherche = $_GET['projet_recherche']; |
} |
} else { |
$where_recherche = ''; |
$valeur_projet_recherche = ''; |
} |
$select = ''; |
$from_recherche = ''; |
if (isset($_GET[PROJET_VARIABLE_THEME])) { |
$from_recherche = ' left join projet_avoir_theme on pat_id_projet=p_id left join projet_theme on pat_id_theme=pt_id_theme'; |
$where_recherche = ' where pat_id_theme='.$_GET[PROJET_VARIABLE_THEME]; |
$theme_selectionne = $_GET[PROJET_VARIABLE_THEME]; |
} else { |
$theme_selectionne = 0; |
} |
if ($this->_auth->getAuth()) { |
/** on recherche egalement le statut si l utilisateur est loggue */ |
$from_recherche .= ' left join projet_statut_utilisateurs on psu_id_projet=p_id and psu_id_utilisateur='.$this->_auth->getAuthData(PROJET_CHAMPS_ID). |
' left join projet_statut on psu_id_statut=ps_id_statut'; |
$select = 'psu_id_statut, ps_statut_nom,'; |
} |
$requete = 'select '.$select.'p_id, p_titre, p_resume, pl_id_liste, plle_id_liste, p_avoir_document, ps_nombre_inscrit, ps_pourcent,'. |
' p_wikini, ps_doc_derniere_semaine, p_avoir_document, ps_nombre_inscrit_derniere_semaine, '. |
' ps_nombre_membre_yahoo, ps_msg_derniere_semaine, ps_modifwiki_derniere_semaine, p_en_dormance from'. |
' projet left join projet_lien_liste on p_id=pl_id_projet'. |
' left join projet_lien_liste_externe on p_id=plle_id_projet'. |
' left join projet_statistiques on p_id=ps_ce_projet and ps_dernier=1'. |
$from_recherche. |
$where_recherche. |
' group by p_id order by '.$tri.' '.$ordre_tri ; |
$resultat = $this->_db->query($requete) ; |
if (DB::isError($resultat)) { |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$nombre_resultat = $resultat->numRows(); |
/* Si l utilisateur est loggue, on recherche son statut par rapport aux projets */ |
if ($this->_auth->getAuth()) { |
$requete_statut = 'select psu_id_projet, psu_id_statut, ps_statut_nom from projet_statut_utilisateurs, projet_statut'. |
' where ps_id_statut=psu_id_statut and psu_id_utilisateur='.$this->_auth->getAuthData(PROJET_CHAMPS_ID); |
$resultat_statut = $GLOBALS['projet_db']->query($requete_statut); |
while ($ligne_statut = $resultat_statut->fetchRow(DB_FETCHMODE_OBJECT)) { |
$tableau_statut[$ligne_statut->psu_id_projet]['id_statut'] = $ligne_statut->psu_id_statut; |
$tableau_statut[$ligne_statut->psu_id_projet]['nom_statut'] = $ligne_statut->ps_statut_nom; |
} |
} |
include_once PROJET_CHEMIN_BIBLIOTHEQUE_API.'pear/Pager/Pager.php'; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
// Si le projet est en dormance, on ne l affiche pas dans le mode normal |
// Sauf si le theme choisit est "en dormance" |
if ($_SESSION['_PROJET_']['projet_affichage'] != 'expert' && $ligne->p_en_dormance == 1 && $theme_selectionne != 9) { |
} else { |
$donnees[] = $ligne; |
} |
} |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') $perpage = $nombre_resultat; else $perpage = 20; |
// Parametre du pager |
$params = array ( |
'mode' => 'Sliding', |
'perPage' => $perpage, |
'delta' => '5', |
'linkClass' => 'num_page', |
'curPageLinkClassName' => 'page_courante', |
'spacesBeforeSeparator' => 0, |
'spacesAfterSeparator' => 0, |
'separator' => '', |
'prevImg' => '<< Page précédente', |
'nextImg' => 'Page suivante >>', |
'extraVars' => array ('projet_recherche' => $_SESSION['_PROJET_']['motif_recherche'], |
PROJET_VARIABLE_MODE_AFFICHAGE => $_SESSION['_PROJET_']['projet_affichage']), |
'itemData' => $donnees |
); |
$pager = & Pager::factory($params); |
$links = $pager->getLinks(); |
$data = $pager->getPageData(); |
$nombre_projets = $pager->numItems(); |
$range = $pager->getOffsetByPageId(); |
// On inclue un fichier local |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php')) |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ; |
// On verifie si l'utilisateur participe a des projets |
$projetNonParticipantListe = & $projetListe ; |
$liste_projet = array() ; |
// La liste |
$tableau_donnees = array(); |
foreach ($data as $ligne) { |
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ; |
$tableau_donnees[$ligne->p_id]['lien'] = $this->_url->getURL(); |
$tableau_donnees[$ligne->p_id]['titre'] = $ligne->p_titre; |
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_inscrit; |
$tableau_donnees[$ligne->p_id]['resume'] = $ligne->p_resume; |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'simple') { |
if ($ligne->ps_pourcent <33) { |
$tableau_donnees[$ligne->p_id]['activite'] = 'Peu actif'; |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_faible'; |
} |
else if ($ligne->ps_pourcent < 66) { |
$tableau_donnees[$ligne->p_id]['activite'] = 'Assez actif'; |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_moyenne'; |
} |
else if ($ligne->ps_pourcent <= 100) { |
$tableau_donnees[$ligne->p_id]['activite'] = 'Très actif'; |
$tableau_donnees[$ligne->p_id]['classe_projet_activite'] = 'projet_activite_elevee'; |
} |
} else { |
$tableau_donnees[$ligne->p_id]['activite'] = $ligne->ps_pourcent.'%'; |
} |
$res .= $ligne->p_resume ; |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE); |
$res .= '(<a href="'.$this->_url->getURL().'">Rejoindre ce projet</a>)'."\n"; |
// Recherche du forum |
if ($ligne->pl_id_liste != null && $ligne->plle_id_liste == null) { |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM); |
$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica" /></a>'."\n"; |
$res .= $forum; |
} else { |
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ; |
$listes_ext = new liste_externe ($this->_db) ; |
if ($ligne->plle_id_liste != null) { |
$info_liste = $listes_ext->getInfoListe($ligne->plle_id_liste) ; |
$forum = '<a href="'.$info_liste->AGO_A_URLGRP. |
'"><img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/></a>'; |
$tableau_donnees[$ligne->p_id]['nombre_participants'] = $ligne->ps_nombre_membre_yahoo; |
} else { |
$forum = '-'; |
} |
} |
if ($ligne->ps_msg_derniere_semaine != 0) { |
$tableau_donnees[$ligne->p_id]['nombre_message'] = $ligne->ps_msg_derniere_semaine; |
} else { |
$tableau_donnees[$ligne->p_id]['nombre_message'] = 0; |
} |
$tableau_donnees[$ligne->p_id]['forum'] = $forum; |
if ($ligne->p_wikini) { |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI); |
$link=$this->_url->getURL(); |
$wiki_res = '<a href="'.$link.'">voir</a>' ; |
if ($ligne->ps_modifwiki_derniere_semaine != 0) { |
$wiki_res .= ' <span title="Nouvelles contributions cette semaine"> ( +'.$ligne->ps_modifwiki_derniere_semaine.' )</span>'; |
} |
$this->_url->removeQueryString ('act'); |
} else { |
$wiki_res = '-' ; |
} |
$tableau_donnees[$ligne->p_id]['wikini'] = $wiki_res; |
$titre= '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>'; |
if ($ligne->p_avoir_document != 0) { |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ; |
$document = '<a href="'.$this->_url->getURL().'">voir</a>' ; |
if ($ligne->ps_doc_derniere_semaine != 0) { |
$document .= ' <span title="Nouveaux documents cette semaine">( + '.$ligne->ps_doc_derniere_semaine.')</span>'; |
} |
} else { |
$document = '-' ; |
} |
$tableau_donnees[$ligne->p_id]['document'] = $document; |
if ($ligne->p_wikini) { |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI); |
$link=$this->_url->getURL(); |
$this->_url->addQueryString('wiki', 'DerniersChangementsRSS/xml'); |
$wiki_rss = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ; |
$this->_url->removeQueryString ('act'); |
$this->_url->removeQueryString ('wiki'); |
} else { |
$wiki_rss = '-' ; |
} |
$tableau_donnees[$ligne->p_id]['wikini_rss'] = $wiki_rss; |
$this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT); |
$participant = '<a href="'.$this->_url->getURL().'">voir</a>' ; |
$tableau_donnees[$ligne->p_id]['lien_participants'] = $this->_url->getURL(); |
if ($ligne->ps_nombre_inscrit_derniere_semaine != 0) { |
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = '<span title="Nouveaux inscrits cette semaine">( + '.$ligne->ps_nombre_inscrit_derniere_semaine.' )</span>'; |
} else { |
$tableau_donnees[$ligne->p_id]['ps_nombre_inscrit_derniere_semaine'] = ''; |
} |
$ligne_projet = array ( '', $titre, $forum, // le nom du projet |
$wiki_res, $wiki_rss,$document, $participant) ; |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION); |
array_push ($liste_projet, $ligne_projet) ; |
if ($loggue) { |
switch ($ligne->psu_id_statut) { |
case 1 : $icone_statut = 'etoile_rouge'; |
$tableau_donnees[$ligne->p_id]['id_statut'] = 3; |
break; |
case 2 : $icone_statut = 'etoile_verte'; |
$tableau_donnees[$ligne->p_id]['id_statut'] = 2; |
break; |
case 3 : $icone_statut = 'etoile_grise'; |
$tableau_donnees[$ligne->p_id]['id_statut'] = 1; |
break; |
default : $tableau_donnees[$ligne->p_id]['statut_icone'] = ''; |
$tableau_donnees[$ligne->p_id]['id_statut'] = 0; |
$icone_statut = false; |
} |
if ($icone_statut) $tableau_donnees[$ligne->p_id]['statut_icone'] = '<img src="'.PROJET_CHEMIN_ICONES.$icone_statut.'.png" alt="'.$ligne->ps_statut_nom.'" title="'.$ligne->ps_statut_nom.'" />'; |
} |
$res .= '</li>'."\n"; |
} |
$res .= '</ul>'."\n"; |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ; |
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET); |
// Correction bug tri par participant |
if ($_GET[PROJET_VARIABLE_TRI] == 'ps_nombre_inscrit') { |
foreach ($tableau_donnees as $key => $row) { |
$nombre_inscrit[$key] = $row['nombre_participants']; |
} |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') $flag = SORT_ASC ; else $flag = SORT_DESC ; |
array_multisort($nombre_inscrit, $flag, $tableau_donnees); |
} |
// Correction bug tri sur les statuts |
if ($_GET[PROJET_VARIABLE_TRI] == 'psu_id_statut') { |
foreach ($tableau_donnees as $key => $row) { |
$id_statut[$key] = $row['id_statut']; |
} |
if ($_GET[PROJET_VARIABLE_ORDRE_TRI] == 'asc') $flag = SORT_ASC ; else $flag = SORT_DESC ; |
array_multisort($id_statut, $flag, $tableau_donnees); |
} |
$pair = true; |
ob_start(); |
if ($_SESSION['_PROJET_']['projet_affichage'] == 'expert') { |
GEN_stockerFichierScript('jquery', 'api/js/jquery/jquery.js'); |
GEN_stockerFichierScript('animatedcollapse', 'api/js/jquery/animatedcollapse.js'); |
GEN_stockerCodeScript('animatedcollapse.addDiv(\'legende\', \'fade=1, height="100px"\');' ."\n". |
'animatedcollapse.init();' ."\n"); |
include_once PROJET_CHEMIN_CLASSES.'enteteColonneTriable.class.php'; |
foreach ($valeur_acceptable_tri as $var_tri) { |
$enteteTri[$var_tri] = new enteteColonneTriable($var_tri); |
$enteteTri[$var_tri]->setColonneCliquee($tri, PROJET_VARIABLE_TRI); |
$enteteTri[$var_tri]->setOrdre($ordre_tri, PROJET_VARIABLE_ORDRE_TRI); |
} |
$lien_tri_titre = $enteteTri['p_titre']->getLien($this->_url); |
$lien_tri_activite = $enteteTri['ps_pourcent']->getLien($this->_url); |
$lien_tri_participants = $enteteTri['ps_nombre_inscrit']->getLien($this->_url); |
$lien_tri_doc = $enteteTri['ps_doc_derniere_semaine']->getLien($this->_url); |
$lien_tri_statut = $enteteTri['psu_id_statut']->getLien($this->_url); |
include_once PROJET_CHEMIN_APPLI.'/squelettes/liste_projet_expert.tpl.html'; |
} else { |
include_once PROJET_CHEMIN_APPLI.'/squelettes/liste_projet.tpl.html'; |
} |
$res = ob_get_contents(); |
ob_end_clean(); |
// Nettoyage de l'url |
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET); |
$this->_url->removeQueryString (PROJET_VARIABLE_MODE_AFFICHAGE); |
$this->_url->removeQueryString (PROJET_VARIABLE_ORDRE_TRI); |
$this->_url->removeQueryString (PROJET_VARIABLE_TRI); |
return $res ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/client/projet/icones/gauche.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/gauche.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/etoile_grise.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/etoile_grise.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/etoile_verte.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/etoile_verte.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/document.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/document.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/repertoire.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/repertoire.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/cross.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/cross.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/modifier.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/modifier.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/ecrire.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/ecrire.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/etoile_rouge.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/etoile_rouge.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/icones/droite.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/projet/icones/droite.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/projet/services/projet_statistiques.php |
---|
19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: projet_statistiques.php,v 1.2 2008-03-28 08:19:07 j_grillot Exp $ |
// CVS : $Id: projet_statistiques.php,v 1.3 2008-08-25 14:59:22 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,68 → 31,179 |
//Autres auteurs : |
*@author Julien Grillot <julien.grillot@gmail.com> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.2 $ |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** AVERTISSEMENT |
* |
* Ce programme n est pas appele par l application projet |
* Il faut le lancer en ligne de commande |
*/ |
define ('PROJET_STATISTIQUE_MODE_LIGNE_COMMANDE', true); |
/** Chemin vers les programmes ezmlm en PHP */ |
define ('PROJET_CHEMIN_EZMLM_PHP', '/home/vpopmail/www/'); |
/** Chemin vers le site hebergeant l appli projet*/ |
define ('PROJET_CHEMIN_SITE_APPLI_PROJET', '/home/telabotap/www/'); |
/** Chemin vers les wikinis pour les flux rss */ |
define('PROJET_URL_WIKINI', "http://www.tela-botanica.org/wikini/"); |
/** Chemin vers les flux rss de Yahoo! */ |
define ('PROJET_URL_RSS_YAHOO', 'http://rss.groups.yahoo.com/group/'); |
/** Chemin vers les groupes Yahoo! */ |
define ('PROJET_URL_GROUPES_YAHOO', 'http://fr.groups.yahoo.com/group/'); |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** Connexion base de donne */ |
include_once PROJET_CHEMIN_APPLI.'classes/ezmlmAccessObject.class.php'; |
if (PROJET_STATISTIQUE_MODE_LIGNE_COMMANDE) { |
set_include_path(get_include_path().':'.PROJET_CHEMIN_SITE_APPLI_PROJET.'api/pear/'); |
define ('GEN_CHEMIN_API', '/home/telabotap/www/api/'); |
include_once PROJET_CHEMIN_SITE_APPLI_PROJET.'papyrus/configuration/pap_config.inc.php'; |
$dsn = PAP_DSN; |
include_once 'DB.php'; |
$GLOBALS['projet_db'] = DB::connect($dsn); |
if (PEAR::isError($GLOBALS['projet_db'])) die ("\n".'Erreur de connexion a la BD.'."\n".$GLOBALS['projet_db']->getMessage()); |
else echo "\n"."connection ok..."; |
// Quelques constantes de chemin |
include_once PROJET_CHEMIN_SITE_APPLI_PROJET.'client/projet/configuration/projet.config.inc.php'; |
if (DB::isError($GLOBALS['projet_db'])) die ("\n".'Erreur de connexion a la BD.'."\n".$GLOBALS['projet_db']->getMessage()); |
} else { |
$GLOBALS['projet_db'] = &$this->_db; |
} |
include_once PROJET_CHEMIN_BIBLIOTHEQUE_API.'pear/XML/RSS.php'; |
// Ne pas changer : les groupes Yahoo se basent toujours sur la semaine |
define("NB_SEC_INSERT", 7*24*3600); |
define("NB_SEC_UPDATE", 2*3600); |
define("URL_WIKINI", "http://www.tela-botanica.org/wikini/"); |
function is_natural($val, $acceptzero = false) { |
$return = ((string)$val === (string)(int)$val); |
if ($acceptzero) |
$base = 0; |
else |
$base = 1; |
if ($return && intval($val) < $base) |
$return = false; |
return $return; |
} |
if(!is_natural($_GET['start']))$_GET['start']='0'; |
/** |
* Procedure retrouvant le nombre de contribution, de message et le contenu de la page a partir des informations de la BDD |
* @param object $ligne resultat d'un fetch row contenant l'url du document a analyser |
* @param int $nombre_contrib recupere le nombre de contributions du projet |
* @param int $nombre_message recupere le nombre de nouveaux messages du projet |
* @param int $nombre_membre recupere le nombre de nouveaux messages du projet |
* @param int $nombre_photo recupere le nombre de nouveaux messages du projet |
* @return false si la fonction echoue lors de la tentative de recuperation des donnees utiles |
*/ |
function analyser($ligne, &$nombre_contrib, &$nombre_message) { |
function analyser($ligne, &$nombre_contrib, &$nombre_message, &$nombre_nouveau_membre, &$nombre_photo, &$nombre_membre) { |
$nombre_contrib='0'; |
$nombre_msg='0'; |
$r=false; |
// Recuperation du nbre de message |
$xml_parser = &new ezmlmAccessObject('nombre_messages', $ligne->pl_domaine, $ligne->pl_nom_liste, $GLOBALS['lang']) ; |
$xml_parser->load(); |
ob_start(); |
$xml_parser->parse(); |
$nombre_message = ob_get_contents(); |
$domaine = $ligne->pl_domaine; |
$liste = $ligne->pl_nom_liste; |
if ($domaine != '' && $liste != '') { |
ob_start(); |
include PROJET_CHEMIN_EZMLM_PHP.'nombre_messages.php'; |
$xml = ob_get_contents(); |
ob_end_clean(); |
if (isset($xml) && $xml != '' && $xml != 0) { |
$simpleXML = simplexml_load_string($xml); |
$nombre_message = $simpleXML[0]; |
} |
} |
if(!$nombre_message)$nombre_message='0'; |
ob_end_clean(); |
// Si AGO_A_NOMGRP alors il n'y a pas de flux RSS (groupe Yahoo, cad pas Tela) |
// Si AGO_A_NOMGRP existe, la liste est sur Yahoo |
// on essaie de parser la page d accueil du groupe |
// poue recuperer les |
if($ligne->AGO_A_NOMGRP) { |
$url='http://fr.groups.yahoo.com/group/'.$ligne->AGO_A_NOMGRP; |
$url = PROJET_URL_GROUPES_YAHOO.$ligne->AGO_A_NOMGRP; |
// Recherche du schema retrouvant le nombre de nouveaux message dans la semaine |
$pattern='>([0-9]+)</span> nouveau'; |
$pattern_membres = '(: ([0-9]+) </li>)((<li>Rubriqu)|( <li>Cr))'; |
$pattern_nouveaux_membres = '>([0-9]+)</span> .ouveaux? .embres?'; |
$pattern_message = '>([0-9]+)</span> .ouveaux? .essages?'; |
$pattern3 = '>([0-9]+)</span> .ouvelles? .hotos?'; |
// Quelques soucis avec la version asynchrone (sockopen) |
$contenu=file_get_contents($url); |
$contenu = @file_get_contents($url); |
$r=($contenu?true:false); |
ereg($pattern, $contenu, $no); |
$nombre_message=$no[1]; |
// en cas d echec, ce qui est frequent |
// on lit le flux rss |
if ($contenu) { |
sleep(2); |
$r=($contenu?true:false); |
ereg($pattern_message, $contenu, $registre_message); |
$nombre_message=$registre_message[1]; |
ereg($pattern_nouveaux_membres, $contenu, $registre_nouveau_membre); |
$nombre_nouveau_membre=$registre_nouveau_membre[1]; |
ereg($pattern3, $contenu, $no); |
$nombre_photo=$no[1]; |
ereg ($pattern_membres, $contenu, $registre_membre); |
$nombre_membre = $registre_membre[2]; |
} else { |
// Parse le flux RSS genere par wikini |
$rss =& new XML_RSS(PROJET_URL_RSS_YAHOO.$ligne->AGO_A_NOMGRP.'/rss'); |
if (PEAR::isError($rss)) { |
echo $rss->getMessage()."\n"; |
return; |
} |
$rss->parse(); |
// On va compter le nombre de modification depuis les x derniers jours (voirs constantes) |
foreach ($rss->getItems() as $item) { |
// Le script doit etre compatiable avec plusieurs formats de date |
if ($item['pubDate']) { |
if (strtotime($item['pubDate'])>time()-NB_SEC_INSERT) $nombre_message++; |
} else { |
$date = substr($item['title'], strlen($item['title'])-18); |
if ($date>date("Y m d - H:i", time()-NB_SEC_INSERT)) $nombre_message++; |
} |
} |
// On met une * dans les autres variables pour indiquer que ca ne fonctionne pas |
$nombre_membre = '*'; |
$nombre_photo = '*'; |
} |
} else { |
// Parse le flux RSS généré par wikini |
$rss =& new XML_RSS(URL_WIKINI.$ligne->p_wikini.'/wakka.php?wiki=DerniersChangementsRSS/xml'); |
// Parse le flux RSS genere par wikini |
$rss =& new XML_RSS(PROJET_URL_WIKINI.$ligne->p_wikini.'/wakka.php?wiki=DerniersChangementsRSS/xml'); |
$rss->parse(); |
// On va compter le nombre de modification depuis les x derniers jours (voirs constantes) |
foreach ($rss->getItems() as $item) { |
// Le script doit être compatiable avec plusieurs formats de date |
// Le script doit etre compatiable avec plusieurs formats de date |
if ($item['pubDate']) { |
if (strtotime($item['pubDate'])>time()-NB_SEC_INSERT) $nombre_contrib++; |
102,8 → 213,17 |
} |
} |
// On recupere le nombre de nouveaux inscrit au projet |
$r=true; |
// Nombre de derniers messages de la semaine |
$domaine = $ligne->pl_domaine; |
$liste = $ligne->pl_liste; |
ob_start(); |
include_once PROJET_CHEMIN_EZMLM_PHP.'dernier_messages.php'; |
ob_end_clean(); |
$nombre_message = $num; // $num est une variable du fichier dernier_messages.php |
} |
return $r; |
130,51 → 250,51 |
'left join agora on plle_id_liste=AGO_A_ID ' . |
'group by p_id order by p_titre' ; |
$resultat = $this->_db->query($requete) ; |
$resultat = $GLOBALS['projet_db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
echo ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$res .= '<h1>Statistiques des projets</h1>'; |
echo "\n".'Statistiques des projets'; |
echo "\n".'Requete : '."\n\n".$requete."\n"; |
// Un tableau c'est bien mais un beau tableau c'est mieux. |
$res .= '<style type="text/css">'; |
$res .= '.stats { border-spacing: 0px; }'; |
$res .= '.stats .stat_nb { text-align: center; }'; |
$res .= '.stats th { font-weight: bold; }'; |
$res .= '.stats td { border-bottom: 1px #ddd solid; }'; |
$res .= '.warning { color: #800; font-weight: bold; }'; |
$res .= '</style>'; |
$calculs=false; |
$calculs = false; |
$res .= '<table cellspacing="0" class="stats" style="width: 100%"><tr><th>Nom du projet</th><th>Nom liste</th><th>Inscrits</th><th>Utilisateurs</th><th>Nb msg</th><th>Nb doc</th><th>Nb contrib</th></tr>'; |
$nombre_contrib = 0; |
$nombre_message = 0; |
printf ("\n%-56s %-35s %-12s %-12s %-12s %-12s %-12s %-12s", |
"Nom du projet", "Nom liste", "Nouv inscrits", "Utilisateurs", "Nb messages", "Nb doc", "Nb contrib", 'Nombre inscrit Yahoo'); |
$nombre_photo = 0; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$nombre_contrib = 0; |
$nombre_message = 0; |
// On verifie la date de derniere mise à jour |
$nombre_nouveau_membre = 0; |
$nombre_membre_yahoo = 0; |
// On verifie la date de derniere mise a jour |
$requete_verif='SELECT * FROM projet_statistiques WHERE ps_ce_projet="'.$ligne->p_id.'" ORDER BY ps_date DESC LIMIT 1'; |
$resultat_verif = $this->_db->query($requete_verif); |
$resultat_verif = $GLOBALS['projet_db']->query($requete_verif); |
if (DB::isError($resultat_verif)) { |
return $resultat_verif->getMessage().$resultat_verif; |
echo $resultat_verif->getMessage().$resultat_verif; |
} |
$ligne_verif = $resultat_verif->fetchRow(DB_FETCHMODE_OBJECT); |
// Si elle remonte a plus de deux heure, on sauvegarde, et a plus de 7 jours, on archive et créé une nouvelle entrée |
// Si elle remonte a plus de deux heure, on sauvegarde, et a plus de 7 jours, on archive et cree une nouvelle entree |
if($ligne_verif->ps_date > date("Y-m-d H:i:s", time()-NB_SEC_INSERT)) { |
if($ligne_verif->ps_maj < date("Y-m-d H:i:s", time()-NB_SEC_UPDATE)) { |
// Recupere nombre_contrib et nombre_message |
$calculs=analyser($ligne, $nombre_contrib, $nombre_message); |
$calculs=analyser($ligne, $nombre_contrib, $nombre_message, $nombre_nouveau_membre, $nombre_photo, $nombre_membre_yahoo); |
$requete_maj = 'UPDATE projet_statistiques SET ps_msg_derniere_semaine="'.$nombre_message.'", ps_doc_derniere_semaine="'.$ligne->nb_doc.'", ps_nombre_inscrit="'.$ligne->nb_utilisateur.'", ps_nombre_inscrit_liste="'.$ligne->nb_utilisateur_liste.'", ps_modifwiki_derniere_semaine="'.$nombre_contrib.'", ps_maj=NOW() WHERE ps_ce_projet="'.$ligne->p_id.'" AND ps_date="'.$ligne->ps_date.'"'; |
$resultat_maj = $this->_db->query($requete_maj); |
$requete_maj = 'UPDATE projet_statistiques SET ps_msg_derniere_semaine="'.$nombre_message.'", ps_doc_derniere_semaine="'. |
$ligne->nb_doc.'", ps_nombre_inscrit_derniere_semaine="'.$nombre_nouveau_membre.'", ps_nombre_inscrit="'.$ligne->nb_utilisateur. |
'", ps_nombre_inscrit_liste="'. |
$ligne->nb_utilisateur_liste.'", ps_modifwiki_derniere_semaine="'.$nombre_contrib. |
'", ps_maj=NOW(), ps_nombre_membre_yahoo="'.$nombre_membre_yahoo.'" WHERE ps_ce_projet="'. |
$ligne->p_id.'" AND ps_dernier="1"'; |
$resultat_maj = $GLOBALS['projet_db']->query($requete_maj); |
if (DB::isError($resultat_maj)) { |
return $resultat_maj->getMessage().$requete_maj; |
echo $resultat_maj->getMessage().$requete_maj; |
} |
} else { |
186,55 → 306,100 |
} else { |
// Recupere nombre_contrib et nombre_message |
$calculs=analyser($ligne, $nombre_contrib, $nombre_message); |
$requete_maj = 'INSERT INTO projet_statistiques (ps_ce_projet, ps_msg_derniere_semaine, ps_doc_derniere_semaine, ps_nombre_inscrit, ps_nombre_inscrit_liste, ps_modifwiki_derniere_semaine, ps_date, ps_maj) '. |
'VALUES ("'.$ligne->p_id.'", "'.$nombre_message.'", "'.$ligne->nb_doc.'", "'.$ligne->nb_utilisateur.'", "'.$ligne->nb_utilisateur_liste.'", "'.$nombre_contrib.'", NOW(), NOW())'; |
$resultat_maj = $this->_db->query($requete_maj); |
$calculs=analyser($ligne, $nombre_contrib, $nombre_message, $nombre_nouveau_membre, $nombre_photo, $nombre_membre_yahoo); |
// On place ps_dernier a O pour les stats de la semaine precedente |
$requete_stat_prec = 'update projet_statistiques set ps_dernier=0 where ps_ce_projet='.$ligne->p_id; |
$resultat_stat_prec = $GLOBALS['projet_db']->query($requete_stat_prec); |
$requete_maj = 'INSERT INTO projet_statistiques set ps_ce_projet="'.$ligne->p_id.'", ps_msg_derniere_semaine="'.$nombre_message |
.'", ps_doc_derniere_semaine="'.$ligne->nb_doc.'", ps_nombre_inscrit_derniere_semaine="'.$nombre_nouveau_membre. |
'", ps_nombre_inscrit= "'.$ligne->nb_utilisateur.'", ps_nombre_inscrit_liste="'.$ligne->nb_utilisateur_liste. |
'", ps_modifwiki_derniere_semaine="'.$nombre_contrib.'", ps_date=now(), ps_maj=now(), ps_dernier=1'. |
', ps_nombre_membre_yahoo="'.$nombre_membre_yahoo.'"'; |
$resultat_maj = $GLOBALS['projet_db']->query($requete_maj); |
if (DB::isError($resultat_maj)) { |
return $resultat_maj->getMessage().$requete_maj; |
echo $resultat_maj->getMessage().$requete_maj; |
} |
} |
// Et on affiche les stats courantes |
$res .= '<tr><td>'.$ligne->p_titre.'</td><td>'.($ligne->pl_nom_liste?$ligne->pl_nom_liste:$ligne->AGO_A_NOMGRP.' (Yahoo)').'</td><td class="stat_nb">'.$ligne->nb_utilisateur_liste.'</td><td class="stat_nb">'.$ligne->nb_utilisateur.'</td><td class="stat_nb">'.$nombre_message.'</td><td class="stat_nb">'.$ligne->nb_doc.'</td><td class="stat_nb">'.$nombre_contrib.'</td></tr>'; |
$format = "\n%-56s %-35s %-12d %-12d %-12d %-12d %-12d %-12d"; |
printf ($format, html_entity_decode($ligne->p_titre), ($ligne->pl_nom_liste?$ligne->pl_nom_liste:$ligne->AGO_A_NOMGRP.' (Yahoo)'), |
$nombre_nouveau_membre, $ligne->nb_utilisateur, $nombre_message, $ligne->nb_doc, $nombre_contrib, $nombre_membre_yahoo); |
} |
$res .= '</table>'; |
//$res .= '</table>'; |
// Met a jour les statistiques et somme d'activite |
$sql="update `projet_statistiques` set ps_somme=(ps_msg_derniere_semaine +ps_doc_derniere_semaine+ps_nombre_inscrit_liste+ps_modifwiki_derniere_semaine);"; |
$resultat = $this->_db->query($sql); |
$sql="update `projet_statistiques` set ps_somme=(ps_msg_derniere_semaine +5*ps_doc_derniere_semaine+ps_nombre_inscrit_liste+ps_modifwiki_derniere_semaine);"; |
$resultat = $GLOBALS['projet_db']->query($sql); |
if (DB::isError($resultat)) { |
return $resultat->getMessage().$sql; |
} |
// On cherche le max pour ponderer les sommes |
$sql='SELECT MAX( ps_somme ) AS max FROM projet_statistiques WHERE ps_date>=CURDATE()'; |
$resultat = $this->_db->query($sql); |
$sql='SELECT MAX( LN(ps_somme+1) ) AS max FROM projet_statistiques WHERE ps_dernier=1'; |
$resultat = $GLOBALS['projet_db']->query($sql); |
if (DB::isError($resultat)) { |
return $resultat->getMessage().$sql; |
} |
$tresultat = $resultat->fetchRow(DB_FETCHMODE_OBJECT); |
$max = $tresultat->max; |
// On pondere |
$sql="UPDATE `projet_statistiques` SET ps_pourcent=ps_somme / ".($tresultat->max?$tresultat->max:1)." * 100 WHERE ps_date>=CURDATE();"; |
$resultat = $this->_db->query($sql); |
$sql = 'UPDATE projet_statistiques SET ps_pourcent=LN(ps_somme+1) / '.$max.' * 100 WHERE ps_dernier=1'; |
$resultat = $GLOBALS['projet_db']->query($sql); |
if (DB::isError($resultat)) { |
return $resultat->getMessage().$sql; |
} |
// Calcul de al dormance de certains projets |
$requete_dormance = 'select ps_ce_projet from projet_statistiques where ps_ce_projet not in '. |
'(SELECT ps_ce_projet FROM `projet_statistiques` WHERE `ps_somme` <> 0 group by ps_ce_projet) group by ps_ce_projet'; |
$resultat_dormance = $GLOBALS['projet_db']->query ($requete_dormance); |
echo "\n".'Mise a jour de la dormance...'."\n"; |
while ($ligne_dormance = $resultat_dormance->fetchRow(DB_FETCHMODE_OBJECT)) { |
// Comme les statistiques n'ont pas un an, on verifie s'il n'y pas de documents |
$requete_complementaire = 'select pd_id from projet_documents where pd_date_de_mise_a_jour > date_sub(now(), interval 1 year) and pd_ce_projet = ' |
.$ligne_dormance->ps_ce_projet; |
$resultat_complementaire = $GLOBALS['projet_db']->query ($requete_complementaire); |
if (DB::isError($resultat_complementaire)) { |
echo $resultat_complementaire->getMessage()."\n".$resultat_complementaire->getDebugInfo()."\n".'Requete : '.$requete_complementaire."\n"; |
} |
if ($resultat_complementaire->numRows() !=0) { // Le projet a eu una activite meme infime depuis un an |
$requete_projet = 'update projet set p_en_dormance=0 where p_id='.$ligne_dormance->ps_ce_projet; |
$GLOBALS['projet_db']->query($requete_projet); |
// Suppression puis insertion |
$requete_avoir_theme = 'delete from projet_avoir_theme where pat_id_projet='.$ligne_dormance->ps_ce_projet.' and pat_id_theme=9'; |
$GLOBALS['projet_db']->query ($requete_avoir_theme); |
} else { // Le projet dort on fait les mises a jour sur projet et projet_avoir_theme |
$requete_projet = 'update projet set p_en_dormance=1 where p_id='.$ligne_dormance->ps_ce_projet; |
$GLOBALS['projet_db']->query($requete_projet); |
// Suppression puis insertion |
$requete_avoir_theme = 'delete from projet_avoir_theme where pat_id_projet='.$ligne_dormance->ps_ce_projet.' and pat_id_theme=9'; |
$GLOBALS['projet_db']->query ($requete_avoir_theme); |
$requete_avoir_theme = 'insert into projet_avoir_theme set pat_id_projet='.$ligne_dormance->ps_ce_projet.', pat_id_theme=9'; // Le theme en dormance |
$GLOBALS['projet_db']->query ($requete_avoir_theme); |
} |
} |
// On affiche quelques infos inutiles mais indispensables |
$res .= '<p>'; |
if(!$calculs)$res .= '<span class="warning">Les variables nb_msg et nb_contrib n\'ont pas été calculées (datent de moins de '.round(NB_SEC_UPDATE/3600).' heures)</span><br />'; |
$res .= 'Executé en '.(round((microtime(true)-$start)*1000)/1000).' secondes.</p>'; |
echo "\n"; |
if(!$calculs) $res .= 'Les variables nb_msg et nb_contrib n\'ont pas été calculées (datent de moins de '.round(NB_SEC_UPDATE/3600).' heures)'."\n"; |
echo 'Executé en '.(round((microtime(true)-$start)*1000)/1000).' secondes.'."\n"; |
return $res; |
if (PROJET_STATISTIQUE_MODE_LIGNE_COMMANDE) { |
} else { |
return $res; |
} |
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2008-03-27 09:15:36 j_grillot |
* Correction du bug sur le parsing xml |
* |
* +--Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |