Пример #1
0
function printfolder()
{
    global $aMovieFolder, $defaultposterfolder, $scriptfile, $defaultfanart;
    if (0 < count($aMovieFolder)) {
        foreach ($aMovieFolder as $aFolder) {
            debugprint("printfolder(m)", $aFolder['file']);
            $sFile = realpath($aFolder['file']) . "/";
            $sCimage = $aFolder['file'] . '/folder.jpg';
            if (!file_exists($sCimage)) {
                $sCimage = $defaultposterfolder;
            }
            $title = strtoupper(basename($aFolder['file'])) . " - " . $aFolder['size'];
            printitem($title, $scriptfile . '?page=' . urlencode($aFolder['file']), $sCimage);
        }
    }
}
Пример #2
0
function checkNewOriginalSkinVersion()
{
    global $versionfile, $internetversionfile, $skinoriginalicon;
    $title = "";
    $internetversion = rtrim(file_get_contents($internetversionfile));
    $version = getVersion();
    if ($internetversion == $version) {
        system("wget '{$skinpage}/original/original.tar.gz' -O {$skinpath}/original/original.tar.gz");
        system("echo {$version} > {$skinpath}/original/version.txt");
    }
    if (file_exists($versionfile)) {
        $foundversion = rtrim(file_get_contents($versionfile));
        if ($version != $foundversion) {
            $title = "New Version found : {$foundversion}, expected: {$version}, please perform backup";
        }
    } else {
        $title = "versionfile: {$versionfile} not found! Please perform backup!";
    }
    return $title;
    if ("" != $title) {
        printitem($title, $scriptfile . '?backup=true', $skinoriginalicon, 'photoView23');
    }
}
Пример #3
0
function drawitems($top_item, $rows, $highlight)
{
    printheaderb();
    $query = "select count(*) as count from localtemptrans";
    $db = tDataConnect();
    $result = sql_query($query, $db);
    $row = sql_fetch_array($result);
    $rowCount = $row["count"];
    sql_close($db);
    if ($rowCount == 0) {
        if ($_SESSION["training"] != 1) {
            plainmsg($_SESSION["welcomeMsg1"] . "<br />" . $_SESSION["welcomeMsg2"] . "<br />" . $_SESSION["welcomeMsg3"]);
        } else {
            plainmsg($_SESSION["trainingMsg1"] . "<br />" . $_SESSION["trainingMsg2"]);
        }
    } else {
        $query_range = "select * from screendisplay where trans_id >= " . $top_item . " and trans_id <= " . ($top_item + $rows) . " order by trans_id";
        $db_range = tDataConnect();
        $result_range = sql_query($query_range, $db_range);
        $num_rows = sql_num_rows($result_range);
        echo "<tr><td width='600' colspan='3'>&nbsp;</td></tr>\n";
        for ($i = 0; $i < $num_rows; $i++) {
            $row = sql_fetch_array($result_range);
            $trans_id = $row["trans_id"];
            $description = $row["description"];
            $total = $row["total"];
            $comment = $row["comment"];
            $tf = $row["status"];
            $color = $row["lineColor"];
            if ($trans_id == $highlight) {
                if ($color == "") {
                    printitemhilite($description, $comment, $total, $tf);
                } else {
                    printitemcolorhilite($color, $description, $comment, $total, $tf);
                }
            } else {
                if ($color == "") {
                    printitem($description, $comment, $total, $tf);
                } else {
                    printitemcolor($color, $description, $comment, $total, $tf);
                }
            }
        }
        sql_close($db_range);
    }
}