Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
371 commits
Select commit Hold shift + click to select a range
5bd8fcb
[UPDATE] pagination in admin transactions
iAmShorty Mar 1, 2014
a824c01
Notifications Padding
Mar 1, 2014
49df842
Fix Div
Mar 1, 2014
a86dbb2
Fix Stuff
Mar 1, 2014
3caabaa
[UPDATE] pagination in admin
iAmShorty Mar 1, 2014
d644366
Merge branch 'bootstrap' of https://github.com/MPOS/php-mpos into boo…
iAmShorty Mar 1, 2014
d4ebc92
Switches
Mar 1, 2014
e017fc9
Merge branch 'bootstrap' of https://github.com/MPOS/php-mpos into boo…
Mar 1, 2014
c78b2a3
Notification Page Switches
Mar 1, 2014
5ff6298
[UPDATE] fixed divs
iAmShorty Mar 1, 2014
efa5c0b
Merge branch 'bootstrap' of https://github.com/MPOS/php-mpos into boo…
iAmShorty Mar 1, 2014
6f5c5d7
Panel Inception Fix
Mar 1, 2014
36e23aa
Fix Datables CSS & Master Template
Mar 1, 2014
7e4d891
Fix Notification Switches and Worker Add Button
Mar 1, 2014
91cad49
Remove Switch Scrips
Mar 1, 2014
2b6a9b4
Fix Things
Mar 1, 2014
7e3623d
Various Fixes
Mar 2, 2014
93981f6
Various Fixes
Mar 2, 2014
ae5f6e4
Cronsjobs Permissions
Mar 2, 2014
787ad97
site_assets Permissions
Mar 2, 2014
06a033d
Permissions again
Mar 2, 2014
d6b223c
Permissions Fix
Mar 2, 2014
aa4cb8e
Permissions Fix #2
Mar 2, 2014
d210537
Fix Footer
Mar 2, 2014
322deab
Update Login, Registration, TOS, and Donors Page
Mar 2, 2014
30387ab
Add TAC Content and Change News Icon
Mar 2, 2014
8b13d01
[REVERT] Permission changes
MPOS123 Mar 2, 2014
5e6bf2e
[ADDED] Sparkline dashboard example for Live API
MPOS123 Mar 2, 2014
14c9f00
[UPDATE] Number formatting
MPOS123 Mar 2, 2014
5ae3f96
[ADDED] Sparkline Sharerate
MPOS123 Mar 2, 2014
1428c5c
[UPDATE] footer fix
iAmShorty Mar 2, 2014
257949f
[UPDATE] another footer fix
iAmShorty Mar 2, 2014
36f8f95
[FIX] undefined variables, smarty defaults
iAmShorty Mar 2, 2014
057f453
[UPDATE] make news style as an option
iAmShorty Mar 2, 2014
409fc0f
[FIX] add news defaults to smarty
iAmShorty Mar 2, 2014
8751610
[UPDATE] bringing back cell colors for confirmed/unconfirmed/orphan
iAmShorty Mar 2, 2014
6705f87
[UPDATE] total user earnings, icons in invitations
iAmShorty Mar 2, 2014
4c22c41
[FIX] fixed div
iAmShorty Mar 2, 2014
66473d1
[FIX] style changes
iAmShorty Mar 2, 2014
6733c49
[FIX] dashboard headers and workers
iAmShorty Mar 2, 2014
9fa4b17
[CHANGE] move transaction summary to earnings to add timeframed stats…
iAmShorty Mar 2, 2014
b59f878
[MERGE] Development, merge conflicts fixed
MPOS123 Mar 3, 2014
0ce22eb
[ADDED] Template Editor
MPOS123 Mar 3, 2014
d470dae
[CHANGED] Basic layout idea for dashboard
MPOS123 Mar 3, 2014
84b62ae
[FEATURE] timeframed earning stats
iAmShorty Mar 3, 2014
45f9b2a
[FIX] delete temp file
iAmShorty Mar 3, 2014
74ac29e
[FIX] delete screenshot
iAmShorty Mar 3, 2014
1960df0
[UPDATE] updated query and template
iAmShorty Mar 3, 2014
887eef3
[FIX] fixed typo in notification class
iAmShorty Mar 3, 2014
57e6b2d
[FIX] permission fix
iAmShorty Mar 3, 2014
4820cc7
[UPDATE] style fix for confirmations
iAmShorty Mar 4, 2014
a17a7f7
[UPDATE] style fix dashboard account balance
iAmShorty Mar 4, 2014
779bbb8
Dashboard Test Setout
nrpatten Mar 4, 2014
8e8736e
[CHANGE] notifications
iAmShorty Mar 4, 2014
59aef1d
Merge branch 'development' into bootstrap
MPOS123 Mar 4, 2014
4b56420
[FIX] Bar chart updates
MPOS123 Mar 4, 2014
b6b0006
[UPDATE] Dashboard Layout
nrpatten Mar 4, 2014
36cda4a
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
nrpatten Mar 4, 2014
746c2ef
[UPDATE] Dashboard graphs with proper boxes
MPOS123 Mar 4, 2014
88caa1a
[UPDATE] Overview Footer margin -15px
nrpatten Mar 4, 2014
a980773
[DASHBOARD] More work and samples
MPOS123 Mar 4, 2014
c3a31b0
[FIX] Merge conflict, proper CSS fix
MPOS123 Mar 4, 2014
35bef0f
[FIX] Round progress number
MPOS123 Mar 4, 2014
e48bb24
[UPDATE] hide lastlogin message without site reload
iAmShorty Mar 4, 2014
c29bcf2
[CLEANUP] removed mobile settings and template files
iAmShorty Mar 4, 2014
d45e171
[UPDATE] notification dismiss motd/backend/lastlogin
iAmShorty Mar 4, 2014
6575418
[FIX] At least two decimals for hashrates
MPOS123 Mar 4, 2014
9b95c95
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
MPOS123 Mar 4, 2014
73db2cf
[ADDED] Worker information
MPOS123 Mar 4, 2014
5626c2b
[ADDED] Accont balance updates
MPOS123 Mar 4, 2014
f56de00
[FIX] Round percentage two digits
MPOS123 Mar 4, 2014
4136cc7
[CHANGE] Show 10 instead of 5 blocks on pool stats
MPOS123 Mar 4, 2014
8f40e3b
[FIX] sparkline tooltip fix
iAmShorty Mar 5, 2014
5a2e926
[FIX] removed accidentally added logfile
iAmShorty Mar 5, 2014
6eed6ec
[FIX] added newmint wallet fix
iAmShorty Mar 5, 2014
963b76e
[STYLE] added icons to notifications
iAmShorty Mar 5, 2014
50de392
[UPDATE] autohide notifications and settings update
iAmShorty Mar 5, 2014
8f03474
[FIX] removed tooltipformat from sparkline
iAmShorty Mar 5, 2014
1ae463d
[UPDATE] Overview Layout Align On Resize
nrpatten Mar 5, 2014
bcb5eac
[UPDATE] New Overview Layout Align On Resize [Opps Remove MPOS1]
nrpatten Mar 5, 2014
3120ed7
[FIX] Block Overview Error
nrpatten Mar 5, 2014
0e981d7
[ADD] Password reset form and link in login
nrpatten Mar 5, 2014
faf414e
[FEATURE] added minimum payout
iAmShorty Mar 5, 2014
b85a47a
[UPDATE] dashboard fixes, disable tickerupdate in cron/dashboard
iAmShorty Mar 5, 2014
69e47fe
Add Ticketupdate 'enabled' var
Mar 5, 2014
f9835e6
[FIX] trim whitespaces
iAmShorty Mar 6, 2014
dcfa79c
[FIX] coin_address is string, not int
iAmShorty Mar 6, 2014
b7db722
[FIX] removed test from footer
iAmShorty Mar 6, 2014
d2ddad5
Fix Dashboard Centering
Mar 6, 2014
581f365
[FIX] Removed +x bit
MPOS123 Mar 7, 2014
e62db71
[FIX] Tickerupdate Checks
MPOS123 Mar 7, 2014
7e49e90
[Merge] Fix conflicts with development
MPOS123 Mar 7, 2014
ba8e3aa
[TEST] Min/Max Ranges for Price Ticker
MPOS123 Mar 7, 2014
942c1ff
[REMOVED] Color Round Stats, not our own style
MPOS123 Mar 7, 2014
7c1e9b4
[ADDED] Dashboard Quick Access on mobile
MPOS123 Mar 7, 2014
afd9fb2
[UPDATE] Login Icons/Dashboard Auto Resize (easyer to work with for a…
nrpatten Mar 10, 2014
e6088fe
[FIX][UPDATE] Login Icons/Dashboard Auto Resize (easyer to work with …
nrpatten Mar 10, 2014
e3317f3
[FIX] mpos theme notification fix
iAmShorty Mar 10, 2014
6b1bcea
[FIX] removed test files
iAmShorty Mar 10, 2014
7bc6ec9
[FIX] mpos compatibility for icons in navigation
iAmShorty Mar 10, 2014
baf07e0
[CLEANUP] Responsive tables added when needed
MPOS123 Mar 10, 2014
cf3e230
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
MPOS123 Mar 10, 2014
022a3d1
[FIX] Dasboard icon alignment
iAmShorty Mar 10, 2014
0f3c24a
[FIX] Nethashrate
nrpatten Mar 10, 2014
04c5b4b
[FIX] Nethashrate
nrpatten Mar 10, 2014
2767064
[FIX] Sparks Line/Bar
nrpatten Mar 10, 2014
68816e3
[UPDATE] fixed balance background
iAmShorty Mar 10, 2014
b845ec6
[FIX] Forgot api id's
nrpatten Mar 10, 2014
1a9ba4a
[FIX] Forgot api id's
nrpatten Mar 10, 2014
2225468
[FIX] changed inline styles to css
iAmShorty Mar 10, 2014
03c890b
[FIX] changed inline styles to css in overview
iAmShorty Mar 10, 2014
cd1c828
[FIX] Remove spark from bootstrap.css
nrpatten Mar 10, 2014
f16be5d
[FIX] Remove spark from bootstrap.css
nrpatten Mar 10, 2014
3ade244
[FIX] Remove spark from bootstrap.min.css
nrpatten Mar 10, 2014
e4f048b
[UPDATE] added CTOKEN to forms
iAmShorty Mar 10, 2014
6c195af
[UPDATE] removed debugger console
iAmShorty Mar 10, 2014
4fc9eae
[UPDATE] borderless css for dashboard round stats
iAmShorty Mar 10, 2014
f6425ba
[ADD] Price enable/disable to currency/day
nrpatten Mar 10, 2014
e9b6e00
[FIX] Open {nocache}
nrpatten Mar 10, 2014
603961d
[FIX] added default start var to worker paging
iAmShorty Mar 10, 2014
bf1ac16
Merge branch 'development' into bootstrap
MPOS123 Mar 10, 2014
7977834
[UPDATE] additional spaces request #1920
iAmShorty Mar 10, 2014
4ff53d1
[UPDATE] Registration Layout
nrpatten Mar 10, 2014
834b813
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
nrpatten Mar 10, 2014
20df379
[UPDATE] changed bitcoin icon to money
iAmShorty Mar 10, 2014
bf3029d
[UPDATE] Move .hashunits into span next to Hashrate [FIX] For resize
nrpatten Mar 10, 2014
e707548
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
nrpatten Mar 10, 2014
c53c288
[UPDATE] reworked getting started page
iAmShorty Mar 10, 2014
9f97eb6
[CLEANUP] Font in stats boxes
MPOS123 Mar 10, 2014
1ab765b
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
MPOS123 Mar 10, 2014
3ef1aa4
[UPDATE] Overview MH/s size
nrpatten Mar 10, 2014
7143845
[FIX] updating workers page
iAmShorty Mar 10, 2014
c7df914
[UPDATE] Remove dashboard round stats color as requested
nrpatten Mar 11, 2014
ac8223c
[UPDATE] Remove dashboard round stats color as requested
nrpatten Mar 11, 2014
5e07655
[UPDATE] Add Difficulty/est Difficulty and Time per Block
nrpatten Mar 11, 2014
62a9672
[UPDATE] Add shares per second S/s to My Sharerate
nrpatten Mar 11, 2014
8831dad
[PREP] #1922
MPOS123 Mar 11, 2014
670432a
[CLEANUP] Number formatting adjusted in JS
MPOS123 Mar 11, 2014
a54ba1e
[FIX] Initial hashrate value for graph
MPOS123 Mar 11, 2014
fbf8036
[CLEANUP] Major structure overhaul for dashboard
MPOS123 Mar 11, 2014
3205404
Merge branch 'development' into bootstrap
MPOS123 Mar 11, 2014
e86f670
[CLONE] Copied prop dashboard to PPLNS for @iAmShorty to play with
MPOS123 Mar 11, 2014
c3d69fe
[ADDED] Worker Information Box to dashboard
MPOS123 Mar 11, 2014
7f01244
[UPDATE] smaller table footers
iAmShorty Mar 11, 2014
5a5a5b4
[UPDATE] change dashboard as requested
iAmShorty Mar 11, 2014
26d52b6
[UPDATE] dashboard style
iAmShorty Mar 11, 2014
b05d626
[CLEANUP] Bar graphs design
MPOS123 Mar 11, 2014
65ce8f1
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
MPOS123 Mar 11, 2014
02dc719
[UPDATE] dashboard style
iAmShorty Mar 11, 2014
686e7f1
[UPDATE] morris.js charts
iAmShorty Mar 11, 2014
59d9c83
[FIX] show estimated coins if coinprice is disabled
iAmShorty Mar 11, 2014
3c41f0b
[UPDATE] progress bars and Est Next Difficulty split
nrpatten Mar 11, 2014
d1442fe
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
nrpatten Mar 11, 2014
083b1f5
[UPDATE] progress bars and Est Next Difficulty split for props
nrpatten Mar 11, 2014
dbc4b70
[UPDATE] adding colors to progressbars
iAmShorty Mar 11, 2014
4a79ed8
[FIX] Initial static values for round shares
MPOS123 Mar 11, 2014
5a746bb
[FIX] Hide worker information if live dashboard disabled
MPOS123 Mar 11, 2014
b8ebbe5
[FIX] Use proper personal invalid shares
MPOS123 Mar 11, 2014
846165d
Merge branch 'development' into bootstrap
MPOS123 Mar 11, 2014
dfddb83
Merge branch 'development' into bootstrap
MPOS123 Mar 12, 2014
a431c0f
[UPDATE] fixed worker page icons and paging
iAmShorty Mar 12, 2014
d9cfd2a
[FIX] user earnings only visible as admin
iAmShorty Mar 12, 2014
fd30568
[CLEANUP] In-line with rest of account pages
MPOS123 Mar 12, 2014
25dd2a9
[FIX] user auth status
iAmShorty Mar 12, 2014
89fad15
[FIX] Logic error
MPOS123 Mar 12, 2014
05bd929
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
MPOS123 Mar 12, 2014
1969744
[FIX] typo in config
iAmShorty Mar 12, 2014
b3eb25c
[FIX] text-center QRcode
nrpatten Mar 12, 2014
f0ca663
[FIX] css folders
iAmShorty Mar 12, 2014
3f028a2
[UPDATE] cleaned up about page
iAmShorty Mar 12, 2014
b300901
[FIX] fixed divs in transactions
iAmShorty Mar 12, 2014
90fe686
[FIX] making round stats responsive
iAmShorty Mar 12, 2014
654dcc3
[FIX] making round stats responsive - prop
iAmShorty Mar 12, 2014
ac9b65e
[FIX] adding recaptcha to login
iAmShorty Mar 12, 2014
9dfcab2
[FIX] fixed share information update if shares are 0
iAmShorty Mar 13, 2014
69bf240
[FIX] fixed progressbars style/color for efficiency
iAmShorty Mar 13, 2014
c5788c5
[FIX] fixed undefined index share
iAmShorty Mar 13, 2014
41c1af7
[UPDATE] style fixes
iAmShorty Mar 13, 2014
d6244e3
[FIX] Small Rez row center
nrpatten Mar 13, 2014
e863ef3
Merge branch 'development' into bootstrap
MPOS123 Mar 17, 2014
9f942a6
[FIX] added missing icons
iAmShorty Mar 18, 2014
e19f77f
[ADDED] Missing number_format
MPOS123 Mar 19, 2014
40337e4
[FIX] datatable issue with empty donors
iAmShorty Mar 19, 2014
f7e6e6a
[FIX] fixed datatables if arrays are empty
iAmShorty Mar 19, 2014
452d468
[UPDATE] added datatable to user info
iAmShorty Mar 19, 2014
9f9b4e9
[FIX] update datatables css
iAmShorty Mar 19, 2014
5c4112d
Merge branch 'development' into bootstrap
MPOS123 Mar 19, 2014
ccd217d
[UPDATE] mail stale users
iAmShorty Mar 19, 2014
88e3edb
[MERGE] Fix merge conflict
MPOS123 Mar 19, 2014
fe36acf
[UPDATE] responsive tables in wallet info
iAmShorty Mar 20, 2014
d0707c9
Merge branch 'bootstrap' of https://github.com/MPOS/php-mpos into boo…
iAmShorty Mar 20, 2014
fb0dbbd
[FIX] style fixes
iAmShorty Mar 21, 2014
5841eb4
Merge branch 'development' into bootstrap
MPOS123 Mar 21, 2014
3ec6248
Merge branch 'development' into bootstrap
MPOS123 Mar 21, 2014
1634d0a
Update bootstrap.min.css
Samuelnz Mar 22, 2014
049d3be
Update bootstrap.min.css
Samuelnz Mar 22, 2014
39da074
Update mpos.css
Samuelnz Mar 22, 2014
f78b20f
Update mpos.css
Samuelnz Mar 22, 2014
828481b
[FIX] Worker Info Responsive
MPOS123 Mar 22, 2014
a00b847
[DRAFT] PPS Dashboard
MPOS123 Mar 22, 2014
f9c57e8
Merge pull request #1987 from SamuelNZ/patch-3
TheSerapher Mar 22, 2014
fd5591f
New Test Setout
nrpatten Mar 22, 2014
f3f12d3
New Test Setout Round Stats
nrpatten Mar 22, 2014
20130b4
New Test Setout Round Stats Readd
nrpatten Mar 22, 2014
b0fdb62
[LAYOUT] Blocks Stats page
MPOS123 Mar 22, 2014
51b7cbd
Update mpos.css
Samuelnz Mar 22, 2014
02c7074
New Test Setout Round Props
nrpatten Mar 22, 2014
3e68540
New Test Setout Round Props
nrpatten Mar 22, 2014
f0e0bf2
[UPDATE] Overview Icons
nrpatten Mar 22, 2014
7350178
[UPDATE] Pool Info Without Price
nrpatten Mar 22, 2014
cddb929
[FIX] HTML Fixes
nrpatten Mar 22, 2014
bd57e04
[UPDATE] style fixes
iAmShorty Mar 22, 2014
ca163a4
[UPDATE] style fixes
iAmShorty Mar 22, 2014
aa63eac
Update global.inc.dist.php
Samuelnz Mar 22, 2014
bfd0302
[FIX] Style Margin
nrpatten Mar 22, 2014
0aa75bd
[FIX] More Style Margin
nrpatten Mar 22, 2014
948fe89
[FIX] More Style Margin
nrpatten Mar 22, 2014
af3b048
Merge branch 'development' into bootstrap
MPOS123 Mar 22, 2014
441e718
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
MPOS123 Mar 22, 2014
5b47274
Merge branch 'development' into bootstrap
MPOS123 Mar 22, 2014
bd4096b
[UPDATE] added exchange url to price ticker
iAmShorty Mar 22, 2014
5866cbb
[UPDATE] changed link behavior
iAmShorty Mar 22, 2014
c785af9
[UPDATE] changed link behavior
iAmShorty Mar 22, 2014
48a34c4
[FIX] HTML Errors
nrpatten Mar 23, 2014
ab96fcf
[FIX] More HTML Errors [FIX] contributors share/hashrate highlight
nrpatten Mar 23, 2014
a9f2386
[FIX] contributors share/hashrate highlight
nrpatten Mar 23, 2014
13590f6
[UPDATE] Teal Backgrond for Pool Information Round Information Not so…
nrpatten Mar 23, 2014
c89b807
[CLEANUP] Number formatting
MPOS123 Mar 23, 2014
9d0700e
[UPDATE] added Pool Navigation to header and admin settings
iAmShorty Mar 24, 2014
ad0feb3
[UPDATE] description update
iAmShorty Mar 24, 2014
ad6f70f
[FIX] small style change for dropdown
iAmShorty Mar 24, 2014
c15aaa6
[UPDATE] lightblue background with opacity 0.8 / font-weight 600 for …
nrpatten Mar 24, 2014
fec49db
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
nrpatten Mar 24, 2014
6d04c4f
[FIX] style fix
iAmShorty Mar 24, 2014
4b8db48
Merge pull request #1989 from SamuelNZ/patch-4
TheSerapher Mar 24, 2014
7d51e8f
[FIX] broken mobile navigation
iAmShorty Mar 24, 2014
4dff6ee
[UPDATE] style fix user transactions
iAmShorty Mar 24, 2014
b6aa1cb
Merge branch 'development' into bootstrap
MPOS123 Mar 25, 2014
d454570
[FIX] added getbalancewithunconfirmed to wallet template
iAmShorty Mar 25, 2014
8f739bb
Merge branch 'development' into bootstrap
MPOS123 Mar 25, 2014
577f9ad
Merge branch 'bootstrap' of github.com:MPOS/php-mpos into bootstrap
MPOS123 Mar 25, 2014
d51cfc0
[UPDATE] Make bootstrap default template
MPOS123 Mar 25, 2014
3a7e358
[UPDATE] some style changes, design switcher for own designs
iAmShorty Mar 25, 2014
1087d48
[UPDATE] hover links in dark theme
iAmShorty Mar 25, 2014
6a8784e
[FIX] default design fix
iAmShorty Mar 25, 2014
b464791
[FIX] style fix in admin news and css
iAmShorty Mar 25, 2014
dffd5a7
[UPDATE] Couple of color tweeks
nrpatten Mar 26, 2014
07ba447
[UPDATE] More color tweeks
nrpatten Mar 26, 2014
557856e
[UPDATE] More tweeks
nrpatten Mar 26, 2014
ff6b267
[FIX] Me Being Silly :P
nrpatten Mar 26, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 15 additions & 7 deletions cronjobs/tickerupdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,26 @@
$strLogMask = "| %-25.25s | %15.15s | %8.8s | %-6.6s | %-80.80s |";
$log->logInfo(sprintf($strLogMask, 'Method', 'Value', 'Runtime', 'Status', 'Message'));

empty($config['price']['enabled']) ? $tickerupdate = false : $tickerupdate = $config['price']['enabled'];

// Fetch latest coin price via API call
$start = microtime(true);
$message = 'Updated latest ' . $config['currency'] . ' price from ' . $config['price']['url'] . ' API';
$status = 'OK';
if ($price = $tools->getPrice()) {
if (!$setting->setValue('price', $price)) {
$message = 'Unable to store new price value: ' . $setting->getCronError();
if ($tickerupdate) {
$message = 'Updated latest ' . $config['currency'] . ' price from ' . $config['price']['url'] . ' API';
$status = 'OK';
if ($price = $tools->getPrice()) {
if (!$setting->setValue('price', $price)) {
$message = 'Unable to store new price value: ' . $setting->getCronError();
$status = 'ERROR';
}
} else {
$message = 'Failed to fetch price from API: ' . $tools->getCronError();
$status = 'ERROR';
}
} else {
$message = 'Failed to fetch price from API: ' . $tools->getCronError();
$status = 'ERROR';
$message = 'Tickerupdate is disabled';
$status = 'OK';
$price = 0;
}
$log->logInfo(sprintf($strLogMask, 'Price Update', $price, number_format(microtime(true) - $start, 3), $status, $message));

Expand Down
8 changes: 4 additions & 4 deletions public/include/admin_checks.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@

// display the errors
foreach ($enotice as $en) {
$_SESSION['POPUP'][] = array('CONTENT' => $en, 'TYPE' => 'info');
$_SESSION['POPUP'][] = array('CONTENT' => $en, 'TYPE' => 'alert alert-info');
}
if (!count($notice) && !count($error)) {
$_SESSION['POPUP'][] = array('CONTENT' => 'The config options we checked seem OK', 'TYPE' => 'success');
$_SESSION['POPUP'][] = array('CONTENT' => 'The config options we checked seem OK', 'TYPE' => 'alert alert-success');
} else {
foreach ($notice as $n) {
$_SESSION['POPUP'][] = array('CONTENT' => $n, 'TYPE' => 'warning');
$_SESSION['POPUP'][] = array('CONTENT' => $n, 'TYPE' => 'alert alert-warning');
}
foreach ($error as $e) {
$_SESSION['POPUP'][] = array('CONTENT' => $e, 'TYPE' => 'errormsg');
$_SESSION['POPUP'][] = array('CONTENT' => $e, 'TYPE' => 'alert alert-danger');
}
}
}
Expand Down
12 changes: 3 additions & 9 deletions public/include/autoloader.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,14 @@
die('Unable to load your coins class definition for ' . $config['algorithm']);
}

// 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 if ( PHP_SAPI == 'cli') {
if ( PHP_SAPI == 'cli') {
// Create a new compile folder just for crons
// We call mail templates directly anyway
$theme = 'cron';
} else {
// Use configured theme, fallback to default theme
$setting->getValue('website_theme') ? $theme = $setting->getValue('website_theme') : $theme = 'mpos';
$setting->getValue('website_theme') ? $theme = $setting->getValue('website_theme') : $theme = 'bootstrap';
}
define('THEME', $theme);

Expand Down Expand Up @@ -76,4 +70,4 @@
require_once(INCLUDE_DIR . '/lib/Michelf/Markdown.php');
require_once(INCLUDE_DIR . '/lib/scrypt.php');

?>
?>
2 changes: 1 addition & 1 deletion public/include/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
// We include all needed files here, even though our templates could load them themself
require_once(INCLUDE_DIR . '/autoloader.inc.php');

?>
?>
6 changes: 3 additions & 3 deletions public/include/classes/notification.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ public function addNotification($account_id, $type, $data) {
* @param id int Account ID
* @return array Notification data
**/
public function getNotifications($account_id) {
public function getNotifications($account_id,$limit=50) {
$this->debug->append("STA " . __METHOD__, 4);
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE account_id = ? ORDER BY time DESC");
if ($stmt && $stmt->bind_param('i', $account_id) && $stmt->execute() && $result = $stmt->get_result())
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE account_id = ? ORDER BY time DESC LIMIT ?");
if ($stmt && $stmt->bind_param('ii', $account_id, $limit) && $stmt->execute() && $result = $stmt->get_result())
return $result->fetch_all(MYSQLI_ASSOC);
return $this->getError();
}
Expand Down
17 changes: 17 additions & 0 deletions public/include/classes/template.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ public function getThemes() {
return $aThemes;
}

/**
* Get all available designs
* Read css files from css/design folder
*
* @return array - list of available designs
*/
public function getDesigns() {
$this->debug->append("STA " . __METHOD__, 4);
$aTmpDesigns = glob(BASEPATH . 'site_assets/' . THEME . '/css/design/*.css');
$aDesigns = array();
$aDesigns['default'] = 'default';
foreach ($aTmpDesigns as $filename) {
if (basename($filename) != '.' && basename($filename) != '..') $aDesigns[basename($filename, ".css")] = basename($filename, ".css");
}
return $aDesigns;
}

/**
* Cached getActiveTemplates method
*
Expand Down
54 changes: 54 additions & 0 deletions public/include/classes/transaction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,60 @@ public function getTransactionSummary($account_id=NULL) {
return $this->sqlError();
}


/**
* Fetch a transaction summary by user with total amounts
* @param account_id int Account ID, NULL for all
* @return data array type and total
**/
public function getTransactionTypebyTime($account_id=NULL) {
$this->debug->append("STA " . __METHOD__, 4);
if ($data = $this->memcache->get(__FUNCTION__)) return $data;
$stmt = $this->mysqli->prepare("
SELECT
IFNULL(SUM(IF(t.type = 'Credit' AND timestamp >= DATE_SUB(now(), INTERVAL 3600 SECOND), t.amount, 0)), 0) AS 1HourCredit,
IFNULL(SUM(IF(t.type = 'Debit_MP' AND timestamp >= DATE_SUB(now(), INTERVAL 3600 SECOND), t.amount, 0)), 0) AS 1HourDebitMP,
IFNULL(SUM(IF(t.type = 'Debit_AP' AND timestamp >= DATE_SUB(now(), INTERVAL 3600 SECOND), t.amount, 0)), 0) AS 1HourDebitAP,
IFNULL(SUM(IF(t.type = 'TXFee' AND timestamp >= DATE_SUB(now(), INTERVAL 3600 SECOND), t.amount, 0)), 0) AS 1HourTXFee,
IFNULL(SUM(IF(t.type = 'Fee' AND timestamp >= DATE_SUB(now(), INTERVAL 3600 SECOND), t.amount, 0)), 0) AS 1HourFee,
IFNULL(SUM(IF(t.type = 'Donation' AND timestamp >= DATE_SUB(now(), INTERVAL 3600 SECOND), t.amount, 0)), 0) AS 1HourDonation,

IFNULL(SUM(IF(t.type = 'Credit' AND timestamp >= DATE_SUB(now(), INTERVAL 86400 SECOND), t.amount, 0)), 0) AS 24HourCredit,
IFNULL(SUM(IF(t.type = 'Debit_MP' AND timestamp >= DATE_SUB(now(), INTERVAL 86400 SECOND), t.amount, 0)), 0) AS 24HourDebitMP,
IFNULL(SUM(IF(t.type = 'Debit_AP' AND timestamp >= DATE_SUB(now(), INTERVAL 86400 SECOND), t.amount, 0)), 0) AS 24HourDebitAP,
IFNULL(SUM(IF(t.type = 'TXFee' AND timestamp >= DATE_SUB(now(), INTERVAL 86400 SECOND), t.amount, 0)), 0) AS 24HourTXFee,
IFNULL(SUM(IF(t.type = 'Fee' AND timestamp >= DATE_SUB(now(), INTERVAL 86400 SECOND), t.amount, 0)), 0) AS 24HourFee,
IFNULL(SUM(IF(t.type = 'Donation' AND timestamp >= DATE_SUB(now(), INTERVAL 86400 SECOND), t.amount, 0)), 0) AS 24HourDonation,

IFNULL(SUM(IF(t.type = 'Credit' AND timestamp >= DATE_SUB(now(), INTERVAL 604800 SECOND), t.amount, 0)), 0) AS 1WeekCredit,
IFNULL(SUM(IF(t.type = 'Debit_MP' AND timestamp >= DATE_SUB(now(), INTERVAL 604800 SECOND), t.amount, 0)), 0) AS 1WeekDebitMP,
IFNULL(SUM(IF(t.type = 'Debit_AP' AND timestamp >= DATE_SUB(now(), INTERVAL 604800 SECOND), t.amount, 0)), 0) AS 1WeekDebitAP,
IFNULL(SUM(IF(t.type = 'TXFee' AND timestamp >= DATE_SUB(now(), INTERVAL 604800 SECOND), t.amount, 0)), 0) AS 1WeekTXFee,
IFNULL(SUM(IF(t.type = 'Fee' AND timestamp >= DATE_SUB(now(), INTERVAL 604800 SECOND), t.amount, 0)), 0) AS 1WeekFee,
IFNULL(SUM(IF(t.type = 'Donation' AND timestamp >= DATE_SUB(now(), INTERVAL 604800 SECOND), t.amount, 0)), 0) AS 1WeekDonation,

IFNULL(SUM(IF(t.type = 'Credit' AND timestamp >= DATE_SUB(now(), INTERVAL 2419200 SECOND), t.amount, 0)), 0) AS 1MonthCredit,
IFNULL(SUM(IF(t.type = 'Debit_MP' AND timestamp >= DATE_SUB(now(), INTERVAL 2419200 SECOND), t.amount, 0)), 0) AS 1MonthDebitMP,
IFNULL(SUM(IF(t.type = 'Debit_AP' AND timestamp >= DATE_SUB(now(), INTERVAL 2419200 SECOND), t.amount, 0)), 0) AS 1MonthDebitAP,
IFNULL(SUM(IF(t.type = 'TXFee' AND timestamp >= DATE_SUB(now(), INTERVAL 2419200 SECOND), t.amount, 0)), 0) AS 1MonthTXFee,
IFNULL(SUM(IF(t.type = 'Fee' AND timestamp >= DATE_SUB(now(), INTERVAL 2419200 SECOND), t.amount, 0)), 0) AS 1MonthFee,
IFNULL(SUM(IF(t.type = 'Donation' AND timestamp >= DATE_SUB(now(), INTERVAL 2419200 SECOND), t.amount, 0)), 0) AS 1MonthDonation,

IFNULL(SUM(IF(t.type = 'Credit' AND timestamp >= DATE_SUB(now(), INTERVAL 31536000 SECOND), t.amount, 0)), 0) AS 1YearCredit,
IFNULL(SUM(IF(t.type = 'Debit_MP' AND timestamp >= DATE_SUB(now(), INTERVAL 31536000 SECOND), t.amount, 0)), 0) AS 1YearDebitMP,
IFNULL(SUM(IF(t.type = 'Debit_AP' AND timestamp >= DATE_SUB(now(), INTERVAL 31536000 SECOND), t.amount, 0)), 0) AS 1YearDebitAP,
IFNULL(SUM(IF(t.type = 'TXFee' AND timestamp >= DATE_SUB(now(), INTERVAL 31536000 SECOND), t.amount, 0)), 0) AS 1YearTXFee,
IFNULL(SUM(IF(t.type = 'Fee' AND timestamp >= DATE_SUB(now(), INTERVAL 31536000 SECOND), t.amount, 0)), 0) AS 1YearFee,
IFNULL(SUM(IF(t.type = 'Donation' AND timestamp >= DATE_SUB(now(), INTERVAL 31536000 SECOND), t.amount, 0)), 0) AS 1YearDonation
FROM transactions AS t
LEFT OUTER JOIN blocks AS b ON b.id = t.block_id
WHERE
t.account_id = ? AND (b.confirmations > 0 OR b.id IS NULL)");
if ($this->checkStmt($stmt) && $stmt->bind_param("i", $account_id) && $stmt->execute() && $result = $stmt->get_result())
return $this->memcache->setCache(__FUNCTION__ . $account_id, $result->fetch_assoc(), 60);
return $this->sqlError();
}

/**
* Get all transactions from start for account_id
* @param start int Starting point, id of transaction
Expand Down
42 changes: 36 additions & 6 deletions public/include/config/admin_settings.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;

$aThemes = $template->getThemes();
$aDesigns = $template->getDesigns();

// Load the settings available in this system
$aSettings['website'][] = array(
Expand Down Expand Up @@ -49,16 +50,30 @@
$aSettings['website'][] = array(
'display' => 'Website theme', 'type' => 'select',
'options' => $aThemes,
'default' => 'mpos',
'default' => 'bootstrap',
'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.'
'display' => 'Website Design', 'type' => 'select',
'options' => $aDesigns,
'default' => 'default',
'name' => 'website_design', 'value' => $setting->getValue('website_design'),
'tooltip' => 'The default design used on your pool.'
);
$aSettings['website'][] = array(
'display' => 'Website News Style', 'type' => 'select',
'options' => array( 0 => 'Show all news in one Page', 1 => 'Show Responsive News Table' ),
'default' => 0,
'name' => 'website_news_style', 'value' => $setting->getValue('website_news_style'),
'tooltip' => 'How News are displayed on Main Page.'
);
$aSettings['website'][] = array(
'display' => 'Auto Hide Notifications', 'type' => 'select',
'options' => array( 0 => 'Notifications always visible', 1 => 'Hide Notifications automatically' ),
'default' => 0,
'name' => 'website_notification_autohide', 'value' => $setting->getValue('website_notification_autohide'),
'tooltip' => 'Hides Notifications after 5 seconds.'
);
$aSettings['blockchain'][] = array(
'display' => 'Disable Blockexplorer', 'type' => 'select',
Expand Down Expand Up @@ -432,3 +447,18 @@
'name' => 'notifications_disable_idle_worker', 'value' => $setting->getValue('notifications_disable_idle_worker'),
'tooltip' => 'Enable/Disable IDLE worker notifications globally. Will remove the user option too.'
);
$aSettings['pools'][] = array(
'display' => 'Enable Pool Navigation', 'type' => 'select',
'options' => array( 0 => 'No', 1 => 'Yes' ),
'default' => 0,
'name' => 'poolnav_enabled', 'value' => $setting->getValue('poolnav_enabled'),
'tooltip' => 'Enable or Disable Pool Navigation for multiple Pools in Header.'
);
$aSettings['pools'][] = array(
'display' => 'Pools for Pool Navigation', 'type' => 'textarea',
'size' => 20,
'height' => 12,
'default' => 'Pool Name|Pool URL',
'name' => 'poolnav_pools', 'value' => $setting->getValue('poolnav_pools'),
'tooltip' => '.'
);
1 change: 1 addition & 0 deletions public/include/config/global.inc.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
* Fetch exchange rates via an API
* https://github.com/MPOS/php-mpos/wiki/Config-Setup#wiki-ticker-api
**/
$config['price']['enabled'] = false;
$config['price']['url'] = 'https://btc-e.com';
$config['price']['target'] = '/api/2/ltc_usd/ticker';
$config['price']['currency'] = 'USD';
Expand Down
Loading