#
require "../settings.php";
if ($_POST) {
    switch ($_POST["key"]) {
        case "confirm":
            $OUTPUT = confirmSettings($_POST);
            break;
        case "write":
            $OUTPUT = writeSettings($_POST);
            break;
        default:
            $OUTPUT = editSettings();
    }
} else {
    # print form for data entry
    $OUTPUT = editSettings();
}
require "../template.php";
##
# Functions
##
# form to enter new data
function editSettings()
{
    # connect to db
    db_connect();
    /* static settings for dumb sars thing... you might as well just make your percentage 0 */
    $i = 0;
    if (!isset($sdlpayable)) {
        $sdlpayable = getCSetting("SDLPAYABLE");
    }
Exemple #2
0
function updateSettings($datas)
{
    foreach ($datas as $data) {
        $data_setting = array('group' => $data['group'], 'Key' => $data['Key'], 'Value' => $data['Value']);
        $settings = getSettings($data_setting);
        if (count($settings) > 0) {
            $query = editSettings($data_setting);
        } else {
            $query = insertSettings($data_setting);
        }
    }
    if ($query) {
        return true;
    }
    return false;
}
Exemple #3
0
<?php

require_once 'config.php';
$session->requireLoggedIn();
require 'design_head.php';
echo xhtmlMenu($profile_menu, 'blog_menu');
wiki('Settings');
echo '<br/>';
editSettings();
require 'design_foot.php';