Esempio n. 1
0
            min-width: 100%;
            min-height: 100%;
            font-size: 100px;
            text-align: right;
            filter: alpha(opacity=0);
            opacity: 0;
            outline: none;
            background: white;
            cursor: inherit;
            display: block;
        }
    </style>

<?php 
$error = '';
if ($siteUser->isLoggedIn() == false) {
    $error = "You need to be logged in to add adventures.";
} else {
    if ($siteUser->getType() == "Reader") {
        $error = "'Reader' account types cannot add adventures. Contact administrator to upgrade your account.";
    } else {
        if ($siteUser->getType() == "Admin") {
            // admin can add adventures and can edit any adventure
        } else {
            if (isset($_GET['mode']) && $_GET['mode'] == "edit") {
                $user_id = $siteUser->getUserId();
                $stmt = $mysql->prepare("SELECT * FROM adventure WHERE user_id=? AND adventure_id=?");
                $stmt->bind_param("ii", $user_id, $_POST['adventure_id']);
                $stmt->execute();
                $r = $stmt->get_result();
                if ($r->num_rows != 1) {