コード例 #1
0
ファイル: index.php プロジェクト: rachelproject/contentshell
?>
</a></div>
</div>

<div class="menubar cf">
    <ul>
    <li><a href="index.php" target="_self"><?php 
echo strtoupper($lang['home']);
?>
</a></li>
    <li><a href="about.html" target="_self"><?php 
echo strtoupper($lang['about']);
?>
</a></li>
    <?php 
if (show_local_content_link()) {
    echo "<li><a href=\"http://{$_SERVER['SERVER_ADDR']}:8090/\" target=\"_self\">LOCAL CONTENT</a></li>";
}
?>
    </ul>
</div>

<div id="content">

<?php 
$modcount = 0;
$fsmods = getmods_fs();
# if there were any modules found in the filesystem
if ($fsmods) {
    # get a list from the databases (where the sorting
    # and visibility is stored)
コード例 #2
0
        foreach (explode(",", $_GET['moddirs']) as $moddir) {
            $moddir = $db->escapeString($moddir);
            if (isset($hidden[$moddir])) {
                $is_hidden = 1;
            } else {
                $is_hidden = 0;
            }
            $rv = $db->exec("UPDATE modules SET position = '{$position}', hidden = '{$is_hidden}'" . " WHERE moddir = '{$moddir}'");
            if (!$rv) {
                throw new Exception($db->lastErrorMsg());
            }
            ++$position;
        }
    } catch (Exception $ex) {
        $db->exec("ROLLBACK");
        error_log($ex);
        header("HTTP/1.1 500 Internal Server Error");
        exit;
    }
    $db->exec("COMMIT");
    # restart kiwix so it sees what modules are visible/hidden
    kiwix_restart();
    header("HTTP/1.1 200 OK");
}
if (is_rachelplus()) {
    $checked = show_local_content_link() ? " checked" : "";
    echo "<hr style='margin: 20px 0;'>\n";
    echo "<p style='background: #ddd; padding: 10px 5px; border-radius: 5px; font-size: small;'>\n";
    echo "<input type='checkbox' id='localcontent'{$checked}> Show the <b>en-local_content</b> module as <b>\"LOCAL CONTENT\"</b> link in RACHEL header</p>";
}
include "foot.php";