Добро пожаловать, Гость!
:: + Добавить ссылку через биллинг
:: + Добавить ссылку анонимно
❤️МИР, ЯРКИХ ЗНАКОМСТВ И ОБЩЕНИЯ!❤️
❤️МИР, ЯРКИХ ЗНАКОМСТВ И ОБЩЕНИЯ!❤️
Кеш - Страница 1
Помощь мастерам | Кеш
socio :
С чем это едят?
Делать то што? ))
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
if ( !$auth->acl_get('a_') )
{
die("NOT admin !");
}
if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of zcache will only run on PHP version 5 or greater!n");
// Version:
$version = '1.0.2';
$cache = './cache';
$noshow = request_var('noshow',0);
$del = request_var('del','');
if(!empty($del))
{
switch ($del)
{
case 1:
{
if($g = glob($cache . '/*.*'))
{
foreach($g as $filename)
{
if($del == 1)
{
if(preg_match("|$cache/.htaccess|i",$filename)) continue;
if(preg_match("|$cache/index.htm|i",$filename)) continue;
if(preg_match("|$cache/queue.php|i",$filename)) continue;
if(preg_match("|$cache/queue.php.lock|i",$filename)) continue;
}
@unlink($filename);
}
}
break;
}
default:
{
if(!preg_match("|/|",$del))
{
@unlink($cache . '/' . $del);
}
break;
}
}
exit("<meta http-equiv='refresh' content='0; url=$_SERVER[PHP_SELF]'>");
}
if(!$noshow)
{
if($g = glob($cache . '/*.*'))
{
@header( 'Content-type: text/html; charset=utf-8' );
echo '<sсript type="text/javasсript">';
echo 'function yesno(){return confirm("Удалить ?");}';
echo '</sсript>';
echo '<font face="monospace"><table width="100%" border="1" cellspacing="0" cellpadding="2">';
echo '<tr>';
echo '<th colspan="4" align="center">Просмотр и очистка кэша phpBB (' . $cache . ')</th>';
echo '</tr>';
echo '<tr>';
echo '<th colspan="4" align="center">';
echo '[<a href="zcache.php">Обновить</a>]';
echo ' ';
echo '[<a href="zcache.php?del=1" onclick="javasсript:return yesno();">Удалить все файлы</a>]';
echo '</th>';
echo '</tr>';
echo '<tr>';
echo '<th width="1%" align="center">N</th>';
echo '<th width="59%" align="left">Файл</th>';
echo '<th width="20%" align="right">Дата/Время</th>';
echo '<th width="20%" align="right">Размер, байт</th>';
echo '</tr>';
$n = 0;
$totalsize = 0;
foreach($g as $filename)
{
if(preg_match("|$cache/.htaccess|i",$filename)) continue;
if(preg_match("|$cache/index.htm|i",$filename)) continue;
if(preg_match("|$cache/queue.php|i",$filename)) continue;
if(preg_match("|$cache/queue.php.lock|i",$filename)) continue;
$n++;
$size = filesize($filename);
$totalsize += $size;
$strsize = str_replace(' ',' ',number_format($size,0,'.',' '));
$file = str_replace($cache . '/','',$filename);
echo '<tr>';
echo '<td width="1%" align="center">' . $n . '</td>';
echo '<td width="59%">' . '<a href="zcache.php?del=' . $file . '" onclick="javasсript:return yesno();">' . $file . '</a></td>';
echo '<td width="20%" align="right">' . date("Y.m.d/H:i:s",fileatime($filename)) . '</td>';
echo '<td width="20%" align="right">' . $strsize . '</td>';
echo '</tr>';
}
$strsize = str_replace(' ',' ',number_format($totalsize,0,'.',' '));
echo '<tr>';
echo '<th width="80%" colspan="3" align="right">Всего</th>';
echo '<th width="20%" align="right">' . $strsize . '</th>';
echo '</tr>';
echo '</table></font>';
echo '<div width="100%" align="right"><small><i>ZCache v.' . $version . ' (C) 2013 <a href="mailto:c61@yandex.ru">c61</a></i></small></div>';
}
}
?>
Кеш
31 Мая 2015С чем это едят?
Делать то што? ))
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
if ( !$auth->acl_get('a_') )
{
die("NOT admin !");
}
if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of zcache will only run on PHP version 5 or greater!n");
// Version:
$version = '1.0.2';
$cache = './cache';
$noshow = request_var('noshow',0);
$del = request_var('del','');
if(!empty($del))
{
switch ($del)
{
case 1:
{
if($g = glob($cache . '/*.*'))
{
foreach($g as $filename)
{
if($del == 1)
{
if(preg_match("|$cache/.htaccess|i",$filename)) continue;
if(preg_match("|$cache/index.htm|i",$filename)) continue;
if(preg_match("|$cache/queue.php|i",$filename)) continue;
if(preg_match("|$cache/queue.php.lock|i",$filename)) continue;
}
@unlink($filename);
}
}
break;
}
default:
{
if(!preg_match("|/|",$del))
{
@unlink($cache . '/' . $del);
}
break;
}
}
exit("<meta http-equiv='refresh' content='0; url=$_SERVER[PHP_SELF]'>");
}
if(!$noshow)
{
if($g = glob($cache . '/*.*'))
{
@header( 'Content-type: text/html; charset=utf-8' );
echo '<sсript type="text/javasсript">';
echo 'function yesno(){return confirm("Удалить ?");}';
echo '</sсript>';
echo '<font face="monospace"><table width="100%" border="1" cellspacing="0" cellpadding="2">';
echo '<tr>';
echo '<th colspan="4" align="center">Просмотр и очистка кэша phpBB (' . $cache . ')</th>';
echo '</tr>';
echo '<tr>';
echo '<th colspan="4" align="center">';
echo '[<a href="zcache.php">Обновить</a>]';
echo ' ';
echo '[<a href="zcache.php?del=1" onclick="javasсript:return yesno();">Удалить все файлы</a>]';
echo '</th>';
echo '</tr>';
echo '<tr>';
echo '<th width="1%" align="center">N</th>';
echo '<th width="59%" align="left">Файл</th>';
echo '<th width="20%" align="right">Дата/Время</th>';
echo '<th width="20%" align="right">Размер, байт</th>';
echo '</tr>';
$n = 0;
$totalsize = 0;
foreach($g as $filename)
{
if(preg_match("|$cache/.htaccess|i",$filename)) continue;
if(preg_match("|$cache/index.htm|i",$filename)) continue;
if(preg_match("|$cache/queue.php|i",$filename)) continue;
if(preg_match("|$cache/queue.php.lock|i",$filename)) continue;
$n++;
$size = filesize($filename);
$totalsize += $size;
$strsize = str_replace(' ',' ',number_format($size,0,'.',' '));
$file = str_replace($cache . '/','',$filename);
echo '<tr>';
echo '<td width="1%" align="center">' . $n . '</td>';
echo '<td width="59%">' . '<a href="zcache.php?del=' . $file . '" onclick="javasсript:return yesno();">' . $file . '</a></td>';
echo '<td width="20%" align="right">' . date("Y.m.d/H:i:s",fileatime($filename)) . '</td>';
echo '<td width="20%" align="right">' . $strsize . '</td>';
echo '</tr>';
}
$strsize = str_replace(' ',' ',number_format($totalsize,0,'.',' '));
echo '<tr>';
echo '<th width="80%" colspan="3" align="right">Всего</th>';
echo '<th width="20%" align="right">' . $strsize . '</th>';
echo '</tr>';
echo '</table></font>';
echo '<div width="100%" align="right"><small><i>ZCache v.' . $version . ' (C) 2013 <a href="mailto:c61@yandex.ru">c61</a></i></small></div>';
}
}
?>
Комментарии: