Вход Регистрация
Файл: sys/inc/random_logos.php
Строк: 16
<?php 
function rand_logos($patch "pic/logos/"

if(!
$dir opendir($patch)) return "Это не директория"
while((
$t readdir($dir)) !== false

$ext substr(strrchr($t,'.'), 1); 
if(
is_file($t) && ($ext == "gif") || ($ext == "jpg") || ($ext == "png")) 

$filename[] = $patch."/".$t



closedir($dir); 
$index rand(0count($filename) - 1); 
$foto "<img src=".$filename[$index].">"
return 
$foto

echo 
rand_logos();
?>
Онлайн: 1
Реклама