コード例 #1
0
ファイル: functions.php プロジェクト: nickyschlobs/atlas
function DISPLAY_show_torrent($torrent)
{
    if (!($link = db_init(true))) {
        break;
    }
    $result = mysqli_query($link, 'SELECT * FROM `users` WHERE `id`=' . mysqli_real_escape_string($link, $torrent['uploader']) . ';');
    $uploader = @mysqli_fetch_all($result, MYSQLI_ASSOC)[0];
    $uploader = is_array($uploader) ? $uploader['username'] : '******';
    mysqli_free_result($result);
    mysqli_close($link);
    unset($link);
    echo '<tr>';
    echo '<td><a href="info.php?id=' . $torrent['id'] . '"><b>' . $torrent['torrentname'] . '</b></a></td>';
    echo '<td><a href="user.php?id=' . $torrent['uploader'] . '"><i>' . $uploader . '</a></i></td>';
    echo '<td>' . getHumanDate(new DateTime($torrent['created']), new DateTime(date('Y-n-d H:i:s', time()))) . '</td>';
    echo '<td>' . getHumanFilesize(getTorrent(unserialize(_CONFIG)['torrents']['dir'] . DIRECTORY_SEPARATOR . $torrent['filename'] . '.torrent')->size()) . '</td>';
    echo '<td>' . $torrent['downloads'] . '</td>';
    echo '<td><font color="green">TBD</font></td>';
    echo '<td><font color="blue">TBD</font></td>';
    echo '</tr>';
}
コード例 #2
0
ファイル: utilities.php プロジェクト: nickyschlobs/atlas
                if (!($link = db_init(false))) {
                    dead(mysqli_error($link));
                }
                $result = mysqli_query($link, 'SELECT * FROM `meta`;');
                $meta = @mysqli_fetch_all($result, MYSQLI_ASSOC)[0];
                mysqli_free_result($result);
                mysqli_close($link);
                unset($link);
                ?>
            <h6>Server statistics</h6>
			<br>
			<div align="center">
			<?php 
                echo 'Atlas ' . INFO_ATLAS_VERSION . '-' . INFO_ATLAS_STAGE . '<br>' . PHP_EOL;
                echo 'Built ' . INFO_ATLAS_BUILDDATE . '<br>' . PHP_EOL;
                echo 'Installed ' . getHumanDate(new DateTime($meta['installed']), new DateTime(date('Y-n-d H:i:s', time()))) . '<br>' . PHP_EOL;
                ?>
                <br>
			</div>
                <?php 
                break;
        }
    } else {
        echo '<ul class="collection">';
        foreach ($ACCEPTED_ACTIONS as $action => $translation) {
            echo '<a href="' . basename(__FILE__) . '?action=' . $action . '"' . (strpos($action, 'export') !== false ? 'target="_blank"' : '') . '>';
            echo '<li class="collection-item">';
            echo $translation;
            echo '</li>';
            echo '</a>';
            echo PHP_EOL;
コード例 #3
0
ファイル: log.php プロジェクト: raphaelvigee/SvnAdmin
"><?php 
        echo $value['attrib']['revision'];
        ?>
</td>
								<td rowspan="<?php 
        echo count($value['paths']['path']);
        ?>
"><?php 
        echo $value['author'];
        ?>
</td>
								<td rowspan="<?php 
        echo count($value['paths']['path']);
        ?>
"><?php 
        echo getHumanDate($value['date']);
        ?>
</td>
						<?php 
        $i2 = 1;
        foreach ($value['paths']['path'] as $key2 => $value2) {
            ?>
									<?php 
            if ($i2 != 1) {
                ?>
										<tr>
										<?php 
            }
            switch (trim($value2['attrib']['action'])) {
                case 'M':
                    ?>
コード例 #4
0
ファイル: info.php プロジェクト: nickyschlobs/atlas
        mysqli_free_result($result);
    }
    mysqli_close($link);
    unset($link);
    $explode = getTorrent(unserialize(_CONFIG)['torrents']['dir'] . DIRECTORY_SEPARATOR . $torrent['filename'] . '.torrent');
    $CURRENT_PAGE = 'Info';
    $PAGE_TITLE = PAGE_DEFAULT_TITLE . ' | ' . $explode->name();
    require_once 'header.php';
    ?>
	    <div class="card-panel">
			<h4><?php 
    echo $explode->name();
    ?>
</h4>
			<small><?php 
    echo getHumanDate(new DateTime($torrent['created']), new DateTime(date('Y-n-d H:i:s', time())));
    ?>
 <small><?php 
    echo $torrent['created'];
    ?>
</small></small></small>
			<br> <br>
			<div align="center">
				<img
					src="artwork.php?filename=<?php 
    echo $torrent['filename'];
    ?>
">
			</div>
			<br>
			<?php 
コード例 #5
0
ファイル: functions.php プロジェクト: raphaelvigee/SvnAdmin
function getCommitDate($rev2 = null, $force = false)
{
    $log = getLog($rev2);
    $domObj = new xmlToArrayParser(implode("\n", $log));
    $domArr = $domObj->array;
    if (isset($domArr['log']['logentry']['date'])) {
        return getHumanDate($domArr['log']['logentry']['date'], $force);
    } else {
        return t('noCommit');
    }
}