pool/web/yaamp/modules/nicehash/NicehashController.php
Tanguy Pruvot bb31cec957 dos2unix all files, we are on linux
trim them, btw... its important to start on a clean base...
2015-07-12 04:40:50 +02:00

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();
}
}