<?php
session_start();
include "../../inc/config.php";
session_check();
switch ($_GET["act"]) {
  case 'salin_single':
  $temp_data_insert = array(
    'id_kelas_kuliah' => $_POST['id_kelas'],
    'id_matkul' => $_POST['id_matkul']
  );
  $data_dic = [
    'act' => 'SalinKomponenEvaluasiMatkul',
      'token' => get_token(),
      'key' => $temp_data_insert,
  ];
  $temp_recs = service_request($data_dic);
  $value_data = addslashes($temp_recs->error_desc);
  if ($value_data!='') {
     action_response($value_data);
  } else {
    action_response('');
  }
    break;
      case 'delete_download':
  if (file_exists($_POST['uri'])) {
    unlink($_POST['uri']);
  }
  if (file_exists($_POST['file_data'])) {
    unlink($_POST['file_data']);
  }
   break;
}

?>