<!DOCTYPE html>
<html translate="no" data-dpr="1" style="font-size: 48.24px;">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="robots" content="noindex,nofollow">
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <title>Tiranga</title>
    <link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.5.1/css/all.css">
    <link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.5.1/css/sharp-thin.css">
    <link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.5.1/css/sharp-solid.css">
    <link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.5.1/css/sharp-regular.css">
    <link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.5.1/css/sharp-light.css">
    <link rel="stylesheet" href="./index_files/index-96409872.css">
    <link rel="stylesheet" href="../index_files/index-96409872.css">
    <link href="/css/promotion/app.css" rel="stylesheet" />
    <link href="/css/promotion/chunk-0_1.css" rel="stylesheet" />
    <link href="/css/promotion/chunk-0_2.css" rel="stylesheet" />
    <link href="/css/promotion/chunk-0_3.css" rel="stylesheet" />
    <link href="/css/promotion/chunk-0_4.css" rel="stylesheet" />
    <link href="/css/promotion/chunk-0_5.css" rel="stylesheet" />
    <link href="/css/promotion/chunk-0_6.css" rel="stylesheet" />
    <link rel="stylesheet" href="./index_files/index-96409872.css">
    <link rel="apple-touch-icon" sizes="57x57" href="/images/favicon/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/images/favicon/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/images/favicon/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/images/favicon/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/images/favicon/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/images/favicon/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/images/favicon/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/images/favicon/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/apple-icon-180x180.png">
    <link rel="icon" type="image/png" sizes="192x192" href="/images/favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="/images/favicon/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon/favicon-16x16.png">
    <link rel="manifest" href="/images/favicon/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/images/favicon/ms-icon-144x144.png">
    <meta name="theme-color" content="#ffffff">
    <style>
        html,
        body {
            height: 100%;
            width: 100%;
            background-color: #090909;
            padding: 0;
            margin: 0;
        }

        .amount {
            padding-top: 25px;
            font-weight: 500;
            font-size: .64rem;
            line-height: .64rem;
            color: #8f5206;
            width: auto;
            margin: 0px 178px;
            margin-bottom: .21333rem;
        }

        .amount_txt {
            margin-left: 87px;
            height: .64rem;
            width: 55%;
            min-width: 3.41333rem;
            background: #8F5206;
            border-radius: .66667rem;
            line-height: .64rem;
            text-align: center;
            font-size: .34667rem;
            margin-bottom: .33333rem;
            white-space: nowrap;
            padding: 0 .33333rem;
            color: #fae59f;
        }

        .tip {
            font-size: .29333rem;
            margin-bottom: .26667rem;
            margin-left: 60px;
            color: #8f5206;
        }

        .info_content {
            justify-content: space-between;
            position: relative;
            z-index: 10;
            display: flex;
            width: 100%;
            height: 95%;
            background-color: #404040;
            border-radius: .26667rem;
            overflow: hidden;
            -webkit-box-pack: justify;
        }

        .btn {
            margin: .48rem 0 .34667rem;
            width: 100%;
            height: .93333rem;
            text-align: center;
        }

        .promote__cell-item {
            padding: .37333rem .26667rem .37333rem .37333rem;
            background: #3F3F3F;
            border-radius: .26667rem;
            display: flex;
            -webkit-box-pack: justify;
            justify-content: space-between;
            -webkit-box-align: center;
            align-items: center;
            margin-bottom: .26667rem;
        }

        .label {
            align-items: center;
            display: flex;
            -webkit-box-align: center;
        }

        .label img {
            width: .8rem;
            height: .8rem;
            margin-right: .13333rem;
        }

        .label span {
            font-weight: 300;
            font-size: .37333rem;
            line-height: .29333rem;
            color: #fff;
        }

        .arrow {
            align-items: center;
            display: flex;
        }

        .arrow span {
            font-weight: 400;
            font-size: .32rem;
            line-height: .29333rem;
            color: #d9ac4f;
            margin-right: .10667rem;
        }

        .arrow img {
            width: .64rem;
            height: .64rem;
        }

        .info {
            width: 50%;
        }

        .head {
            height: 1.06667rem;
            line-height: 1.06667rem;
            background-color: #fae59f;
            color: #8f5206;
            font-weight: 600;
            font-size: .34667rem;
            padding-left: 1.01333rem;
            background-image: url(/images/download24.png);
            background-size: .64rem;
            margin-bottom: .2rem;
            background-repeat: no-repeat;
            background-position: .26667rem center;
            position: relative;
        }

        .line1 {
            color: #a6a9ae;
            font-size: .29333rem;
            text-align: center;
            border-right: .01333rem solid #292929;
            padding-top: .2rem;
        }

        .line2 {
            color: #a6a9ae;
            font-size: .29333rem;
            text-align: center;
            border-right: .01333rem solid #292929;
            padding-top: .2rem;
        }

        .line3 {
            color: #a6a9ae;
            font-size: .29333rem;
            text-align: center;
            border-right: .01333rem solid #292929;
            padding-top: .2rem;
        }

        .line4 {
            color: #a6a9ae;
            font-size: .29333rem;
            text-align: center;
            border-right: .01333rem solid #292929;
            padding-top: .2rem;
        }

        .Promotion_cell {
            height: 365px;
        }

        .numbers {
            margin: 15px;
            color: #fff;
            font-size: medium;
        }
    </style>
