<?php
$cate_area = $_REQUEST['cate_area'];
if( !$cate_area ) return;

if( $cate_area == "service" ){
  $cate_id = "mnu_svc_visit_chart";
}else{
  $cate_id = "mnu_adm_visit_chart";
}

$today     = $_REQUEST['sdate'] ?: date("Y-m-d");

switch( $_REQUEST['mode'] ){

  case "year":
    $cate_title = "년간";
    include __DIR__."/visit_chart_year.php";
  break;

  case "month":
    $cate_title = "월간";
    include __DIR__."/visit_chart_month.php";
  break;

  case "week":
    $cate_title = "주간";
    include __DIR__."/visit_chart_week.php";
  break;

  case "day":
  default:
    $cate_title = "일일";
    include __DIR__."/visit_chart_day.php";
  break;
}