Размер файла: 4.92Kb
<?php
##****************************************************************************##
## Руками не трогать! ##
## 1:46 12.12.09 ##
## Proton http://wap-svoboda.com ##
##****************************************************************************##
list($generic_msec,$generic_sec)=explode(chr('32'),microtime());
$generic_time=$generic_sec+$generic_msec;
$title='Секс рассказы';
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- wap-svoboda.com -->
<!-- '.date("d.m.Y H:i",time()).' -->
<head>
<title>
'.$title.'
</title>
<style type="text/css">
body { margin: auto; max-width:450px; background-color : #ffffdd; color: #555555; font-family: Century, Georgia, Arial; font-size: 12px;
}
.title { background-image: url(title_index.gif); background-repeat: repeat-x; background-position:0%50%; color:#000000; font-size: 20px; background-color: #ffffdd; padding: 4px 4px 4px; margin-top: 5px; font-family: Mistral, Magneto, Arial;
}
.header { background-image: url(title.gif); background-repeat: repeat-x; color: #886666; font-weight: bold; font-size: 11px; background-color: #ffaa55; border: 1px solid #555500; padding: 4px 4px 4px; margin-top: 2px;
}
.button { color: #0000aa; background-color: #ffffff; padding: 2px; margin-left: 5px;
}
.form_go { color: #0000aa; background-color: #ffffff; padding: 2px; margin-top:3px; margin-left: 5px;
}
textarea { width: 95%; margin-left: 5px;
}
a:link,a:active,a:visited { color: #000000; text-decoration: none;
}
a:hover { text-decoration: none; color: #000033; background-color: #ffffff; border: 1px solid #000055; padding: 1px; position: relative; top: 1px;
}
.row { background-color: #ffffbb; border-bottom: 1px solid #555500; border-left: 1px solid #555500; border-right: 1px solid #555500; padding: 4px 4px 4px;
}
.row_easy { background-color: #ffffcc; border-bottom: 1px solid #557898; border-left: 1px solid #557898; border-right: 1px solid #557898; padding: 1px;
}
.row_hard { background-color: #ffffdd; border-bottom: 1px solid #557898; border-left: 1px solid #557898; border-right: 1px solid #557898; padding: 1px;
}
div.row_hard a { color: #555555; text-decoration: none;
}
div.row_easy a { color: #555555; text-decoration: none;
}
div.header a { color: #993333; text-decoration: underline;
}
</style>
</head>
<body>
<div class="title"><center>'.$title.'</center></div>
<!-- body -->
';
if (empty($_GET['cat'])) {
$file=file('data/index.dat');
echo '<br />
';
for($i=0;$i<count($file);$i++) {
$str=trim($file[$i]);
$arr=explode('||',$str);
$cat=$arr[0];
$name=$arr[1];
$num=$arr[2];
echo '<div class="header"><a href="?cat='.$cat.'">'.$name.'</a> ('.$num.')<br /></div>
';
}
echo '<p>
';
} else {
$cat=$_GET['cat'];
$file=file('data/index.dat');
echo '<br />
';
for($i=0;$i<count($file);$i++) {
$str=trim($file[$i]);
$arr=explode('||',$str);
$name=$arr[1];
if ($cat==$arr[0]) {
echo '<div class="header"><center><b>'.$name.'</b></center></div>
'; break;
}}
$page=@$_GET['page']?$_GET['page']:1;
$file=file('data/'.$cat.'.dat');
$count=count($file);
$end=$page*15;
$start=$end-15;
for ($i=$start; $i<$end; $i++) {
if (!empty($file[$i])) {
$str=trim($file[$i]);
$arr=explode('||',$str);
$link=$arr[0];
$size=$arr[1];
$path_parts=pathinfo($link);
$basename=$path_parts['basename'];
echo '<div class="row"><a href="'.$link.'">'.$basename.'</a> ('.$size.')<br /></div>
';
}}
$page_nav=ceil($count/15);
if ($page<=$page_nav and $page_nav>1) {
echo '<p>
Страницы: ';
$pages=3;
$link=0;
$link2=0;
if ($page>($page_nav-$pages)) {
$link2=$page_nav-$page;
$link2=$pages-$link2;
}
if ($page>($pages+1) and $page_nav>7) {
echo '<a href="?page=1&cat='.$cat.'">1</a> ';
}
if (($page-$pages)>2 and $page_nav>8) {
echo ' ... ';
}
for ($i=(($page-$pages)-$link2); $i<$page; $i++) {
if ($i>0) {
echo '<a href="?page='.$i.'&cat='.$cat.'">'.$i.'</a> ';
$link++;
}}
$link=$pages-$link;
echo '<b>'.$page.'</b> ';
for ($i=($page+1); $i<((($page+$pages)+1)+$link); $i++) {
if ($i<=$page_nav) {
echo '<a href="?page='.$i.'&cat='.$cat.'">'.$i.'</a> ';
}}
if (($page+$pages)<($page_nav-1) and $page_nav>8) {
echo ' ... ';
}
if ($page<($page_nav-$pages) and $page_nav>7) {
echo '<a href="?page='.$page_nav.'&cat='.$cat.'">'.$page_nav.'</a>';
}
echo '<br />
</p>
';
}
echo '<p>
- <a href="index.php">Разделы</a><br />
';
}
list($generic_newmsec,$generic_newsec)=explode(chr('32'),microtime());
echo '- <a href="/">Главная</a><br />
</p>
<!-- // end body -->
© <a href="http://wap-svoboda.com">by Proton</a><br />
'.round((($generic_newsec+$generic_newmsec)-$generic_time),'4').'<br />
</body></html>';
?>