Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions public/include/classes/mail.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ public function sendMail($template, $aData, $throttle=false) {
if ($transport_type == 'sendmail') {
$transport = Swift_SendmailTransport::newInstance($this->config['swiftmailer'][$transport_type]['path'] . ' ' . $this->config['swiftmailer'][$transport_type]['options']);
} else if ($this->config['swiftmailer']['type'] == 'smtp') {
$transport = Swift_SmtpTransport::newInstance($this->config['switfmailer']['smtp']['host'], $this->config['switfmailer']['smtp']['port'], $this->config['switfmailer']['smtp']['encryption']);
if (!empty($this->config['switfmailer']['smtp']['username']) && !empty($this->config['switfmailer']['smtp']['password'])) {
$transport->setUsername($this->config['switfmailer']['smtp']['username']);
$transport->setPassword($this->config['switfmailer']['smtp']['password']);
$transport = Swift_SmtpTransport::newInstance($this->config['swiftmailer']['smtp']['host'], $this->config['swiftmailer']['smtp']['port'], $this->config['swiftmailer']['smtp']['encryption']);
if (!empty($this->config['swiftmailer']['smtp']['username']) && !empty($this->config['swiftmailer']['smtp']['password'])) {
$transport->setUsername($this->config['swiftmailer']['smtp']['username']);
$transport->setPassword($this->config['swiftmailer']['smtp']['password']);
}
}
$mailer = Swift_Mailer::newInstance($transport);

// Throttle mails to x per minute, used for newsletter for example
if ($this->config['swiftmailer']['type'] == 'smtp' && $throttle) {
$mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin(
$this->config['switfmailer']['smtp']['throttle'], Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE
$this->config['swiftmailer']['smtp']['throttle'], Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE
));
}

Expand Down
14 changes: 7 additions & 7 deletions public/include/config/global.inc.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Do not edit this unless you have confirmed that your config has been updated!
* https://github.com/MPOS/php-mpos/wiki/Config-Setup#wiki-config-version
**/
$config['version'] = '0.0.7';
$config['version'] = '0.0.8';

/**
* Unless you disable this, we'll do a quick check on your config first.
Expand Down Expand Up @@ -65,12 +65,12 @@
$config['swiftmailer']['type'] = 'sendmail';
$config['swiftmailer']['sendmail']['path'] = '/usr/sbin/sendmail';
$config['swiftmailer']['sendmail']['options'] = '-bs';
$config['switfmailer']['smtp']['host'] = 'your.mail-relay.com';
$config['switfmailer']['smtp']['port'] = '587';
$config['switfmailer']['smtp']['encryption'] = 'tls';
$config['switfmailer']['smtp']['username'] = '';
$config['switfmailer']['smtp']['password'] = '';
$config['switfmailer']['smtp']['throttle'] = 100;
$config['swiftmailer']['smtp']['host'] = 'your.mail-relay.com';
$config['swiftmailer']['smtp']['port'] = '587';
$config['swiftmailer']['smtp']['encryption'] = 'tls';
$config['swiftmailer']['smtp']['username'] = '';
$config['swiftmailer']['smtp']['password'] = '';
$config['swiftmailer']['smtp']['throttle'] = 100;

/**
* Getting Started Config
Expand Down
21 changes: 21 additions & 0 deletions public/include/pages/admin/earnings.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;

// Check user authentication status
if ($user->isAuthenticated()) {
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
$iLimit = 30;
$debug->append('No cached version available, fetching from backend', 3);
if (!$setting->getValue('disable_transactionsummary')) {
$aTransactionSummary = $transaction->getTransactionSummary($_SESSION['USERDATA']['id']);
$aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_SESSION['USERDATA']['id']);
$smarty->assign('SUMMARY', $aTransactionSummary);
$smarty->assign('BYTIME', $aTransactionSummaryByTime);
}
} else {
$debug->append('Using cached page', 3);
}
}

$smarty->assign('CONTENT', 'default.tpl');
?>
24 changes: 24 additions & 0 deletions public/include/pages/admin/userdetails.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;

// Check user to ensure they are admin
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
header("HTTP/1.1 404 Page not found");
die("404 Page not found");
}

if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
$debug->append('No cached version available, fetching from backend', 3);
if (isset($_REQUEST['id']) && !empty($_REQUEST['id'])) {
$aTransactionSummary = $transaction->getTransactionSummary($_REQUEST['id']);
$aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_REQUEST['id']);
$smarty->assign('USERNAME', $user->getUsername($_REQUEST['id']));
$smarty->assign('SUMMARY', $aTransactionSummary);
$smarty->assign('BYTIME', $aTransactionSummaryByTime);
}
} else {
$debug->append('Using cached page', 3);
}

$smarty->assign('CONTENT', 'default.tpl');
?>
42 changes: 21 additions & 21 deletions public/include/pages/api/getpoolinfo.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@

// Output JSON format
$data = array(
// coin info
'currency' => $config[currency],
'coinname' => $config[gettingstarted][coinname],
// coin algorithm info
'cointarget' => $config[cointarget],
'coindiffchangetarget' => $config[coindiffchangetarget],
'algorithm' => $config[algorithm],
// stratum
'stratumport' => $config[gettingstarted][stratumport],
// payments
'payout_system' => $config[payout_system],
'confirmations' => $config[confirmations],
'min_ap_threshold' => $config[ap_threshold][min],
'max_ap_threshold' => $config[ap_threshold][max],
'reward_type' => $config[payout_system] == 'pps' ? $config['pps']['reward']['type'] : $config['reward_type'],
'reward' => $config[payout_system] == 'pps' ? $config['pps']['reward']['default'] : $config['reward'],
// fees
'txfee' => $config[txfee_manual], // make it backwards compatible
'txfee_manual' => $config[txfee_manual],
'txfee_auto' => $config[txfee_auto],
'fees' => $config[fees]
// coin info
'currency' => $config['currency'],
'coinname' => $config['gettingstarted']['coinname'],
// coin algorithm info
'cointarget' => $config['cointarget'],
'coindiffchangetarget' => $config['coindiffchangetarget'],
'algorithm' => $config['algorithm'],
// stratum
'stratumport' => $config['gettingstarted']['stratumport'],
// payments
'payout_system' => $config['payout_system'],
'confirmations' => $config['confirmations'],
'min_ap_threshold' => $config['ap_threshold']['min'],
'max_ap_threshold' => $config['ap_threshold']['max'],
'reward_type' => $config['payout_system'] == 'pps' ? $config['pps']['reward']['type'] : $config['reward_type'],
'reward' => $config['payout_system'] == 'pps' ? $config['pps']['reward']['default'] : $config['reward'],
// fees
'txfee' => $config['txfee_manual'], // make it backwards compatible
'txfee_manual' => $config['txfee_manual'],
'txfee_auto' => $config['txfee_auto'],
'fees' => $config['fees']
);

echo $api->get_json($data);
Expand Down
2 changes: 1 addition & 1 deletion public/include/version.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

define('MPOS_VERSION', '0.0.4');
define('DB_VERSION', '0.0.8');
define('CONFIG_VERSION', '0.0.7');
define('CONFIG_VERSION', '0.0.8');

// Fetch installed database version
$db_version = $setting->getValue('DB_VERSION');
Expand Down
85 changes: 0 additions & 85 deletions public/site_assets/mpos/css/animation.css

This file was deleted.

Loading