} $action = "report_kepuasan_customer.php?page=form_result&preview=1"; include '../views/report_kepuasan_customer/form.php'; if (isset($_GET['preview'])) { if (isset($_GET['date'])) { $i_date = $_GET['date']; } else { extract($_POST); $i_date = get_isset($i_date); } $i_date = str_replace(" ", "", $i_date); $date = explode("-", $i_date); $date1 = format_back_date($date[0]); $date2 = format_back_date($date[1]); $query_item = select_detail($date1, $date2); $query_partner = select_partner($date1, $date2); $query_tr = select_transaction($date1, $date2); //fungsi backup $datetime1 = new DateTime($date1); $datetime2 = new DateTime($date2); $difference = $datetime1->diff($datetime2); //echo $difference->days; /*$sel = abs(strtotime($date2)-strtotime($date1)); $selisih= $sel /(60*60*24);*/ $jumlah_hari = $difference->days + 1; $jumlah_customer_puas = get_jumlah_customer_puas($date1, $date2); $total_customer = get_total_customer(); $kepuasan = $jumlah_customer_puas / $total_customer * 100; include '../views/report_kepuasan_customer/form_result.php'; } get_footer();
$page = isset($_GET['page']) ? $_GET['page'] : "list"; $title = ucfirst("menu"); $_SESSION['menu_active'] = 1; switch ($page) { case 'list': get_header($title); $query = select(); $add_button = "menu.php?page=form"; include '../views/menu/list.php'; get_footer(); break; case 'form': get_header(); $close_button = "menu.php?page=list"; $query_menu_type = select_menu_type(); $query_partner = select_partner(); $id = isset($_GET['id']) ? $_GET['id'] : null; $add_button_item = "menu.php?page=form_item&menu_id={$id}"; if ($id) { $row = read_id($id); $query_recipe = select_recipe($id); $action = "menu.php?page=edit&id={$id}"; } else { //inisialisasi $row = new stdClass(); $row->menu_name = false; $row->menu_type_id = 9; $row->menu_original_price = false; $row->menu_margin_price = false; $row->menu_price = false; $row->menu_img = false;