Exemplo n.º 1
0
 case 'getOtherFile':
     if (array_key_exists('uri', $input)) {
         $functions->getOtherFile($input['uri'], false);
     } else {
         $functions->sendBackError('Missing ini uri');
     }
     break;
 case 'getIniValueByKey':
     if (array_key_exists('uri', $input) && array_key_exists('key', $input)) {
         $functions->sendBackOk($functions->getDbTableValueByKey($input['uri'], $input['key']));
     } else {
         $functions->sendBackError('Missing parameters');
     }
     break;
 case 'getCurrentTitle':
     $functions->getCurrentTitle();
     break;
 case 'getMusicPlayerPlaylist':
     $functions->sendBackOk($functions->getMusicPlayerPlaylist($dataStore->getVar('paths', 'youtubePlaylist')));
     break;
 case 'saveToConfig':
     if (array_key_exists('settingPath', $input) && array_key_exists('setting', $input)) {
         $path = explode('/', $input['settingPath']);
         if ($dataStore->setVar($path[0], $path[1], $input['setting'])) {
             $functions->sendBackOk('Setting Saved');
         } else {
             $functions->sendBackError('Failed to save setting', 418, 418);
         }
     } else {
         $functions->sendBackError('Missing parameters');
     }