コード例 #1
0
ファイル: main.php プロジェクト: thefkboss/openTracker
$spref = new Pref("system");
$time = new Pref("time");
if (isset($_POST['save'])) {
    try {
        if ($_POST['secure_input'] != $_SESSION['secure_token']) {
            throw new Exception("Wrong secure token");
        }
        $wpref->name = $_POST['name'];
        $wpref->cleanurls = isset($_POST['clean_url']) ? 1 : 0;
        $wpref->noreply_email = $_POST['email'];
        $wpref->language = $_POST['language'];
        $wpref->startapp = $_POST['startapp'];
        $wpref->update();
        $time->offset = $_POST['offset'];
        $time->long = $_POST['time_long'];
        $time->update();
        $spref->registration = isset($_POST['registration']) ? 1 : 0;
        $spref->max_users = $_POST['max_users'];
        $spref->template = $_POST['template'];
        $spref->update();
        echo notice(_t("System settings saved."));
    } catch (Exception $e) {
        echo error(_t($e->getMessage()));
    }
}
$templates = makefilelist(PATH_TEMPLATES, ".|..|index.html", true, "folders");
$apps = makefilelist(PATH_APPLICATIONS, ".|..", true, "folders");
?>

<h4><?php 
echo _t("Website Settings");
コード例 #2
0
ファイル: system.php プロジェクト: thefkboss/openTracker
$wpref = new Pref("website");
$spref = new Pref("system");
$time = new Pref("time");
if (isset($_POST['save'])) {
    try {
        if ($_POST['secure_input'] != $_SESSION['secure_token']) {
            throw new Exception("Wrong secure token");
        }
        $wpref->name = $_POST['name'];
        $wpref->cleanurls = isset($_POST['clean_url']) ? 1 : 0;
        $wpref->noreply_email = $_POST['email'];
        $wpref->language = $_POST['language'];
        $wpref->startapp = $_POST['startapp'];
        $wpref->update();
        $spref->template = $_POST['template'];
        $spref->update();
        echo notice(_t("System settings saved."));
    } catch (Exception $e) {
        echo error(_t($e->getMessage()));
    }
}
$templates = makefilelist(PATH_TEMPLATES, ".|..|index.html", true, "folders");
$apps = makefilelist(PATH_APPLICATIONS, ".|..", true, "folders");
?>
<form method="POST">
    <input type="hidden" name="secure_input" value="<?php 
echo $_SESSION['secure_token_last'];
?>
">
    <table cellspacing="0" width="600px">
        <tr>