Wiki Van Bloem

Ceci est une ancienne révision du document !


<php> require_once(DOKU_INC.'inc/search.php');

  global $conf;
  global $ID;
  $dir = $conf['datadir'];
  $ns  = cleanID($ns);
  #fixme use appropriate function
  if(empty($ns)){
      $ns = dirname(str_replace(':','/',$ID));
      if($ns == '.') $ns ='';
  }
  $ns  = utf8_encodeFN(str_replace(':','/',$ns));

echo '

';

$data = array();

  search($data,$conf['datadir'],'search_index',array('ns' => $ns));
  echo html_buildlist($data,'idx','html_list_index','html_li_index');

echo '&nbsp;

';

function search2(&$data,$base,$func,$opts,$dir=,$lvl=1){ $n=0; $dirs = array(); $files = array(); read in directories and files $dh = @opendir($base.'/'.$dir); if(!$dh) return; while1) !== false){ if(preg_match('/^[\._]/',$file)) continue; skip hidden files and upper dirs if(is_dir($base.'/'.$dir.'/'.$file)){ $dirs[] = $dir.'/'.$file; $tony = $tony.'liste['.$n.']=“'.$file.'”;'; $n=$n+1; continue; } $files[] = $dir.'/'.$file; } closedir($dh); sort($files); sort($dirs); return $tony; } echo '<script>'; echo 'var liste = new Array();</script>'; $tony=search2($data,$conf['datadir'],'search_index',array('ns' ⇒ $ns)); echo '<script>'.$tony.'</script>'; </php> <html> <body onload=“”> <form class=“button btn_create” method=“post” action=“/doku.php?do=index” name=tony> <style> .ap {font-family:tahoma;font-size:12px} .b {font-family:tahoma;font-size:12px;width:150;background: #e0e0e0;; } .tony {font-family:tahoma;font-size:12px;background: #ffffff;;font-weight:bold;color: #000080 } TD {font-family:tahoma;font-size:12px;background: #ffffff;text-align:left;font-weight:bold;color: #000080 } .TD2 {font-family:tahoma;font-size:14px;background: #e0e0e0;;font-weight:bold;color: #000080 } .tony2 {font-family:tahoma;font-size:12px;background: #ffffff;;font-weight:bold;color: #000080 } .tony3 {font-family:tahoma;font-size:8px;background: #ffffff;;font-weight:bold;color: #000080 } .tony3_2 {font-family:tahoma;font-size:8px;background: #000080;;font-weight:bold;color: #e0e0e0 } .c {font-family:tahoma;font-size:10px;background: #87CEFA;;font-weight:bold;color: #000080 } input {font-family:tahoma;font-size:12px;} textarea {font-family:tahoma;font-size:12px;} select {font-family:tahoma;font-size:12px;} A:link {font-family: tahoma, arial, geneva, sans-serif; font-size: 12px; text-decoration: underline; color: #0088bb} A:visited {font-family: tahoma, arial, geneva, sans-serif; font-size: 12px; text-decoration: underline; color: #0088bb} A:hover {font-family: tahoma, arial, geneva, sans-serif; font-size: 12px; text-decoration: none; color: #008000;} </style> <center>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </center> <b>Index</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>Créer une nouvelle page</b> <br> <br>

<style> TD {background: #dfd} </style> <script> function code(an) { liste.sort() a=

      a=a+'<center><div style="width:950px;background: #dfd;border: 0px solid #9d9;">'
a=a+'<table border=0 cellspacing=2 cellpadding=2 style="background: #dfd;"><tr><td colspan=3>&nbsp;</td></tr>'
a=a+'<tr><td rowspan=4 width=20px>&nbsp;</td><td>'
a=a+'Choix de la catégorie</td><td><select id="sel" class="edit" name=sel onfocus=this.select size=8>'
for(var i=0;i<liste.length;i++)
{
	if(liste[i]!='wiki' && liste[i] !='playground' && liste[i]!='Wiki' && liste[i] !='Playground')
	{
		a=a+'<option value="'+liste[i]+'" '
		if((i==0 &&  an =='') || (liste[i]==an && an !=''))
                      {a=a+'selected'}

a=a+'>'+liste[i]+'</option>'

	}
}

a=a+'</select></td></tr>'

a=a+'<tr><td>Titre de la page</td><td><input type=text size=100 id="taixt" name="taixt"  class="edit" onfocus="this.select()" value="">'
a=a+'&nbsp;&nbsp;<input type=button value="Créer cette page" class="button" accesskey="e" title="Créer cette page [E]"  onclick="lance()" /></td></tr>'
a=a+'<tr><td height=20px>&nbsp;</td></tr>'
a=a+'<tr><td>Ajouter une nouvelle catégorie&nbsp;&nbsp;</td><td><input type=text size=40 id="ajout" name="ajout"  class="edit" value="">'
a=a+'&nbsp;&nbsp;<input type=button value="Ajouter une nouvelle catégorie" class="button" onclick="aj()"></td></tr>'
a=a+'</table></div></center>'

document.getElementById('maliste').innerHTML=a

if(an !=) {document.getElementById('taixt').focus()} } code() document.getElementById('sel').focus() function aj() {if(document.tony.ajout.value==)return false; var an=liste.length var chaine=document.tony.ajout.value var chaine1= chaine.substring(0,1) var chaine2= chaine.substring(1) chaine= chaine1.toUpperCase()+ chaine2.toLowerCase() document.tony.ajout.value=chaine liste[an]=document.tony.ajout.value document.tony.ajout.value=“” code(liste[an]) } function Remplacer(a) { var a, tmp; tmp = “”; for(var i = 0; i < a.length; i++) {tmp = tmp + a.charAt(i); if (a.charAt(i) == “:”) { tmp = tmp.replace(“:”,“ _ ”); } } a = tmp; return a; } </script> <input type=“hidden” name=“do” value=“edit” /> <input type=“hidden” name=“rev” value=“” /> <input type=“hidden” name=“id” value=“” /> <script> function lance() {if(document.tony.taixt.value==) {alert('Il faut saisir le titre de la page') return false;} document.tony.taixt.value=Remplacer(document.tony.taixt.value) document.getElementById('qsearch__in').value=document.getElementById('sel').options[document.getElementById('sel').selectedIndex].value+“:”+document.tony.taixt.value document.tony.id.value=document.getElementById('sel').options[document.getElementById('sel').selectedIndex].value+“:”+document.tony.taixt.value document.tony.submit()

} </script>

<script>

k2000text = “”; k2000pos = 0; k2000increment = 1;

k2000text='- Bienvenue sur le wiki -'

function k2000effet()

{

k2000aff = “”

for(k2000a=0;k2000a<k2000text.length;k2000a++)
	{
	k2000lettre = k2000text.charAt(k2000a);
	if(k2000a == k2000pos || k2000a == (k2000pos+k2000increment))
		k2000aff += "<FONT COLOR=#0000ef face=tahoma size=5><b>"+k2000lettre+"</b></FONT>";
	else
		k2000aff += "<FONT COLOR=black  face=tahoma size=6><b>"+k2000lettre+"</b></FONT>";;
	}
document.getElementById("k2000").innerHTML = k2000aff;
if(k2000pos == k2000text.length)
	k2000increment = -1;
if(k2000pos == 0 && k2000increment== -1)
	k2000increment = 1;
k2000pos = k2000pos+k2000increment;
timer = setTimeout("k2000effet()",200)

}

</script>

<script> k2000effet() </script>

<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<b>Liens utiles</b> </form>

</body> </html>

<note tip> Syntaxe du Wiki
Documentation sur le Wiki
</note>

1)
$file = readdir($dh
start.1695717537.txt.gz · Dernière modification : de vanbloem