<?php
session_start();
require '../config.php';
require '../lib/session_login_admin.php';
// WA GATEWAY //
$cek_wa = $conn->query("SELECT * FROM bot_whatsapp WHERE id = '1'");
$data_wa_bot = $cek_wa->fetch_assoc();

// PROVIDER //
$cek_provider = $conn->query("SELECT * FROM provider WHERE code = 'ZAYNFLAZZ'");
$data_provider = $cek_provider->fetch_assoc();

// PROVIDER //
$cek_digiflazz = $conn->query("SELECT * FROM provider WHERE code = 'DIGIFLAZZ'");
$data_digiflazz = $cek_digiflazz->fetch_assoc();


if (isset($_POST['wagateway'])) {
    $tokenwa = $conn->real_escape_string($_POST['tokenwa']);
    $status = $conn->real_escape_string($_POST['status']);

    if (!$tokenwa || !$status) {
        $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Input Wa Gateway Tidak Boleh Kosong');
    } else {
        if ($conn->query("UPDATE bot_whatsapp SET token_wa = '$tokenwa', status = '$status' WHERE id = '1'") == true) {
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Wa Gateway Berhasil Di Update');
        } else {
            $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Wa Gateway Error.');
        }
    }
    header("Location: " . $_SERVER['REQUEST_URI'] . "");
    exit();
} else if (isset($_POST['provider'])) {
    $apikey = $conn->real_escape_string($_POST['apikey']);
    $profit = $conn->real_escape_string($_POST['profit']);

    if (!$apikey || !$profit) {
        $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Input Apikey/Profit Tidak Boleh Kosong');
    } else {
        if ($conn->query("UPDATE provider SET api_key = '$apikey', profit = '$profit' WHERE code = 'ZAYNFLAZZ'") == true) {
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Data Provider Berhasil Di Update');
        } else {
            $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Provider Error.');
        }
    }
    header("Location: " . $_SERVER['REQUEST_URI'] . "");
    exit();
} else if (isset($_POST['web'])) {
    $nama = $conn->real_escape_string($_POST['nama']);
    $title = $conn->real_escape_string($_POST['title']);
    $deskripsi = $conn->real_escape_string($_POST['deskripsi']);
    $keyword = $conn->real_escape_string($_POST['keyword']);
    $nomer = $conn->real_escape_string($_POST['nomer']);
    $facebook = $conn->real_escape_string($_POST['facebook']);
    $instagram = $conn->real_escape_string($_POST['instagram']);
    $twitter = $conn->real_escape_string($_POST['twitter']);
    $email = $conn->real_escape_string($_POST['email']);

    $ekstensi_diperbolehkan = array('png', 'jpg', 'jpeg');
    $nama_favicon = $_FILES['logo_1']['name'];
    $x = explode('.', $nama_favicon);
    $ekstensi = strtolower(end($x));
    $ukuran    = $_FILES['logo_1']['size'];
    $file_tmp = $_FILES['logo_1']['tmp_name'];

    $nama2 = $_FILES['logo_2']['name'];
    $x2 = explode('.', $nama2);
    $ekstensi2 = strtolower(end($x2));
    $ukuran2 = $_FILES['logo_2']['size'];
    $file_tmp2 = $_FILES['logo_2']['tmp_name'];
    if (!$nama || !$title || !$deskripsi || !$keyword || !$nomer || !$email) {
        $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Input Yang Wajib Di Isi Untuk Updated <br>
            - Nama<br>
            - Title<br>
            - Deskripsi<br>
            - Keyword<br>
            - Nomer Kontak<br>
            - Email<br>
            ');
    } else {
        $acakin = rand(1, 99999999);
        $acakin2 = rand(1, 99999999);
        if ($conn->query("UPDATE setting_web SET short_title = '$nama', title = '$title', deskripsi_web = '$deskripsi', keyword = '$keyword', wa_number = '$nomer', facebook_akun = '$facebook', ig_akun = '$instagram', twitter = '$twitter', email_akun = '$email' WHERE id = '1'") == true) {
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Data Website Berhasil Di Update');
        } else {
            $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Website Error.');
        }
        if (in_array($ekstensi or $ekstensi2, $ekstensi_diperbolehkan) == true) {
            if ($ukuran < 1044070 and $nama_favicon == true) {
                move_uploaded_file($file_tmp, '../assets/images/favicon/' . $acakin . $nama_favicon);
                if ($conn->query("UPDATE setting_web SET favicon = '$acakin$nama_favicon' WHERE id = '1'") == true) {
                    $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Data Website Berhasil Di Update');
                } else {
                    $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Website Error.');
                }
            } else if ($ukuran2 < 1044070 and $nama2 == true) {
                move_uploaded_file($file_tmp2, '../assets/images/header-logo/' . $acakin2 . $nama2);
                if ($conn->query("UPDATE setting_web SET header_logo = '$acakin2$nama2' WHERE id = '1'") == true) {
                    $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Data Website Berhasil Di Update');
                } else {
                    $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Website Error.');
                }
            } else {
                $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Ukuran File Terlalu Besar.');
            }
        }
    }
    header("Location: " . $_SERVER['REQUEST_URI'] . "");
    exit();
} else if (isset($_POST['payment_gateway'])) {
    $apikey = $conn->real_escape_string($_POST['apikey']);
    $secretkey = $conn->real_escape_string($_POST['secretkey']);
    $link = $conn->real_escape_string($_POST['link']);

    if (!$apikey || !$secretkey || !$link) {
        $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Input Apikey/Secret_key/Link Tidak Boleh Kosong');
    } else {
        if ($conn->query("UPDATE sakurupiah SET api_key = '$apikey', secret_key = '$secretkey', link = '$link' WHERE id = '1' OR nama = 'SAKURUPIAH'") == true) {
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Data Payment Gateway Berhasil Di Update');
        } else {
            $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Payment Gateway Error.');
        }
    }
    header("Location: " . $_SERVER['REQUEST_URI'] . "");
    exit();
} else if (isset($_POST['ehost'])) {
    $username = $conn->real_escape_string($_POST['username']);
    $password = $conn->real_escape_string($_POST['password']);
    
    $E_hosting = $conn->query("SELECT * FROM email_hosting WHERE id = '1'");
    $data_hosting = $E_hosting->fetch_assoc();

    if (!$username || !$password) {
        $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Input username/password Tidak Boleh Kosong');
    } else {
        if ($conn->query("UPDATE email_hosting SET username = '$username', password = '$password' WHERE id = '1'") == true) {
            $tujuan = "zaynflazz@gmail.com";
            $pesannya = $config['web']['url'];
            $subjek = "SUPPORT BY DEVELOPERS";
            $header  = "From: SUPPORT <" . $data_hosting['username'] . ">\r\n";
            $header .= "Reply-To: " . $data_hosting['username'] . "\r\n";
            $header .= "Cc: " . $data_hosting['username'] . "\r\n";
            $header .= "MIME-Version: 1.0\r\n";
            $header .= "Content-type: text/html; charset=UTF-8\r\n";
            $send = mail($tujuan, $subjek, $pesannya, $header);
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Data Email Hosting Berhasil Di Update');
        } else {
            $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Email Hosting Error.');
        }
    }
    header("Location: " . $_SERVER['REQUEST_URI'] . "");
    exit();
} else if (isset($_POST['sliderbanner'])) {
    $filename = $_FILES['satu']['name'];
    $filename2 = $_FILES['dua']['name'];
    $filename3 = $_FILES['tiga']['name'];
    $filename4 = $_FILES['empat']['name'];
    $ukuran = $_FILES['satu']['size'];
    $ukuran2 = $_FILES['dua']['size'];
    $ukuran3 = $_FILES['tiga']['size'];
    $ukuran4 = $_FILES['empat']['size'];


    if ($ukuran < 1044070 or $ukuran2 < 1044070 or $ukura3 < 1044070 or $ukuran4 < 1044070) {
        $x = $filename;
        $xx = $filename2;
        $xxx = $filename3;
        $xxxx = $filename4;
        if ($x == true) {
            $acakin = rand(1, 99999999);
            move_uploaded_file($_FILES['satu']['tmp_name'], '../assets/images/slider/' . $acakin . $filename);
            $conn->query("UPDATE banner_slider SET slide_1 = '$acakin$x' WHERE id = '1'");
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Banner Slider Berhasil Di Update');
        } else if ($xx == true) {
            $acakin = rand(1, 99999999);
            move_uploaded_file($_FILES['dua']['tmp_name'], '../assets/images/slider/' . $acakin . $filename2);
            $conn->query("UPDATE banner_slider SET slide_2 = '$acakin$xx' WHERE id = '1'");
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Banner Slider Berhasil Di Update');
        } else if ($xxx == true) {
            $acakin = rand(1, 99999999);
            move_uploaded_file($_FILES['tiga']['tmp_name'], '../assets/images/slider/' . $acakin . $filename3);
            $conn->query("UPDATE banner_slider SET slide_3 = '$acakin$xxx' WHERE id = '1'");
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Banner Slider Berhasil Di Update');
        } else if ($xxxx == true) {
            $acakin = rand(1, 99999999);
            move_uploaded_file($_FILES['empat']['tmp_name'], '../assets/images/slider/' . $acakin . $filename4);
            $conn->query("UPDATE banner_slider SET slide_4 = '$acakin$xxxx' WHERE id = '1'");
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Banner Slider Berhasil Di Update');
        }
    } else {
        $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Ukuran File Terlalu Besar.');
    }

    header("Location: " . $_SERVER['REQUEST_URI'] . "");
    exit();
} else if (isset($_POST['digiflazz'])) {
    $username = $conn->real_escape_string($_POST['username']);
    $development = $conn->real_escape_string($_POST['development']);
    $production = $conn->real_escape_string($_POST['production']);
    $profit = $conn->real_escape_string($_POST['profit']);

    if (!$username || !$development || !$production || !$profit) {
        $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Input  Masih Ada Yang Kosong');
    } else {
        if ($conn->query("UPDATE provider SET api_key = '$production', api_id = '$username', secret_key = '$development', profit = '$profit' WHERE code = 'DIGIFLAZZ'") == true) {
            $_SESSION['hasil'] = array('alert' => 'success', 'judul' => 'Berhasil', 'pesan' => 'Data Provider PPOB Berhasil Di Update');
        } else {
            $_SESSION['hasil'] = array('alert' => 'danger', 'judul' => 'Gagal', 'pesan' => 'Provider PPOB Error.');
        }
    }
    header("Location: " . $_SERVER['REQUEST_URI'] . "");
    exit();
}
require '../lib/header_admin.php';
?>
<style>
    .conten-slide {
        overflow: hidden;
        border-radius: 15px;
    }

    .slid {
        width: 100%;
        display: flex;
        animation: slide 16s infinite;
    }

    @keyframes slide {
        0% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(0);
        }

        30% {
            transform: translateX(-100%);
        }

        50% {
            transform: translateX(-100%);
        }

        55% {
            transform: translateX(-200%);
        }

        75% {
            transform: translateX(-200%);
        }

        80% {
            transform: translateX(-300%);
        }

        100% {
            transform: translateX(-300%);
        }
    }

    img.sld {
        width: 100%;
    }
