<?php
//© Copyright Approcket. All rights reserved.
//Majoris Panel Script is considered a proprietary software.
//To gain information about the laws regarding the use of these script,
//please visit www.approcket.ir

include('panel_config.php');

//we sure we have one app in apps in self-hosted-mode
$app = db::fetch("SELECT * FROM apps",[]);
$panelconfig  = db::fetch("SELECT * FROM panelconfig WHERE `app_id` = ?",[$app['id']]);
$aes_key      = trim($panelconfig['aes_key']);
$api_token    = trim($panelconfig['api_token']);
$license_key   = trim($panelconfig['license_key']);
$runtime_token = trim($panelconfig['runtime_token']);

?>


<!DOCTYPE html>

<html lang="fa">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">

    <title>فعالسازی توکن‌های رمزنگاری و امنیتی</title>

    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/sweetalert2.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/line-awesome/css/line-awesome.min.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins/components-elegant-icons/css/elegant-icons.min.css"
        type="text/css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins/colorpicker/bootstrap-colorpicker.min.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/css/majoris_root.css?<?=CSS_VERSIONS?>">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/css/majoris_style.css?<?=CSS_VERSIONS?>">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/bootstrap-rtl.min.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/persian-datepicker.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/dropzone.css">

    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/pickr_nano.min.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/notyf.min.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/fancybox.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/materialdesignicons.min.css">
    <link rel="stylesheet" href="<?=BASE?>/core/_dist/plugins-css/phosphor_icons.css">


    <link rel="apple-touch-icon" sizes="180x180" href="<?=BASE?>/core/_dist/img/fav/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="<?=BASE?>/core/_dist/img/fav/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="<?=BASE?>/core/_dist/img/fav/favicon-16x16.png">
    <link rel="mask-icon" href="<?=BASE?>/core/_dist/img/fav/safari-pinned-tab.svg" color="#5bbad5">
    <link rel="shortcut icon" href="<?=BASE?>/core/_dist/img/fav/favicon.ico">
    <meta name="msapplication-TileColor" content="#dae2e7">
    <meta name="msapplication-config" content="<?=BASE?>/core/_dist/img/fav/browserconfig.xml">
    <meta name="theme-color" content="#dae2e7">


</head>

<body>

<div class="row">

<div class="col-md-3"></div>

<div class="col-md-6">

<div style="text-align:center;margin-top:5%;padding:30px;">

    <h4 style="font-weight:300;margin-bottom:30px;">فعال‌سازی امنیتی و رمزنگاری ماجوریس</h4>
    <p style="font-size: 11px;margin-bottom:20px;">برای محافظت از داده‌ها، ارتباطات و درخواست‌های اپلیکیشن و سایت شما، لطفاً کلیدهای امنیتی مربوط به رمزنگاری و توکن‌ها را از <a href="https://my.approcket.ir/" target="_blank">پنل اپ‌راکت</a> خود کپی کرده و در این بخش وارد نمایید.</p>

    <button class="btn-show-keys-helper btn btn-sm btn-primary">راهنمای تصویری</button>

    <div id="activation-keys-enter-wrapper">

        <div style="text-align:right" class="form-group">
        <label style="font-weight: 400;" class="mppanel_labels">توکن API:</label>
        <textarea type="text" style="direction:ltr;text-align:left;" id="api_token" rows="1" class="form-control"><?=$api_token?></textarea>
        </div>

        <div style="text-align:right" class="form-group">
        <label style="font-weight: 400;" class="mppanel_labels">کلید رمزنگاری:</label>
        <textarea type="text" style="direction:ltr;text-align:left;" id="aes_key" rows="1" class="form-control"><?=$aes_key?></textarea>
        </div>

        <div style="text-align:right" class="form-group">
        <label style="font-weight: 400;" class="mppanel_labels">کلید لایسنس:</label>
        <textarea type="text" style="direction:ltr;text-align:left;" id="license_key" rows="3" class="form-control"><?=$license_key?></textarea>
        </div>

        <div style="text-align:right" class="form-group">
        <label style="font-weight: 400;" class="mppanel_labels">توکن Runtime:</label>
        <textarea type="text" style="direction:ltr;text-align:left;" id="runtime_token" rows="3" class="form-control"><?=$runtime_token?></textarea>
        </div>

        <button id="save_the_activation_keys_btn" class="btn btn-primary btn-block">ثبــت و ذخیــره</button>

    </div>

</div> 

</div>


<div class="col-md-3"></div>

</div>




<!-- footer -->

<script>
    let mpPanelBaseUrl = "<?= BASE ?>";
</script>

<script src="<?= BASE ?>/core/_dist/plugins/jquery/jquery.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/sweetalert2.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/pickr.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/notyf.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/fancybox.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/Sortable.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/jquery-sortable.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/jquery-visibility.js"></script>


<script src="<?= BASE ?>/core/_dist/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/adminlte.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/persian-date.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/persian-datepicker.min.js"></script>
<script src="<?= BASE ?>/core/_dist/plugins-js/dropzone.js"></script>

<script src="<?= BASE ?>/core/_dist/js/main/activation.js?<?=JS_VERSIONS?>"></script>

</body>
