예제 #1
0
 echo "<th>" . _("Media ID") . "</th>";
 echo "<th>" . _("User") . "</th>";
 echo "<th>" . _("Remote Media") . "</th>";
 echo "<th>" . _("Created") . "</th>";
 echo "<th>" . _("Adapter") . "</th>";
 echo "<th>" . _("Status") . "</th>";
 echo "<th>" . _("Details") . "</th>";
 echo "</tr>\n";
 foreach ($media as $m) {
     echo "<tr>";
     echo "<td><a href=\"/status/job?mediaid=" . $m["id"] . "\">" . $m["id"] . "</a></td>";
     echo "<td><a href=\"/status/media?user="******"owner"] . "\">" . substr($m["email"], 0, 60) . "</a></td>";
     echo "<td>" . $m["remoteid"] . "</td>";
     echo "<td>" . date_my2fr($m["datecreate"], true) . "</td>";
     echo "<td>" . $m["adapter"] . "</td>";
     echo "<td>" . red_if($m["status"] == 2 || $m["status"] == 4, $a_status[$m["status"]]) . "</td>";
     echo "<td>";
     $t = @unserialize($m["metadata"]);
     if (count($t)) {
         if (isset($t["mime"])) {
             echo "Mime: " . $t["mime"] . " &nbsp; ";
         }
         if (isset($t["file_size"])) {
             echo "Size: " . format_size($t["file_size"]) . " &nbsp; ";
         }
         if (isset($t["box"])) {
             echo "Box: " . $t["box"] . " &nbsp; ";
         }
         if (isset($t["tracks"])) {
             // we are not in the "one 'other' track" case (jpeg, other system etc.)
             if (isset($t["tracks"][0]) && isset($t["tracks"][0]["type"]) && ($t["tracks"][0]["type"] != "other" || count($t["tracks"]) > 1)) {
예제 #2
0
파일: job.php 프로젝트: ninetian/omk-server
        echo "<td>" . $q["id"] . "</td>";
        echo "<td><a href=\"/status/job?user="******"uid"] . "\">" . substr($q["email"], 0, 60) . "</a></td>";
        echo "<td><a href=\"/status/job?mediaid=" . $q["mediaid"] . "\">" . $q["mediaid"] . "</a></td>";
        echo "<td>" . $q["remoteid"] . "</td>";
        echo "<td>" . $a_tasks[$q["task"]] . "</td>";
        echo "<td>" . red_if(time() - $q["ts"] > 7200 && $q["datedone"] == "0000-00-00 00:00:00", date_my2fr($q["datequeue"], true));
        echo "<td>" . red_if(time() - $q["ts"] > 7200 && $q["datedone"] == "0000-00-00 00:00:00", date_my2fr($q["datetry"], true));
        echo "</td>";
        if (substr($q["datedone"], 0, 10) == substr($q["datequeue"], 0, 10)) {
            $done = substr($q["datedone"], 11, 5);
        } else {
            $done = date_my2fr($q["datedone"], true);
        }
        echo "<td>" . ($q["datedone"] == "0000-00-00 00:00:00" ? _("Not done yet") : $done);
        echo "</td>";
        echo "<td><a href=\"/status/reload/" . $q["id"] . "\" title=\"" . _("Will relaunch this task") . "\">" . red_if($q["status"] == 2, $a_status[$q["status"]]) . "</a> <a href=\"/status/delete/" . $q["id"] . "\" title=\"" . _("Will delete this task") . "\">X</a></td>";
        echo "<td>" . ($q["retry"] == 1 ? "<span class=\"error\">" . _("Failed") . "</span>" : $q["retry"]) . "</td>";
        echo "<td>";
        $t = unserialize($q["params"]);
        foreach ($t as $k => $v) {
            if ($k == "url") {
                echo "{$k}: <a href=\"{$v}\">" . substr($v, strrpos($v, "/")) . "</a> &nbsp; ";
            } else {
                echo "{$k}: {$v} &nbsp; ";
            }
        }
        echo "</td>";
        echo "</tr>";
    }
    echo "</table>\n";
}