Commit Graph

263 Commits

Author SHA1 Message Date
Sebastian Grewe
020ea2269b Re-adding admin flags to user list for admin panel
Fixes #99
2013-06-04 13:46:56 +02:00
Sebastian Grewe
d85ded7c5c Moving from user to statistics class
* This fetches all users and joins with shares table

Should speed up things a fair bit.
2013-06-04 13:14:25 +02:00
Sebastian Grewe
4fa3089655 fixing JS crash when table has no content 2013-06-04 12:13:38 +02:00
Sebastian Grewe
43772f439b fixing sort arrows showing behind text 2013-06-04 12:10:43 +02:00
Sebastian Grewe
38a66b917f adding number format to admin user query table 2013-06-04 12:01:16 +02:00
Sebastian Grewe
60789b9332 adding user ID to table 2013-06-04 11:55:36 +02:00
Sebastian Grewe
065f5e6d16 Adding working user admin panel to query user DB
* Users are all fetched from the DB
* Each user is assigned special stats
 * Hashrate
 * Shares
 * Balance
 * Est. Payout
 * Est. Donation
* Display in sortable and paginated table

This is not well optimized. Each user stats are grabbed individually
via the stats and transaction classes. It would probably make sense to
expand the statistics class to list a full user list with all statistics
available instead to cover this in a single SQL query.
2013-06-04 11:34:22 +02:00
Sebastian Grewe
ed0853202b Initial file import for admin panel
* Added isAdmin to user class
 * Run isAdmin on EACH page to ensure admin status hasn't changed
* Added main page with no content
* Added user query page with basic form, no content
2013-06-04 09:15:55 +02:00
Sebastian Grewe
c6347a8ba8 Merge pull request #97 from TheSerapher/issue-96
Addressing #96, missing difficulty on stats page
2013-06-04 00:09:54 -07:00
Sebastian Grewe
bdcc3f747c Addressing #96, missing difficulty on stats page
* Properly assign template variable
* Removed unneeded additional template
2013-06-04 09:08:30 +02:00
Sebastian Grewe
da1d7daaa2 Removed warning from worker list
* Workers can safely be removed even during a round
2013-06-03 20:54:58 +02:00
Sebastian Grewe
07d49f83d3 Changing hash- and share rate calculation SQL
* Do not include shares_archive table
 * Main reason: This table is optional
 * Secondary reason: Speeds up the query from 1.3s to 0.005s
* Drawback: Once a block is found it takes 10 minutes for the stats to
  be accuracte again

This could potentially be reverted but since shares_archive is optional
and the speed increase is rather significant I'd like to keep it this
way.
2013-06-03 15:03:04 +02:00
Sebastian Grewe
0890914d69 Merge branch 'next' of github.com:TheSerapher/php-mmcfe-ng into next 2013-06-03 12:57:19 +02:00
Sebastian Grewe
8a50e14f0b Fixing minor template issues
* Fixed donation link in userinfo bar
* Fixed sidebar table format with proper width
2013-06-03 12:30:37 +02:00
Sebastian Grewe
c16e12886a Update global.inc.dist.php
* Adjusted default difficulty in `config.inc.dist.php` to `20` which seems to be stratum default.
2013-06-03 12:07:06 +03:00
Sebastian Grewe
18109685e7 Merge pull request #94 from TheSerapher/rename-worker-table
Renamed workers table to pool_worker
2013-06-03 02:01:39 -07:00
Sebastian Grewe
96c9a4ae08 Renamed workers table to pool_worker
* This will fix issues with mining pools using the default name
* Back in line with default configurations for most mining pool software
* Fixes #93
2013-06-03 10:59:12 +02:00
Sebastian Grewe
3eb652402f adding est. shares for a block based on est time and share rate 2013-06-03 08:59:12 +02:00
Sebastian Grewe
494a09ca66 Update README.md
Adding donor section! Thanks to all donating their hard earned LTC to this project!
2013-06-02 22:31:07 +03:00
Sebastian Grewe
2efc7a647d Update run-crons.sh
Fixes #89
2013-06-02 18:41:45 +03:00
Sebastian Grewe
64e1177326 Merge pull request #88 from TheSerapher/cron-script
Adding new run-crons.sh script
2013-06-02 03:20:17 -07:00
Sebastian Grewe
bf110505d6 Adding new run-crons.sh script
This script can be used to run all cronjobs required for `mmcfe-ng`.
It can be expanded by pool users in the future by adding or removing
job from the CRONS list in the script.

