本文整理汇总了PHP中Setting::QuickValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::QuickValue方法的具体用法?PHP Setting::QuickValue怎么用?PHP Setting::QuickValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setting
的用法示例。
在下文中一共展示了Setting::QuickValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<div class="panel panel-default" style="padding: 20px;">
<?php
$ToSLink = Setting::QuickValue("tos_link");
if (!empty($ToSLink)) {
echo '
<div class="alert alert-warning" role="alert">
<b>Notice:</b> By donating you agree to our <a href="' . $ToSLink . '">Terms of Service!</a>
</div>
';
}
?>
<h3 style="margin-left: 20px;">Donate</h3>
<br />
<?php
$PresetAmounts = array(5, 10, 15, 20, 25, 30);
foreach ($PresetAmounts as $Amount) {
echo '
<form name="form_' . $Amount . '" method="POST" action="?page=donate" style="display: inline-block;">
<input type="hidden" name="go" value="true" />
<input type="hidden" name="amount" value="' . $Amount . '" />
<button style="background-color: #EEE;border: 1px solid #CCC;padding: 10px;display: inline-block;margin: 10px;color: #428bca;">
<img src="includes/images/money_dollar.png" /> <b>' . number_format((double) $Amount, 2, '.', '') . '</b>
</button>
</form>
';
}
?>
示例2:
<div class="row">
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title" style="font-size: 12px;height: 12px;">Send Credits</h3>
</div>
<div class="panel-body">
<?php
if (Setting::QuickValue("credittransfer") == false) {
echo '<i style="font-size: 12px;">This feature has been disabled.</i>';
} else {
?>
<form method="POST" action="?page=account" class="form-inline" role="form">
<input type="hidden" name="sendCredits" value="1" />
<div class="row" style="line-height: 38px;">
<div class="col-md-4" style="text-align: right;">
<b>Amount</b>
</div>
<div class="col-md-8" style="text-align: right;">
<input type="text" name="amount" class="form-control" placeholder="$5.50" style="float: left;width: 80px;margin-right: 10px;" />
</div>
</div>
<div class="row" style="line-height: 38px;">
<div class="col-md-4" style="text-align: right;">
<b>To</b>
</div>
示例3: intval
<?php
if (isset($_POST["sendCredits"]) && Setting::QuickValue("credittransfer") == true) {
$Amount = intval(str_replace("\$", "", $_POST["amount"]));
$ToSteam = $_POST["toSteam"];
if ($Amount == null || 0 >= $Amount || $Amount > User::$ActiveUser->GetValue("Credit")) {
echo '
<div class="alert alert-danger" role="alert">
There was an error trying to transfer those credits...
</div>
';
} else {
$ToUser = User::GetByField("User", "SteamID", $ToSteam);
if (!isset($ToUser) || !$ToUser->IsReal()) {
echo '
<div class="alert alert-danger" role="alert">
No user was found with that SteamID!
</div>
';
} else {
User::$ActiveUser->AddCredit(-1 * $Amount);
$ToUser->AddCredit($Amount);
echo '
<div class="alert alert-success" role="alert">
Sent $' . number_format($Amount, 2) . ' to SteamID ' . $ToSteam . '
</div>
';
}
}
}
示例4: curl_setopt
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));
if (!($res = curl_exec($ch))) {
curl_close($ch);
exit;
}
curl_close($ch);
if (strcmp($res, "VERIFIED") == 0) {
/* SETUP OUR VARIABLES */
$Email = Setting::QuickValue("pp_email");
$Currency = Setting::GetByField("Setting", "SysName", "pp_currency")->GetValue();
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$item_name = $_POST['item_name'];
$item_number = intval($_POST['item_number']);
$payment_status = $_POST['payment_status'];
$payment_amount = floatval($_POST['mc_gross']);
$payment_currency = $_POST['mc_currency'];
$txn_id = $_POST['txn_id'];
$receiver_email = $_POST['receiver_email'];
$payer_email = $_POST['payer_email'];
$custom = $_POST['custom'];
/* MAKE SURE THEY ARENT TRYING ANYTHING TRICKY */
if ($payment_currency != $Currency) {
die("");