create_intervention.php 818 B

123456789101112131415161718192021
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once '../inc/global.inc.php';
  4. $allow = api_get_configuration_value('extra');
  5. if (empty($allow)) {
  6. exit;
  7. }
  8. $table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
  9. $comment = isset($_POST['inter_coment']) ? Database::escape_string($_POST['inter_coment']) : '';
  10. $date = isset($_POST['date']) ? Database::escape_string($_POST['date']) : '';
  11. $level = isset($_POST['level']) ? Database::escape_string($_POST['level']) : '';
  12. $ex_user_id = isset($_POST['ex_user_id']) ? Database::escape_string($_POST['ex_user_id']) : '';
  13. $sql = "INSERT INTO $table (exe_user_id,c_id,level,exe_date,inter_coment)
  14. VALUES ($ex_user_id, 0, '$level', '$date', '$comment')";
  15. Database::query($sql);
  16. header("location: myStudents.php?student=$ex_user_id");
  17. exit;