Exemplo n.º 1
0
/**
 * print an error and die if the user is not logged in or is not an admin
 * @param string $errortext error text to be printed 
 */
function MustBeAdmin()
{
    MustLogIn();
    if (!IsAdmin()) {
        bw_error("Only for admins!");
    }
}
Exemplo n.º 2
0
                    }
                    if (isset($tt[1])) {
                        $struct->SYSHCvol_comment = $tt[1];
                    }
                }
            }
            array_push($TData, $struct);
        }
        // end of while not feof
        fclose($ff);
    }
    // end of loading data from file
    return $TData;
}
// end of loading data
MustLogIn();
$RightLevel = HasRight('Pannel');
// Check the rights
if ($RightLevel < 1) {
    echo "For this you need the <b>Panel</b> rights<br />";
    exit(0);
}
$action = GetParam("action");
$PannelScope = RightScope('Pannel');
$Message = "";
switch ($action) {
    case "DiffDB":
        if (!HasRight('Pannel', $action)) {
            // Check the rights
            echo "For this you need the scope <b>" . $action . "</b> within <b>Panel</b> rights<br>";
            exit(0);