コード例 #1
0
ファイル: dev.php プロジェクト: diamondo25/mapler.me
<?php

require_once __DIR__ . '/inc/header.php';
?>

<?php 
if (!$_loggedin) {
    DisplayError('nopermission');
    ?>
<p class="status lead">Mapler.me offers an extensive <b>{JSON}</b> API for developers to take advantage of our extensive framework.</p>

<?php 
} else {
    ?>
<style>

.title {
	font-weight: bold;
	font-family: Helvetica, sans-serif;
	font-size: 24px;
	letter-spacing: 0px;
	color: #777;
}

.more {
	font-weight: 200;
	letter-spacing: normal;
	color: #999;
	font-size: 15px;
}
コード例 #2
0
				<input type="password" name="confirm" placeholder="Password"/>
				<input type="submit" class="btn btn-danger" value="Delete my account"/>
			</form>
		</div>
	</div>
<?php 
    }
} else {
    require_once __DIR__ . '/../inc/header.php';
    ?>

<div class="row">
	<div class="span12">
<?php 
    if ($_loggedin) {
        ?>
		<p class="lead alert alert-info"><i class="icon-question-sign"></i> We're sorry to see you go! To protect your account please type your password below:</p>
		<form method="post">
			<input type="password" name="confirm" placeholder="Password"/>
			<input type="submit" class="btn btn-danger" value="Delete my account"/>
		</form>
<?php 
    } else {
        DisplayError(1);
    }
    ?>
	</div>
</div>
<?php 
}
require_once __DIR__ . '/../inc/footer.php';
コード例 #3
0
ファイル: faq.php プロジェクト: gpuenteallott/rox
     while ($rWhile = mysql_fetch_object($qry)) {
         array_push($TData, $rWhile);
     }
     DisplayFaqWiki($TData, $rCat);
     // call the layout with the selected parameters
     exit(0);
 case "update":
     if (!HasRight("Faq") > 0) {
         // only people with suficient right can edit FAQ
         $errcode = "ErrorNeedRight";
         // initialise global variable
         DisplayError(ww($errcode, "Faq"));
     }
     if (GetStrParam("QandA") == "") {
         echo "You must fill the word code associated with the FAQ";
         DisplayError("You must fill the word code associated with the FAQ");
         exit(0);
     }
     $Faq = LoadRow("SELECT * FROM faq WHERE id=" . $IdFaq);
     $rwq = LoadRow("SELECT * FROM words WHERE code='" . "FaqQ_" . GetStrParam("QandA") . "' and IdLanguage=0");
     $rwa = LoadRow("SELECT * FROM words WHERE code='" . "FaqA_" . GetStrParam("QandA") . "' and IdLanguage=0");
     if (!isset($rwq->id)) {
         $str = "INSERT INTO words\n                                    (code,\n                                     Description,\n                                     IdLanguage,\n                                     ShortCode,\n                                     created)\n                                VALUES\n                                    ('FaqQ_" . GetStrParam("QandA") . "',\n                                     'This is the questiontext for a Frequently Asked Question.',\n                                     0,\n                                     '" . $_SESSION['lang'] . "',\n                                     NOW())";
         sql_query($str);
     }
     if (!isset($rwa->id)) {
         $str = "INSERT INTO words\n                                    (code,\n                                     Description,\n                                     IdLanguage,\n                                     ShortCode,\n                                     created)\n                                VALUES\n                                    ('FaqA_" . GetStrParam("QandA") . "',\n                                     'This is the answertext for a Frequently Asked Question.',\n                                     0,\n                                     '" . $_SESSION['lang'] . "',\n                                     NOW())";
         sql_query($str);
     }
     // reload for case it was just inserted before
     $rwq = LoadRow("SELECT * FROM words WHERE code='" . "FaqQ_" . GetStrParam("QandA") . "' and IdLanguage=0");
コード例 #4
0
ファイル: login.php プロジェクト: diamondo25/mapler.me
            color: #FFF;
            text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
        }
        
        .login-extra a {
            color: #CCC;
        }
    </style>
</head>
<body>
<?php 
if (IsLoggedin()) {
    ?>
<meta http-equiv="refresh" content="3;URL='/stream/'" />
<?php 
    DisplayError(3);
    require_once __DIR__ . '/inc/footer.php';
    die;
    // Prevent error after login
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (!isset($_POST['username'], $_POST['password'])) {
        // $error = "Opps! Your username or password was not included.";
        $error = "Opps! Your e-mail or password was not included.";
    } else {
        $username = $__database->real_escape_string($_POST['username']);
        $password = $_POST['password'];
        // $query = $__database->query("SELECT * FROM accounts WHERE username = '******'");
        $query = $__database->query("SELECT * FROM accounts WHERE email = '" . $username . "'");
        if ($query->num_rows == 1) {
            $row = $query->fetch_assoc();
コード例 #5
0
ファイル: docompare.php プロジェクト: it114/webpagetest
        $idStr = $_GET['tid'];
        if ($_GET['tidlabel']) {
            $idStr .= '-l:' . urlencode($_GET['tidlabel']);
        }
    }
    foreach ($ids as $id) {
        if (strlen($idStr)) {
            $idStr .= ',';
        }
        $idStr .= $id;
    }
    $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' || isset($_SERVER['HTTP_SSL']) && $_SERVER['HTTP_SSL'] == 'On' ? 'https' : 'http';
    $compareUrl = "{$protocol}://" . $_SERVER['HTTP_HOST'] . "/video/compare.php?tests={$idStr}";
    header("Location: {$compareUrl}");
} else {
    DisplayError();
}
/**
* Submit a video test request with the appropriate parameters
* 
* @param mixed $url
* @param mixed $label
*/
function SubmitTest($url, $label, $key)
{
    global $uid;
    global $user;
    global $ip;
    $id = null;
    $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' || isset($_SERVER['HTTP_SSL']) && $_SERVER['HTTP_SSL'] == 'On' ? 'https' : 'http';
    $testUrl = "{$protocol}://" . $_SERVER['HTTP_HOST'] . '/runtest.php?';
コード例 #6
0
ファイル: characters.php プロジェクト: diamondo25/mapler.me
		document.location.href = '?deletecharacter=' + id;
	}
}
</script>

