Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 1289 → Rev 1288

/trunk/.htaccess
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/.settings/org.eclipse.core.resources.prefs
File deleted
/trunk/sites/chezju/fr/squelettes/defaut.html
File deleted
/trunk/sites/chezju/fr/styles/defaut.css
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/bazar/bibliotheque/bazar.fonct.rss.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: bazar.fonct.rss.php,v 1.77 2007-04-04 15:15:22 neiluj Exp $
// CVS : $Id: bazar.fonct.rss.php,v 1.76 2007-04-04 15:09:59 florian Exp $
/**
*
*@package bazar
28,7 → 28,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2006
*@version $Revision: 1.77 $
*@version $Revision: 1.76 $
// +------------------------------------------------------------------------------------------------------+
*/
 
262,7 → 262,7
}
}
elseif ( $tableau[$i]['type']=='wikini' ) {
$res .= '<div class="BAZ_lien_wikini BAZ_lien_wikini_'.$GLOBALS['_BAZAR_']['class'].'"><a href="wikini/'.genere_nom_wiki($ligne["bf_titre"], TRUE).'">'.BAZ_ENTRER_PROJET.'</a></div>'."\n";
$res .= '<div class="BAZ_lien_wikini BAZ_lien_wikini_'.$GLOBALS['_BAZAR_']['class'].'"><a href="wikini/'.baz_titre_wiki($ligne["bf_titre"]).'">'.BAZ_ENTRER_PROJET.'</a></div>'."\n";
}
}
//afficher les liens pour l'annonce
476,55 → 476,7
return $res ;
}
 
// merci PHP 5 ...
function mb_str_split($str, $length = 1) {
if ($length < 1) return FALSE;
 
$result = array();
 
for ($i = 0; $i < strlen($str); $i += $length) {
$result[] = substr($str, $i, $length);
}
 
return $result;
}
//
 
function genere_nom_wiki($nom, $spaces = FALSE)
{
// traitement des accents
$nom = str_replace(array('é','è','ë','ê','É','È','Ë','Ê','&','£'), 'e', $nom);
$nom = str_replace(array('à','ä','â','Â','Ä','À','@'), 'a', $nom);
$nom = str_replace(array('ç','Ç'), 'c', $nom);
$nom = str_replace(array('ÿ','¾'), 'y', $nom);
$nom = str_replace(array('ô','ö','ò','Ô','Ò','Ö'), 'o', $nom);
$nom = str_replace(array('ï','î','ì','Î','Ï','Ì'), 'i', $nom);
$nom = str_replace('$', 's', $nom);
$temp = mb_str_split($nom);
$count = 0;
$final = NULL;
foreach($temp as $letter)
{
if(preg_match('/([[:space:]]|[[:punct:]])/', $letter))
{
$final .= ($spaces ? '_' : '');
} elseif(preg_match ('/[a-zA-Z0-9]/', $letter)) {
$final .= (($count == 0 || $count == (strlen($nom) - 1)) ? strtoupper($letter) : strtolower($letter));
}
$count++;
}
// vérifions que le retour n'est pas uniquement un underscore
if(preg_match('/^[[:punct:]]+$/', $final)) return FALSE;
 
// sinon retour du nom formaté
return($final);
}
 
 
 
/** RSSversHTML () transforme un flux RSS (en XML) en page HTML
*
* On passe en paramètre le contenu du flux RSS, on affiche ou non la description,
1178,9 → 1130,6
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.76 2007/04/04 15:09:59 florian
* modif class fichiers
*
* Revision 1.75 2007/04/04 08:51:01 florian
* gestion des classes spécifiques pour habiller par CSS les fiches bazar
*
/trunk/client/bottin/bibliotheque/inscription.fonct.php
19,8 → 19,8
// | 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: inscription.fonct.php,v 1.25 2007-04-04 15:15:22 neiluj Exp $
// CVS : $Id: inscription.fonct.php,v 1.25 2007-04-04 15:15:22 neiluj Exp $
// CVS : $Id: inscription.fonct.php,v 1.24 2007-01-04 16:37:27 alexandre_tb Exp $
// CVS : $Id: inscription.fonct.php,v 1.24 2007-01-04 16:37:27 alexandre_tb Exp $
/**
* Fonctions du module inscription
*
32,8 → 32,8
//Autres auteurs :
*@author Florian Schmitt <florian@ecole-et-nature.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.25 $ $Date: 2007-04-04 15:15:22 $
*@version $Revision: 1.25 $ $Date: 2007-04-04 15:15:22 $
*@version $Revision: 1.24 $ $Date: 2007-01-04 16:37:27 $
*@version $Revision: 1.24 $ $Date: 2007-01-04 16:37:27 $
// +------------------------------------------------------------------------------------------------------+
*/
 
