Esempio n. 1
0
							<?php 
    if (Downloader::background_jobs() > 0) {
        echo "<b>";
    }
    ?>
Background downloads : <?php 
    echo Downloader::background_jobs() . " / " . Downloader::max_background_jobs();
    if (Downloader::background_jobs() > 0) {
        echo "</b>";
    }
    ?>
 <span class="caret"></span></a>
						<ul class="dropdown-menu" role="menu">
							<?php 
    if (Downloader::get_current_background_jobs() != null) {
        foreach (Downloader::get_current_background_jobs() as $key) {
            if (strpos($key['cmd'], '-x') !== false) {
                echo "<li><a href=\"#\"><i class=\"fa fa-music\"></i> Elapsed time : " . $key['time'] . "</a></li>";
            } else {
                echo "<li><a href=\"#\"><i class=\"fa fa-video-camera\"></i> Elapsed time : " . $key['time'] . "</a></li>";
            }
        }
        echo "<li class=\"divider\"></li>";
        echo "<li><a href=\"./index.php?kill=all\">Kill all downloads</a></li>";
    } else {
        echo "<li><a>No jobs !</a></li>";
    }
    ?>
						</ul>
					</li>
					<?php