' . $categoryName . '
Tags: define('_LOVE_HUYEN', 'forever');
include'..;
include'..;
$rootDir = dirname(__FILE__);
$listDir = array(
'girl-xinh',
'girl-xinh-bikini'
);
$page = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
$requestUri = trim$_SERVER['REQUEST_URI'],';
$parseRequest = explode';
if (isset($parseRequest[2]) && preg_match0\.(html|htm|xhtml)$#i', $parseRequest[2], $match))
{
$page = abs(intval($match[1]));
}
$start = $page * 5 - 5;
Template::pageHeader();
if (isset($parseRequest[1]) && in_array($parseRequest[1], $listDir))
{
$fileCache = $rootDir . '/cache_' . $parseRequest[1] . '.lovehuyen';
if (file_exists($fileCache))
{
$cachePicture = file($fileCache);
}
else
{
$dirPath = $rootDir . '/' . $parseRequest[1];
$cachePicture = array();
$dataDir = opendir($dirPath);
$i = 0;
while ($picture = readdir($dataDir))
{
if (preg_match('#\.(jpg|png|gif|jpge)$#i', $picture))
{
$cachePicture[$i] = $picture;
++$i;
}
}
closedir($dataDir);
file_put_contents($fileCache, implode("\n", $cachePicture));
}
$end = sizeof($cachePicture) > $page * 5 ? $page * 5 : sizeof($cachePicture);
$categoryName = ucwords0);
echo '
' . $categoryName . '
';
for 0
{
echo '
';
}
echo '
';
}
else
{
echo '
Picture
';
}
Template::displayPage