update_report.php 660 B

1234567891011121314151617181920212223
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @package chamilo.plugin.ticket
  5. */
  6. exit;
  7. require_once __DIR__.'/../inc/global.inc.php';
  8. $work_id = intval($_POST['work_id']);
  9. $forum_id = intval($_POST['forum_id']);
  10. $rs_id = intval($_POST['rs_id']);
  11. api_protect_course_script();
  12. if (!api_is_allowed_to_edit()) {
  13. echo Display::return_message(get_lang("DeniedAccess"), 'error');
  14. } else {
  15. $sql = "UPDATE ".Database::get_main_table('rp_reporte_semanas')."
  16. SET work_id = '$work_id', forum_id = '$forum_id'
  17. WHERE id ='$rs_id'";
  18. Database::query($sql);
  19. echo Display::return_message(get_lang('Updated'), 'confirm');
  20. }