604,44 → 604,26
* Génère un nom wiki valide à partir des données saisies par l'utilisateur
* fait une requete dans la base
*
* UPDATE: modification de la fonction pour propretée du titre / nom --julien
* @return string un nom wiki valide
*/
 
function genere_nom_wiki($nom, $spaces = TRUE)
{
// traitement des accents
$nom = str_replace(array('é','è','ë','ê','É','È','Ë','Ê','&','£'), 'e', $nom);
$nom = str_replace(array('à','ä','â','Â','Ä','À','@'), 'a', $nom);
$nom = str_replace(array('ç','Ç'), 'c', $nom);
$nom = str_replace(array('ÿ','¾'), 'y', $nom);
$nom = str_replace(array('ô','ö','ò','Ô','Ò','Ö'), 'o', $nom);
$nom = str_replace(array('ï','î','ì','Î','Ï','Ì'), 'i', $nom);
$nom = str_replace('$', 's', $nom);
function genere_nom_wiki($prenom, $nom) {
// 1. suppression des espaces
$nom = trim ($nom) ;
$prenom = trim ($prenom) ;
$temp = str_split($nom);
$count = 0;
$final = NULL;
foreach($temp as $letter)
{
if(preg_match('/([[:space:]]|[[:punct:]])/', $letter))
{
$final .= ($spaces ? '_' : '');
} elseif(preg_match ('/[a-zA-Z0-9]/', $letter)) {
$final .= (($count == 0 || $count == (strlen($nom) - 1)) ? strtoupper($letter) : strtolower($letter));
}
$count++;
}
// vérifions que le retour n'est pas uniquement un underscore
if(preg_match('/^[[:punct:]]+$/', $final)) return FALSE;
 
// sinon retour du nom formaté
return($final);
// 2. suppression des caractères non ascii et ajout de la première lettre en majuscule
$nom = trim_non_ascii ($nom) ;
$prenom = trim_non_ascii ($prenom) ;
// Vérification
$nom_wiki = $prenom.$nom ;
if (!preg_match('/^[A-Z][a-z]+[A-Z,0-9][A-Z,a-z,0-9]*$/', $nom_wiki)) {
$nom_wiki = chr(rand(65, 90)).$nom_wiki.chr(rand(65, 90)) ;
}
return $nom_wiki ;
}
 
 
/**
* Cette fonction supprime les caractères autres que asccii et les chiffres
*
677,7 → 659,7
}
 
//==============================================================================
/** function create_new_random($n,$type) permet de générer un nombre de caractères alçatoires.
/** function create_new_random($n,$type) permet de générer un nombre de caractères aléatoires.
*
*
*
736,9 → 718,6
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.24 2007/01/04 16:37:27 alexandre_tb
* ajout d'un test pour savoir si la fonction inscription_validee existe déjà (peut être inutile à vérifier)
*
* Revision 1.23 2006/12/01 13:23:15 florian
* integration annuaire backoffice
*
/trunk/papyrus/bibliotheque/fonctions/pap_site.fonct.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: pap_site.fonct.php,v 1.8 2007-04-04 15:15:22 neiluj Exp $
// CVS : $Id: pap_site.fonct.php,v 1.7 2006-12-08 20:15:21 jp_milcent Exp $
/**
* Bibliothèque de fonctions concernant les sites.
*
38,7 → 38,7
//Autres auteurs :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.8 $ $Date: 2007-04-04 15:15:22 $
*@version $Revision: 1.7 $ $Date: 2006-12-08 20:15:21 $
// +------------------------------------------------------------------------------------------------------+
*/
 
96,7 → 96,7
'WHERE gs_id_site = '.$site_id.' '.
'AND gs_id_site = gsr_id_site_01 '.
'AND gsr_id_site_01 = gsr_id_site_02 '.
'AND gsr_id_valeur = 102'; // 102 = site "principal"
'AND gsr_id_valeur = 102 '; // 102 = site "principal"
$resultat = $objet_pear_db->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
275,9 → 275,6
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.7 2006/12/08 20:15:21 jp_milcent
* Correction bogue requete sql dans fonction GEN_lireInfoSiteI18nCodeAlpha().
*
* Revision 1.6 2006/12/08 18:48:43 jp_milcent
* Amélioration du mode de reception des données pour GEN_lireInfoSiteI18nCodeAlpha().
*
297,7 → 294,7
* Changement de nom et d'arborescence de Genesia en Papyrus.
*
* Revision 1.1 2004/05/03 16:26:07 jpm
* Ajout de la bibliothèque de fonctions permettant de manipuler les informations issues des tables "gen_site_..." de Papyrus.
* Ajout de la bibliothèque de fonctions permettant de manipuler les informations issues des tables "gen_site_..." de Génésia.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+