service.php 683 B

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