Commit Graph

163 Commits

Author SHA1 Message Date
Sebastian Grewe
b3479a9c04 Adding further IFNULL checks to statistics class 2013-07-04 13:25:11 +02:00
Sebastian Grewe
e963072740 Merge pull request #368 from TheSerapher/issue-367
Issue 367
2013-07-04 04:03:11 -07:00
Sebastian Grewe
c9915ce628 Removed var_dump debug output 2013-07-04 13:02:36 +02:00
Sebastian Grewe
463b97ea50 Do not return null on empty valid/invalid shares 2013-07-04 13:01:29 +02:00
Sebastian Grewe
dfa8d285ce Properly allow '0' as a workername or password
This fixes #347 as recommended at

http://de3.php.net/manual/en/function.empty.php

We allow anything else than an empty string.
2013-07-04 12:50:17 +02:00
Sebastian Grewe
8056ce9f87 Adding input check for AP and Donation
Fixes #354
2013-07-04 12:42:03 +02:00
Sebastian Grewe
acba30a888 Merge pull request #363 from TheSerapher/issue-331
Adding shares archive table back in for hash calcs
2013-07-04 01:41:50 -07:00
Sebastian Grewe
f4ce22bee8 Skip bogus upstream shares
This will fix an issue with blocks being assigned upstream shares that
are marked as valid but are not the actual solution for a block.

Only shares inserted when or after the block timestamp are now looked
at. This will ensure other shares inserted earlier and marked as
upstream valid are skipped.

This will not fix edge cases where many shares are inserted at the same
time and are all in the same timeframe of the block. Then the first
valid share in that time is used.

This worked fine on a testnet with a number of blocks found and false
shares inserted by hand.

Fixes #352
2013-07-03 15:01:08 +02:00
Sebastian Grewe
4c3c690f1c Merge pull request #351 from TheSerapher/issue-346
Fix PHP warning in notification class
2013-07-03 05:27:04 -07:00
Sebastian Grewe
ce5a8f7240 Fix PHP Warnings on Password Reset page
* Added HTML5 required to username field
* Added empty string check to resetPassword method

Fixes #348
2013-07-03 14:25:14 +02:00
Sebastian Grewe
382fddb528 Remove PHP Warnings from worker page
* Added HTML5 required flags for username/passwords
* Added empty string check in addWorker method

Fixes #347
2013-07-03 14:21:05 +02:00
Sebastian Grewe
4f2402e6ed Fix PHP warning in notification class
* Fix PHP Warning if no notification settings exist yet

Fixes #346
2013-07-03 08:09:09 +02:00
Sebastian Grewe
7e4938f279 Fixing PHP warnings on account workers page
* Fixes PHP Warning if no workers are updated
* Fixes PHP Warning in worker class if data is empty

Fixes #339
2013-07-02 21:08:26 +02:00
Sebastian Grewe
e1c5761cf4 Fixing strict PHP warnings when registering a user
Fixes #329
2013-07-02 20:59:03 +02:00
Sebastian Grewe
306162a1da Adding shares archive table back in for hash calcs
If the shares archive table is used via config option, those shares are
included when calculating the users hashrate. This will help on very
short rounds where each round end deletes all shares and users will not
be able to track their hashrates. They will be very jumpy and change to
0 all the time.

Still missing this implementation for the hourly hashrate function to
ensure the graphs are always kept up-to-date.

Addresses #331
2013-07-02 14:02:13 +02:00
Sebastian Grewe
535f13c184 Fixing PHP Warnings in Registration page
* Fix API Key generation not using SALT when creating hash
 * This should not affect existing API keys since hashes are compared
* Fix PHP Warning for RECAPTCHA if disabled

Fixes #328
2013-07-02 10:38:23 +02:00
Sebastian Grewe
cfb209a425 removed debug output 2013-06-30 13:43:05 +02:00
Sebastian Grewe
7390ca38e5 Enable or Disable maintenance and registrations
This will allow any admin to enable or disable a pool maintenance mode.
Regular users that are still logged in will not be kicked out (yet). New
users that are trying to login and are not admins will be denied access.

Also added registration option to Admin Settings via WebUI. You can now
disable new accounts via web option or configuration setting.

Fixes #259 but also adds an additional feature.
2013-06-30 12:03:46 +02:00
Sebastian Grewe
483e554259 Adding SQL based pagination to admin transactions
This will prevent PHP OOM errors due to a large amount of transactions.
You can find navigation arrows at the top and fetch 30 transactions at a
time.

Fixes #267
2013-06-30 11:04:12 +02:00
Sebastian Grewe
5c6e872867 Fixing false shares result in API call
Fixes #262
2013-06-28 15:54:30 +02:00
Sebastian Grewe
92f2243cfb Fixing getuserstatus API call
Fixes #257
2013-06-28 15:47:21 +02:00
Sebastian Grewe
d4f4b9073f Working jQuery Mobile frontend for mobile devices
* Added mobile device detection PHP library
* Call PHP library to decide which theme to use
* Added theme as a configuration option into global config
 * Selectable Desktop theme (default: mmcFE)
 * Selectable Mobile theme (default: mobile)
 * Disable mobile theme support entirely

**NOTE**: This requires updates to the `global.inc.php` so please check
the dist file and update your config before filing a new issue!

Addresses #25
2013-06-28 13:45:14 +02:00
Sebastian Grewe
1126118cb9 Fetch all user shares in one query
This will fetch all user shares in a single run, not user by user as
done previously. Saves one query and can possibly increase SQL execution
time.

Addresses #246
2013-06-26 10:54:10 +02:00
Sebastian Grewe
416d52078d Adding an optimized valid/invalid shares query
* This should speed up the process of finding shares for round and users

