mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-20 18:09:54 +00:00
55 lines
767 B
PHP
55 lines
767 B
PHP
<?php
|
|
|
|
class NicehashController extends CommonController
|
|
{
|
|
public $defaultAction='index';
|
|
|
|
public function actionIndex()
|
|
{
|
|
if(!$this->admin) return;
|
|
$this->render('index');
|
|
}
|
|
|
|
public function actionIndex_results()
|
|
{
|
|
if(!$this->admin) return;
|
|
$this->renderPartial('index_results');
|
|
}
|
|
|
|
public function actionStart()
|
|
{
|
|
if(!$this->admin) return;
|
|
$id = getiparam('id');
|
|
|
|
$nicehash = getdbo('db_nicehash', $id);
|
|
if(!$nicehash) return;
|
|
|
|
$nicehash->active = true;
|
|
$nicehash->save();
|
|
|
|
$this->goback();
|
|
}
|
|
|
|
public function actionStop()
|
|
{
|
|
if(!$this->admin) return;
|
|
$id = getiparam('id');
|
|
|
|
$nicehash = getdbo('db_nicehash', $id);
|
|
if(!$nicehash) return;
|
|
|
|
$nicehash->active = false;
|
|
$nicehash->save();
|
|
|
|
$this->goback();
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|