Initial commit
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.db
|
2
README.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Riko.moe
|
||||||
|
Source code of [Riko.moe](http://riko.moe/)
|
BIN
favicon.ico
Normal file
After Width: | Height: | Size: 361 KiB |
BIN
images/26705.jpg
Normal file
After Width: | Height: | Size: 155 KiB |
BIN
images/3369691647_41165d2ce5.jpg
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
images/573485-riko_suminoe__profile_portrait__large.png
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
images/6343259033_35bdb68f68.jpg
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
images/Suminoe.Riko.full.239425.jpg
Normal file
After Width: | Height: | Size: 265 KiB |
BIN
images/cb4f20a6ae59ac058fd07d647b79ecc7d2308c48.png
Normal file
After Width: | Height: | Size: 213 KiB |
BIN
images/dc2c23a0d2f26.jpg
Normal file
After Width: | Height: | Size: 141 KiB |
BIN
images/kissxsis_01.jpg
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
images/riko.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
images/tumblr_n47jqpdOCi1smmytpo1_400.gif
Normal file
After Width: | Height: | Size: 973 KiB |
52
index.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?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>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Riko</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
<link rel="shortcut icon" href="favicon.ico" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="text-center"><p style="font-size:xx-large;">Press F5 for another pic!</p></div>
|
||||||
|
<!-- image displays here -->
|
||||||
|
<div class="pic-center">
|
||||||
|
<img src="<?php echo $path . $img ?>" alt="" />
|
||||||
|
</div>
|
||||||
|
<a href="sources.php">Sources</a> | <a href="riko.zip">Download all pictures</a>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
27
sources.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Riko Image Sources</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
<link rel="shortcut icon" href="favicon.ico" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li><a href="http://www.nyusu.fm/es/ranking/2443/ako-vs-riko">26705.jpg</a></li>
|
||||||
|
<li><a href="http://www.forumla.de/f-anime-manga-221/t-bewerte-den-anime-charakter-ueber-dir-206388/page16#post4316715">3369691647_41165d2ce5.jpg</a></li>
|
||||||
|
<li><a href="http://www.animevice.com/riko-suminoe/18-18154/forums/">573485-riko_suminoe__profile_portrait__large.png</a></li>
|
||||||
|
<li><a href="http://myanimelist.net/forum/?topicid=480369&show=180#msg20323187">6343259033_35bdb68f68.jpg</a></li>
|
||||||
|
<li><a href="https://hoshifluff.wordpress.com/2011/07/18/monday-suminoe-riko/">cb4f20a6ae59ac058fd07d647b79ecc7d2308c48.png</a></li>
|
||||||
|
<li><a href="http://www.fairy-tail-pbf.pun.pl/viewtopic.php?pid=9077#p9077">dc2c23a0d2f26.jpg</a></li>
|
||||||
|
<li><a href="http://www.emptyblue.it/image.aspx?alt=KissXSis&url=http://www.emptyblue.it/data/wallpaper/KissXSis/kissxsis_01.jpg&dummy=1">kissxsis_01.jpg</a></li>
|
||||||
|
<li><a href="https://thebutterflyboy.wordpress.com/2011/08/31/kiss-x-sis/">riko.jpg</a></li>
|
||||||
|
<li><a href="http://www.zerochan.net/239425">Suminoe.Riko.full.239425.jpg</a></li>
|
||||||
|
<li><a href="http://wifflegif.com/gifs/515729-riko-suminoe-kiss-x-sis-gif">tumblr_n47jqpdOCi1smmytpo1_400.gif</a></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>... <a href="http://riko.moe/">Back</a></p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
12
style.css
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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; }
|
||||||
|
|
||||||
|
.pic-center { text-align: center; }
|
||||||
|
.text-center {text-align: center;}
|