Addresses #246
2013-06-26 10:00:06 +02:00
Sebastian Grewe
a09bd1470e Adding account name to all transactions
Fixes #251
2013-06-25 11:39:44 +02:00
Sebastian Grewe
370b3475b9 Adding transactions admin panel
* Lists all transactions for all users

Addresses #251
2013-06-25 10:57:56 +02:00
Sebastian Grewe
2095b09d69 More verbose output on cron updates
* Added more verbosity to crons
* Made the output look better on consoles
* Added another error message to notifications class
2013-06-24 10:36:59 +02:00
Sebastian Grewe
d630329055 Display error message to user on failed logins
Warn a user with an error that there have been failed login attempts
for their account. Login errors can be cleared by clicking on the URL in
the message itself.

Fixes #240
2013-06-23 20:58:42 +02:00
Sebastian Grewe
4113e05a10 Adding multi-API support
This will allow users to change the API url, added coinchose as an
example as pointed out by @vias79 .

* tools class detects the API type
* getPrice returns the price based on API URL parsed

Fixes #236
2013-06-23 20:41:43 +02:00
Sebastian Grewe
2e7a4a8092 Adding donors page to About dropdown
Lists all donors, their donation setting and total donated amount.
This will allow people to see who is contributing to the pool.

Fixes #223
2013-06-23 20:12:34 +02:00
Sebastian Grewe
bfcf14a74c Sort news by time, newest first
Fixes #231
2013-06-21 20:29:21 +02:00
Sebastian Grewe
2e566f6e97 Only use valid shares for worker status
Fixes #229
2013-06-21 16:30:08 +02:00
Sebastian Grewe
84ababe9f7 Adding support for post time and author
* Added new SQL upgrade and structure
* Added post time and author to admin panel
* Added post time and author to news list

Fixes #226
2013-06-21 12:11:13 +02:00
Sebastian Grewe
e4e88e5226 Adding custom news posts via admin panel
* Adding dynamic news posts from DB
* Support Adding, Editing, Activating, Deactivating through admin panel
* Display all active posts on news page
* Implemented Markdown Library by Michelf

Fixes #61
2013-06-21 11:16:02 +02:00
Sebastian Grewe
5f271e3f67 Fixing issues with application using BASEPATH
Fixes #217
2013-06-19 14:50:13 +02:00
Sebastian Grewe
3f0c3884aa Adding some more information for PPS to sidebar
* Added user share rate to sidebar for PPS
* Added estimated 24h LTC payout based on PPS value and share rate

Addresses #160
2013-06-18 09:35:01 +02:00
Sebastian Grewe
68d874b15a Merge pull request #208 from TheSerapher/issue-189
Issue 189
2013-06-18 00:31:51 -07:00
Sebastian Grewe
34509051e2 Properly detect if we did find an upstream share
Avoid returning true even if no share was found.

Addresses #189
2013-06-18 09:30:13 +02:00
Sebastian Grewe
b532bbca51 Do not mark PPS transactions as unconfirmed
Fixes #206
2013-06-17 16:42:17 +02:00
Sebastian Grewe
fa7f61c436 Adding transaction fees to transaction class
This will add back the transaction fees. Prior to this commit the pool
had to cover the transaction fees. Now for each transaction the full
balance is transferred (RPC Daemon will remove the TX Fee) but two
transactions are added. One for the Debig and one TXFee.

Fixes #203.

**Requires database upgrade with supplied SQL file**
2013-06-17 11:17:15 +02:00
Sebastian Grewe
91ef2caaab Added cronjob to pre-cache statistics
This will fix #199 and help on loading times for the website in case
caches are empty. Caches are pre-filled by a cron so the website only
does it as a fall back. Check Ticket for details.
2013-06-17 10:07:40 +02:00
Sebastian Grewe
0817befaaa Further cleanup to reduce PHP notice warnings 2013-06-14 13:51:06 +02:00
Sebastian Grewe
6f858188ad Adding pool and combined hashrate graphs
* Moving from My Graph to its own section: Hashrate Graphs
* Adding pool hashrate graph
* Adding combined hashrate graph and piechart

Fixes #187
2013-06-13 22:59:19 +02:00
Sebastian Grewe
5d356b5c4f Adding counter for failed login attempts
* Track failed login attempts of a user
* Reset failed attempts as soon as the login succeeded

Fixes #182
2013-06-13 15:26:23 +02:00
Sebastian Grewe
bfaa0a67ef Enforce session logout if IP address changed
Fixes #179
2013-06-13 13:59:45 +02:00
Sebastian Grewe
6a5f938895 Store Users IP address in accounts after login
Fixes #177
2013-06-13 13:46:32 +02:00
Sebastian Grewe
44851e35df Add admin/lock changes to admin panel
* Add clickable boxes for Admin and Locked status for all users
* Change status via Ajax call, script embedded to the admin page

Fixes #147
2013-06-13 11:36:28 +02:00
Sebastian Grewe
42b6d4b3b2 Adding support for user locking
* Currently no GUI, use DB access to change the row entry
* Upgraded Database table `accounts` with upgrade SQL
* Updated `admin` field to `is_admin` as boolean
* Modified pages, classes, templates to support is_admin and is_locked

Addresses #147
2013-06-13 11:36:28 +02:00
Sebastian Grewe
27b4c4473f Adding bonus to unconfirmed calculations 2013-06-12 09:17:50 +02:00
Sebastian Grewe
a006ea782a Adding confirmed and unconfirmed balance
* Added SQL code to support both balances
* Added sidebar entries
* Modified auto_payout to use new index
* Mofified account page to use new index

Addresses #140 but needs to be tested!
2013-06-12 09:13:14 +02:00