Added options to enable/disable account upgrades and coinpayments
This commit is contained in:
@ -1,29 +1,30 @@
|
||||
<?php
|
||||
require('../common.php');
|
||||
|
||||
if(!ENABLE_UPGRADES){
|
||||
die('Upgrades disabled');
|
||||
}
|
||||
if(!COINPAYMENTS_ENABLED){
|
||||
die('CoinPayments disabled');
|
||||
}
|
||||
if(empty($_SERVER['HTTP_HMAC'])){
|
||||
die("No HMAC signature sent");
|
||||
}
|
||||
|
||||
$merchant = $_POST['merchant'] ?? '';
|
||||
if(empty($merchant)){
|
||||
die("No Merchant ID passed");
|
||||
}
|
||||
|
||||
if($merchant !== COINPAYMENTS_MERCHANT_ID){
|
||||
die("Invalid Merchant ID");
|
||||
}
|
||||
|
||||
$request = file_get_contents('php://input');
|
||||
if(empty($request)){
|
||||
die("Error reading POST data");
|
||||
}
|
||||
|
||||
$hmac = hash_hmac("sha512", $request, COINPAYMENTS_IPN_SECRET);
|
||||
if($hmac !== $_SERVER['HTTP_HMAC']){
|
||||
die("HMAC signature does not match");
|
||||
}
|
||||
|
||||
$db = get_db_instance();
|
||||
$status = 0;
|
||||
if($_POST['status'] < 0){
|
||||
|
@ -324,8 +324,8 @@ $quota_files_usage = $quota['quota_files_used'] / $quota['quota_files'];
|
||||
$usage_text = bytes_to_human_readable($quota['quota_size_used'] * 1024) . ' of ' . bytes_to_human_readable($quota['quota_size'] * 1024) . ' - ' . round($quota_usage * 100, 2).'%';
|
||||
$usage_files_text = "$quota[quota_files_used] of $quota[quota_files] - " . round($quota_files_usage * 100, 2).'%';
|
||||
?>
|
||||
<p>Your disk usage: <meter value="<?php echo round($quota_usage, 2); ?>"><?php echo $usage_text; ?></meter> - <?php echo $usage_text; ?> (updated hourly) <a href="upgrade.php?upgrade=1g_quota">Upgrade</a></p>
|
||||
<p>Your file number usage: <meter value="<?php echo round($quota_files_usage, 2); ?>"><?php echo $usage_files_text; ?></meter> - <?php echo $usage_files_text; ?> (updated hourly) <a href="upgrade.php?upgrade=100k_files_quota">Upgrade</a></p>
|
||||
<p>Your disk usage: <meter value="<?php echo round($quota_usage, 2); ?>"><?php echo $usage_text; ?></meter> - <?php echo $usage_text; ?> (updated hourly) <?php echo ENABLE_UPGRADE ? '<a href="upgrade.php?upgrade=1g_quota">Upgrade</a>' : ''; ?></p>
|
||||
<p>Your file number usage: <meter value="<?php echo round($quota_files_usage, 2); ?>"><?php echo $usage_files_text; ?></meter> - <?php echo $usage_files_text; ?> (updated hourly) <?php echo ENABLE_UPGRADE ? '<a href="upgrade.php?upgrade=100k_files_quota">Upgrade</a>' : ''; ?></p>
|
||||
<h3>Logs</h3>
|
||||
<table border="1">
|
||||
<tr><th>Date</th><th>access.log</th><th>error.log</th></tr>
|
||||
|
@ -24,7 +24,7 @@ header('X-Accel-Expires: 60');
|
||||
<li>Web-based file manager</li>
|
||||
<li>FTP and SFTP access</li>
|
||||
<li>command line access to shell via SSH</li>
|
||||
<li>1GB disk quota and a maximum of 100.000 files. - upgradable</li>
|
||||
<li>1GB disk quota and a maximum of 100.000 files<?php echo ENABLE_UPGRADES ? ' - upgradable' : ''; ?></li>
|
||||
<li>mail() can send e-mails from your_system_account@<?php echo ADDRESS; ?> (your_system_account@hosting.danwin1210.me for clearnet)</li>
|
||||
<li>Webmail and IMAP, POP3 and SMTP access to your mail account</li>
|
||||
<li>Mail sent to anything@your.onion gets automatically redirected to your inbox</li>
|
||||
|
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
require('../common.php');
|
||||
if(!ENABLE_UPGRADES || !COINPAYMENTS_ENABLED){
|
||||
header('Location: home.php');
|
||||
exit;
|
||||
}
|
||||
$user=check_login();
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
|
Reference in New Issue
Block a user