<?php
session_start();
include "../modules/Class/autoload.php"; 
$url = '217.11.177.108:9907/Fines/api/rbdaapi/index.php';
$secret = 'shohinnewkey';
$inputdate = date('ymdHis');
$id = filterdb($_REQUEST['login']);
$data = [
    "action"=>"getrank",
    "inputdate"=>$inputdate,
    "id"=>$id,
    "sign"=>md5('getrank'.$inputdate.$secret)
];
$jsondata = json_encode($data);
$sendcurl = sendcurl($jsondata,$url);
$arraydata = customjsondecode($sendcurl);     
$dataproceed = $arraydata[0];   

?>
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>РБДА</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content="РБДА" name="description" />
    <meta content="Themesdesign" name="author" />
    <!-- App favicon -->
    <link rel="shortcut icon" href="../assets/images/nerufavicon.png">
    <!-- Bootstrap Css -->
    <link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- Icons Css -->
    <link href="../assets/css/icons.min.css" rel="stylesheet" type="text/css" />
    <!-- App Css-->
    <link href="../assets/css/app.min.css" rel="stylesheet" type="text/css" />

</head>

<body data-sidebar="dark">

    <!-- Begin page -->
    <div id="layout-wrapper">

        
        <?php include "header.php";?>
        <!-- ========== Left Sidebar Start ========== -->
        <?php include "menu.php"?>
        <!-- Left Sidebar End -->

        <!-- ============================================================== -->
        <!-- Start right Content here -->
        <!-- ============================================================== -->
        <div class="main-content">

            <div class="page-content">
                <div class="container-fluid">

                    <!-- start page title -->
                    <div class="row">
                        <div class="col-12">
                            <div class="page-title-box d-flex align-items-center justify-content-between">
                                <h4 class="mb-0 font-size-18">Редактирование ролей</h4>
                            </div>
                        </div>
                    </div>
                    <!-- end page title -->
                <div class="card">
                        <div class="card-body">
                            <div class="p-lg-3">
                                <div class="col" style="overflow-x:auto ;">
                                    <div class="col-8">
                                        <form method="post" action="../modules/crud.php?act=updrank">
                                            <div class="form-group">
                                                <label for="my-input">Название</label>
                                                <input value="<?=$dataproceed['Name']?>" id="my-input" class="form-control" type="text" name="name" required>
                                            </div>
                                           <div class="form-group">
                                            <label for="my-select">Статус</label>
                                            <select id="my-select" class="form-control" name="status">
                                                <option value="1">Активный</option>
                                                <option value="0">Не активный</option>
                                            </select>
                                           </div>
                                            <input type="hidden" name="id" value="<?=$id?>">
                                            <div class="form-group">
                                               <button class="btn btn-primary" type="submit">Добавить</button>
                                            </div>
                                        </form>
                                    </div>
                                    
                                </div>
                                    
                                                                             
                            </div>
                        <!--end card body-->
                    </div> <!-- end card-->
                </div> <!-- container-fluid -->
            </div>
            <!-- End Page-content -->
        </div>
        <!-- end main content-->

    </div>
    <!-- END layout-wrapper -->

    <!-- JAVASCRIPT -->
    <script src="../assets/libs/jquery/jquery.min.js"></script>
    <script src="../assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="../assets/libs/metismenu/metisMenu.min.js"></script>
    <script src="../assets/libs/simplebar/simplebar.min.js"></script>
    <script src="../assets/libs/node-waves/waves.min.js"></script>

    <script src="../assets/js/app.js"></script>
    <script src="../assets/js/myjs.js"></script>

</body>

</html>