service.php 600 B

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