Пример #1
0
    echo "value='submit'></td>\n";
    echo "</tr>\n";
    echo "</table>\n";
    printfooter();
}
if (!$version && $pwd) {
    // we connected to an empty database and have the password
    // now create the initial tables
    //$db->debug = true;
    include "./dd/0_001_inc.php";
}
// $version is known, so we have a working database and must now authenticate
if ($version) {
    $system_settings = unserialize(get_cell($db, "settings", "settings", "id", 1));
    include "./includes/auth_inc.php";
    allowonly($SUPER, $USER["permissions"]);
    printheader("Settings");
    navbar($USER["permissions"]);
    // insert database updates here
    if ($version < $version_code) {
        $test = true;
        // Creates table antibodies
        if ($version < 0.0021) {
            include "./dd/0_0021_inc.php";
        }
        // Creates table protocols
        if ($version < 0.0022) {
            include "./dd/0_0022_inc.php";
        }
        // Creates table pdfs
        if ($version < 0.0023) {
Пример #2
0
// groups.php -  List, modify, delete and add groups
// groups.php - author: Nico Stuurman <*****@*****.**>
// TABLES: groups
/***************************************************************************
  * This script displays a table with groups in phplabware. It can only be   *
  * called by the sysadmin                                                   *
  * Copyright (c) 2001 by Nico Stuurman                                      *
  * ------------------------------------------------------------------------ *
  *  This program is free software; you can redistribute it and/or modify it *
  *  under the terms of the GNU General Public License as published by the   *
  *  Free Software Foundation; either version 2 of the License, or (at your  *
  *  option) any later version.                                              *
  \**************************************************************************/
// main include thingies
require "include.php";
allowonly($SUPER, $USER['permissions']);
// register variables
$PHP_SELF = $_SERVER['PHP_SELF'];
$get_vars = 'mod,groupid,groupname,';
globalize_vars($get_vars, $_GET);
$post_vars = "add,groupid,groupname,submit,";
globalize_vars($post_vars, $_POST);
// main global vars
$title = 'Admin Groups';
/**
 *  Adds group to database.
 *
 * An error string is returned when problems occur 
 */
function add_new_group($db, $groupname)
{
Пример #3
0
    show_user_form('me');
    printfooter($db, $USER);
    exit;
}
if ($me == 'Change Settings') {
    $title .= 'Change Settings';
    $result = modify($db, 'me');
    printheader($title);
    navbar($USER['permissions']);
    echo $result;
    show_user_form('me');
    printfooter($db, $USER);
    exit;
}
// Only a groupadmin and sysadmin are allowed to view the remainder
allowonly($ADMIN, $USER['permissions']);
// set title and print headers
$title .= 'User administration';
// extend title if user is an admin
if (!($USER['permissions'] & $SUPER)) {
    $title .= ' in group ' . get_cell($db, 'groups', 'name', 'id', $USER['groupid']);
}
printheader($title);
navbar($USER['permissions']);
// Check whether modify or delete button has been chosen
$del = false;
$mod = false;
if ($_POST) {
    //determine wether or not the remove-command is given and act on it
    while (list($key, $val) = each($_POST)) {
        if (substr($key, 0, 3) == "del") {