Script assumed to run inside the cronjobs folder, this can be adjusted
via CRONHOME in the script.
2013-06-02 12:18:13 +02:00
Sebastian Grewe
0a404e6f39 Adding new option to configuration file
* `archive_shares`, true or false, to move shares to archive table
2013-06-02 08:45:06 +02:00
Sebastian Grewe
8c4bfa2992 fixed name for payout job 2013-05-31 14:46:24 +02:00
Sebastian Grewe
9193a859f5 Merge pull request #84 from TheSerapher/sql-structure-update
New database structure
2013-05-31 05:34:05 -07:00
Sebastian Grewe
ffc1c5439d New database structure
* Adds `share_id` to blocks table, see #83
2013-05-31 14:33:14 +02:00
Sebastian Grewe
ac2a9b30c5 Merge pull request #83 from TheSerapher/refactor-backend
Changed backend logics for block finding and payout
2013-05-31 05:31:06 -07:00
Sebastian Grewe
a7bc6fc342 Changed backend logics for block finding and payout
* Findblocks cronjob changes
 * Find & Store upstream share
  * Use last found `share_id` as starting ID or `0`
 * Find & Store upstream finder
  * Use last found `share_id` as starting ID or `0`
* Use stored information when running propotional payout
 * Fetch current checked blocks upstream share from block table
 * Fetch previous upstream share of previous block from block table
 * Calculated payouts in that range of IDs
* Updated `block.class.php` to store share_id in block and fetch highest `share_id`
2013-05-31 14:23:29 +02:00
Sebastian Grewe
f5da2110ef fixing/removing typo in tickerupdate cron 2013-05-31 12:15:16 +02:00
Sebastian Grewe
4917376908 Merge pull request #82 from TheSerapher/upstream-share-by-order
Changing upstream share finding function
2013-05-31 03:13:52 -07:00
Sebastian Grewe
8a1dc20ec8 Changing upstream share finding function
* Fetch all blocks unaccounted for in ASC oder (low to high height)
* Use lowest height block to find lowest ID upstream accepted share
* Use this share as the finding share for a block
* Set share as last found upstream share for further blocks
 * This only applies if shares are not deleted at all which they should!
2013-05-31 12:11:56 +02:00
Sebastian Grewe
969be407c4 Merge pull request #81 from TheSerapher/php-notice-fixes
Getting rid of various PHP notice warnings
2013-05-31 02:57:50 -07:00
Sebastian Grewe
b2725fbce5 Getting rid of various PHP notice warnings
* Assigned empty defaults on templates
* Added some variable checking
2013-05-31 11:56:56 +02:00
Sebastian Grewe
cd13feee70 Merge pull request #80 from TheSerapher/inline-documentation
Adding more in-line documentation and some cleanup
2013-05-30 00:56:43 -07:00
Sebastian Grewe
b5ab1a02fb Adding more in-line documentation and some cleanup 2013-05-30 09:55:21 +02:00
Sebastian Grewe
61658b76f4 changed error message for RPC errors 2013-05-29 21:18:24 +02:00
Sebastian Grewe
10266959a5 removed More button for blocks 2013-05-29 20:59:08 +02:00
Sebastian Grewe
bdc42c58c1 fetch last value from API instead of average
* Added curl as dependency in README
2013-05-29 20:54:34 +02:00
Sebastian Grewe
7e56f484e5 Merge pull request #79 from TheSerapher/api-auth
Properly abort API calls if api_key is invalid
2013-05-29 03:43:22 -07:00
Sebastian Grewe
69b2c2f517 Properly abort API calls if api_key is invalid
* Fixes an issue where any api_key would be validated
* Now returns user ID upon success, aborts script processing with error
  on fail
2013-05-29 12:41:53 +02:00
Sebastian Grewe
ee01bd0df0 Merge pull request #78 from TheSerapher/issue-74
change tx detection to check for orphaned blocks
2013-05-29 03:15:23 -07:00
Sebastian Grewe
36bfcf6b6b change tx detection to check for orphaned blocks 2013-05-29 12:14:30 +02:00
Sebastian Grewe
43320a77d8 Merge pull request #77 from TheSerapher/ticket-cron
Ticket cron
2013-05-29 02:04:19 -07:00
Sebastian Grewe
6b5245b489 new DB strucutre to change setting table to column name 2013-05-29 11:00:48 +02:00
Sebastian Grewe
2376c82c79 default to n/a on template if no value is stored yet 2013-05-29 10:59:10 +02:00
Sebastian Grewe
cdfb074076 Re-adding LTC/usd to website ministats header
* Use tickerupdate.php cron to update setting value
* Added new configuration variables for ticket updates
* Added some missing configuration vars for some URLs
2013-05-29 10:56:08 +02:00
Sebastian Grewe
44851cf82b Update README.md
Added existing and planned future payout systems as features
2013-05-29 07:01:39 +02:00
Sebastian Grewe
ddc1446a2b removing API reference since it is split into many methods now 2013-05-28 16:01:53 +02:00
Sebastian Grewe
2548d4b03d add API key back to account details
Fixes #73.
2013-05-28 15:35:28 +02:00
Sebastian Grewe
006faba666 Merge branch 'next' of github.com:TheSerapher/php-mmcfe-ng into next 2013-05-28 15:25:04 +02:00