Exemplo n.º 1
0
<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php";
error_reporting(E_ALL);
ini_set('display_errors', '1');
$campaignCodes = Order::$campaignCodes;
$email = '';
$fname = '';
$lname = '';
!empty($_REQUEST['mmForetagsnyckel']) ? $nyckel = $_REQUEST['mmForetagsnyckel'] : ($nyckel = '');
$user = Medlem::getInloggad();
if (!empty($user)) {
    $email = $user->getEpost();
    $fname = $user->getFNamn();
    $lname = $user->getENamn();
}
?>


<script src="/js/jquery.validate.min.js" type="text/javascript"></script>
<script type="text/javascript">    
  $(function() {
    sum();  //run the sum function to validate pre-checked ratio buttons 
    
    //do input validation
    var validator = $("#checkout").validate({
      errorClass: "invalid",
      validClass: "valid",
      rules: {
        firstname: {
          required: true
Exemplo n.º 2
0
            header("Location: /pages/api_result.php?ret=200", true, '200');
            exit;
        } catch (MedlemException $e) {
            header("Location: /pages/api_result.php?ret=400", true, '400');
            exit;
        }
        break;
    case "loginsave":
        try {
            if (empty($_REQUEST["mem"]) or empty($_REQUEST["in"]) or empty($_REQUEST["steg0_aid"]) or empty($_REQUEST["steg0_datum"]) or empty($_REQUEST["steg0_antal"])) {
                header("Location: /pages/api_result.php?ret=400", true, '400');
                exit;
            }
            $status = Medlem::loggaIn(trim($_REQUEST["mem"]), trim($_REQUEST["in"]));
            if (!isset($status) || !$status) {
                throw new UserException("Felaktig inloggning", $felInloggString);
            }
            $USER = Medlem::getInloggad();
            $USER->saveBrowserAndIp();
            $a = Aktivitet::loadById($_REQUEST["steg0_aid"]);
            new Steg($USER, $a, date($_REQUEST["steg0_datum"] . " H:i:s"), $_REQUEST["steg0_antal"]);
            header("Location: /pages/api_result.php?ret=200", true, '301');
            exit;
        } catch (Exception $e) {
            header("Location: /pages/api_result.php?ret=400", true, '400');
            exit;
            //throw new UserException("Felaktig inloggning", $felInloggString);
        }
        break;
    default:
}
Exemplo n.º 3
0
<?php

/*
	Denna fil hanterar inloggning pŒ Motiomera, och skickar sedan medlemmen till min sida
*/
include $_SERVER["DOCUMENT_ROOT"] . "/php/init.php";
if ($medlem = Medlem::getInloggad()) {
    $medlem->loggaUt();
}
@session_destroy();
header("location:/");
//header("location:/forum/ucp.php?mode=logout&sid=" . $_COOKIE["phpbb3_kq7es_sid"]);