diff -r 000000000000 -r d970ebf37754 enmi12/glossaire/writeWords.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/enmi12/glossaire/writeWords.php Wed Nov 06 03:21:17 2013 +0000
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+load($document);
+ $elements = $document_xml->getElementsByTagName('glossaire');
+ $resultat_html = '';
+ $arbre = $elements->item(0);
+
+ $mots = $arbre -> childNodes;
+
+ $monfichier = fopen('mots.txt', 'r+');
+ fseek($monfichier, 0);
+
+ $value = 0;
+
+ foreach($mots as $mot){
+ if($mot->hasChildNodes()){
+ if($mot->hasAttributes()){
+ $wordName = $mot -> getAttribute('name');
+ $wordName = removeAccents($wordName);
+ $wordName = strtolower($wordName);
+ echo($wordName);
+ }
+ else{
+ echo($mot -> nodeValue);
+ }
+
+ if(isset($wordName)){
+ $wordUrl = 'http://enmi12.org/glossaire/index.php?mot=' . $wordName;
+ }
+ else{
+ echo($mot -> nodeValue);
+ }
+
+ fseek($monfichier, 0, SEEK_END);
+
+ if(isset($wordName) && isset($wordUrl)){
+fputs($monfichier, '
+
+ ' . $wordUrl . '
+');
+ $value++;
+ echo($value);
+ }
+ }
+
+ }
+
+ fclose($monfichier);
+
+}
+
+writeLinks();
+?>
+
+
\ No newline at end of file