Initial commit

This commit is contained in:
Akamaru 2015-02-28 21:48:37 +01:00
parent 86f2d0ec76
commit 5fd8ae6266
17 changed files with 94 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.db

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# Riko.moe
Source code of [Riko.moe](http://riko.moe/)

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

BIN
images/26705.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

BIN
images/dc2c23a0d2f26.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

BIN
images/kissxsis_01.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

BIN
images/riko.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

52
index.php Normal file
View 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>

BIN
riko.zip Normal file

Binary file not shown.

27
sources.php Normal file
View 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
View 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;}