</head>

<body style="font-size: 12px;">
    <div id="app">
        <div data-v-7c8bbbf4="" class="mian" style="min-height: 105vh;">
            <div data-v-106b99c8="" data-v-7c8bbbf4="" class="navbar">
                <div data-v-106b99c8="" class="navbar-title"> Agency </div>
                <div data-v-106b99c8="" class="navbar-right" onclick="location.href='/promotion/bonusrecord'">
                    <div data-v-7c8bbbf4="" data-v-106b99c8="" class="c-row">
                        <i class="fa-duotone fa-calendar-lines fa-fade fa-lg"
                            style="--fa-primary-color: #fff; --fa-secondary-color: #fff;"></i>
                    </div>
                </div>
            </div>
            <div data-v-7c8bbbf4="" class="promotion" style="padding-top: 0;">
                <div data-v-7c8bbbf4="" class="box">
                    <div data-v-7c8bbbf4="" class="tit" style="line-height:0; background: #c4933f; height: 6.0667rem;">
                        <div class="amount" id="roses_today">0</div>
                        <div class="amount_txt">Yesterday's total commission</div>
                        <div class="tip">Upgrade the level to increase commission income</div>
                        <div class="info_content">
                            <div class="info">
                                <div class="head">Direct Subordinates</div>
                                <div class="line1">
                                    <div class="numbers" id="nor">0</div>
                                    Number of register
                                </div>
                                <div class="line2">
                                    <div class="numbers" id="d_n" style="color: #fae59f;;"></div>Deposit number
                                </div>
                                <div class="line3">
                                    <div class="numbers" id="d_a" style="color: #d9ac4f;;;"></div>Deposit amount
                                </div>
                                <div class="line4">
                                    <div class="numbers" id="dnfd"></div>
                                    <div style="line-height: 1.1;">Number of people making first deposit</div>
                                </div>
                            </div>
                            <div class="info">
                                <div class="head">Team Subordinates</div>
                                <div class="line1">
                                    <div class="numbers" id="Tnor">0</div>Number of register
                                </div>
                                <div class="line2">
                                    <div class="numbers" id="tdn" style="color:  #fae59f;;"></div>Deposit number
                                </div>
                                <div class="line3">
                                    <div class="numbers" id="tda" style="color: #d9ac4f;;"></div>Deposit amount
                                </div>
                                <div class="line4">
                                    <div class="numbers" id="tnfd"></div>
                                    <div style="line-height: 1.1;">Number of people making first deposit</div>
                                </div>
                            </div>
                        </div>
                        <div class="btn">
                            <div id="invitation_link" onclick="copytoclipboard('invitation_link')"
                                class="btn m-b-10 c-row c-row-middle-center tag-read" style="
    background: linear-gradient(180deg, #FAE59F 0%, #C4933F 100%);
    height: 100%;
    font-size: .4rem;
    font-weight: 700;
    letter-spacing: .01333rem;
    color: #8f5206;
">Invitation link</div>
                        </div>
                        <div class="Promotion_cell">
                            <div class="promote__cell-item" onclick="copytoclipboard('show_invite_code')">
                                <div class="label">
                                    <img src="/images/copy_code-eda53ba2.png" alt="">
                                    <span>Copy invitation code</span>
                                </div>
                                <div class="arrow">
                                    <span id="show_invite_code"></span>
                                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADKSURBVHgB7dfBDYJAEIXhgUq2FUvwSIMSL1qCpbiViPs8GkIIO/PIJO9LjJ7M/GRhFzMRERGRwwZzcrs/3r8//AyXabpWIxnNV1nG5TXPz2IkbgG48u2rGjnCbQkBhsbw7Wdpn8pYTq4BwI5wDwBmREgAsCLCAoARERoA0RHhARAZQQmAqAhaAEREeB8lNmHY/x3bOlEDIlAD1paQddJNvEfqx2jqjSz1USL1YS71cTr1C03qV8ozhge3nfiM4cH7KEEdXkRERKTTF7kYzSLK3JrOAAAAAElFTkSuQmCC"
                                        alt="">
                                </div>
                            </div>
                            <div class="promote__cell-item" onclick="location.href='/promotion/TeamReport'">
                                <div class="label">
                                    <img src="/images/team_port-a127ca76.png" alt="">
                                    <span>Subordinates data</span>
                                </div>
                                <div class="arrow">
                                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADKSURBVHgB7dfBDYJAEIXhgUq2FUvwSIMSL1qCpbiViPs8GkIIO/PIJO9LjJ7M/GRhFzMRERGRwwZzcrs/3r8//AyXabpWIxnNV1nG5TXPz2IkbgG48u2rGjnCbQkBhsbw7Wdpn8pYTq4BwI5wDwBmREgAsCLCAoARERoA0RHhARAZQQmAqAhaAEREeB8lNmHY/x3bOlEDIlAD1paQddJNvEfqx2jqjSz1USL1YS71cTr1C03qV8ozhge3nfiM4cH7KEEdXkRERKTTF7kYzSLK3JrOAAAAAElFTkSuQmCC"
                                        alt="">
                                </div>
                            </div>
                            <div class="promote__cell-item" onclick="location.href='/promotion/promotionDes'">
                                <div class="label">
                                    <img src="/images/commission-340af997.png" alt="">
                                    <span>Commission detail</span>
                                </div>
                                <div class="arrow">
                                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADKSURBVHgB7dfBDYJAEIXhgUq2FUvwSIMSL1qCpbiViPs8GkIIO/PIJO9LjJ7M/GRhFzMRERGRwwZzcrs/3r8//AyXabpWIxnNV1nG5TXPz2IkbgG48u2rGjnCbQkBhsbw7Wdpn8pYTq4BwI5wDwBmREgAsCLCAoARERoA0RHhARAZQQmAqAhaAEREeB8lNmHY/x3bOlEDIlAD1paQddJNvEfqx2jqjSz1USL1YS71cTr1C03qV8ozhge3nfiM4cH7KEEdXkRERKTTF7kYzSLK3JrOAAAAAElFTkSuQmCC"
                                        alt="">
                                </div>
                            </div>
                            <div class="promote__cell-item" onclick="location.href='/promotion/tutorial'"">
                                <div  class=" label">
                                <img src="/images/invite_reg-4c4b51a1.png" alt="">
                                <span>Invitation rules</span>
                            </div>
                            <div class="arrow">
                                <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADKSURBVHgB7dfBDYJAEIXhgUq2FUvwSIMSL1qCpbiViPs8GkIIO/PIJO9LjJ7M/GRhFzMRERGRwwZzcrs/3r8//AyXabpWIxnNV1nG5TXPz2IkbgG48u2rGjnCbQkBhsbw7Wdpn8pYTq4BwI5wDwBmREgAsCLCAoARERoA0RHhARAZQQmAqAhaAEREeB8lNmHY/x3bOlEDIlAD1paQddJNvEfqx2jqjSz1USL1YS71cTr1C03qV8ozhge3nfiM4cH7KEEdXkRERKTTF7kYzSLK3JrOAAAAAElFTkSuQmCC"
                                    alt="">
                            </div>
                        </div>


                    </div>
                </div>
            </div>
        </div>
    </div>
    <!---->
    
    </div>
    <%- include('../nav') -%>
    </div>
    </div>



    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="/js/qr.js"></script>
    <script src="/js/client.js"></script>
    
    
    
    
    
    
    <script>
        function RosesRender(datas) {
            let html = datas.map((e) => {
                let html = '';
                return html += `<div data-v-7c8bbbf4="" class="bd van-row">
                        <div data-v-7c8bbbf4="" class="c-tc van-ellipsis van-col van-col--6">Lvl ${e.level}</div>
                        <div data-v-7c8bbbf4="" class="c-tc van-col van-col--4">${e.f1}%</div>
                        <div data-v-7c8bbbf4="" class="c-tc van-col van-col--4">${e.f2}%</div>
                        <div data-v-7c8bbbf4="" class="c-tc van-col van-col--5">${e.f3}%</div>
                        <div data-v-7c8bbbf4="" class="c-tc van-col van-col--5">${e.f4}%</div>
                    </div>`;
            });
            $('.table:eq(1) .box').append(html);

            $('.table:eq(1) .box').append(`
                <div data-v-7c8bbbf4="" class="bd van-row">
                    <div data-v-7c8bbbf4="" class="c-tc fw van-col van-col--6">...</div>
                    <div data-v-7c8bbbf4="" class="c-tc fw van-col van-col--4">...</div>
                    <div data-v-7c8bbbf4="" class="c-tc fw van-col van-col--4">...</div>
                    <div data-v-7c8bbbf4="" class="c-tc fw van-col van-col--5">...</div>
                    <div data-v-7c8bbbf4="" class="c-tc fw van-col van-col--5">...</div>
                </div>
                `);
        }
        $.ajax({
            type: "POST",
            url: "/api/webapi/promotion",
            data: {

            },
            dataType: "json",
            success: function (response) {
                $('.Loading').fadeOut(0);
                $('#f1').text(response.invite.f1);
                $('#f1_today').text(response.invite.f1_today);
                const f1Count =response.invite.f1_today;
                console.log(f1Count);
                $('#f_all_today').text(response.invite.f_all_today);
                $('#f_total').text(response.invite.total_f);

                $('#roses_f1').text("Direct Commission: " + response.invite.roses_f1);
                $('#roses_f').text("Team Commission: " + response.invite.roses_f);
                $('#roses_all').text(response.invite.roses_all);
                $('#roses_today').text(response.invite.roses_today);
                $('#invite_code').text(window.location.hostname + `/register?r_code=${response.info[0].code}`);

                if (response.status === false) return location.href = '/home';
                RosesRender(response.level);
                $('.btn-box .btn:eq(0)').attr('data-clipboard-text', response.info[0].code);
                $('.btn-box .btn:eq(1)').attr('data-clipboard-text', window.location.hostname + `/register?r_code=${response.info[0].code}`);
                var qrcode = new QRCode("qrcode");
                $('#qrcode').attr('title', window.location.hostname + `/register?r_code=${response.info[0].code}`)
                function makeCode() {
                    qrcode.makeCode(window.location.hostname + `/register?r_code=${response.info[0].code}`);
                }

                makeCode();
            }
        });

        function copy(selector) {
            var $temp = $("<div>");
            $("body").append($temp);
            $temp.attr("contenteditable", true)
                .html($(selector).html()).select()
                .on("focus", function () { document.execCommand('selectAll', false, null); })
                .focus();
            document.execCommand("copy");
            $temp.remove();
        }
    </script>
</body>

</html>