Initial commit
|
@ -0,0 +1 @@
|
|||
*.db
|
After Width: | Height: | Size: 4.7 MiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 906 KiB |
After Width: | Height: | Size: 282 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 304 KiB |
After Width: | Height: | Size: 211 KiB |
After Width: | Height: | Size: 707 KiB |
After Width: | Height: | Size: 381 KiB |
After Width: | Height: | Size: 410 KiB |
After Width: | Height: | Size: 223 KiB |
After Width: | Height: | Size: 624 KiB |
After Width: | Height: | Size: 818 KiB |
After Width: | Height: | Size: 526 KiB |
After Width: | Height: | Size: 5.9 MiB |
After Width: | Height: | Size: 906 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 416 KiB |
After Width: | Height: | Size: 2.8 MiB |
After Width: | Height: | Size: 571 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 306 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 602 KiB |
After Width: | Height: | Size: 892 KiB |
After Width: | Height: | Size: 304 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 706 KiB |
After Width: | Height: | Size: 715 KiB |
After Width: | Height: | Size: 162 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 185 KiB |
After Width: | Height: | Size: 792 KiB |
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
// Indicate the location of your images
|
||||
$root = '';
|
||||
// use if specifying path from root
|
||||
//$root = $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
$path = 'images/';
|
||||
|
||||
function getImagesFromDir($path) {
|
||||
$images = array();
|
||||
if ( $img_dir = @opendir($path) ) {
|
||||
while ( false !== ($img_file = readdir($img_dir)) ) {
|
||||
// checks for gif, jpg, png and jpeg
|
||||
if ( preg_match("/(\.gif|\.jpg|\.png\.jpeg)$/", $img_file) ) {
|
||||
$images[] = $img_file;
|
||||
}
|
||||
}
|
||||
closedir($img_dir);
|
||||
}
|
||||
return $images;
|
||||
}
|
||||
|
||||
function getRandomFromArray($ar) {
|
||||
mt_srand( (double)microtime() * 1000000 ); // php 4.2+ not needed
|
||||
$num = array_rand($ar);
|
||||
return $ar[$num];
|
||||
}
|
||||
|
||||
|
||||
// Obtain list of images from directory
|
||||
$imgList = getImagesFromDir($root . $path);
|
||||
|
||||
$img = getRandomFromArray($imgList);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Yagyuu</title>
|
||||
<style type="text/css">
|
||||
body { font: 14px/1.3 verdana, arial, helvetica, sans-serif; }
|
||||
h1 { font-size:1.3em; }
|
||||
h2 { font-size:1.2em; }
|
||||
a:link { color:#33c; }
|
||||
a:visited { color:#339; }
|
||||
p { max-width: 60em; }
|
||||
|
||||
/* so linked image won't have border */
|
||||
a img { border:none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<center>
|
||||
<!-- image displays here -->
|
||||
<div><img src="<?php echo $path . $img ?>" alt="" /></div>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|