<?php
session_start();
header('Access-Control-Allow-Origin: *');
include "../../inc/config.php";
$url = get_service_url('url_rest');
$token = $db->get_token();
$json_response = array();
    //truncate jurusan
    $db->fetch_custom("truncate jurusan");
    $data_dic = array(
      'act' => 'GetCountProdi',
      'token' => $token,
      'filter' => "status='A'",
    );
    $results = json_decode(run($data_dic,$url));
    //dump($results);
    if ($results->data>0) {
       $json_response["jumlah"] = $results->data;
    } else {
      $json_response["jumlah"] = 0;
    }
    echo json_encode($json_response);
?>
