当前位置: 首页>>代码示例>>PHP>>正文


PHP Settings::i方法代码示例

本文整理汇总了PHP中Settings::i方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::i方法的具体用法?PHP Settings::i怎么用?PHP Settings::i使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Settings的用法示例。


在下文中一共展示了Settings::i方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: generateMessage

function generateMessage($first_name, $cart, $transid)
{
    $message = 'Hallo ' . $first_name . ",\n\nWe received your Payment with the Transaction ID: " . $transid . "\n\n";
    $message .= "You purchased:\n\n";
    foreach ($cart as $productid => $product) {
        $message .= "- " . $product->name . " (" . $product->description . ")" . "\n";
    }
    $message .= "\nTo download the Products you have purchased, please visit the 'Payment History' section when logged in\n\n";
    $message .= "- Your " . Settings::i()->title . " Team";
    return $message;
}
开发者ID:sharedRoutine,项目名称:ShopFix,代码行数:11,代码来源:process.php

示例2: __construct

 function __construct($testing = false)
 {
     $this->testing = $testing;
     if (!$testing) {
         $this->api_url = str_replace("sandbox.", "", $this->api_url);
     }
     $this->api_user = Settings::i()->paypal_email;
     $this->api_password = Settings::i()->paypal_api_pass;
     $this->api_signature = Settings::i()->paypal_api_signature;
     if (is_null($this->api_user) || is_null($this->api_password) || is_null($this->api_signature)) {
         throw new Exception("PayPal API Credentials missing");
     }
 }
开发者ID:sharedRoutine,项目名称:ShopFix,代码行数:13,代码来源:class.paypal.php

示例3: die

require_once ROOT_DIR . '/class.sessionmanager.php';
require_once ROOT_DIR . '/recaptchalib.php';
if (!SessionManager::i()->validateToken("LoginToken", "token")) {
    Logger::i()->writeLog("Token to login is missing", 'dev');
    die(Submission::createResult("Please refresh the page and try again"));
}
if (isset($_POST['login'])) {
    $login = (array) json_decode(base64_decode($_POST['login']));
    if ($field = Submission::checkFields(array("username", "password"), $login)) {
        die(Submission::createResult(ucfirst($field) . " is missing or invalid"));
    }
    if (Settings::i()->captcha_private) {
        if (!isset($login['captcha_response'])) {
            die(Submission::createResult("Please validate the captcha"));
        }
        $reCaptcha = new ReCaptcha(Settings::i()->captcha_private);
        $resp = $reCaptcha->verifyResponse($_SERVER["REMOTE_ADDR"], $login['captcha_response']);
        if (!$resp->success) {
            die(Submission::createResult("Please validate the Captcha"));
        }
    }
    $key = Crypto::GenerateKey($login['username']);
    $find = DbManager::i()->select("sf_members", array("iv", "userid"), array("key" => base64_encode(base64_encode($key))));
    if ($find !== false) {
        if (!is_array($find)) {
            $iv = base64_decode(base64_decode($find->iv));
            $password = base64_encode(base64_encode(Crypto::EncryptString($key, $iv, $login['password'])));
            $find = DbManager::i()->select("sf_members", array("userid"), array("password" => $password));
            if ($find !== false && !is_array($find)) {
                echo Submission::createResult("login successful", true);
                $_SESSION['login'] = 1;
开发者ID:sharedRoutine,项目名称:ShopFix,代码行数:31,代码来源:login.php

示例4:

');" class="center-block" src="https://www.paypalobjects.com/webstatic/en_US/developer/docs/ec/EC-button.gif" alt="Paypal"/></a>
									</div>
									<?php 
}
if (strlen(Settings::i()->btc_api_key) > 0) {
    ?>
									<div class="col-md-6">
										<h3 class="text-center">Checkout with Bitcoin</h3>
										<a><img ng-click="checkoutWithBTC('<?php 
    echo $_SESSION['CheckoutToken'];
    ?>
');" class="center-block" src="images/bitcoin.png" alt="BTC"/></a>
									</div>
									<?php 
}
if (strlen(Settings::i()->paypal_email) <= 0 && strlen(Settings::i()->btc_api_key) <= 0) {
    ?>
										<p class="text-center">Checkout not possible at the moment. Please contact an administrator</p>
									<?php 
}
?>
			  					</div>
							</div>
							<div id="btcResult" ng-show="btcaddress.length">
								<div class="panel panel-default">
									<div class="panel-body">
										<h3 class="text-center"><span class="glyphicon glyphicon-btc" aria-hidden="true"></span> Please send {{btcamount | currency:'':8}} Bitcoins to: {{btcaddress}}</h3>
										<p class="text-center">After paying please visit 'Payment History' to check for the status. Thanks :)</p>
									</div>
								</div>
							</div>
开发者ID:sharedRoutine,项目名称:ShopFix,代码行数:31,代码来源:index.php

示例5:

<head>
	<title><?php 
echo Settings::i()->title;
?>
</title>
	<meta charset="UTF-8">
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="description" content="ShopFix is a simple but useful shop CMS" />
	<meta name="keywords" content="shopping, shopfix, cms, purchases" />
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<meta name='expires' content='0'>
	<meta content='no-cache'>

	<link rel="stylesheet" href="./css/bootstrap.min.css">
</head>
<body>
	<div class="container">
		<div class="jumbotron">
		  <h1>Hi there!</h1>
		  <p>It seems you do not have JavaScript enabled for this Website, however <?php 
echo Settings::i()->title;
?>
 requires you to have JavaScript enabled.</p>
		  <p>Please enable JavaScript and then you can get back to <a href="index.php">the actual <?php 
echo Settings::i()->title;
?>
 website</a></p>
		</div>
	</div>
</body>
</html>
开发者ID:sharedRoutine,项目名称:ShopFix,代码行数:31,代码来源:noscript.php

示例6: function

		<!-- Angular JS -->
		<script type="text/javascript" src= "../js/angular.min.js"></script>
		<script type="text/javascript" src= "./js/shopfix.js"></script>

		<!-- Bootstrap -->
		<script type="text/javascript" src="../js/bootstrap.min.js"></script>
		<link rel="stylesheet" href="../css/bootstrap.min.css">

		<script type="text/javascript">
			var loginResponse = null;
			var loginContainer = null;
		    var loadCaptcha = function() {
		      loginContainer = grecaptcha.render('login_container', {
		        'sitekey' : '<?php 
if (!is_null(Settings::i()->captcha_public)) {
    echo Settings::i()->captcha_public;
}
?>
',
		        'callback' : function(response) {
		          loginResponse = response;
		        }
		      });
		    };
		</script>

	</head>
	<body>
		<div class="container">
			<div class="row">
				<div class="panel panel-default">
开发者ID:sharedRoutine,项目名称:ShopFix,代码行数:31,代码来源:index.php

示例7: __construct

 function __construct()
 {
     $this->api_key = Settings::i()->btc_api_key;
     $this->api_pin = Settings::i()->btc_api_pin;
     if (!is_null($this->api_key) && !is_null($this->api_pin)) {
         try {
             $this->block_io = new BlockIo($this->api_key, $this->api_pin, BTC_API_VERSION);
         } catch (Exception $e) {
             throw new Exception($e->getMessage());
         }
     } else {
         throw new Exception("API Key and API Pin are missing in settings");
     }
     $this->token = SessionManager::GenerateToken();
 }
开发者ID:sharedRoutine,项目名称:ShopFix,代码行数:15,代码来源:class.btc.php


注:本文中的Settings::i方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。