Esempio n. 1
0
function getAuthorised($userid, $pass, $level)
{
    global $auth;
    echo '<h1>DONT USE THIS FUNCTION!</h1>';
    return 0;
    // This function is disabled
    if (!authValidateUser($userid, $pass)) {
        return 0;
    }
    return authGetUserLevel($userid) >= $level;
}
Esempio n. 2
0
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
/*
	JM-booking - login
*/
include "glob_inc.inc.php";
if (isset($_POST['WEBAUTH_USER'])) {
    if (authValidateUser(getUserName(), getUserPassword())) {
        header('Location: index.php');
        exit;
    }
}
if (isset($_GET['sendepost']) && isset($_POST['sendepost_navn']) && isset($_POST['sendepost_epost']) && isset($_POST['sendepost_melding'])) {
    require "libs/mail.class.php";
    $epostform_feilfunnet = false;
    $_POST['sendepost_navn'] = htmlspecialchars(strip_tags($_POST['sendepost_navn']), ENT_QUOTES);
    $_POST['sendepost_epost'] = htmlspecialchars(strip_tags($_POST['sendepost_epost']), ENT_QUOTES);
    $_POST['sendepost_melding'] = htmlspecialchars(strip_tags($_POST['sendepost_melding']), ENT_QUOTES);
    if ($_POST['sendepost_navn'] == '' || $_POST['sendepost_epost'] == '' || $_POST['sendepost_melding'] == '') {
        $epostform_feilfunnet = true;
    } else {
        // Sender epost med spørsmål
        $mail = new mail();
Esempio n. 3
0
  Will eventually return to URL argument "TargetURL=whatever".
*/
if (isset($Action) && $Action == "SetName") {
    /* First make sure the password is valid */
    if ($NewUserName == "") {
        // Unset the session variables
        if (isset($_SESSION)) {
            $_SESSION = array();
        } else {
            global $HTTP_SESSION_VARS;
            $HTTP_SESSION_VARS = array();
        }
    } else {
        $NewUserName = unslashes($NewUserName);
        $NewUserPassword = unslashes($NewUserPassword);
        if (!authValidateUser($NewUserName, $NewUserPassword)) {
            print_header_mrbs(0, 0, 0, 0);
            echo "<P>" . get_string('usernamenotfound') . "</P>\n";
            printLoginForm($TargetURL);
            exit;
        }
        if (isset($_SESSION)) {
            $_SESSION["UserName"] = $NewUserName;
        } else {
            global $HTTP_SESSION_VARS;
            $HTTP_SESSION_VARS["UserName"] = $NewUserName;
        }
    }
    header("Location: {$TargetURL}");
    /* Redirect browser to initial page */
    /* Note HTTP 1.1 mandates an absolute URL. Most modern browsers support relative URLs,