예제 #1
0
function ch_softlinks_all($fvalue, &$ctag, &$refObj, &$row)
{
    global $dsql, $cfg_phpurl;
    $phppath = $cfg_phpurl;
    $dtp = new DedeTagParse();
    $dtp->LoadSource($fvalue);
    if (!is_array($dtp->CTags)) {
        $dtp->Clear();
        return "无链接信息!";
    }
    $tempStr = GetSysTemplets('channel_downlinks.htm');
    $downlinks = '';
    foreach ($dtp->CTags as $ctag) {
        if ($ctag->GetName() == 'link') {
            $link = trim($ctag->GetInnerText());
            $serverName = trim($ctag->GetAtt('text'));
            $islocal = trim($ctag->GetAtt('islocal'));
            //分析本地链接
            if (!isset($firstLink) && $islocal == 1) {
                $firstLink = $link;
            }
            if ($islocal == 1 && $row['islocal'] != 1) {
                continue;
            }
            //支持http,迅雷下载,ftp,flashget
            if (!eregi('^http://|^thunder://|^ftp://|^flashget://', $link)) {
                $link = $GLOBALS['cfg_mainsite'] . $link;
            }
            $downloads = getDownloads($link);
            $uhash = substr(md5($link), 0, 24);
            if ($row['gotojump'] == 1) {
                $link = $phppath . "/download.php?open=2&id={$refObj->ArcID}&uhash={$uhash}";
            }
            $temp = str_replace("~link~", $link, $tempStr);
            $temp = str_replace("~server~", $serverName, $temp);
            $temp = str_replace("~downloads~", $downloads, $temp);
            $downlinks .= $temp;
        }
    }
    $dtp->Clear();
    //获取镜像功能的地址
    //必须设置为:[根据本地地址和服务器列表自动生成] 的情况
    $linkCount = 1;
    if ($row['ismoresite'] == 1 && $row['moresitedo'] == 1 && trim($row['sites']) != '' && isset($firstLink)) {
        $firstLink = eregi_replace("http://([^/]*)/", '/', $firstLink);
        $row['sites'] = ereg_replace("[\r\n]{1,}", "\n", $row['sites']);
        $sites = explode("\n", trim($row['sites']));
        foreach ($sites as $site) {
            if (trim($site) == '') {
                continue;
            }
            list($link, $serverName) = explode('|', $site);
            $link = trim(ereg_replace("/\$", "", $link)) . $firstLink;
            $downloads = getDownloads($link);
            $uhash = substr(md5($link), 0, 24);
            if ($row['gotojump'] == 1) {
                $link = $phppath . "/download.php?open=2&id={$refObj->ArcID}&uhash={$uhash}";
            }
            $temp = str_replace("~link~", $link, $tempStr);
            $temp = str_replace("~server~", $serverName, $temp);
            $temp = str_replace("~downloads~", $downloads, $temp);
            $downlinks .= $temp;
        }
    }
    return $downlinks;
}
예제 #2
0
echo str_pad("PServer-Requests", 20);
echo str_pad("PServer-Unique", 20);
echo "\n";
for ($intYear = 2012; $intYear <= 2014; $intYear++) {
    for ($intMonth = 1; $intMonth <= 12; $intMonth++) {
        $objStartDate->setIntDay(1)->setIntMonth($intMonth)->setIntYear($intYear)->setIntHour(0)->setIntMin(0)->setIntSec(1);
        $objEndDate = clone $objStartDate;
        $objEndDate->setNextDay();
        while ($objEndDate->getIntDay() != 1) {
            $objEndDate->setNextDay();
        }
        $objEndDate->setPreviousDay()->setIntHour(23)->setIntMin(59)->setIntSec(59);
        echo str_pad($objStartDate->getIntMonth() . "/" . $objStartDate->getIntYear(), 10);
        echo str_pad(getHits($objStartDate->getTimeInOldStyle(), $objEndDate->getTimeInOldStyle()), 15, " ", STR_PAD_LEFT);
        echo str_pad(getVisitors($objStartDate->getTimeInOldStyle(), $objEndDate->getTimeInOldStyle()), 15, " ", STR_PAD_LEFT);
        echo str_pad(getDownloads($objStartDate->getTimeInOldStyle(), $objEndDate->getTimeInOldStyle()), 15, " ", STR_PAD_LEFT);
        echo str_pad(getPackageserverRequests($objStartDate->getLongTimestamp(), $objEndDate->getLongTimestamp()), 20, " ", STR_PAD_LEFT);
        echo str_pad(getUniquePackageserverSystems($objStartDate->getLongTimestamp(), $objEndDate->getLongTimestamp()), 20, " ", STR_PAD_LEFT);
        echo "\n";
        flush();
        ob_flush();
    }
}
echo "Total unique installations: \n";
getTotalUniquePackagesererSystems();
function getTotalUniquePackagesererSystems()
{
    $strQuery = "SELECT log_hostname, count(*) AS ANZ\n                FROM " . _dbprefix_ . "packageserver_log\n                GROUP BY log_hostname\n                ORDER BY ANZ DESC   ";
    $intI = 0;
    foreach (class_carrier::getInstance()->getObjDB()->getPArray($strQuery, array()) as $arrOneRow) {
        if (uniStrpos($arrOneRow["log_hostname"], "localhost/") === false && uniStrpos($arrOneRow["log_hostname"], "kajona.de") === false && uniStrpos($arrOneRow["log_hostname"], "kajonabase") === false && uniStrpos($arrOneRow["log_hostname"], "aquarium") === false && uniStrpos($arrOneRow["log_hostname"], "stb400s") === false && $arrOneRow["log_hostname"] != "") {
예제 #3
0
파일: maps.php 프로젝트: nwoki/2s2h-website
?>
</div>

<?php 
$maps_dir = "q3ut4/";
$myDirectory = opendir($maps_dir);
// get each entry
while ($entryName = readdir($myDirectory)) {
    // salvo i link all'ultima versione
    if (!is_dir($entryName)) {
        $maps_Array[] = $entryName;
    }
}
closedir($myDirectory);
sort($maps_Array);
$downloads_count = getDownloads($maps_Array);
echo '
<div align="center">
	<table border="0" cellpadding="5" cellspacing="4" summary="List of maps">
		<THEAD>
			<tr>
				<th scope="col">Map name</th>
				<th scope="col">Dimension</th>
				<th scope="col">Downloads</th>
			</tr>
		<TBODY>
		';
foreach ($maps_Array as $map) {
    echo '<tr><td align="left"><a href="download.php?d=' . $maps_dir . $map . '">' . $map . '</a></td><td align="right">' . linux_size($maps_dir . $map) . '</td><td align="right">' . $downloads_count[$map] . '</td></tr>
			';
}
예제 #4
0
if (is_dir($old_dir)) {
    $myDirectory = opendir($old_dir);
    // get each entry
    while ($entryName = readdir($myDirectory)) {
        // salvo i link delle versioni vecchie
        if (substr($entryName, 0, 1) != ".") {
            $old_Array[] = $entryName;
            $temp[] = $entryName;
        }
    }
    if (($old_indexCount = count($old_Array)) > 0) {
        sort($old_Array);
    }
    closedir($myDirectory);
}
$downloads = getDownloads($temp);
?>
<!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">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="description" content="<?php 
echo $description[$_SESSION["page"]];
?>
" />
    <meta name="keywords" content="server rent, server renting, server hosting, server host, urban terror, urt, urt server hosting, server hosting urt, BanBot, anticheat" />
    <title><?php 
echo $title[$_SESSION["page"]];
?>
</title>
		<script src="js/jquery-1.4.2.min.js" type="text/javascript" ></script>