service.php 701 B

12345678910111213141516171819202122232425
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once __DIR__.'/../../../main/inc/global.inc.php';
  4. api_protect_admin_script();
  5. $action = isset($_GET['what']) ? $_GET['what'] : '';
  6. define('CHAMILO_INTERNAL', true);
  7. $plugin = VChamiloPlugin::create();
  8. $thisurl = api_get_path(WEB_PLUGIN_PATH).'vchamilo/views/manage.php';
  9. switch ($action) {
  10. case 'syncthis':
  11. $res = include_once api_get_path(SYS_PLUGIN_PATH).'vchamilo/views/syncparams.controller.php';
  12. if (!$res) {
  13. echo '<span class="label label-success">Success</span>';
  14. } else {
  15. echo '<span class="label label-danger">Failure<br/>'.$errors.'</span>';
  16. }
  17. break;
  18. }
  19. exit;