Частый гость
Покинул форум
Сообщений всего: 156
Дата рег-ции: Май 2007
Откуда: Город Святого Петра
Помог: 0 раз(а)
[+]
|
PHP:
скопировать код в буфер обмена
function derdir($dir,$mar){ $type['.avi']='video'; $type['.flv']='video'; $type['.mp3']='audio'; $type['.jpg']='img'; $type['.png']='img'; $type['.exe']='exe'; $type['.txt']='txt'; $type['.iso']='iso'; $type['.zip']='zip'; $type['.rar']='zip'; $type['.php']='php'; $type['.PHP']='php'; $type['']='error'; $type['.html']='html'; $type['.css']='css'; $mar=$mar+10; if($dirs!='..' && $dirs!='.'){ echo("<img style='cursor:pointer;' src='ico/dir1.png' hspace='5' width='25 px' OnClick=ak('".$id."')><a href='".$dir."/".$dirs."'>".$dirs."</a> <div id=".$id." style='display:none; margin-top:7px;margin-bpttom:7px; margin-left:".$mar."px'>"); } else{ echo("<div><img style='cursor:pointer;' src='ico/".$type[$fil]."' hspace='5' width='25 px'><a href='".$dir."/".$dirs."'>".$dirs."</a></div>");} derdir($dir."/".$dirs,$mar);} } } echo("</div><br />"); } derdir('.',1); ?>
CODE ( javascript):
скопировать код в буфер обмена
<script type="text/javascript"> num=0; function ak(na){ st=document.getElementById(na).style.display; if(st=='none'){ document.getElementById(na).style.display='block'} else{ document.getElementById(na).style.display='none';} } </script>
|