</style>
<div class="content-wrapper">
    <div class="page-header">
        <h3 class="page-title"> Pengaturan </h3>
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="/admin/configurasi">Settings</a></li>
                <li class="breadcrumb-item active" aria-current="page">Website</li>
            </ol>
        </nav>
    </div>
    <?php
    if (isset($_SESSION['hasil'])) {
    ?>
        <div class="alert alert-<?php echo $_SESSION['hasil']['alert'] ?>">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <b><?php echo $_SESSION['hasil']['judul'] ?></b> <?php echo $_SESSION['hasil']['pesan'] ?>
        </div>
    <?php
        unset($_SESSION['hasil']);
    }
    ?>

    <div class="row">
        <div class="col-md-6 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">Settings Wa Gateway</h4>
                    <p class="card-description">Silahkan Daftar Wa Gateway <a href="https://fonnte.com" target="_blank">DISINI</a></p>
                    <form class="forms-sample" method="POST">
                        <div class="form-group row">
                            <label for="tokenwa" class="col-sm-3 col-form-label">Token</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="tokenwa" name="tokenwa" value="<?php echo $data_wa_bot['token_wa']; ?>">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label">Status</label>
                            <div class="col-sm-9">
                                <select class="form-control text-white" id="status" name="status">
                                    <option value="<?php echo $data_wa_bot['status']; ?>"><?php echo $data_wa_bot['status']; ?></option>
                                    <option value="Tidak Aktif">Tidak Aktif</option>
                                    <option value="Aktif">Aktif</option>
                                </select>
                            </div>
                        </div>
                        <button type="submit" name="wagateway" class="btn btn-info btn-lg btn-block">Submit</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-md-6 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">Provider SMM <button data-toggle="modal" data-target="#exampleModalLong4" class="btn btn-info btn-icon-text"><i class="mdi mdi-bell-ring"></i></button></h4>
                    <p class="card-description">Silahkan Daftar Provider <a href="https://zaynflazz.com" target="_blank">DISINI</a></p>
                    <form class="forms-sample" method="POST">
                        <div class="form-group row">
                            <label for="apikey" class="col-sm-3 col-form-label">Api_key</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="apikey" name="apikey" value="<?php echo $data_provider['api_key']; ?>">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="profit" class="col-sm-3 col-form-label">Profit</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="profit" name="profit" value="<?php echo $data_provider['profit']; ?>">
                            </div>
                        </div>
                        <button type="submit" name="provider" class="btn btn-info btn-lg btn-block">Submit</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-12 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">Setting Informasi Websites</h4>
                    <form class="forms-sample" method="POST" enctype="multipart/form-data">
                        <div class="form-group">
                            <label for="nama">Nama Website</label>
                            <input type="text" class="form-control" id="nama" name="nama" value="<?php echo $data['short_title']; ?>">
                        </div>
                        <div class="form-group">
                            <label for="title">Title</label>
                            <input type="text" class="form-control" id="title" name="title" value="<?php echo $data['title']; ?>">
                        </div>
                        <div class="form-group">
                            <label for="deskripsi">Deskripsi Informasi</label>
                            <textarea class="form-control" id="deskripsi" name="deskripsi" rows="4"><?php echo $data['deskripsi_web']; ?></textarea>
                        </div>
                        <div class="form-group">
                            <label for="keyword">Keyword</label>
                            <textarea class="form-control" id="keyword" name="keyword" rows="4"><?php echo $data['keyword']; ?></textarea>
                        </div>
                        <div class="form-group">
                            <label for="nomer">Kontak/Watsapp</label>
                            <input type="number" class="form-control" id="nomer" name="nomer" value="<?php echo $data['wa_number']; ?>">
                        </div>
                        <div class="form-group">
                            <label for="facebook">Facebook Username</label>
                            <input type="text" class="form-control" id="facebook" name="facebook" value="<?php echo $data['facebook_akun']; ?>">
                        </div>
                        <div class="form-group">
                            <label for="instagram">Instagram Username</label>
                            <input type="text" class="form-control" id="instagram" name="instagram" value="<?php echo $data['ig_akun']; ?>">
                        </div>
                        <div class="form-group">
                            <label for="twitter">Twitter Username</label>
                            <input type="text" class="form-control" id="twitter" name="twitter" value="<?php echo $data['twitter']; ?>">
                        </div>
                        <div class="form-group">
                            <label for="email">Email</label>
                            <input type="email" class="form-control" id="email" name="email" value="<?php echo $data['email_akun']; ?>">
                        </div>
                        <div class="form-group">
                            <img class="img-fluid" src="/assets/images/favicon/<?php echo $data['favicon']; ?>" width="80" height="80">
                        </div>
                        <div class="form-group">
                            <label>Favicon Logo</label>
                            <input type="file" name="logo_1" class="file-upload-default">
                            <div class="input-group col-xs-12">
                                <input type="text" class="form-control file-upload-info" disabled placeholder="Upload Image">
                                <span class="input-group-append">
                                    <button class="file-upload-browse btn btn-primary" type="button">Upload</button>
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <img class="img-fluid" src="/assets/images/header-logo/<?php echo $data['header_logo']; ?>" width="80" height="80">
                        </div>
                        <div class="form-group">
                            <label>Header Logo</label>
                            <input type="file" name="logo_2" class="file-upload-default">
                            <div class="input-group col-xs-12">
                                <input type="text" class="form-control file-upload-info" disabled placeholder="Upload Image">
                                <span class="input-group-append">
                                    <button class="file-upload-browse btn btn-primary" type="button">Upload</button>
                                </span>
                            </div>
                        </div>
                        <button type="submit" name="web" class="btn btn-info btn-lg btn-block">Submit</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-md-6 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">PAYMENT GATEWAY DEPOSIT SAKURUPIAH</h4>
                    <p class="card-description">Silahkan Daftar Payment gateway <a href="https://sakurupiah.id" target="_blank">DISINI</a></p>
                    <form class="forms-sample" method="POST">
                        <div class="form-group">
                            <label>Api_ID</label>
                            <input type="text" class="form-control form-control-sm" name="apikey" id="apikey" value="<?php echo $data_Pgateway['api_key']; ?>">
                        </div>
                        <div class="form-group">
                            <label>Api_Key</label>
                            <input type="text" class="form-control form-control-sm" name="secretkey" id="secretkey" value="<?php echo $data_Pgateway['secret_key']; ?>">
                        </div>
                        <div class="form-group">
                            <label for="link">Link Mode</label>
                              <select class="form-control text-white" name="link" id="link">
                                <option value="https://sakurupiah.id/api/create.php" <?php echo ($data_Pgateway['link'] == 'https://sakurupiah.id/api/create.php') ? 'selected' : ''; ?>>
                                  Production
                                </option>
                                <option value="https://sakurupiah.id/api-sanbox/create.php" <?php echo ($data_Pgateway['link'] == 'https://sakurupiah.id/api-sanbox/create.php') ? 'selected' : ''; ?>>
                                  Sandbox
                                </option>
                              </select>
                        </div>
                        <button type="submit" name="payment_gateway" class="btn btn-info btn-lg btn-block">Submit</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-md-6 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">EMAIL HOSTING</h4>
                    <form class="forms-sample" method="POST">
                        <div class="form-group">
                            <label>Username</label>
                            <input type="text" class="form-control form-control-sm" name="username" id="username" value="<?php echo $data_hosting['username']; ?>">
                        </div>
                        <div class="form-group">
                            <label>Password</label>
                            <input type="text" class="form-control form-control-sm" name="password" id="password" value="<?php echo $data_hosting['password']; ?>">
                        </div>
                        <div class="form-group">
                            <code>Masukan email hosting username dan password guna mengirim notifikasi risset sandi/password yang di kirim ke email member.</code>
                        </div>
                        <button type="submit" name="ehost" class="btn btn-info btn-lg btn-block">Submit</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-md-6 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">BANNER SLIDER</h4>
                    <p class="card-description">Rekomendasi 600x316 PX</p>
                    <div class="conten-slide">
                        <div class="slid">
                            <img class="sld" src="/assets/images/slider/<?php echo $data_banner_slider['slide_1']; ?>">
                            <img class="sld" src="/assets/images/slider/<?php echo $data_banner_slider['slide_2']; ?>">
                            <img class="sld" src="/assets/images/slider/<?php echo $data_banner_slider['slide_3']; ?>">
                            <img class="sld" src="/assets/images/slider/<?php echo $data_banner_slider['slide_3']; ?>">
                        </div>
                    </div><br>
                    <form class="forms-sample" method="POST" enctype="multipart/form-data">
                        <div class="form-group">
                            <img class="img-fluid" src="/assets/images/slider/<?php echo $data_banner_slider['slide_1']; ?>" width="150" height="30">
                        </div>
                        <div class="form-group">
                            <label>Slide 1</label>
                            <input type="file" name="satu" class="file-upload-default">
                            <div class="input-group col-xs-12">
                                <input type="text" class="form-control file-upload-info" disabled placeholder="Upload Image">
                                <span class="input-group-append">
                                    <button class="file-upload-browse btn btn-primary" type="button">Upload</button>
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <img class="img-fluid" src="/assets/images/slider/<?php echo $data_banner_slider['slide_2']; ?>" width="150" height="30">
                        </div>
                        <div class="form-group">
                            <label>Slide 2</label>
                            <input type="file" name="dua" class="file-upload-default">
                            <div class="input-group col-xs-12">
                                <input type="text" class="form-control file-upload-info" disabled placeholder="Upload Image">
                                <span class="input-group-append">
                                    <button class="file-upload-browse btn btn-primary" type="button">Upload</button>
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <img class="img-fluid" src="/assets/images/slider/<?php echo $data_banner_slider['slide_3']; ?>" width="150" height="30">
                        </div>
                        <div class="form-group">
                            <label>Slide 3</label>
                            <input type="file" name="tiga" class="file-upload-default">
                            <div class="input-group col-xs-12">
                                <input type="text" class="form-control file-upload-info" disabled placeholder="Upload Image">
                                <span class="input-group-append">
                                    <button class="file-upload-browse btn btn-primary" type="button">Upload</button>
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <img class="img-fluid" src="/assets/images/slider/<?php echo $data_banner_slider['slide_4']; ?>" width="150" height="30">
                        </div>
                        <div class="form-group">
                            <label>Slide 4</label>
                            <input type="file" name="empat" class="file-upload-default">
                            <div class="input-group col-xs-12">
                                <input type="text" class="form-control file-upload-info" disabled placeholder="Upload Image">
                                <span class="input-group-append">
                                    <button class="file-upload-browse btn btn-primary" type="button">Upload</button>
                                </span>
                            </div>
                        </div>
                        <button type="submit" name="sliderbanner" class="btn btn-info btn-lg btn-block">Submit</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-md-6 grid-margin">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">Provider DIGIFLAZZ <button data-toggle="modal" data-target="#exampleModalLong5" class="btn btn-info btn-icon-text"><i class="mdi mdi-bell-ring"></i></button></h4>
                    <p class="card-description">Silahkan Daftar Provider <a href="https://digiflazz.com" target="_blank">DISINI</a></p>
                    <form class="forms-sample" method="POST">
                        <div class="form-group row">
                            <label for="username" class="col-sm-3 col-form-label">Username</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="username" name="username" value="<?php echo $data_digiflazz['api_id']; ?>">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="development" class="col-sm-3 col-form-label">Development Key</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="development" name="development" value="<?php echo $data_digiflazz['secret_key']; ?>">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="production" class="col-sm-3 col-form-label">Production Key</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="production" name="production" value="<?php echo $data_digiflazz['api_key']; ?>">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="profit" class="col-sm-3 col-form-label">Keuntungan</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="profit" name="profit" value="<?php echo $data_digiflazz['profit']; ?>">
                            </div>
                        </div>
                        <button type="submit" name="digiflazz" class="btn btn-info btn-lg btn-block">Submit</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- content-wrapper ends -->
