- use ordered list instead of writing every single number

- made HTML5 conform again
- use tabs for better reading
This commit is contained in:
Andreas Bielawski 2015-02-12 22:35:31 +01:00
parent 3993b856b6
commit 749cc8d2f0
2 changed files with 78 additions and 73 deletions

View File

@ -7,46 +7,46 @@ $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);
$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;
}
}
return $images;
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];
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>
<head>
<meta charset="utf-8" />
<title>Yagyuu</title>
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<head>
<meta charset="utf-8" />
<title>Yagyuu</title>
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<!-- image displays here -->
<div class="pic-center">
<img src="<?php echo $path . $img ?>" alt="" />
</div>
<a href="sources.php">Sources</a> | <a href="yagyuu.zip">Download all pictures</a>
<!-- image displays here -->
<div class="pic-center">
<img src="<?php echo $path . $img ?>" alt="" />
</div>
<a href="sources.php">Sources</a> | <a href="yagyuu.zip">Download all pictures</a>
</body>
</body>
</html>

View File

@ -1,48 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Yagyuu Image Sources</title>
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
01. <a href="http://raikuhoshigami.deviantart.com/art/Loneliness-339941563">0caa24d8659e6effa5d6550d2b95bc66-d5me4l7.png</a><br />
02. <a href="http://kyuubiconduit.deviantart.com/art/YagyuuSIG-378584533">1f6d73b8fccd71990fe56d91ac658ea0-d69edp1.jpg</a><br />
03. <a href="http://myfigurecollection.net/item/153077">153077.jpg</a><br />
04. <a href="http://myanimelist.net/character/67553/Yagyuu">192957.jpg</a><br />
05. <a href="http://www.gamezone.de/Senran-Kagura-3DS-236978/News/Senran-Kagura-Sexy-Maedels-Pruegeleien-und-Brustgroessen-982240/galerie/1944492/977620/">1838486-senran_kagura_yagyu.jpg</a><br />
06. <a href="http://s1007.photobucket.com/user/JunoTheTrap/media/Senran%20Kagura/1841028-a5dbed63e119fe8d257ddfc1bb9d5fd1.jpg.html">1841028-a5dbed63e119fe8d257ddfc1bb9d5fd1.jpg</a><br />
07. <a href="http://www.giantbomb.com/images/1300-1841029">1841029-d5ec77975b6c5894dd40c0b2b445bc5c.jpg</a><br />
08. <a href="http://hank88.deviantart.com/art/Big-Yagyuu-in-the-city-495666865">big_yagyuu_in_the_city_by_hank88-d873v01.jpg</a><br />
09. <a href="http://hank88.deviantart.com/art/Calling-Yagyuu-s-attention-457257695">calling_yagyuu_s_attention_by_hank88-d7k8man.jpg</a><br />
10. <a href="http://kyuubiconduit.deviantart.com/art/YagyuuAV-378584534">fcc64a0658894908495dbe91c5725018-d69edp2.jpg</a><br />
11. <a href="http://kittyskie.deviantart.com/art/MMD-Yagyuu-from-Senran-Kagura-282020534">mmd___yagyuu_from_senran_kagura_by_kittyskie-d4nwofq.jpg</a><br />
12. <a href="http://darth7.deviantart.com/art/Senran-Kagura-Yagyuu-489312677">senran_kagura___yagyuu_by_darth7-d83bo2t.png</a><br />
13. <a href="http://tiramisutwo.deviantart.com/art/Senran-Kagura-Yagyuu-267174903">senran_kagura_yagyuu_by_tiramisutwo-d4f2hh3.png</a><br />
14. <a href="https://avvesione.files.wordpress.com/2013/03/senran_kagura-09-yagyuu-hanzou_academy-ninja-shinobi-eye_patch-shuriken_hair_ornaments-school_girl.jpg">senran_kagura-09-yagyuu-hanzou_academy-ninja-shinobi-eye_patch-shuriken_hair_ornaments-school_girl.jpg</a><br />
15. <a href="http://www.zerochan.net/654612">Yagyuu.(Senran.Kagura).full.1063534.jpg</a><br />
16. <a href="http://www.zerochan.net/790920">Yagyuu.(Senran.Kagura).full.1150045.jpg</a><br />
17. <a href="http://www.zerochan.net/806449">Yagyuu.(Senran.Kagura).full.1262101.jpg</a><br />
18. <a href="http://www.zerochan.net/1063534">Yagyuu.(Senran.Kagura).full.1305714.jpg</a><br />
19. <a href="http://www.zerochan.net/1150045">Yagyuu.(Senran.Kagura).full.1414180.jpg</a><br />
20. <a href="http://www.zerochan.net/1262101">Yagyuu.(Senran.Kagura).full.1418521.jpg</a><br />
21. <a href="http://www.zerochan.net/1305714">Yagyuu.(Senran.Kagura).full.1539208.jpg</a><br />
22. <a href="http://www.zerochan.net/1414180">Yagyuu.(Senran.Kagura).full.1563695.jpg</a><br />
23. <a href="http://www.zerochan.net/1418521">Yagyuu.(Senran.Kagura).full.1573814.jpg</a><br />
24. <a href="http://www.zerochan.net/1539208">Yagyuu.(Senran.Kagura).full.1605325.jpg</a><br />
25. <a href="http://www.zerochan.net/1563695">Yagyuu.(Senran.Kagura).full.654612.jpg</a><br />
26. <a href="http://www.zerochan.net/1573814">Yagyuu.(Senran.Kagura).full.790920.jpg</a><br />
27. <a href="http://www.zerochan.net/1605325">Yagyuu.(Senran.Kagura).full.806449.jpg</a><br />
28. <a href="http://angel2sky.deviantart.com/art/Yagyuu-Senran-Kagura-full-1063534-354665213">yagyuu__senran_kagura__full_1063534_by_angel2sky-d5v5pfh.jpg</a><br />
29. <a href="http://0cookie0.deviantart.com/art/Yagyuu-392364880">yagyuu_by_0cookie0-d6hlqog.png</a><br />
30. <a href="http://0cookie0.deviantart.com/art/Yagyuu-434185536">yagyuu_by_0cookie0-d76i3pc.png</a><br />
31. <a href="http://keiichim.deviantart.com/art/Yagyuu-356458386">yagyuu_by_keiichim-d5w851u.png</a><br />
32. <a href="http://selgadis.deviantart.com/art/Yagyuu-213089293">yagyuu_by_selgadis-d3iv8r1.jpg</a><br />
33. <a href="http://utsuhofanboy24000.deviantart.com/art/Yagyuu-438938651">yagyuu_by_utsuhofanboy24000-d79bz8b.jpg</a><br />
34. <a href="http://vocaloidfan113.deviantart.com/art/Yagyuu-301102397">yagyuu_by_vocaloidfan113-d4z9o3h.jpg</a><br />
35. <a href="http://raidramon0.deviantart.com/art/Yagyuu-Morphed-470707003">yagyuu_morphed_by_raidramon0-d7s8vuj.jpg</a><br />
36. <a href="http://axelcre.deviantart.com/art/Yagyuu-Yagyu-441579004">yagyuu_yagyu__by_axelcre-d7awkjg.png</a><br />
...
</body>
</html>
<head>
<meta charset="utf-8" />
<title>Yagyuu Image Sources</title>
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<ol>
<li><a href="http://raikuhoshigami.deviantart.com/art/Loneliness-339941563">0caa24d8659e6effa5d6550d2b95bc66-d5me4l7.png</a></li>
<li><a href="http://kyuubiconduit.deviantart.com/art/YagyuuSIG-378584533">1f6d73b8fccd71990fe56d91ac658ea0-d69edp1.jpg</a></li>
<li><a href="http://myfigurecollection.net/item/153077">153077.jpg</a></li>
<li><a href="http://myanimelist.net/character/67553/Yagyuu">192957.jpg</a></li>
<li><a href="http://www.gamezone.de/Senran-Kagura-3DS-236978/News/Senran-Kagura-Sexy-Maedels-Pruegeleien-und-Brustgroessen-982240/galerie/1944492/977620/">1838486-senran_kagura_yagyu.jpg</a></li>
<li><a href="http://s1007.photobucket.com/user/JunoTheTrap/media/Senran%20Kagura/1841028-a5dbed63e119fe8d257ddfc1bb9d5fd1.jpg.html">1841028-a5dbed63e119fe8d257ddfc1bb9d5fd1.jpg</a></li>
<li><a href="http://www.giantbomb.com/images/1300-1841029">1841029-d5ec77975b6c5894dd40c0b2b445bc5c.jpg</a></li>
<li><a href="http://hank88.deviantart.com/art/Big-Yagyuu-in-the-city-495666865">big_yagyuu_in_the_city_by_hank88-d873v01.jpg</a></li>
<li><a href="http://hank88.deviantart.com/art/Calling-Yagyuu-s-attention-457257695">calling_yagyuu_s_attention_by_hank88-d7k8man.jpg</a></li>
<li><a href="http://kyuubiconduit.deviantart.com/art/YagyuuAV-378584534">fcc64a0658894908495dbe91c5725018-d69edp2.jpg</a></li>
<li><a href="http://kittyskie.deviantart.com/art/MMD-Yagyuu-from-Senran-Kagura-282020534">mmd___yagyuu_from_senran_kagura_by_kittyskie-d4nwofq.jpg</a></li>
<li><a href="http://darth7.deviantart.com/art/Senran-Kagura-Yagyuu-489312677">senran_kagura___yagyuu_by_darth7-d83bo2t.png</a></li>
<li><a href="http://tiramisutwo.deviantart.com/art/Senran-Kagura-Yagyuu-267174903">senran_kagura_yagyuu_by_tiramisutwo-d4f2hh3.png</a></li>
<li><a href="https://avvesione.files.wordpress.com/2013/03/senran_kagura-09-yagyuu-hanzou_academy-ninja-shinobi-eye_patch-shuriken_hair_ornaments-school_girl.jpg">senran_kagura-09-yagyuu-hanzou_academy-ninja-shinobi-eye_patch-shuriken_hair_ornaments-school_girl.jpg</a></li>
<li><a href="http://www.zerochan.net/654612">Yagyuu.(Senran.Kagura).full.1063534.jpg</a></li>
<li><a href="http://www.zerochan.net/790920">Yagyuu.(Senran.Kagura).full.1150045.jpg</a></li>
<li><a href="http://www.zerochan.net/806449">Yagyuu.(Senran.Kagura).full.1262101.jpg</a></li>
<li><a href="http://www.zerochan.net/1063534">Yagyuu.(Senran.Kagura).full.1305714.jpg</a></li>
<li><a href="http://www.zerochan.net/1150045">Yagyuu.(Senran.Kagura).full.1414180.jpg</a></li>
<li><a href="http://www.zerochan.net/1262101">Yagyuu.(Senran.Kagura).full.1418521.jpg</a></li>
<li><a href="http://www.zerochan.net/1305714">Yagyuu.(Senran.Kagura).full.1539208.jpg</a></li>
<li><a href="http://www.zerochan.net/1414180">Yagyuu.(Senran.Kagura).full.1563695.jpg</a></li>
<li><a href="http://www.zerochan.net/1418521">Yagyuu.(Senran.Kagura).full.1573814.jpg</a></li>
<li><a href="http://www.zerochan.net/1539208">Yagyuu.(Senran.Kagura).full.1605325.jpg</a></li>
<li><a href="http://www.zerochan.net/1563695">Yagyuu.(Senran.Kagura).full.654612.jpg</a></li>
<li><a href="http://www.zerochan.net/1573814">Yagyuu.(Senran.Kagura).full.790920.jpg</a></li>
<li><a href="http://www.zerochan.net/1605325">Yagyuu.(Senran.Kagura).full.806449.jpg</a></li>
<li><a href="http://angel2sky.deviantart.com/art/Yagyuu-Senran-Kagura-full-1063534-354665213">yagyuu__senran_kagura__full_1063534_by_angel2sky-d5v5pfh.jpg</a></li>
<li><a href="http://0cookie0.deviantart.com/art/Yagyuu-392364880">yagyuu_by_0cookie0-d6hlqog.png</a></li>
<li><a href="http://0cookie0.deviantart.com/art/Yagyuu-434185536">yagyuu_by_0cookie0-d76i3pc.png</a></li>
<li><a href="http://keiichim.deviantart.com/art/Yagyuu-356458386">yagyuu_by_keiichim-d5w851u.png</a></li>
<li><a href="http://selgadis.deviantart.com/art/Yagyuu-213089293">yagyuu_by_selgadis-d3iv8r1.jpg</a></li>
<li><a href="http://utsuhofanboy24000.deviantart.com/art/Yagyuu-438938651">yagyuu_by_utsuhofanboy24000-d79bz8b.jpg</a></li>
<li><a href="http://vocaloidfan113.deviantart.com/art/Yagyuu-301102397">yagyuu_by_vocaloidfan113-d4z9o3h.jpg</a></li>
<li><a href="http://raidramon0.deviantart.com/art/Yagyuu-Morphed-470707003">yagyuu_morphed_by_raidramon0-d7s8vuj.jpg</a></li>
<li><a href="http://axelcre.deviantart.com/art/Yagyuu-Yagyu-441579004">yagyuu_yagyu__by_axelcre-d7awkjg.png</a></li>
</ol>
<p>...</p>
</body>
</html>