<?php 
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    if (isset($_GET['deletecharacter'])) {
        $id = intval($_GET['deletecharacter']);
        $name = GetCharacterName($id, CURRENT_LOCALE);
        $character_account_id = GetCharacterAccountId($id, CURRENT_LOCALE);
        echo $name;
        echo $character_account_id;
        $cerror = '';
        if ($_loginaccount->GetID() !== $character_account_id) {
            DisplayError(6);
            $cerror = 'nope';
        }
        echo $cerror;
        if ($id != NULL && ($cerror = NULL)) {
            Logging('characterdeletion', $name, $_loginaccount->GetID(), NULL);
            ?>
<p class="alert-info alert fademeout">Successfully requested deletion of <?php 
            echo $name;
            ?>
.<p>
<?php 
        }
    }
}
$i = 0;
コード例 #7
0
$ldap = ConnectToLdapServer($ldap_info['server'], $upn, $ldap_info['password']);
// Get LDAP info
if ($_GET["record_type"] == "computer") {
    $sam_account_name = $ldap_info['system_name'] . "\$";
    $attributes = $_GET["full_details"] == "y" ? array() : $computer_ldap_attributes;
} else {
    // Get user account name - user name *may* be in DOMAIN\ACCOUNT format or may not :-)
    $sam_account_name = stripos($ldap_info["net_user_name"], "\\") !== FALSE ? array_pop(explode("\\", $ldap_info["net_user_name"])) : $ldap_info["net_user_name"];
    $attributes = $_GET["full_details"] == "y" ? array() : $user_ldap_attributes;
}
$filter = "(&(objectClass=" . $_GET["record_type"] . ")(sAMAccountName=" . $sam_account_name . "))";
$sr = ldap_search($ldap, $ldap_info['nc'], utf8_encode($filter), $attributes);
$info = ldap_get_entries($ldap, $sr);
// Couldn't retrieve user or computer object from LDAP - alert user & done
if ($info == NULL) {
    DisplayError(__("Cannot retrieve LDAP details. The ") . $_GET["record_type"] . __(" object cannot be found in the LDAP source - ") . $ldap_info["name"]);
}
// ObjectSid is binary - need to use ldap_get_values_len() to ensure that it's correctly retrieved - only needed if retrieving full attributes
if ($_GET["full_details"] == "y") {
    $entry = ldap_first_entry($ldap, $sr);
    $objectsid = ldap_get_values_len($ldap, $entry, "objectsid");
    $info[0]["objectsid"][0] = $objectsid[0];
}
// Sort by keys
ksort($info[0]);
?>

<!-- LDAP details header -->
<td>
<div class='ldap_details'>
<div>
コード例 #8
0
    }
    ?>
			</ul>
		</nav>
<?php 
}
?>
    </div>
</header>

<div class="container main" style="padding: 20px; border-radius: 5px; margin-top: 90px; margin-bottom: 30px;">

<?php 
if ($_loggedin) {
    if ($_loginaccount->GetAccountRank() <= RANK_AWAITING_ACTIVATION) {
        if (strpos($_SERVER['REQUEST_URI'], '/support/') === FALSE) {
            DisplayError(5);
            require_once __DIR__ . '/../../inc/footer.php';
            die;
        }
    }
    if (!$_loginaccount->IsMuted()) {
        require_once 'social.php';
    }
    if ($_loginaccount->IsRankOrHigher(RANK_ADMIN)) {
        require_once 'banhammer.php';
    }
    if ($_loginaccount->IsMuted()) {
        DisplayError(4);
    }
}
コード例 #9
0
ファイル: register.php プロジェクト: diamondo25/mapler.me
                echo $nickname;
                ?>
! Check your email (<?php 
                echo $email;
                ?>
) for more information! Note: <b>Check your spam folder if you don't receive it after a few minutes!</b></p>
<?php 
            }
        }
    }
}
if ($_loggedin) {
    ?>
<meta http-equiv="refresh" content="3;URL='/'" />
<?php 
    DisplayError(2);
    ?>

<?php 
} else {
    if ($error != null) {
        ?>
<p class="lead alert-error alert"><?php 
        echo $error;
        ?>
</p>
<?php 
    }
    ?>

<div class="row">
コード例 #10
0
ファイル: pkg_upload.php プロジェクト: brycied00d/freshports
                            DisplayError('OH NO! CopyStagingToWatchList failed!');
                        }
                    }
                }
            }
        }
    }
    if ($Debug) {
        echo '<br>' . __LINE__ . '<br>';
    }
    #
    # either we display the staging area, or we display the upload form.
    #
    if ($DisplayStagingArea) {
        if ($WatchListUpdated) {
            DisplayError('<BIG>Your watch list has been updated. You may wish to empty your staging area now.</BIG>');
        }
        if ($WatchListID) {
            DisplayStagingArea($User->id, $WatchListID, $db);
        } else {
            ChooseWatchLists($User->id, $db);
        }
    } else {
        DisplayUploadForm($db, $User->id);
    }
}
?>
</TD>
</TR>
</TABLE>
</TD>