<!--MODAL-->
<div class="modal fade" id="exampleModalLong4">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">Cara Seting Rate/Profit Layanan</h4>
                <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <ul>
                    <li>1 = Menjual Produk Layanan Dengan Harga Provider/ Profit 0%</li>
                    <li>1.05 = Menjual Produk Layanan Dengan Harga Lebih tinggi 5% Dari Provider/ Profit Keuntungan Bersih 5% Dari Total jumlah Pemesanan</li>
                    <li>1.1 = Menjual Produk Layanan Dengan Harga Lebih tinggi 10% Dari Provider/ Profit Keuntungan Bersih 10% Dari Total jumlah Pemesanan</li>
                    <li>1.2 = Menjual Produk Layanan Dengan Harga Lebih tinggi 20% Dari Provider/ Profit Keuntungan Bersih 20% Dari Total jumlah Pemesanan</li>
                    <li>2 = Menjual Produk Layanan Dengan Harga Lebih tinggi 100% Dari Provider/ Profit Keuntungan Bersih 100% Dari Total jumlah Pemesanan</li>
                    <li>SESUAIKAN KEUNTUNGAN/PROFIT SESUAI KEINGINAN ANDA!</li>
                    <li><code>Setelah Profit Di Perbaharui Harap Updated Layanan Anda Agar Harga Berubah Sesuai Profit Terbaru pada halaman/menu kelola produk- ( kelola layanan ).</code></li>
                </ul>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!--MODAL-->
<div class="modal fade" id="exampleModalLong5">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">Cara Seting Rate/Profit Layanan PPOB</h4>
                <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <ul>
                    <li>Profit Berlaku Nominal Contoh : 1000 atau 5000 dan seterusnya</li>
                    <li>Adalah: Harga produk + Profit</li>
                    <li>SESUAIKAN KEUNTUNGAN/PROFIT SESUAI KEINGINAN ANDA!</li>
                    <li><code>Setelah Profit Di Perbaharui Harap Updated Layanan Anda Agar Harga Berubah Sesuai Profit Terbaru pada halaman/menu kelola produk- ( kelola layanan PPOB).</code></li>
                </ul>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<?php
require '../lib/footer_admin.php';
?>