[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: как меня сделать кэширование для это страница
saddam123
у меня страница
/***************************************************** 
Dynamic status.php file Modified
EXPANDABLE VERSION!
1st Modified
******************************************************/

function sanitize ($input)
{
if (is_array ($input))
{
foreach ($input as $k => $i)
{
$output[$k] = sanitize ($i);
}
}

else
{
$output = mysql_real_escape_string ($input);
}

return $output;
}

function get_host ($hostid)
{
global $mcon;
$host = array ();
if(count($mcon[$hostid])>1)
{
$host['name'] = $mcon[$hostid][1];
$host['file'] = $mcon[$hostid][2];
$host_names['file'] = $mcon[$hostid][3];
}
return $host;
}
require 'includes/db.inc.php';
require 'includes/configs.inc.php';
require 'includes/mconfig.php';
$_GET = sanitize ($_GET);
$file_id = $_GET['uid'];
$data = mysql_query("SELECT name,size, hits, UNIX_TIMESTAMP(dtime) as dtime FROM file WHERE uid = '$file_id'") or die(mysql_error());
$file_info = mysql_fetch_array($data);
$file_name = $file_info['name'];
//mysql_free_result($data);

if (!($data = mysql_query ('' . 'SELECT hostid, url180, hits, status FROM mirrorfile WHERE uid = \'' . $file_id . '\'')))
{
exit (mysql_error ());
}
echo '
<div class="downloadarea downlinks" style=" margin-left:20px;">
<div class="heading1 links"> </div>
<table align="center" cellpadding="9" cellspacing="0" width="860">
<tr>
<th>Host</th>
<th>Download Link</th>
<th>Hits</th>
<th>Status</th>
</tr>'
;
while ($mirror_info = mysql_fetch_array ($data))
{
$host = get_host ($mirror_info['hostid']);
$hostfile = $host['file'];
$stat = $mirror_info['status'];
if ($mirror_info['status'] == 0)
{
$status = 'Upload';
}
else
{
if ($mirror_info['status'] == 1)
{
//$status = 'Retry';
//exec ('' . $php_path . ' -c ' . $config_ini . ' ' . $hostfile . ' ' . $file_id . ' ' . $stat . ' >/dev/null &');

}
else
{
if ($mirror_info['status'] == 2)
{
$status = 'Failed';
}
else
{
if ($mirror_info['status'] == 3)
{
$status = 'Success';
}
}
}
}

$host_name= "".$host['name']."";
echo '<tr>

<td class="host"><img src=/imagesdo/'
. $host['name'] . '.gif </img><br/><span style="display: none;position: absolute;">Click the button on the right side to <br/>download'.strtoupper(substr($file_name, 0, 40)).'<br/> from '.$host_name.'</span></td>';
if ($stat == 3)


{
if ($direct_url == '1')
{
echo '<td class="host"><a href=/redirect/' . $file_id . '/' . $mirror_info['hostid'] . ' target=_blank><img src=/images/click.png border=\'0\' /></a></td>';
}
else
{
echo '<td class="host"><a href=/redirect.php?uid=' . $file_id . '/' . $mirror_info['hostid'] . ' target=_blank><img src=/images/click.png border=\'0\' /></a></td>';
}
}

else
{
echo '<td class="host"><img src=/images/na.gif /></td>';
}
echo '<td class="host">' . $mirror_info['hits'] . '</td>
<td><img src=/images/'
. $status . '.gif /></td>
</tr></div>'
;}
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.