Esempio n. 1
0
/**
 * Function to save after editing a function
 */
function doSaveEdit()
{
    global $data, $lang, $misc, $_reload_browser;
    $fnlang = strtolower($_POST['original_lang']);
    if ($fnlang == 'c') {
        $def = array($_POST['formObjectFile'], $_POST['formLinkSymbol']);
    } else {
        if ($fnlang == 'internal') {
            $def = $_POST['formLinkSymbol'];
        } else {
            $def = $_POST['formDefinition'];
        }
    }
    if (!$data->hasFunctionAlterSchema()) {
        $_POST['formFuncSchema'] = '';
    }
    $status = $data->setFunction($_POST['function_oid'], $_POST['original_function'], $_POST['formFunction'], $_POST['original_arguments'], $_POST['original_returns'], $def, $_POST['original_lang'], $_POST['formProperties'], isset($_POST['original_setof']), $_POST['original_owner'], $_POST['formFuncOwn'], $_POST['original_schema'], $_POST['formFuncSchema'], isset($_POST['formCost']) ? $_POST['formCost'] : null, isset($_POST['formRows']) ? $_POST['formRows'] : 0, $_POST['formComment']);
    if ($status == 0) {
        // If function has had schema altered, need to change to the new schema
        // and reload the browser frame.
        if (!empty($_POST['formFuncSchema']) && $_POST['formFuncSchema'] != $_POST['original_schema']) {
            // Jump them to the new function schema
            $misc->setCurrentSchema($_POST['formFuncSchema']);
            // Force a browser reload
            $_reload_browser = true;
        }
        doProperties($lang['strfunctionupdated']);
    } else {
        doEdit($lang['strfunctionupdatedbad']);
    }
}
Esempio n. 2
0
/**
 * Function to save after editing a view
 */
function doSaveEdit()
{
    global $data, $lang;
    $status = $data->setView($_POST['view'], $_POST['formDefinition'], $_POST['formComment']);
    if ($status == 0) {
        doDefinition($lang['strviewupdated']);
    } else {
        doEdit($lang['strviewupdatedbad']);
    }
}
Esempio n. 3
0
<?php

require_once "../../../includes/initialize.php";
$action = isset($_GET['action']) && $_GET['action'] != '' ? $_GET['action'] : '';
switch ($action) {
    case 'add':
        doInsert();
        break;
    case 'edit':
        doEdit();
        break;
    case 'delete':
        doDelete();
        break;
    case 'assign':
        doAssignsubj();
        break;
    case 'delsubj':
        doDelsubj();
        break;
    case 'enroll':
        doEnroll();
        break;
    case 'delsy':
        doDelsy();
        break;
}
function doInsert()
{
    if (isset($_POST['save'])) {
        $NAME = $_POST['name'];
Esempio n. 4
0
/** 
 * Function to save after editing a user
 */
function doSaveEdit()
{
    global $data, $lang;
    // Check name and password
    if (isset($_POST['newname']) && $_POST['newname'] == '') {
        doEdit($lang['struserneedsname']);
    } else {
        if ($_POST['formPassword'] != $_POST['formConfirm']) {
            doEdit($lang['strpasswordconfirm']);
        } else {
            if (isset($_POST['newname'])) {
                $status = $data->setRenameUser($_POST['username'], $_POST['formPassword'], isset($_POST['formCreateDB']), isset($_POST['formSuper']), $_POST['formExpires'], $_POST['newname']);
            } else {
                $status = $data->setUser($_POST['username'], $_POST['formPassword'], isset($_POST['formCreateDB']), isset($_POST['formSuper']), $_POST['formExpires']);
            }
            if ($status == 0) {
                doDefault($lang['struserupdated']);
            } else {
                doEdit($lang['struserupdatedbad']);
            }
        }
    }
}
Esempio n. 5
0
/**
 * Saves changes to a report
 */
function doSaveEdit()
{
    global $reportsdb, $lang;
    if (!isset($_POST['report_name'])) {
        $_POST['report_name'] = '';
    }
    if (!isset($_POST['db_name'])) {
        $_POST['db_name'] = '';
    }
    if (!isset($_POST['descr'])) {
        $_POST['descr'] = '';
    }
    if (!isset($_POST['report_sql'])) {
        $_POST['report_sql'] = '';
    }
    // Check that they've given a name and a definition
    if ($_POST['report_name'] == '') {
        doEdit($lang['strreportneedsname']);
    } elseif ($_POST['report_sql'] == '') {
        doEdit($lang['strreportneedsdef']);
    } else {
        $status = $reportsdb->alterReport($_POST['report_id'], $_POST['report_name'], $_POST['db_name'], $_POST['descr'], $_POST['report_sql'], isset($_POST['paginate']));
        if ($status == 0) {
            doDefault($lang['strreportcreated']);
        } else {
            doEdit($lang['strreportcreatedbad']);
        }
    }
}
Esempio n. 6
0
			$("#t1").tablesorter(
			{
				sortList: [[0,0]],
				widgets: ["zebra"]
			}); 
		}); 
		</script>
	</head>
<body>
	<H2>Gruppen - Verwaltung</H2>
<?php 
if (isset($_POST['newFrm']) || isset($_GET['newFrm'])) {
    doEdit(null, true);
} else {
    if (isset($_GET['edit'])) {
        doEdit(addslashes($_GET['kurzbz']), false);
    } else {
        if (isset($_POST['type']) && $_POST['type'] == 'save') {
            printDropDown();
            doSave();
            getUebersicht();
        } else {
            if (isset($_GET['type']) && $_GET['type'] == 'delete') {
                printDropDown();
                $e = new gruppe();
                if (!$e->delete($_GET['einheit_id'])) {
                    echo $e->errormsg;
                }
                getUebersicht();
            } else {
                printDropDown();