public function __construct() { $this->session = Session::getInstance(); $this->user = User::getInstance(); $this->user->auth('*****@*****.**', 'tenant'); $this->vu = VoteUtils::getInstance(); }
$rid = -1; if (isset($json->rid)) { $rid = $json->rid; } // $res = $screenUtils->getConfig($rid); $res = $screenUtils->getConfigByStationId($rid); $res = array('req' => 'loadRadioConfig', 'res' => $res, 'err' => ''); if (false == $res) { $res = array('req' => 'loadRadioConfig', 'res' => 'false', 'err' => L::__('No such rid'), 'rid' => $rid); } header('Content-Type: application/json'); print json_encode($res); return; }); $app->post('/i-like-this-song/', function () use($app) { $voteUtils = VoteUtils::getInstance(); $utils = Utils::getInstance(); $session = Session::getInstance(); $user = User::getInstance(); $json = $utils->iJsonDoc($app->request()->post('json'), 255); $rid = 1; $sid = 1; $cid = 1; $tid = 1; $uid = 1; $song = 1; $channel = 1; if (false != $json) { if (false != isset($json->rid)) { $rid = $json->rid; }