fixing merge conflicts
This commit is contained in:
commit
6522fb2747
@ -1,34 +1,40 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// We need this one in here to properly set our theme
|
// Default classes
|
||||||
require_once(INCLUDE_DIR . '/lib/Mobile_Detect.php');
|
|
||||||
|
|
||||||
// Detect device
|
|
||||||
if ($detect->isMobile() && $config['website']['mobile']) {
|
|
||||||
// Set to mobile theme
|
|
||||||
$config['website']['mobile_theme'] ? $theme = $config['website']['mobile_theme'] : $theme = 'mobile';
|
|
||||||
} else {
|
|
||||||
// Use configured theme, fallback to default theme
|
|
||||||
$config['website']['theme'] ? $theme = $config['website']['theme'] : $theme = 'mmcFE';
|
|
||||||
}
|
|
||||||
define('THEME', $theme);
|
|
||||||
|
|
||||||
require_once(CLASS_DIR . '/debug.class.php');
|
require_once(CLASS_DIR . '/debug.class.php');
|
||||||
require_once(CLASS_DIR . '/bitcoin.class.php');
|
require_once(CLASS_DIR . '/bitcoin.class.php');
|
||||||
require_once(CLASS_DIR . '/statscache.class.php');
|
require_once(CLASS_DIR . '/statscache.class.php');
|
||||||
require_once(CLASS_DIR . '/bitcoinwrapper.class.php');
|
require_once(CLASS_DIR . '/bitcoinwrapper.class.php');
|
||||||
require_once(INCLUDE_DIR . '/lib/KLogger.php');
|
require_once(INCLUDE_DIR . '/lib/KLogger.php');
|
||||||
require_once(INCLUDE_DIR . '/database.inc.php');
|
require_once(INCLUDE_DIR . '/database.inc.php');
|
||||||
require_once(INCLUDE_DIR . '/smarty.inc.php');
|
|
||||||
// Load classes that need the above as dependencies
|
// We need to load these two first
|
||||||
require_once(CLASS_DIR . '/base.class.php');
|
require_once(CLASS_DIR . '/base.class.php');
|
||||||
|
require_once(CLASS_DIR . '/setting.class.php');
|
||||||
|
|
||||||
|
// We need this one in here to properly set our theme
|
||||||
|
require_once(INCLUDE_DIR . '/lib/Mobile_Detect.php');
|
||||||
|
|
||||||
|
// Detect device
|
||||||
|
if ($detect->isMobile() && $setting->getValue('website_mobile_theme')) {
|
||||||
|
// Set to mobile theme
|
||||||
|
$setting->getValue('website_mobile_theme') ? $theme = $setting->getValue('website_mobile_theme') : $theme = 'mobile';
|
||||||
|
} else {
|
||||||
|
// Use configured theme, fallback to default theme
|
||||||
|
$setting->getValue('website_theme') ? $theme = $setting->getValue('website_theme') : $theme = 'mmcFE';
|
||||||
|
}
|
||||||
|
define('THEME', $theme);
|
||||||
|
|
||||||
|
// Load smarty now that we have our theme defined
|
||||||
|
require_once(INCLUDE_DIR . '/smarty.inc.php');
|
||||||
|
|
||||||
|
// Load everything else in proper order
|
||||||
require_once(CLASS_DIR . '/api.class.php');
|
require_once(CLASS_DIR . '/api.class.php');
|
||||||
require_once(CLASS_DIR . '/mail.class.php');
|
require_once(CLASS_DIR . '/mail.class.php');
|
||||||
require_once(CLASS_DIR . '/tokentype.class.php');
|
require_once(CLASS_DIR . '/tokentype.class.php');
|
||||||
require_once(CLASS_DIR . '/token.class.php');
|
require_once(CLASS_DIR . '/token.class.php');
|
||||||
require_once(CLASS_DIR . '/payout.class.php');
|
require_once(CLASS_DIR . '/payout.class.php');
|
||||||
require_once(CLASS_DIR . '/block.class.php');
|
require_once(CLASS_DIR . '/block.class.php');
|
||||||
require_once(CLASS_DIR . '/setting.class.php');
|
|
||||||
require_once(CLASS_DIR . '/monitoring.class.php');
|
require_once(CLASS_DIR . '/monitoring.class.php');
|
||||||
require_once(CLASS_DIR . '/user.class.php');
|
require_once(CLASS_DIR . '/user.class.php');
|
||||||
require_once(CLASS_DIR . '/invitation.class.php');
|
require_once(CLASS_DIR . '/invitation.class.php');
|
||||||
@ -40,3 +46,6 @@ require_once(CLASS_DIR . '/notification.class.php');
|
|||||||
require_once(CLASS_DIR . '/news.class.php');
|
require_once(CLASS_DIR . '/news.class.php');
|
||||||
require_once(INCLUDE_DIR . '/lib/Michelf/Markdown.php');
|
require_once(INCLUDE_DIR . '/lib/Michelf/Markdown.php');
|
||||||
require_once(INCLUDE_DIR . '/lib/scrypt.php');
|
require_once(INCLUDE_DIR . '/lib/scrypt.php');
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ if (!defined('SECURITY')) die('Hacking attempt');
|
|||||||
**/
|
**/
|
||||||
class Api extends Base {
|
class Api extends Base {
|
||||||
function isActive($error=true) {
|
function isActive($error=true) {
|
||||||
if (!$this->config['website']['api']['disabled']) {
|
if (!$this->setting->getValue('disable_api')) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if ($error == true) {
|
if ($error == true) {
|
||||||
@ -21,3 +21,4 @@ class Api extends Base {
|
|||||||
|
|
||||||
$api = new Api();
|
$api = new Api();
|
||||||
$api->setConfig($config);
|
$api->setConfig($config);
|
||||||
|
$api->setSetting($setting);
|
||||||
|
|||||||
@ -32,7 +32,10 @@ class Base {
|
|||||||
$this->token = $token;
|
$this->token = $token;
|
||||||
}
|
}
|
||||||
public function setBlock($block) {
|
public function setBlock($block) {
|
||||||
$this->block= $block;
|
$this->block = $block;
|
||||||
|
}
|
||||||
|
public function setSetting($setting) {
|
||||||
|
$this->setting = $setting;
|
||||||
}
|
}
|
||||||
public function setBitcoin($bitcoin) {
|
public function setBitcoin($bitcoin) {
|
||||||
$this->bitcoin = $bitcoin;
|
$this->bitcoin = $bitcoin;
|
||||||
|
|||||||
@ -10,9 +10,10 @@ class Block {
|
|||||||
// This defines each block
|
// This defines each block
|
||||||
public $height, $blockhash, $confirmations, $time, $accounted;
|
public $height, $blockhash, $confirmations, $time, $accounted;
|
||||||
|
|
||||||
public function __construct($debug, $mysqli, $salt) {
|
public function __construct($debug, $mysqli, $config) {
|
||||||
$this->debug = $debug;
|
$this->debug = $debug;
|
||||||
$this->mysqli = $mysqli;
|
$this->mysqli = $mysqli;
|
||||||
|
$this->config = $config;
|
||||||
$this->debug->append("Instantiated Block class", 2);
|
$this->debug->append("Instantiated Block class", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,8 +133,9 @@ class Block {
|
|||||||
* @param confirmations int Required confirmations to consider block confirmed
|
* @param confirmations int Required confirmations to consider block confirmed
|
||||||
* @return data array Array with database fields as keys
|
* @return data array Array with database fields as keys
|
||||||
**/
|
**/
|
||||||
public function getAllUnconfirmed($confirmations='120') {
|
public function getAllUnconfirmed() {
|
||||||
$stmt = $this->mysqli->prepare("SELECT id, height, blockhash, confirmations FROM $this->table WHERE confirmations < ? AND confirmations > -1");
|
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE confirmations < ? AND confirmations > -1");
|
||||||
|
empty($this->config['network_confirmations']) ? $confirmations = 120 : $confirmations = $this->config['network_confirmations'];
|
||||||
if ($this->checkStmt($stmt) && $stmt->bind_param("i", $confirmations) && $stmt->execute() && $result = $stmt->get_result())
|
if ($this->checkStmt($stmt) && $stmt->bind_param("i", $confirmations) && $stmt->execute() && $result = $stmt->get_result())
|
||||||
return $result->fetch_all(MYSQLI_ASSOC);
|
return $result->fetch_all(MYSQLI_ASSOC);
|
||||||
return false;
|
return false;
|
||||||
@ -279,4 +281,4 @@ class Block {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Automatically load our class for furhter usage
|
// Automatically load our class for furhter usage
|
||||||
$block = new Block($debug, $mysqli, SALT);
|
$block = new Block($debug, $mysqli, $config);
|
||||||
|
|||||||
@ -4,30 +4,7 @@
|
|||||||
if (!defined('SECURITY'))
|
if (!defined('SECURITY'))
|
||||||
die('Hacking attempt');
|
die('Hacking attempt');
|
||||||
|
|
||||||
class Mail {
|
class Mail extends Base {
|
||||||
private $sError = '';
|
|
||||||
|
|
||||||
public function setDebug($debug) {
|
|
||||||
$this->debug = $debug;
|
|
||||||
}
|
|
||||||
public function setMysql($mysqli) {
|
|
||||||
$this->mysqli = $mysqli;
|
|
||||||
}
|
|
||||||
public function setSmarty($smarty) {
|
|
||||||
$this->smarty = $smarty;
|
|
||||||
}
|
|
||||||
public function setUser($user) {
|
|
||||||
$this->user = $user;
|
|
||||||
}
|
|
||||||
public function setConfig($config) {
|
|
||||||
$this->config = $config;
|
|
||||||
}
|
|
||||||
public function setErrorMessage($msg) {
|
|
||||||
$this->sError = $msg;
|
|
||||||
}
|
|
||||||
public function getError() {
|
|
||||||
return $this->sError;
|
|
||||||
}
|
|
||||||
function checkStmt($bState) {
|
function checkStmt($bState) {
|
||||||
$this->debug->append("STA " . __METHOD__, 4);
|
$this->debug->append("STA " . __METHOD__, 4);
|
||||||
if ($bState ===! true) {
|
if ($bState ===! true) {
|
||||||
@ -39,21 +16,15 @@ class Mail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function sendMail($template, $aData) {
|
public function sendMail($template, $aData) {
|
||||||
$this->smarty->assign('WEBSITENAME', $this->config['website']['name']);
|
$this->smarty->assign('WEBSITENAME', $this->setting->getValue('website_name'));
|
||||||
$this->smarty->assign('SUBJECT', $aData['subject']);
|
$this->smarty->assign('SUBJECT', $aData['subject']);
|
||||||
$this->smarty->assign('DATA', $aData);
|
$this->smarty->assign('DATA', $aData);
|
||||||
$headers = 'From: Website Administration <' . $this->config['website']['email'] . ">\n";
|
$headers = 'From: Website Administration <' . $this->setting->getValue('website_email') . ">\n";
|
||||||
$headers .= "MIME-Version: 1.0\n";
|
$headers .= "MIME-Version: 1.0\n";
|
||||||
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
|
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
|
||||||
if (mail($aData['email'],
|
if (mail($aData['email'], $this->smarty->fetch(BASEPATH . 'templates/mail/subject.tpl'), $this->smarty->fetch(BASEPATH . 'templates/mail/' . $template . '.tpl'), $headers))
|
||||||
$this->smarty->fetch(BASEPATH . 'templates/mail/subject.tpl'),
|
return true;
|
||||||
$this->smarty->fetch(BASEPATH . 'templates/mail/' . $template . '.tpl'),
|
$this->setErrorMessage('Unable to send mail');
|
||||||
$headers)) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
$this->setErrorMessage("Unable to send mail");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64,4 +35,5 @@ $mail->setDebug($debug);
|
|||||||
$mail->setMysql($mysqli);
|
$mail->setMysql($mysqli);
|
||||||
$mail->setSmarty($smarty);
|
$mail->setSmarty($smarty);
|
||||||
$mail->setConfig($config);
|
$mail->setConfig($config);
|
||||||
|
$mail->setSetting($setting);
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -17,21 +17,6 @@ class Notification extends Mail {
|
|||||||
return $this->updateSingle($id, $field);
|
return $this->updateSingle($id, $field);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Update a single row in a table
|
|
||||||
* @param userID int Account ID
|
|
||||||
* @param field string Field to update
|
|
||||||
* @return bool
|
|
||||||
**/
|
|
||||||
private function updateSingle($id, $field, $table='') {
|
|
||||||
if (empty($table)) $table = $this->table;
|
|
||||||
$this->debug->append("STA " . __METHOD__, 4);
|
|
||||||
$stmt = $this->mysqli->prepare("UPDATE $table SET " . $field['name'] . " = ? WHERE id = ? LIMIT 1");
|
|
||||||
if ($this->checkStmt($stmt) && $stmt->bind_param($field['type'].'i', $field['value'], $id) && $stmt->execute())
|
|
||||||
return true;
|
|
||||||
$this->debug->append("Unable to update " . $field['name'] . " with " . $field['value'] . " for ID $id");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* We check our notification table for existing data
|
* We check our notification table for existing data
|
||||||
* so we can avoid duplicate entries
|
* so we can avoid duplicate entries
|
||||||
|
|||||||
@ -5,10 +5,9 @@ if (!defined('SECURITY'))
|
|||||||
die('Hacking attempt');
|
die('Hacking attempt');
|
||||||
|
|
||||||
class Setting {
|
class Setting {
|
||||||
public function __construct($debug, $mysqli, $salt) {
|
public function __construct($debug, $mysqli) {
|
||||||
$this->debug = $debug;
|
$this->debug = $debug;
|
||||||
$this->mysqli = $mysqli;
|
$this->mysqli = $mysqli;
|
||||||
$this->salt = $salt;
|
|
||||||
$this->table = 'settings';
|
$this->table = 'settings';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,9 +46,8 @@ class Setting {
|
|||||||
if ($stmt && $stmt->bind_param('sss', $name, $value, $value) && $stmt->execute())
|
if ($stmt && $stmt->bind_param('sss', $name, $value, $value) && $stmt->execute())
|
||||||
return true;
|
return true;
|
||||||
$this->debug->append("Failed to set $name to $value");
|
$this->debug->append("Failed to set $name to $value");
|
||||||
echo $this->mysqli->error;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$setting = new Setting($debug, $mysqli, SALT);
|
$setting = new Setting($debug, $mysqli);
|
||||||
|
|||||||
@ -404,10 +404,10 @@ class Statistics {
|
|||||||
GROUP BY HOUR(time)");
|
GROUP BY HOUR(time)");
|
||||||
if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $account_id, $account_id) && $stmt->execute() && $result = $stmt->get_result()) {
|
if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $account_id, $account_id) && $stmt->execute() && $result = $stmt->get_result()) {
|
||||||
$iStartHour = date('G');
|
$iStartHour = date('G');
|
||||||
for ($i = $iStartHour; $i < 24; $i++) $aData[$i] = 0;
|
// Initilize array
|
||||||
|
for ($i = 0; $i < 24; $i++) $aData[($iStartHour + $i) % 24] = 0;
|
||||||
|
// Fill data
|
||||||
while ($row = $result->fetch_assoc()) $aData[$row['hour']] = $row['hashrate'];
|
while ($row = $result->fetch_assoc()) $aData[$row['hour']] = $row['hashrate'];
|
||||||
// Fill any non-existing hours with 0 hashrate
|
|
||||||
for ($i = 0; $i < 24; $i++) if (!array_key_exists($i, $aData)) $aData[$i] = 0;
|
|
||||||
return $this->memcache->setCache(__FUNCTION__ . $account_id, $aData);
|
return $this->memcache->setCache(__FUNCTION__ . $account_id, $aData);
|
||||||
}
|
}
|
||||||
// Catchall
|
// Catchall
|
||||||
@ -441,10 +441,10 @@ class Statistics {
|
|||||||
GROUP BY HOUR(time)");
|
GROUP BY HOUR(time)");
|
||||||
if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) {
|
if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) {
|
||||||
$iStartHour = date('G');
|
$iStartHour = date('G');
|
||||||
for ($i = $iStartHour; $i < 24; $i++) $aData[$i] = 0;
|
// Initilize array
|
||||||
|
for ($i = 0; $i < 24; $i++) $aData[($iStartHour + $i) % 24] = 0;
|
||||||
|
// Fill data
|
||||||
while ($row = $result->fetch_assoc()) $aData[$row['hour']] = (int) $row['hashrate'];
|
while ($row = $result->fetch_assoc()) $aData[$row['hour']] = (int) $row['hashrate'];
|
||||||
// Fill any non-existing hours with 0 hashrate
|
|
||||||
for ($i = 0; $i < 24; $i++) if (!array_key_exists($i, $aData)) $aData[$i] = 0;
|
|
||||||
return $this->memcache->setCache(__FUNCTION__, $aData);
|
return $this->memcache->setCache(__FUNCTION__, $aData);
|
||||||
}
|
}
|
||||||
// Catchall
|
// Catchall
|
||||||
|
|||||||
@ -28,6 +28,9 @@ class User {
|
|||||||
public function setBitcoin($bitcoin) {
|
public function setBitcoin($bitcoin) {
|
||||||
$this->bitcoin = $bitcoin;
|
$this->bitcoin = $bitcoin;
|
||||||
}
|
}
|
||||||
|
public function setSetting($setting) {
|
||||||
|
$this->setting = $setting;
|
||||||
|
}
|
||||||
private function setErrorMessage($msg) {
|
private function setErrorMessage($msg) {
|
||||||
$this->sError = $msg;
|
$this->sError = $msg;
|
||||||
}
|
}
|
||||||
@ -525,7 +528,7 @@ class User {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->mysqli->query("SELECT id FROM $this->table LIMIT 1")->num_rows > 0) {
|
if ($this->mysqli->query("SELECT id FROM $this->table LIMIT 1")->num_rows > 0) {
|
||||||
$this->config['accounts']['confirm_email']['enabled'] ? $is_locked = 1 : $is_locked = 0;
|
! $this->setting->getValue('accounts_confirm_email_disabled') ? $is_locked = 1 : $is_locked = 0;
|
||||||
$is_admin = 0;
|
$is_admin = 0;
|
||||||
$stmt = $this->mysqli->prepare("
|
$stmt = $this->mysqli->prepare("
|
||||||
INSERT INTO $this->table (username, pass, email, pin, api_key, is_locked)
|
INSERT INTO $this->table (username, pass, email, pin, api_key, is_locked)
|
||||||
@ -547,14 +550,14 @@ class User {
|
|||||||
$username_clean = strip_tags($username);
|
$username_clean = strip_tags($username);
|
||||||
|
|
||||||
if ($this->checkStmt($stmt) && $stmt->bind_param('sssssi', $username_clean, $password_hash, $email1, $pin_hash, $apikey_hash, $is_locked) && $stmt->execute()) {
|
if ($this->checkStmt($stmt) && $stmt->bind_param('sssssi', $username_clean, $password_hash, $email1, $pin_hash, $apikey_hash, $is_locked) && $stmt->execute()) {
|
||||||
if ($this->config['accounts']['confirm_email']['enabled'] && $is_admin != 1) {
|
if (! $this->setting->getValue('accounts_confirm_email_enabled') && $is_admin != 1) {
|
||||||
if ($token = $this->token->createToken('confirm_email', $stmt->insert_id)) {
|
if ($token = $this->token->createToken('confirm_email', $stmt->insert_id)) {
|
||||||
$aData['username'] = $username_clean;
|
$aData['username'] = $username_clean;
|
||||||
$aData['token'] = $token;
|
$aData['token'] = $token;
|
||||||
$aData['email'] = $email1;
|
$aData['email'] = $email1;
|
||||||
$aData['subject'] = 'E-Mail verification';
|
$aData['subject'] = 'E-Mail verification';
|
||||||
if (!$this->mail->sendMail('register/confirm_email', $aData)) {
|
if (!$this->mail->sendMail('register/confirm_email', $aData)) {
|
||||||
$this->setErrorMessage('Unable to request email confirmation');
|
$this->setErrorMessage('Unable to request email confirmation: ' . $this->mail->getError());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -666,3 +669,4 @@ $user = new User($debug, $mysqli, SALT, $config);
|
|||||||
$user->setMail($mail);
|
$user->setMail($mail);
|
||||||
$user->setToken($oToken);
|
$user->setToken($oToken);
|
||||||
$user->setBitcoin($bitcoin);
|
$user->setBitcoin($bitcoin);
|
||||||
|
$user->setSetting($setting);
|
||||||
|
|||||||
@ -3,48 +3,186 @@
|
|||||||
// Make sure we are called from index.php
|
// Make sure we are called from index.php
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
if (!defined('SECURITY')) die('Hacking attempt');
|
||||||
|
|
||||||
|
// Load a list of themes available
|
||||||
|
$aTmpThemes = glob(THEME_DIR . '/*');
|
||||||
|
$aThemes = array();
|
||||||
|
foreach ($aTmpThemes as $dir) {
|
||||||
|
if (basename($dir) != 'cache' && basename($dir) != 'compile' && basename($dir) != 'mail') $aThemes[basename($dir)] = basename($dir);
|
||||||
|
}
|
||||||
|
|
||||||
// Load the settings available in this system
|
// Load the settings available in this system
|
||||||
$aSettings['system'][] = array(
|
$aSettings['website'][] = array(
|
||||||
'display' => 'Maintenance Mode', 'type' => 'select',
|
'display' => 'Maintenance Mode', 'type' => 'select',
|
||||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
'name' => 'maintenance', 'value' => $setting->getValue('maintenance'),
|
'name' => 'maintenance', 'value' => $setting->getValue('maintenance'),
|
||||||
'tooltip' => 'Enable or Disable maintenance mode. Only admins can still login.'
|
'tooltip' => 'Enable or Disable maintenance mode. Only admins can still login.'
|
||||||
);
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Message of the Day', 'type' => 'text',
|
||||||
|
'size' => 25,
|
||||||
|
'default' => '',
|
||||||
|
'name' => 'system_motd', 'value' => $setting->getValue('system_motd'),
|
||||||
|
'tooltip' => 'Display a message of the day as information popup if set.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Website Name', 'type' => 'text',
|
||||||
|
'size' => 25,
|
||||||
|
'default' => 'The Pool',
|
||||||
|
'name' => 'website_name', 'value' => $setting->getValue('website_name'),
|
||||||
|
'tooltip' => 'The name of you pool page, displayed in the header of the page.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Website Title', 'type' => 'text',
|
||||||
|
'size' => 25,
|
||||||
|
'default' => 'The Pool - Mining Evolved',
|
||||||
|
'name' => 'website_title', 'value' => $setting->getValue('website_title'),
|
||||||
|
'tooltip' => 'The title of you pool page, displayed in the browser window header.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Website Slogan', 'type' => 'text',
|
||||||
|
'size' => 25,
|
||||||
|
'default' => 'Resistance is Futile',
|
||||||
|
'name' => 'website_slogan', 'value' => $setting->getValue('website_slogan'),
|
||||||
|
'tooltip' => 'The slogan of you pool page, displayed in the browser window header.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Website e-mail', 'type' => 'text',
|
||||||
|
'size' => 25,
|
||||||
|
'default' => 'test@example.com',
|
||||||
|
'name' => 'website_email', 'value' => $setting->getValue('website_email'),
|
||||||
|
'tooltip' => 'The email address for your pool, used in mail templates and notifications.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Website theme', 'type' => 'select',
|
||||||
|
'options' => $aThemes,
|
||||||
|
'default' => 'mmcFE',
|
||||||
|
'name' => 'website_theme', 'value' => $setting->getValue('website_theme'),
|
||||||
|
'tooltip' => 'The default theme used on your pool.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Website mobile theme', 'type' => 'select',
|
||||||
|
'options' => $aThemes,
|
||||||
|
'default' => 'mobile',
|
||||||
|
'name' => 'website_mobile_theme', 'value' => $setting->getValue('website_mobile_theme'),
|
||||||
|
'tooltip' => 'The mobile theme used for your pool.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Blockexplorer URL', 'type' => 'text',
|
||||||
|
'size' => 50,
|
||||||
|
'default' => 'http://explorer.litecoin.net/block/',
|
||||||
|
'name' => 'website_blockexplorer_url', 'value' => $setting->getValue('website_blockexplorer_url'),
|
||||||
|
'tooltip' => 'URL to the blockexplorer website for your blockchain. Will append the blockhash to the URL. Leave empty to disabled this.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Disable Blockexplorer', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'name' => 'website_blockexplorer_disabled', 'value' => $setting->getValue('website_blockexplorer_disabled'),
|
||||||
|
'tooltip' => 'Enabled or disable the blockexplorer URL feature. Will remove any links using the blockexplorer URL.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Chaininfo URL', 'type' => 'text',
|
||||||
|
'size' => 50,
|
||||||
|
'default' => 'http://allchains.info',
|
||||||
|
'name' => 'website_chaininfo_url', 'value' => $setting->getValue('website_chaininfo_url'),
|
||||||
|
'tooltip' => 'URL to the chaininfo website for your blockchain. Leave empty to disabled this.'
|
||||||
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Disable Chaininfo', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'name' => 'website_chaininfo_disabled', 'value' => $setting->getValue('website_chaininfo_disabled'),
|
||||||
|
'tooltip' => 'Enabled or disable the chainfo URL feature. Will remove any links using the chaininfo URL.'
|
||||||
|
);
|
||||||
|
$aSettings['statistics'][] = array(
|
||||||
|
'display' => 'Block Statistics Count', 'type' => 'text',
|
||||||
|
'size' => 25,
|
||||||
|
'default' => 20,
|
||||||
|
'name' => 'statistics_block_count', 'value' => $setting->getValue('statistics_block_count'),
|
||||||
|
'tooltip' => 'Blocks to fetch for the block statistics page.'
|
||||||
|
);
|
||||||
|
$aSettings['acl'][] = array(
|
||||||
|
'display' => 'Pool Statistics', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'Private', 1 => 'Public'),
|
||||||
|
'default' => 1,
|
||||||
|
'name' => 'acl_pool_statistics', 'value' => $setting->getValue('acl_pool_statistics'),
|
||||||
|
'tooltip' => 'Make the pool statistics page private (users only) or public.'
|
||||||
|
);
|
||||||
|
$aSettings['acl'][] = array(
|
||||||
|
'display' => 'Blcok Statistics', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'Private', 1 => 'Public'),
|
||||||
|
'default' => 1,
|
||||||
|
'name' => 'acl_block_statistics', 'value' => $setting->getValue('acl_block_statistics'),
|
||||||
|
'tooltip' => 'Make the block statistics page private (users only) or public.'
|
||||||
|
);
|
||||||
|
$aSettings['system'][] = array(
|
||||||
|
'display' => 'Disable e-mail confirmations', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
|
'name' => 'accounts_confirm_email_disabled', 'value' => $setting->getValue('accounts_confirm_email_disabled'),
|
||||||
|
'tooltip' => 'Should users supply a valid e-mail address upon registration. Requires them to confirm the address before accounts are activated.'
|
||||||
|
);
|
||||||
$aSettings['system'][] = array(
|
$aSettings['system'][] = array(
|
||||||
'display' => 'Disable registrations', 'type' => 'select',
|
'display' => 'Disable registrations', 'type' => 'select',
|
||||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
'name' => 'lock_registration', 'value' => $setting->getValue('lock_registration'),
|
'name' => 'lock_registration', 'value' => $setting->getValue('lock_registration'),
|
||||||
'tooltip' => 'Enable or Disable registrations. Useful to create an invitation only pool.'
|
'tooltip' => 'Enable or Disable registrations. Useful to create an invitation only pool.'
|
||||||
);
|
);
|
||||||
$aSettings['system'][] = array(
|
$aSettings['system'][] = array(
|
||||||
'display' => 'Disable Invitations', 'type' => 'select',
|
'display' => 'Disable Invitations', 'type' => 'select',
|
||||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
'name' => 'disable_invitations', 'value' => $setting->getValue('disable_invitations'),
|
'name' => 'disable_invitations', 'value' => $setting->getValue('disable_invitations'),
|
||||||
'tooltip' => 'Enable or Disable invitations. Users will not be able to invite new users via email if disabled.'
|
'tooltip' => 'Enable or Disable invitations. Users will not be able to invite new users via email if disabled.'
|
||||||
);
|
);
|
||||||
$aSettings['system'][] = array(
|
$aSettings['system'][] = array(
|
||||||
'display' => 'Disable Manual Payouts', 'type' => 'select',
|
'display' => 'Disable Manual Payouts', 'type' => 'select',
|
||||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
'name' => 'disable_mp', 'value' => $setting->getValue('disable_mp'),
|
'name' => 'disable_mp', 'value' => $setting->getValue('disable_mp'),
|
||||||
'tooltip' => 'Enable or Disable the manual payout processing. Users will not be able to withdraw any funds if disabled.'
|
'tooltip' => 'Enable or Disable the manual payout processing. Users will not be able to withdraw any funds if disabled.'
|
||||||
);
|
);
|
||||||
$aSettings['system'][] = array(
|
$aSettings['system'][] = array(
|
||||||
'display' => 'Disable Automatic Payouts', 'type' => 'select',
|
'display' => 'Disable Automatic Payouts', 'type' => 'select',
|
||||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
'name' => 'disable_ap', 'value' => $setting->getValue('disable_ap'),
|
'name' => 'disable_ap', 'value' => $setting->getValue('disable_ap'),
|
||||||
'tooltip' => 'Enable or Disable the automatic payout processing. Users exceeding their thresholds will not be paid out if disabled.'
|
'tooltip' => 'Enable or Disable the automatic payout processing. Users exceeding their thresholds will not be paid out if disabled.'
|
||||||
);
|
);
|
||||||
$aSettings['system'][] = array(
|
$aSettings['system'][] = array(
|
||||||
'display' => 'Disable notifications', 'type' => 'select',
|
'display' => 'Disable notifications', 'type' => 'select',
|
||||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
'name' => 'disable_notifications', 'value' => $setting->getValue('disable_notifications'),
|
'name' => 'disable_notifications', 'value' => $setting->getValue('disable_notifications'),
|
||||||
'tooltip' => 'Enable or Disable system notifications. This includes new found blocks, monitoring and all other notifications.'
|
'tooltip' => 'Enable or Disable system notifications. This includes new found blocks, monitoring and all other notifications.'
|
||||||
);
|
);
|
||||||
$aSettings['other'][] = array(
|
$aSettings['system'][] = array(
|
||||||
'display' => 'Message of the Day', 'type' => 'text',
|
'display' => 'Disable API', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
|
'name' => 'disable_api', 'value' => $setting->getValue('disable_api'),
|
||||||
|
'tooltip' => 'Enable or Disable the pool wide API functions. See API reference on Github for details.'
|
||||||
|
);
|
||||||
|
$aSettings['recaptcha'][] = array(
|
||||||
|
'display' => 'Enable re-Captcha', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
'default' => 0,
|
||||||
|
'name' => 'recaptcha_enabled', 'value' => $setting->getValue('recaptcha_enabled'),
|
||||||
|
'tooltip' => 'Enable or Disable re-Captcha. This will require user input on registraion and other forms.'
|
||||||
|
);
|
||||||
|
$aSettings['recaptcha'][] = array(
|
||||||
|
'display' => 're-Captcha Private Key', 'type' => 'text',
|
||||||
'size' => 25,
|
'size' => 25,
|
||||||
'name' => 'system_motd', 'value' => $setting->getValue('system_motd'),
|
'default' => 'YOUR_PRIVATE_KEY',
|
||||||
'tooltip' => 'Display a message of the day as information popup if set.'
|
'name' => 'recaptcha_private_key', 'value' => $setting->getValue('recaptcha_private_key'),
|
||||||
|
'tooltip' => '.'
|
||||||
|
);
|
||||||
|
$aSettings['recaptcha'][] = array(
|
||||||
|
'display' => 're-Captcha Public Key', 'type' => 'text',
|
||||||
|
'size' => 25,
|
||||||
|
'default' => 'YOUR_PUBLIC_KEY',
|
||||||
|
'name' => 'recaptcha_public_key', 'value' => $setting->getValue('recaptcha_public_key'),
|
||||||
|
'tooltip' => 'Your public key as given by your re-Captcha account.'
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -97,49 +97,10 @@ $config['ap_threshold']['min'] = 1;
|
|||||||
$config['ap_threshold']['max'] = 250;
|
$config['ap_threshold']['max'] = 250;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Website specific configuration settings
|
|
||||||
*
|
|
||||||
* Explanation:
|
|
||||||
* title : Website title used in master template
|
|
||||||
* name : The pool name, displayed in the header and mails
|
|
||||||
* slogan : A special slogan, also displayed in the header below name
|
|
||||||
* email : `From` addresses used in notifications
|
|
||||||
* theme : Theme used for desktop browsers
|
|
||||||
* mobile : Enable/Disable mobile theme support
|
|
||||||
* mobile_theme : Theme used for mobile browsers
|
|
||||||
* api disabled : Disable the sites API functions
|
|
||||||
* blocks count : # of blocks to display on block statistics page
|
|
||||||
*
|
|
||||||
* Defaults:
|
|
||||||
* title = `The Pool - Mining Evolved`
|
|
||||||
* name = `The Pool`
|
|
||||||
* slogan = `Resistance is futile`
|
|
||||||
* email = `test@example.com`
|
|
||||||
* theme = `mmcFE`
|
|
||||||
* mobile = true
|
|
||||||
* mobile_theme = `mobile`
|
|
||||||
* api disbabled = false
|
|
||||||
* blocks count = 20
|
|
||||||
**/
|
|
||||||
$config['website']['title'] = 'The Pool - Mining Evolved';
|
|
||||||
$config['website']['name'] = 'The Pool';
|
|
||||||
$config['website']['slogan'] = 'Resistance is futile';
|
|
||||||
$config['website']['email'] = 'test@example.com';
|
|
||||||
$config['website']['theme'] = 'mmcFE';
|
|
||||||
$config['website']['mobile'] = true;
|
|
||||||
$config['website']['mobile_theme'] = 'mobile';
|
|
||||||
$config['website']['api']['disabled'] = false;
|
|
||||||
$config['website']['blocks']['count'] = 20;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account specific settings
|
* Account specific settings
|
||||||
*
|
*
|
||||||
* Explanation
|
* Explanation
|
||||||
* You can change some defaults on how accounts are created or registered
|
|
||||||
* By default, all newly created accounts will require an email verificaiton.
|
|
||||||
* Only after acitivating an account the user will be able to login
|
|
||||||
*
|
|
||||||
* Invitations will allow your users to invite new members to join the pool.
|
* Invitations will allow your users to invite new members to join the pool.
|
||||||
* After sending a mail to the invited user, they can register using the token
|
* After sending a mail to the invited user, they can register using the token
|
||||||
* created. Invitations can be enabled and disabled through the admin panel.
|
* created. Invitations can be enabled and disabled through the admin panel.
|
||||||
@ -149,41 +110,13 @@ $config['website']['blocks']['count'] = 20;
|
|||||||
* variable.
|
* variable.
|
||||||
*
|
*
|
||||||
* Options:
|
* Options:
|
||||||
* confirm_email : Send confirmation mail to user after registration
|
|
||||||
* count : Maximum invitations a user is able to send
|
* count : Maximum invitations a user is able to send
|
||||||
*
|
*
|
||||||
* Defaults:
|
* Defaults:
|
||||||
* confirm_email : true
|
|
||||||
* count : 5
|
* count : 5
|
||||||
**/
|
**/
|
||||||
$config['accounts']['confirm_email']['enabled'] = true;
|
|
||||||
$config['accounts']['invitations']['count'] = 5;
|
$config['accounts']['invitations']['count'] = 5;
|
||||||
|
|
||||||
/**
|
|
||||||
* Some basic access restrictions on some pages
|
|
||||||
*
|
|
||||||
* Explanation:
|
|
||||||
* Some pools would like to run a few pages for public access instead
|
|
||||||
* of enforcing a login. You can change visibility of some pages here.
|
|
||||||
*
|
|
||||||
* Options:
|
|
||||||
* 'public' : Allow guest access and authenticated user to view page
|
|
||||||
* 'private' : Only allow logged in users access to view page
|
|
||||||
*
|
|
||||||
* Defaults:
|
|
||||||
* 'private' for every page
|
|
||||||
**/
|
|
||||||
$config['website']['acl']['statistics']['pool'] = 'private';
|
|
||||||
$config['website']['acl']['statistics']['blocks'] = 'private';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Re-Captcha settings
|
|
||||||
* Please read http://www.google.com/recaptcha for details
|
|
||||||
**/
|
|
||||||
$config['recaptcha']['enabled'] = false;
|
|
||||||
$config['recaptcha']['public_key'] = 'YOUR_PUBLIC_RECAPTCHA_KEY';
|
|
||||||
$config['recaptcha']['private_key'] = 'YOUR_PRIVATE_RECAPTCHA_KEY';
|
|
||||||
|
|
||||||
// Currency system used in this pool, default: `LTC`
|
// Currency system used in this pool, default: `LTC`
|
||||||
$config['currency'] = 'LTC';
|
$config['currency'] = 'LTC';
|
||||||
|
|
||||||
@ -254,15 +187,6 @@ $config['payout_system'] = 'prop';
|
|||||||
$config['archive']['maxrounds'] = 10;
|
$config['archive']['maxrounds'] = 10;
|
||||||
$config['archive']['maxage'] = 60 * 24;
|
$config['archive']['maxage'] = 60 * 24;
|
||||||
|
|
||||||
// URL prefix for block searches, used for block links, default: `http://explorer.litecoin.net/block/`
|
|
||||||
// The Blockhash is appended on the templates to this URL
|
|
||||||
// If this config is empty, the block link to the block information page will be removed
|
|
||||||
$config['blockexplorer'] = 'http://explorer.litecoin.net/block/';
|
|
||||||
|
|
||||||
// Link to blockchain information, used for difficulty link, default: `http://allchains.info`
|
|
||||||
// If empty, the difficulty link to the chain information will be removed
|
|
||||||
$config['chaininfo'] = 'http://allchains.info';
|
|
||||||
|
|
||||||
// Pool fees applied to users in percent, default: 0 (disabled)
|
// Pool fees applied to users in percent, default: 0 (disabled)
|
||||||
$config['fees'] = 0;
|
$config['fees'] = 0;
|
||||||
|
|
||||||
@ -349,6 +273,8 @@ $config['reward'] = 50;
|
|||||||
|
|
||||||
// Confirmations per block required to credit transactions, default: 120
|
// Confirmations per block required to credit transactions, default: 120
|
||||||
$config['confirmations'] = 120;
|
$config['confirmations'] = 120;
|
||||||
|
// Confirmations per block required in network to confirm its transactions, default: 120
|
||||||
|
$config['network_confirmations'] = 120;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available pps options:
|
* Available pps options:
|
||||||
|
|||||||
@ -24,16 +24,24 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
|||||||
$dNewmint = -1;
|
$dNewmint = -1;
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to wallet RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to wallet RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg');
|
||||||
}
|
}
|
||||||
|
// Fetch unconfirmed amount from blocks table
|
||||||
|
$aBlocksUnconfirmed = $block->getAllUnconfirmed();
|
||||||
|
$dBlocksUnconfirmedBalance = 0;
|
||||||
|
if (!empty($aBlocksUnconfirmed))
|
||||||
|
foreach ($aBlocksUnconfirmed as $aData) $dBlocksUnconfirmedBalance += $aData['amount'];
|
||||||
|
|
||||||
// Fetch locked balance from transactions
|
// Fetch locked balance from transactions
|
||||||
$dLockedBalance = $transaction->getLockedBalance();
|
$dLockedBalance = $transaction->getLockedBalance();
|
||||||
} else {
|
} else {
|
||||||
$debug->append('Using cached page', 3);
|
$debug->append('Using cached page', 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$smarty->assign("UNCONFIRMED", $dBlocksUnconfirmedBalance);
|
||||||
$smarty->assign("BALANCE", $dBalance);
|
$smarty->assign("BALANCE", $dBalance);
|
||||||
$smarty->assign("LOCKED", $dLockedBalance);
|
$smarty->assign("LOCKED", $dLockedBalance);
|
||||||
$smarty->assign("NEWMINT", $dNewmint);
|
$smarty->assign("NEWMINT", $dNewmint);
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -10,11 +10,10 @@ if ($setting->getValue('lock_registration') && $setting->getValue('disable_invit
|
|||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Only invited users are allowed to register.', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Only invited users are allowed to register.', 'TYPE' => 'errormsg');
|
||||||
$smarty->assign("CONTENT", "disabled.tpl");
|
$smarty->assign("CONTENT", "disabled.tpl");
|
||||||
} else {
|
} else {
|
||||||
if ($config['recaptcha']['enabled']) {
|
if ($setting->getValue('recaptcha_enabled')) {
|
||||||
require_once(INCLUDE_DIR . '/lib/recaptchalib.php');
|
require_once(INCLUDE_DIR . '/lib/recaptchalib.php');
|
||||||
$smarty->assign("RECAPTCHA", recaptcha_get_html($config['recaptcha']['public_key']));
|
$smarty->assign("RECAPTCHA", recaptcha_get_html($setting->getValue('recaptcha_public_key')));
|
||||||
}
|
}
|
||||||
// Tempalte specifics
|
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
// Make sure we are called from index.php
|
// Make sure we are called from index.php
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
if (!defined('SECURITY')) die('Hacking attempt');
|
||||||
|
|
||||||
if ($config['recaptcha']['enabled']) {
|
if ($setting->getValue('recaptcha_enabled')) {
|
||||||
// Load re-captcha specific data
|
// Load re-captcha specific data
|
||||||
require_once(INCLUDE_DIR . '/lib/recaptchalib.php');
|
require_once(INCLUDE_DIR . '/lib/recaptchalib.php');
|
||||||
$rsp = recaptcha_check_answer (
|
$rsp = recaptcha_check_answer (
|
||||||
$config['recaptcha']['private_key'],
|
$setting->getValue('recaptcha_private_key'),
|
||||||
$_SERVER["REMOTE_ADDR"],
|
$_SERVER["REMOTE_ADDR"],
|
||||||
$_POST["recaptcha_challenge_field"],
|
$_POST["recaptcha_challenge_field"],
|
||||||
$_POST["recaptcha_response_field"]
|
$_POST["recaptcha_response_field"]
|
||||||
@ -19,28 +19,28 @@ if ($setting->getValue('disable_invitations') && $setting->getValue('lock_regist
|
|||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Only invited users are allowed to register.', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Only invited users are allowed to register.', 'TYPE' => 'errormsg');
|
||||||
} else {
|
} else {
|
||||||
// Check if recaptcha is enabled, process form data if valid
|
// Check if recaptcha is enabled, process form data if valid
|
||||||
if($config['recaptcha']['enabled'] && $_POST["recaptcha_response_field"] && $_POST["recaptcha_response_field"]!=''){
|
if($setting->getValue('recaptcha_enabled') && $_POST["recaptcha_response_field"] && $_POST["recaptcha_response_field"]!=''){
|
||||||
if ($rsp->is_valid) {
|
if ($rsp->is_valid) {
|
||||||
$smarty->assign("RECAPTCHA", recaptcha_get_html($config['recaptcha']['public_key']));
|
$smarty->assign("RECAPTCHA", recaptcha_get_html($setting->getValue('recaptcha_public_key')));
|
||||||
isset($_POST['token']) ? $token = $_POST['token'] : $token = '';
|
isset($_POST['token']) ? $token = $_POST['token'] : $token = '';
|
||||||
if ($user->register($_POST['username'], $_POST['password1'], $_POST['password2'], $_POST['pin'], $_POST['email1'], $_POST['email2'], $token)) {
|
if ($user->register($_POST['username'], $_POST['password1'], $_POST['password2'], $_POST['pin'], $_POST['email1'], $_POST['email2'], $token)) {
|
||||||
$config['accounts']['confirm_email']['enabled'] ? $_SESSION['POPUP'][] = array('CONTENT' => 'Please check your mailbox to activate this account') : $_SESSION['POPUP'][] = array('CONTENT' => 'Account created, please login');
|
! $setting->getValue('accounts_confirm_email_disabled') ? $_SESSION['POPUP'][] = array('CONTENT' => 'Please check your mailbox to activate this account') : $_SESSION['POPUP'][] = array('CONTENT' => 'Account created, please login');
|
||||||
} else {
|
} else {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to create account: ' . $user->getError(), 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to create account: ' . $user->getError(), 'TYPE' => 'errormsg');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$smarty->assign("RECAPTCHA", recaptcha_get_html($config['recaptcha']['public_key'], $rsp->error));
|
$smarty->assign("RECAPTCHA", recaptcha_get_html($setting->getValue('recaptcha_public_key'), $rsp->error));
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Invalid Captcha, please try again. (' . $rsp->error . ')', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Invalid Captcha, please try again. (' . $rsp->error . ')', 'TYPE' => 'errormsg');
|
||||||
}
|
}
|
||||||
// Empty captcha
|
// Empty captcha
|
||||||
} else if ($config['recaptcha']['enabled']) {
|
} else if ($setting->getValue('recaptcha_enabled')) {
|
||||||
$smarty->assign("RECAPTCHA", recaptcha_get_html($config['recaptcha']['public_key'], $rsp->error));
|
$smarty->assign("RECAPTCHA", recaptcha_get_html($setting->getValue('recaptcha_public_key'), $rsp->error));
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Empty Captcha, please try again.', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Empty Captcha, please try again.', 'TYPE' => 'errormsg');
|
||||||
// Captcha disabled
|
// Captcha disabled
|
||||||
} else {
|
} else {
|
||||||
isset($_POST['token']) ? $token = $_POST['token'] : $token = '';
|
isset($_POST['token']) ? $token = $_POST['token'] : $token = '';
|
||||||
if ($user->register($_POST['username'], $_POST['password1'], $_POST['password2'], $_POST['pin'], $_POST['email1'], $_POST['email2'], $token)) {
|
if ($user->register($_POST['username'], $_POST['password1'], $_POST['password2'], $_POST['pin'], $_POST['email1'], $_POST['email2'], $token)) {
|
||||||
$config['accounts']['confirm_email']['enabled'] ? $_SESSION['POPUP'][] = array('CONTENT' => 'Please check your mailbox to activate this account') : $_SESSION['POPUP'][] = array('CONTENT' => 'Account created, please login');
|
! $setting->getValue('accounts_confirm_email_disabled') ? $_SESSION['POPUP'][] = array('CONTENT' => 'Please check your mailbox to activate this account') : $_SESSION['POPUP'][] = array('CONTENT' => 'Account created, please login');
|
||||||
} else {
|
} else {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to create account: ' . $user->getError(), 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to create account: ' . $user->getError(), 'TYPE' => 'errormsg');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ if (!defined('SECURITY')) die('Hacking attempt');
|
|||||||
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
// Grab the last blocks found
|
// Grab the last blocks found
|
||||||
!empty($config['website']['blocks']['count']) ? $iLimit = $config['website']['blocks']['count'] : $iLimit = 20;
|
$setting->getValue('statistics_block_count') ? $iLimit = $setting->getValue('statistics_block_count') : $iLimit = 20;
|
||||||
$aBlocksFoundData = $statistics->getBlocksFound($iLimit);
|
$aBlocksFoundData = $statistics->getBlocksFound($iLimit);
|
||||||
|
|
||||||
// Propagate content our template
|
// Propagate content our template
|
||||||
@ -17,7 +17,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
|||||||
$debug->append('Using cached page', 3);
|
$debug->append('Using cached page', 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['website']['acl']['statistics']['blocks'] == 'public') {
|
if ($setting->getValue('acl_block_statistics')) {
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
} else if ($user->isAuthenticated()) {
|
} else if ($user->isAuthenticated()) {
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
|||||||
@ -52,7 +52,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
|||||||
$smarty->assign("CONTRIBSHARES", $aContributorsShares);
|
$smarty->assign("CONTRIBSHARES", $aContributorsShares);
|
||||||
$smarty->assign("CONTRIBHASHES", $aContributorsHashes);
|
$smarty->assign("CONTRIBHASHES", $aContributorsHashes);
|
||||||
$smarty->assign("CURRENTBLOCK", $iBlock);
|
$smarty->assign("CURRENTBLOCK", $iBlock);
|
||||||
$smarty->assign("CURRENTBLOCKHASH", $sBlockHash);
|
$smarty->assign("CURRENTBLOCKHASH", @$sBlockHash);
|
||||||
if (count($aBlockData) > 0) {
|
if (count($aBlockData) > 0) {
|
||||||
$smarty->assign("LASTBLOCK", $aBlockData['height']);
|
$smarty->assign("LASTBLOCK", $aBlockData['height']);
|
||||||
$smarty->assign("LASTBLOCKHASH", $aBlockData['blockhash']);
|
$smarty->assign("LASTBLOCKHASH", $aBlockData['blockhash']);
|
||||||
@ -66,9 +66,9 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Public / private page detection
|
// Public / private page detection
|
||||||
if ($config['website']['acl']['statistics']['pool'] == 'public') {
|
if ($setting->getValue('acl_pool_statistics')) {
|
||||||
$smarty->assign("CONTENT", "authenticated.tpl");
|
$smarty->assign("CONTENT", "authenticated.tpl");
|
||||||
} else if ($user->isAuthenticated() && $config['website']['acl']['statistics']['pool'] == 'private') {
|
} else if ($user->isAuthenticated() && ! $setting->getValue('acl_pool_statistics')) {
|
||||||
$smarty->assign("CONTENT", "authenticated.tpl");
|
$smarty->assign("CONTENT", "authenticated.tpl");
|
||||||
} else {
|
} else {
|
||||||
$smarty->assign("CONTENT", "../default.tpl");
|
$smarty->assign("CONTENT", "../default.tpl");
|
||||||
|
|||||||
@ -34,8 +34,6 @@ if ($iCurrentPoolHashrate > $dNetworkHashrate) $dNetworkHashrate = $iCurrentPool
|
|||||||
|
|
||||||
// Global data for Smarty
|
// Global data for Smarty
|
||||||
$aGlobal = array(
|
$aGlobal = array(
|
||||||
'slogan' => $config['website']['slogan'],
|
|
||||||
'websitename' => $config['website']['name'],
|
|
||||||
'hashrate' => $iCurrentPoolHashrate,
|
'hashrate' => $iCurrentPoolHashrate,
|
||||||
'nethashrate' => $dNetworkHashrate,
|
'nethashrate' => $dNetworkHashrate,
|
||||||
'sharerate' => $iCurrentPoolShareRate,
|
'sharerate' => $iCurrentPoolShareRate,
|
||||||
@ -45,11 +43,8 @@ $aGlobal = array(
|
|||||||
'confirmations' => $config['confirmations'],
|
'confirmations' => $config['confirmations'],
|
||||||
'reward' => $config['reward'],
|
'reward' => $config['reward'],
|
||||||
'price' => $setting->getValue('price'),
|
'price' => $setting->getValue('price'),
|
||||||
'blockexplorer' => $config['blockexplorer'],
|
|
||||||
'chaininfo' => $config['chaininfo'],
|
|
||||||
'disable_mp' => $setting->getValue('disable_mp'),
|
'disable_mp' => $setting->getValue('disable_mp'),
|
||||||
'config' => array(
|
'config' => array(
|
||||||
'website' => $config['website'],
|
|
||||||
'accounts' => $config['accounts'],
|
'accounts' => $config['accounts'],
|
||||||
'disable_invitations' => $setting->getValue('disable_invitations'),
|
'disable_invitations' => $setting->getValue('disable_invitations'),
|
||||||
'disable_notifications' => $setting->getValue('disable_notifications'),
|
'disable_notifications' => $setting->getValue('disable_notifications'),
|
||||||
@ -65,6 +60,21 @@ $aGlobal = array(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Website configurations
|
||||||
|
$aGlobal['website']['name'] = $setting->getValue('website_name');
|
||||||
|
$aGlobal['website']['title'] = $setting->getValue('website_title');
|
||||||
|
$aGlobal['website']['slogan'] = $setting->getValue('website_slogan');
|
||||||
|
$aGlobal['website']['email'] = $setting->getValue('website_email');
|
||||||
|
$aGlobal['website']['api']['disabled'] = $setting->getValue('disable_api');
|
||||||
|
$aGlobal['website']['blockexplorer']['disabled'] = $setting->getValue('website_blockexplorer_disabled');
|
||||||
|
$aGlobal['website']['chaininfo']['disabled'] = $setting->getValue('website_chaininfo_disabled');
|
||||||
|
$setting->getValue('website_blockexplorer_url') ? $aGlobal['website']['blockexplorer']['url'] = $setting->getValue('website_blockexplorer_url') : $aGlobal['website']['blockexplorer']['url'] = 'http://explorer.litecoin.net/block/';
|
||||||
|
$setting->getValue('website_chaininfo_url') ? $aGlobal['website']['chaininfo']['url'] = $setting->getValue('website_chaininfo_url') : $aGlobal['website']['chaininfo']['url'] = 'http://allchains.info';
|
||||||
|
|
||||||
|
// ACLs
|
||||||
|
$aGlobal['acl']['pool']['statistics'] = $setting->getValue('acl_pool_statistics');
|
||||||
|
$aGlobal['acl']['block']['statistics'] = $setting->getValue('acl_block_statistics');
|
||||||
|
|
||||||
// We support some dynamic reward targets but fall back to our fixed value
|
// We support some dynamic reward targets but fall back to our fixed value
|
||||||
// Special calculations for PPS Values based on reward_type setting and/or available blocks
|
// Special calculations for PPS Values based on reward_type setting and/or available blocks
|
||||||
if ($config['pps']['reward']['type'] == 'blockavg' && $block->getBlockCount() > 0) {
|
if ($config['pps']['reward']['type'] == 'blockavg' && $block->getBlockCount() > 0) {
|
||||||
|
|||||||
@ -96,7 +96,7 @@
|
|||||||
<font size="1px">({$TRANSACTIONS[transaction].confirmations|default:"n/a"})</font>
|
<font size="1px">({$TRANSACTIONS[transaction].confirmations|default:"n/a"})</font>
|
||||||
</td>
|
</td>
|
||||||
<td>{$TRANSACTIONS[transaction].coin_address}</td>
|
<td>{$TRANSACTIONS[transaction].coin_address}</td>
|
||||||
<td>{if $TRANSACTIONS[transaction].height == 0}n/a{else}{if $GLOBAL.blockexplorer}<a href="{$GLOBAL.blockexplorer}{$TRANSACTIONS[transaction].blockhash}">{$TRANSACTIONS[transaction].height}</a>{else}{$TRANSACTIONS[transaction].height}{/if}{/if}</td>
|
<td>{if $TRANSACTIONS[transaction].height == 0}n/a{else}{if $GLOBAL.website.blockexplorer.url}<a href="{$GLOBAL.website.blockexplorer.url}{$TRANSACTIONS[transaction].blockhash}">{$TRANSACTIONS[transaction].height}</a>{else}{$TRANSACTIONS[transaction].height}{/if}{/if}</td>
|
||||||
<td><font color="{if $TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Credit_PPS' or $TRANSACTIONS[transaction].type == 'Bonus'}green{else}red{/if}">{$TRANSACTIONS[transaction].amount|number_format:"8"}</td>
|
<td><font color="{if $TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Credit_PPS' or $TRANSACTIONS[transaction].type == 'Bonus'}green{else}red{/if}">{$TRANSACTIONS[transaction].amount|number_format:"8"}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/section}
|
{/section}
|
||||||
|
|||||||
@ -18,9 +18,9 @@
|
|||||||
<td class="center">{if $SETTINGS.$TAB[setting].tooltip|default}<span id='tt'><img src='{$PATH}/images/questionmark.png' height='15px' width='15px' title='{$SETTINGS.$TAB[setting].tooltip}.'></span>{/if}</td>
|
<td class="center">{if $SETTINGS.$TAB[setting].tooltip|default}<span id='tt'><img src='{$PATH}/images/questionmark.png' height='15px' width='15px' title='{$SETTINGS.$TAB[setting].tooltip}.'></span>{/if}</td>
|
||||||
<td>
|
<td>
|
||||||
{if $SETTINGS.$TAB[setting].type == 'select'}
|
{if $SETTINGS.$TAB[setting].type == 'select'}
|
||||||
{html_options name="data[{$SETTINGS.$TAB[setting].name}]" options=$SETTINGS.$TAB[setting].options selected=$SETTINGS.$TAB[setting].value|default:"0"}
|
{html_options name="data[{$SETTINGS.$TAB[setting].name}]" options=$SETTINGS.$TAB[setting].options selected=$SETTINGS.$TAB[setting].value|default:$SETTINGS.$TAB[setting].default}
|
||||||
{else if $SETTINGS.$TAB[setting].type == 'text'}
|
{else if $SETTINGS.$TAB[setting].type == 'text'}
|
||||||
<input type="text" size="{$SETTINGS.$TAB[setting].size}" name="data[{$SETTINGS.$TAB[setting].name}]" value="{$SETTINGS.$TAB[setting].value|default}" />
|
<input type="text" size="{$SETTINGS.$TAB[setting].size}" name="data[{$SETTINGS.$TAB[setting].name}]" value="{$SETTINGS.$TAB[setting].value|default:$SETTINGS.$TAB[setting].default}" />
|
||||||
{else}
|
{else}
|
||||||
Unknown option type: {$SETTINGS.$TAB[setting].type}
|
Unknown option type: {$SETTINGS.$TAB[setting].type}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@ -104,7 +104,7 @@
|
|||||||
<font size="1px">({$TRANSACTIONS[transaction].confirmations|default:"n/a"})</font>
|
<font size="1px">({$TRANSACTIONS[transaction].confirmations|default:"n/a"})</font>
|
||||||
</td>
|
</td>
|
||||||
<td>{$TRANSACTIONS[transaction].coin_address}</td>
|
<td>{$TRANSACTIONS[transaction].coin_address}</td>
|
||||||
<td>{if $TRANSACTIONS[transaction].height == 0}n/a{else}{if $GLOBAL.blockexplorer}<a href="{$GLOBAL.blockexplorer}{$TRANSACTIONS[transaction].blockhash}">{$TRANSACTIONS[transaction].height}</a>{else}{$TRANSACTIONS[transaction].height}{/if}{/if}</td>
|
<td>{if $TRANSACTIONS[transaction].height == 0}n/a{else}{if $GLOBAL.website.blockexplorer.url}<a href="{$GLOBAL.website.blockexplorer.url}{$TRANSACTIONS[transaction].blockhash}">{$TRANSACTIONS[transaction].height}</a>{else}{$TRANSACTIONS[transaction].height}{/if}{/if}</td>
|
||||||
<td><font color="{if $TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Credit_PPS' or $TRANSACTIONS[transaction].type == 'Bonus'}green{else}red{/if}">{$TRANSACTIONS[transaction].amount|number_format:"8"}</td>
|
<td><font color="{if $TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Credit_PPS' or $TRANSACTIONS[transaction].type == 'Bonus'}green{else}red{/if}">{$TRANSACTIONS[transaction].amount|number_format:"8"}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/section}
|
{/section}
|
||||||
|
|||||||
@ -8,6 +8,10 @@
|
|||||||
<th>Locked for users</th>
|
<th>Locked for users</th>
|
||||||
<td class="right">{$LOCKED|number_format:"8"}</td>
|
<td class="right">{$LOCKED|number_format:"8"}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Unconfirmed</th>
|
||||||
|
<td class="right">{$UNCONFIRMED|number_format:"8"}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Liquid Assets</th>
|
<th>Liquid Assets</th>
|
||||||
<td class="right">{($BALANCE - $LOCKED)|number_format:"8"}</td>
|
<td class="right">{($BALANCE - $LOCKED)|number_format:"8"}</td>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<div id="siteinfo">{$GLOBAL.websitename}<br/>
|
<div id="siteinfo">{$GLOBAL.website.name|default:"The Pool"}<br/>
|
||||||
<span class="slogan">{$GLOBAL.slogan}</span>
|
<span class="slogan">{$GLOBAL.website.slogan|default:"Resistance is Futile"}</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="ministats">
|
<div id="ministats">
|
||||||
<table border="0">
|
<table border="0">
|
||||||
|
|||||||
@ -35,10 +35,10 @@
|
|||||||
{else}
|
{else}
|
||||||
<li><a href="{$smarty.server.PHP_SELF}?page=statistics">Statistics</a>
|
<li><a href="{$smarty.server.PHP_SELF}?page=statistics">Statistics</a>
|
||||||
<ul>
|
<ul>
|
||||||
{if $GLOBAL.config.website.acl.statistics.pool == 'public'}
|
{if $GLOBAL.acl.pool.statistics}
|
||||||
<li><a href="{$smarty.server.PHP_SELF}?page=statistics&action=pool">Pool Stats</a></li>
|
<li><a href="{$smarty.server.PHP_SELF}?page=statistics&action=pool">Pool Stats</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
{if $GLOBAL.config.website.acl.statistics.blocks == 'public'}
|
{if $GLOBAL.acl.block.statistics}
|
||||||
<li><a href="{$smarty.server.PHP_SELF}?page=statistics&action=blocks">Block Stats</a></li>
|
<li><a href="{$smarty.server.PHP_SELF}?page=statistics&action=blocks">Block Stats</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=pool">About</a>
|
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=pool">About</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=pool">This Pool</a></li>
|
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=pool">This Pool</a></li>
|
||||||
{if !$GLOBAL.config.website.api.disabled}<li><a href="{$smarty.server.PHP_SELF}?page=about&action=api">API Reference</a></li>{/if}
|
{if !$GLOBAL.website.api.disabled}<li><a href="{$smarty.server.PHP_SELF}?page=about&action=api">API Reference</a></li>{/if}
|
||||||
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=donors">Pool Donors</a></li>
|
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=donors">Pool Donors</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{$GLOBAL.config.website.title}</title>
|
<title>{$GLOBAL.website.title}</title>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=7" />
|
<meta http-equiv="X-UA-Compatible" content="IE=7" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
<link rel="shortcut icon" href="favicon.ico" />
|
||||||
|
|||||||
@ -55,7 +55,11 @@ target and network difficulty and assuming a zero variance scenario.
|
|||||||
{assign var="totalshares" value=$totalshares+$BLOCKSFOUND[block].shares}
|
{assign var="totalshares" value=$totalshares+$BLOCKSFOUND[block].shares}
|
||||||
{assign var="count" value=$count+1}
|
{assign var="count" value=$count+1}
|
||||||
<tr class="{cycle values="odd,even"}">
|
<tr class="{cycle values="odd,even"}">
|
||||||
<td class="center"><a href="{$GLOBAL.blockexplorer}{$BLOCKSFOUND[block].blockhash}" target="_blank">{$BLOCKSFOUND[block].height}</a></td>
|
{if ! $GLOBAL.website.blockexplorer.disabled}
|
||||||
|
<td class="center"><a href="{$GLOBAL.website.blockexplorer.url}{$BLOCKSFOUND[block].blockhash}" target="_blank">{$BLOCKSFOUND[block].height}</a></td>
|
||||||
|
{else}
|
||||||
|
<td class="center">{$BLOCKSFOUND[block].height}</td>
|
||||||
|
{/if}
|
||||||
<td class="center">
|
<td class="center">
|
||||||
{if $BLOCKSFOUND[block].confirmations >= $GLOBAL.confirmations}
|
{if $BLOCKSFOUND[block].confirmations >= $GLOBAL.confirmations}
|
||||||
<font color="green">Confirmed</font>
|
<font color="green">Confirmed</font>
|
||||||
|
|||||||
@ -13,7 +13,11 @@
|
|||||||
{assign var=rank value=1}
|
{assign var=rank value=1}
|
||||||
{section block $BLOCKSFOUND}
|
{section block $BLOCKSFOUND}
|
||||||
<tr class="{cycle values="odd,even"}">
|
<tr class="{cycle values="odd,even"}">
|
||||||
<td class="center"><a href="{$GLOBAL.blockexplorer}{$BLOCKSFOUND[block].blockhash}" target="_new">{$BLOCKSFOUND[block].height}</a></td>
|
{if ! $GLOBAL.website.blockexplorer.disabled}
|
||||||
|
<td class="center"><a href="{$GLOBAL.website.blockexplorer.url}{$BLOCKSFOUND[block].blockhash}" target="_new">{$BLOCKSFOUND[block].height}</a></td>
|
||||||
|
{else}
|
||||||
|
<td class="center">{$BLOCKSFOUND[block].height}</td>
|
||||||
|
{/if}
|
||||||
<td>{if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if}</td>
|
<td>{if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if}</td>
|
||||||
<td class="center">{$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M:%S"}</td>
|
<td class="center">{$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M:%S"}</td>
|
||||||
<td class="right">{$BLOCKSFOUND[block].shares|number_format}</td>
|
<td class="right">{$BLOCKSFOUND[block].shares|number_format}</td>
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
<td class="leftheader">Current Active Workers</td>
|
<td class="leftheader">Current Active Workers</td>
|
||||||
<td>{$GLOBAL.workers}</td>
|
<td>{$GLOBAL.workers}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{if $GLOBAL.blockexplorer}
|
{if $GLOBAL.website.blockexplorer.url}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="leftheader">Next Network Block</td>
|
<td class="leftheader">Next Network Block</td>
|
||||||
<td>{$CURRENTBLOCK + 1} <font size="1"> (Current: <a href="{$GLOBAL.blockexplorer}{$CURRENTBLOCKHASH}" target="_new">{$CURRENTBLOCK})</a></font></td>
|
<td>{$CURRENTBLOCK + 1} <font size="1"> (Current: <a href="{$GLOBAL.website.blockexplorer.url}{$CURRENTBLOCKHASH}" target="_new">{$CURRENTBLOCK})</a></font></td>
|
||||||
</tr>
|
</tr>
|
||||||
{else}
|
{else}
|
||||||
<tr>
|
<tr>
|
||||||
@ -32,12 +32,12 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="leftheader">Last Block Found</td>
|
<td class="leftheader">Last Block Found</td>
|
||||||
<td>{if $GLOBAL.blockexplorer}<a href="{$GLOBAL.blockexplorer}{$LASTBLOCKHASH}" target="_new">{$LASTBLOCK|default:"0"}</a>{else}{$LASTBLOCK|default:"0"}{/if}</td>
|
<td>{if $GLOBAL.website.blockexplorer.url}<a href="{$GLOBAL.website.blockexplorer.url}{$LASTBLOCKHASH}" target="_new">{$LASTBLOCK|default:"0"}</a>{else}{$LASTBLOCK|default:"0"}{/if}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="leftheader">Current Difficulty</td>
|
<td class="leftheader">Current Difficulty</td>
|
||||||
{if $GLOBAL.chaininfo}
|
{if ! $GLOBAL.website.chaininfo.disabled}
|
||||||
<td><a href="{$GLOBAL.chaininfo}" target="_new"><font size="2">{$DIFFICULTY}</font></a></td>
|
<td><a href="{$GLOBAL.website.chaininfo.url}" target="_new"><font size="2">{$DIFFICULTY}</font></a></td>
|
||||||
{else}
|
{else}
|
||||||
<td><font size="2">{$DIFFICULTY}</font></td>
|
<td><font size="2">{$DIFFICULTY}</font></td>
|
||||||
{/if}
|
{/if}
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{if !$GLOBAL.config.website.api.disabled}<li>These stats are also available in JSON format <a href="{$smarty.server.PHP_SELF}?page=api&action=getpoolstatus&api_key={$GLOBAL.userdata.api_key}">HERE</a></li>{/if}
|
{if !$GLOBAL.website.api.disabled}<li>These stats are also available in JSON format <a href="{$smarty.server.PHP_SELF}?page=api&action=getpoolstatus&api_key={$GLOBAL.userdata.api_key}">HERE</a></li>{/if}
|
||||||
{include file="global/block_footer.tpl"}
|
{include file="global/block_footer.tpl"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
<h2>{$GLOBAL.websitename}</h2>
|
<h2>{$GLOBAL.website.name|default:"The Pool"}</h2>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{$GLOBAL.config.website.title}</title>
|
<title>{$GLOBAL.website.title}</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="{$PATH}/css/jquery.mobile-1.3.2.min.css" />
|
<link rel="stylesheet" href="{$PATH}/css/jquery.mobile-1.3.2.min.css" />
|
||||||
<script src="{$PATH}/js/jquery-1.9.1.min.js"></script>
|
<script src="{$PATH}/js/jquery-1.9.1.min.js"></script>
|
||||||
|
|||||||
@ -46,7 +46,7 @@ target and network difficulty and assuming a zero variance scenario.
|
|||||||
{assign var=rank value=1}
|
{assign var=rank value=1}
|
||||||
{section block $BLOCKSFOUND}
|
{section block $BLOCKSFOUND}
|
||||||
<tr class="{cycle values="odd,even"}">
|
<tr class="{cycle values="odd,even"}">
|
||||||
<td class="center"><a href="{$GLOBAL.blockexplorer}{$BLOCKSFOUND[block].height}" target="_blank">{$BLOCKSFOUND[block].height}</a></td>
|
<td class="center"><a href="{$GLOBAL.website.blockexplorer.url}{$BLOCKSFOUND[block].height}" target="_blank">{$BLOCKSFOUND[block].height}</a></td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
{if $BLOCKSFOUND[block].confirmations >= $GLOBAL.confirmations}
|
{if $BLOCKSFOUND[block].confirmations >= $GLOBAL.confirmations}
|
||||||
<font color="green">Confirmed</font>
|
<font color="green">Confirmed</font>
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
{assign var=rank value=1}
|
{assign var=rank value=1}
|
||||||
{section block $BLOCKSFOUND}
|
{section block $BLOCKSFOUND}
|
||||||
<tr class="{cycle values="odd,even"}">
|
<tr class="{cycle values="odd,even"}">
|
||||||
<th><a href="{$GLOBAL.blockexplorer}{$BLOCKSFOUND[block].height}" target="_blank">{$BLOCKSFOUND[block].height}</a></th>
|
<th><a href="{$GLOBAL.website.blockexplorer.url}{$BLOCKSFOUND[block].height}" target="_blank">{$BLOCKSFOUND[block].height}</a></th>
|
||||||
<td>{if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if}</td>
|
<td>{if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if}</td>
|
||||||
<td>{$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M"}</td>
|
<td>{$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M"}</td>
|
||||||
<td align="right">{$BLOCKSFOUND[block].shares|number_format}</td>
|
<td align="right">{$BLOCKSFOUND[block].shares|number_format}</td>
|
||||||
|
|||||||
@ -24,10 +24,10 @@
|
|||||||
<td class="leftheader">Current Active Workers</td>
|
<td class="leftheader">Current Active Workers</td>
|
||||||
<td>{$GLOBAL.workers}</td>
|
<td>{$GLOBAL.workers}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{if $GLOBAL.blockexplorer}
|
{if $GLOBAL.website.blockexplorer.url}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="leftheader">Next Network Block</td>
|
<td class="leftheader">Next Network Block</td>
|
||||||
<td>{$CURRENTBLOCK + 1} <font size="1"> (Current: <a href="{$GLOBAL.blockexplorer}{$CURRENTBLOCKHASH}" target="_new">{$CURRENTBLOCK})</a></font></td>
|
<td>{$CURRENTBLOCK + 1} <font size="1"> (Current: <a href="{$GLOBAL.website.blockexplorer.url}{$CURRENTBLOCKHASH}" target="_new">{$CURRENTBLOCK})</a></font></td>
|
||||||
</tr>
|
</tr>
|
||||||
{else}
|
{else}
|
||||||
<tr>
|
<tr>
|
||||||
@ -37,12 +37,12 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="leftheader">Last Block Found</td>
|
<td class="leftheader">Last Block Found</td>
|
||||||
<td>{if $GLOBAL.blockexplorer}<a href="{$GLOBAL.blockexplorer}{$LASTBLOCKHASH}" target="_new">{$LASTBLOCK|default:"0"}</a>{else}{$LASTBLOCK|default:"0"}{/if}</td>
|
<td>{if $GLOBAL.website.blockexplorer.url}<a href="{$GLOBAL.website.blockexplorer.url}{$LASTBLOCKHASH}" target="_new">{$LASTBLOCK|default:"0"}</a>{else}{$LASTBLOCK|default:"0"}{/if}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{if $GLOBAL.chaininfo}
|
{if ! $GLOBAL.website.chaininfo.disabled}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="leftheader">Current Difficulty</td>
|
<td class="leftheader">Current Difficulty</td>
|
||||||
<td><a href="{$GLOBAL.chaininfo}" target="_new"><font size="2">{$DIFFICULTY}</font></a></td>
|
<td><a href="{$GLOBAL.website.chaininfo.url}" target="_new"><font size="2">{$DIFFICULTY}</font></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user