Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
This commit is contained in:
commit
834b8136d9
@ -9,7 +9,7 @@ if (@$_SESSION['USERDATA']['is_admin'] && $user->isAdmin(@$_SESSION['USERDATA'][
|
|||||||
|
|
||||||
// setup some basic stuff for checking - getuid/getpwuid not available on mac/windows
|
// setup some basic stuff for checking - getuid/getpwuid not available on mac/windows
|
||||||
$apache_user = 'unknown';
|
$apache_user = 'unknown';
|
||||||
if (substr_count(strtolower(PHP_OS), 'nix') > 0) {
|
if (substr_count(strtolower(PHP_OS), 'nix') > 0 || substr_count(strtolower(PHP_OS), 'linux') > 0) {
|
||||||
$apache_user = (function_exists('posix_getuid')) ? posix_getuid() : 'unknown';
|
$apache_user = (function_exists('posix_getuid')) ? posix_getuid() : 'unknown';
|
||||||
$apache_user = (function_exists('posix_getpwuid')) ? posix_getpwuid($apache_user) : $apache_user;
|
$apache_user = (function_exists('posix_getpwuid')) ? posix_getpwuid($apache_user) : $apache_user;
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ if (@$_SESSION['USERDATA']['is_admin'] && $user->isAdmin(@$_SESSION['USERDATA'][
|
|||||||
if ($socket !== false) {
|
if ($socket !== false) {
|
||||||
$address = @gethostbyname($config['gettingstarted']['stratumurl']);
|
$address = @gethostbyname($config['gettingstarted']['stratumurl']);
|
||||||
$result = @socket_connect($socket, $address, $config['gettingstarted']['stratumport']);
|
$result = @socket_connect($socket, $address, $config['gettingstarted']['stratumport']);
|
||||||
if ($result !== 1) {
|
if ($result !== true) {
|
||||||
$enotice[] = "We tried to poke your Stratum server using config->gettingstarted details but it didn't respond";
|
$enotice[] = "We tried to poke your Stratum server using config->gettingstarted details but it didn't respond";
|
||||||
}
|
}
|
||||||
$close = @socket_close($socket);
|
$close = @socket_close($socket);
|
||||||
|
|||||||
@ -19,13 +19,13 @@ if (!include_once(BASEPATH . 'include/config/security.inc.dist.php')) die('Unabl
|
|||||||
if (@file_exists(BASEPATH . 'include/config/security.inc.php')) include_once(BASEPATH . 'include/config/security.inc.php');
|
if (@file_exists(BASEPATH . 'include/config/security.inc.php')) include_once(BASEPATH . 'include/config/security.inc.php');
|
||||||
|
|
||||||
// start our session, we need it for smarty caching
|
// start our session, we need it for smarty caching
|
||||||
$session_start = @session_start();
|
|
||||||
session_set_cookie_params(time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
|
session_set_cookie_params(time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
|
||||||
|
$session_start = @session_start();
|
||||||
if (!$session_start) {
|
if (!$session_start) {
|
||||||
$log->log("info", "Forcing session id regeneration, session failed to start [hijack attempt?]");
|
$log->log("info", "Forcing session id regeneration, session failed to start [hijack attempt?]");
|
||||||
session_destroy();
|
session_destroy();
|
||||||
session_regenerate_id(true);
|
session_regenerate_id(true);
|
||||||
session_start();
|
session_start();
|
||||||
}
|
}
|
||||||
@setcookie(session_name(), session_id(), time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
|
@setcookie(session_name(), session_id(), time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ class Api extends Base {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if ($error == true) {
|
if ($error == true) {
|
||||||
|
unset($_SESSION['POPUP']);
|
||||||
header('HTTP/1.1 501 Not implemented');
|
header('HTTP/1.1 501 Not implemented');
|
||||||
die('501 Not implemented');
|
die('501 Not implemented');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -624,15 +624,12 @@ class User extends Base {
|
|||||||
// Unset all of the session variables
|
// Unset all of the session variables
|
||||||
$_SESSION = array();
|
$_SESSION = array();
|
||||||
// As we're killing the sesison, also kill the cookie!
|
// As we're killing the sesison, also kill the cookie!
|
||||||
if (ini_get("session.use_cookies")) {
|
setcookie(session_name(), '', time() - 42000);
|
||||||
$params = session_get_cookie_params();
|
|
||||||
setcookie(session_name(), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"]);
|
|
||||||
}
|
|
||||||
// Destroy the session.
|
// Destroy the session.
|
||||||
session_destroy();
|
session_destroy();
|
||||||
// Enforce generation of a new Session ID and delete the old
|
// Enforce generation of a new Session ID and delete the old
|
||||||
session_regenerate_id(true);
|
session_regenerate_id(true);
|
||||||
|
|
||||||
// Enforce a page reload and point towards login with referrer included, if supplied
|
// Enforce a page reload and point towards login with referrer included, if supplied
|
||||||
$port = ($_SERVER["SERVER_PORT"] == "80" || $_SERVER["SERVER_PORT"] == "443") ? "" : (":".$_SERVER["SERVER_PORT"]);
|
$port = ($_SERVER["SERVER_PORT"] == "80" || $_SERVER["SERVER_PORT"] == "443") ? "" : (":".$_SERVER["SERVER_PORT"]);
|
||||||
$pushto = $_SERVER['SCRIPT_NAME'].'?page=login';
|
$pushto = $_SERVER['SCRIPT_NAME'].'?page=login';
|
||||||
|
|||||||
@ -36,13 +36,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Donation Percentage</label>
|
<label>Donation Percentage</label>
|
||||||
<font size="1"> Donation amount in percent ({$DONATE_THRESHOLD.min}-100%)</font>
|
<font size="1"> Donation amount in percent ({$DONATE_THRESHOLD.min} - 100%)</font>
|
||||||
{nocache}<input class="form-control" type="text" name="donatePercent" value="{$smarty.request.donatePercent|default:$GLOBAL.userdata.donate_percent|escape|number_format:"2"}" size="4" {if $GLOBAL.twofactor.enabled && $GLOBAL.twofactor.options.details && !$DETAILSUNLOCKED}id="disabledInput" disabled{/if}/>{/nocache}
|
{nocache}<input class="form-control" type="text" name="donatePercent" value="{$smarty.request.donatePercent|default:$GLOBAL.userdata.donate_percent|escape|number_format:"2"}" size="4" {if $GLOBAL.twofactor.enabled && $GLOBAL.twofactor.options.details && !$DETAILSUNLOCKED}id="disabledInput" disabled{/if}/>{/nocache}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Automatic Payout Threshold</label>
|
<label>Automatic Payout Threshold</label>
|
||||||
</br>
|
</br>
|
||||||
<font size="1">{$GLOBAL.config.ap_threshold.min}-{$GLOBAL.config.ap_threshold.max} {$GLOBAL.config.currency}. Set to '0' for no auto payout. A {if $GLOBAL.config.txfee_auto > 0.00001}{$GLOBAL.config.txfee_auto}{else}{$GLOBAL.config.txfee_auto|number_format:"8"}{/if} {$GLOBAL.config.currency} TX fee will apply <span id="tt"><img width="15px" height="15px" title="This {if $GLOBAL.config.txfee_auto > 0.00001}{$GLOBAL.config.txfee_auto}{else}{$GLOBAL.config.txfee_auto|number_format:"8"}{/if} automatic payment transaction fee is a network fee and goes back into the network not the pool." src="site_assets/mpos/images/questionmark.png"></span></font>
|
<font size="1">{$GLOBAL.config.ap_threshold.min} - {$GLOBAL.config.ap_threshold.max} {$GLOBAL.config.currency}. Set to '0' for no auto payout. A {if $GLOBAL.config.txfee_auto > 0.00001}{$GLOBAL.config.txfee_auto}{else}{$GLOBAL.config.txfee_auto|number_format:"8"}{/if} {$GLOBAL.config.currency} TX fee will apply <span id="tt"><img width="15px" height="15px" title="This {if $GLOBAL.config.txfee_auto > 0.00001}{$GLOBAL.config.txfee_auto}{else}{$GLOBAL.config.txfee_auto|number_format:"8"}{/if} automatic payment transaction fee is a network fee and goes back into the network not the pool." src="site_assets/mpos/images/questionmark.png"></span></font>
|
||||||
</br>
|
</br>
|
||||||
<input class="form-control" type="text" name="payoutThreshold" value="{nocache}{$smarty.request.payoutThreshold|default:$GLOBAL.userdata.ap_threshold|escape}{/nocache}" size="{$GLOBAL.config.ap_threshold.max|strlen}" maxlength="{$GLOBAL.config.ap_threshold.max|strlen}" {if $GLOBAL.twofactor.enabled && $GLOBAL.twofactor.options.details && !$DETAILSUNLOCKED}id="disabledInput" disabled{/if}/>
|
<input class="form-control" type="text" name="payoutThreshold" value="{nocache}{$smarty.request.payoutThreshold|default:$GLOBAL.userdata.ap_threshold|escape}{/nocache}" size="{$GLOBAL.config.ap_threshold.max|strlen}" maxlength="{$GLOBAL.config.ap_threshold.max|strlen}" {if $GLOBAL.twofactor.enabled && $GLOBAL.twofactor.options.details && !$DETAILSUNLOCKED}id="disabledInput" disabled{/if}/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<ul class="pager">
|
<ul class="pager">
|
||||||
<li class="previous {if $smarty.get.start <= 0}disabled{/if}">
|
<li class="previous {if $smarty.get.start|default:"0" <= 0}disabled{/if}">
|
||||||
<a href="{if $smarty.get.start|default:"0" <= 0}#{else}{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action={$smarty.request.action|escape}&start={$smarty.request.start|escape|default:"0" - $LIMIT}{if $FILTERS|default:""}{$FILTERS}{/if}{/if}">← Prev</a>
|
<a href="{if $smarty.get.start|default:"0" <= 0}#{else}{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action={$smarty.request.action|escape}&start={$smarty.request.start|escape|default:"0" - $LIMIT}{if $FILTERS|default:""}{$FILTERS}{/if}{/if}">← Prev</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="next">
|
<li class="next">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user