1 | <?php |
---|
2 | include_spip('inc/bible_tableau'); |
---|
3 | function bible_generer_doc(){ |
---|
4 | $langs = bible_tableau('langues'); |
---|
5 | $texte = ''; |
---|
6 | foreach ($langs as $lang){ |
---|
7 | |
---|
8 | $texte .= '<br /><br />{{{'.traduire_nom_langue($lang)."}}}[<-$lang]<br /><br />"; |
---|
9 | $texte .= bible_generer_doc_lang($lang); |
---|
10 | } |
---|
11 | $alias = bible_tableau('alias'); |
---|
12 | $texte .= '<br><br>{{{Alias possible}}}<br><br>'; |
---|
13 | foreach($alias as $lalias=>$lesalias){ |
---|
14 | $lesalias = implode($lesalias['options'],'<br>-'); |
---|
15 | $texte.= '<br><br>{{'.$lalias.': }}<br>-'.$lesalias ; |
---|
16 | } |
---|
17 | |
---|
18 | return $texte; |
---|
19 | |
---|
20 | } |
---|
21 | function bible_generer_doc_lang($lang){ |
---|
22 | $tableau_traduction = bible_tableau('traduction'); |
---|
23 | $tableau_separateur = bible_tableau('separateur'); |
---|
24 | $tableau_livres = bible_tableau('livres'); |
---|
25 | $texte = "{{Séparateur chapitre/verset}} : «".$tableau_separateur[$lang]."»"; |
---|
26 | $texte.="<br /><br />{{Abréviations des livres}}<br /><br/>"; |
---|
27 | |
---|
28 | foreach ($tableau_livres as $lang_livre=>$tableau){ |
---|
29 | if ($lang == $lang_livre){ |
---|
30 | foreach ($tableau as $abrev=>$livre){ |
---|
31 | $texte.='|'.$abrev.'|'.$livre.'|<br/>'; |
---|
32 | } |
---|
33 | } |
---|
34 | |
---|
35 | } |
---|
36 | $texte .= '<br/>'; |
---|
37 | |
---|
38 | foreach ($tableau_traduction as $abrev=>$traduction){ |
---|
39 | if ($traduction['lang']==$lang){ |
---|
40 | $texte .= '<br/>'; |
---|
41 | |
---|
42 | |
---|
43 | $gateway = $traduction['gateway']; |
---|
44 | $wissen = $traduction['wissen']; |
---|
45 | $unbound = $traduction['unbound']; |
---|
46 | $at = $traduction['at']; |
---|
47 | $nt = $traduction['nt']; |
---|
48 | $domaine_public = $traduction['domaine_public']; |
---|
49 | $deutero = $traduction['deutero']; |
---|
50 | $lire = $traduction['lire']; |
---|
51 | |
---|
52 | if ($gateway){ |
---|
53 | $texte .= '{{'.$traduction['traduction'].'}}<br />-'; |
---|
54 | } |
---|
55 | else{ |
---|
56 | $texte .= '{{'.$traduction['traduction'].'}}<br />-'; |
---|
57 | } |
---|
58 | if ($gateway){ |
---|
59 | $url = "http://www.biblegateway.com/versions/index.php?action=getVersionInfo&vid=".$gateway; |
---|
60 | |
---|
61 | } |
---|
62 | else if ($wissen){ |
---|
63 | $url = "http://www.bibelwissenschaft.de/online-bibeln/".$wissen; |
---|
64 | |
---|
65 | } |
---|
66 | |
---|
67 | else if ($unbound){ |
---|
68 | $url = "http://www.unboundbible.org/"; |
---|
69 | |
---|
70 | } |
---|
71 | |
---|
72 | else if($lire){ |
---|
73 | $url = "http://lire.la-bible.net"; |
---|
74 | |
---|
75 | } |
---|
76 | else { |
---|
77 | $url= $traduction['$url']; |
---|
78 | |
---|
79 | } |
---|
80 | |
---|
81 | $texte.= ' {source} : '.$url; |
---|
82 | $texte.='<br />- {valeur du paramètre traduction} : «'.$abrev.'»'; |
---|
83 | $at == true ? $texte.='<br />- {Ancien Testament} : oui ' : $texte.='<br />- {Ancien Testament} : non '; |
---|
84 | $deutero == true ? $texte.='<br />- {Deutérocanoniques} : oui ' : $texte.='<br />- {Deutérocanoniques} : non '; |
---|
85 | $nt == true ? $texte.='<br />- {Nouveau Testament} : oui' : $texte.='<br />- {Nouveau Testament} : non'; |
---|
86 | $domaine_public == true ? $texte.= '<br />- {Domaine Public} : oui <br />' : $texte.= '<br />- {Domaine Public} : non <br />' ; |
---|
87 | } |
---|
88 | |
---|
89 | |
---|
90 | } |
---|
91 | |
---|
92 | |
---|
93 | |
---|
94 | return $texte; |
---|
95 | } ?> |
---|