本文整理汇总了PHP中tools::encrypt_decrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP tools::encrypt_decrypt方法的具体用法?PHP tools::encrypt_decrypt怎么用?PHP tools::encrypt_decrypt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tools
的用法示例。
在下文中一共展示了tools::encrypt_decrypt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tools
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
if (isset($_GET["par4"])) {
$acc_Id = $_GET["par4"];
$tools = new tools();
$encstring = $tools->encrypt_decrypt('encrypt', $acc_Id);
$successContent = '{';
$successContent .= '"status":"Access_Granted",';
$successContent .= '"activationKey":"' . $encstring . '"';
$successContent .= '}';
echo $successContent;
}
示例2: tools
<?php
if (isset($_GET["par4"])) {
$encAccId = $_GET["par4"];
$tools = new tools();
$acc_Id = $tools->encrypt_decrypt('decrypt', $encAccId);
if (strlen($acc_Id) > 0) {
$user_accounts = new user_accounts();
$setArray = array();
$setArray["act"] = "1";
$conditionArray = array();
$conditionArray["acc_Id"] = $acc_Id;
$user_accounts->updateuser_accountsData($setArray, $conditionArray);
$successContent = '{';
$successContent .= '"status":"Access_Granted",';
$successContent .= '"description":"Account Activated Successfully"';
$successContent .= '}';
echo $successContent;
} else {
$errContent = '{';
$errContent .= '"status":"Access_Denied",';
$errContent .= '"description":"Sorry, your account is not found"';
$errContent .= '}';
echo $errContent;
}
}