<?php
session_start();

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

require_once '../include/Constants.php';
require_once "../vendor/autoload.php";
require_once "../include/DatabaseConn.php";
require_once "../models/User.php";
require_once '../models/USettings.php';
require_once '../models/Settings.php';
require_once '../models/Invoice.php';
require_once '../include/GoogleAuthenticator.php';
require_once '../models/News.php';
require_once '../include/Helper.php';

$db = new DatabaseConn();
$link = $db->connect();

$user = User::getCurrentUser($link);

if (is_null($user)) {
    $url = $_SERVER['REQUEST_URI'];
    header("location: ../login?" . RETURN_URL . "=" . $url);
    die();
}

$settings = USettings::getSystemSettings($link, $user->getEmail());
if ($settings->getTwofa() && is_null($user->getFa())) {
    header("location: add-2fa");
    die();
}


if (isset($_POST['message'])) {
    $name = $user->getName();
    $message = filter_input(INPUT_POST, "message", FILTER_SANITIZE_STRING);
    $subject = filter_input(INPUT_POST, "subject", FILTER_SANITIZE_STRING);
    $email = $user->getEmail();

    if (is_null($subject) || is_bool($subject)) {
        $error = "Please provide subject";
    }
    if (is_null($name) || is_bool($name)) {
        $error = "Please provide a name";
    }

    if (is_null($message) || is_bool($message)) {
        $error = "Message body is empty";
    }
    if (!isset($error)) {
        $mail = new PHPMailer(true);
        try {
            $text = "<p>Name: $name</p><br/><p>Email: $email</p><br/><p>Subject: $subject</p><br/><p>Message: $message</p><br/>";
            $mail->isSMTP();
            $mail->SMTPDebug = 0;
            $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
            $mail->Debugoutput = 'html';
            $mail->Host = EMAIL_HOST;

            $mail->Port = 587;
            $mail->SMTPSecure = 'tls';
            $mail->SMTPAuth = true;
            $mail->Username = EMAIL_USERNAME;
            $mail->Password = EMAIL_PASSWORD;
            $mail->setFrom(EMAIL_NO_REPLY, APP_NAME);
            $mail->addAddress(EMAIL_SUPPORT);
            $mail->Subject = $subject;
            $mail->isHTML(true);
            $mail->msgHTML($text);
            //This should be the same as the domain of your From address
            $mail->DKIM_domain = DKIM_DOMAIN;
            $mail->DKIM_private = 'dkim_private.pem';
            $mail->DKIM_selector = DKIM_SELECTOR;
            $mail->DKIM_identity = $mail->From;
            $mail->DKIM_copyHeaderFields = false;

            $mail->send();

            $success = 'Message has been sent We would contact you soon.';
            //    return true;
        } catch (Exception $e) {
            var_dump($e);
            die();
            $error = "Message could not be sent.";
        }
    }
}

$news = News::getNewsPage($link);
$cInvoices = Invoice::getCurrentInvoices($link, $user->getEmail());
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
    <head>
        <?php require_once './partials/head.php'; ?>
    </head>
    <body  class="ltr en">
       <div
    ui-view=""
    id="app"
    ng-class="{'app-mobile' : app.isMobile, 'app-invest' : app.isInvest, 'app-navbar-fixed' : app.layout.isNavbarFixed,
     'app-sidebar-fixed' : app.layout.isSidebarFixed, 'app-footer-fixed':app.layout.isFooterFixed}"
    class="ng-scope app-navbar-fixed app-sidebar-fixed"
    style=""
>
    <div class="sidebar app-aside ng-scope" id="sidebar" style="top: 0 !important;z-index: 999;" toggleable="" parent-active-class="app-slide-off" data-ng-swipe-left="close()">
        <div perfect-scrollbar="" wheel-propagation="false" suppress-scroll-x="true" class="sidebar-container ps-container" data-ps-id="5bfa9aba-b77c-646a-de0b-9849f920bae3">
            <div ng-transclude="">
                <!-- ngInclude: 'assets/views/partials/sidebar.html' -->
                <div data-ng-include=" 'assets/views/partials/sidebar.html' " class="ng-scope">
                    <!-- ngInclude: 'assets/views/partials/nav.html' -->
                    <nav data-ng-include=" 'assets/views/partials/nav.html' " class="ng-scope">
                        <!-- ngInclude: getNav('/api/sites/default/files/api/menu-%v%-menu-%l%%h%.html') -->
                        <ul class="main-navigation-menu ng-scope" ng-controller="SocialMessengersCtrl" data-ng-include="getNav('/api/sites/default/files/api/menu-%v%-menu-%l%%h%.html')" style="">
                            <li ng-class="{'active open':$state.includes('app.accounts') || $state.includes('app.strategyDetails')}" class="ng-scope active open">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-account"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> My Accounts </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('app.accounts.open') || $state.includes('app.strategyDetails')}" class="active">
                                        <a ui-sref="app.accounts.open" href="/en/accounts/open">
                                            <span class="title"> Open New Account </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.accounts.overview') || $state.includes('app.accounts.id') || $state.includes('app.accounts.password')}">
                                        <a ui-sref="app.accounts.overview" href="/en/accounts">
                                            <span class="title"> Accounts Overview </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.money')}" class="ng-scope">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-MyMoney"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> My Money </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('app.money.deposits')}">
                                        <a ui-sref="app.money.deposits" data-ng-click="callVersaTagSizmek()" href="/en/deposits">
                                            <span class="title"> Deposit funds </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.money.withdraw')}">
                                        <a ui-sref="app.money.withdraw" href="/en/withdraw">
                                            <span class="title"> Withdraw funds </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.money.wallet')}">
                                        <a ui-sref="app.money.wallet" href="/en/fxtm-wallet">
                                            <span class="title"> <?php echo APP_NAME; ?> Wallets </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.money.internal')}">
                                        <a ui-sref="app.money.internal" href="/en/internal">
                                            <span class="title"> Internal transfers </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.money.transfers')}">
                                        <a ui-sref="app.money.transfers.overview" href="/en/transfers">
                                            <span class="title"> Transaction History </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.money.conversion-rates')}">
                                        <a ui-sref="app.money.conversion-rates" href="/en/conversion-rates">
                                            <span class="title"> Conversion Rates </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.money.ibLocalTransfer')}" id="ibLocalTransferMenuItem" class="hidden">
                                        <a ui-sref="app.money.ibLocalTransfer" href="/en/transfer-automation">
                                            <span class="title"> IB Local Transfer </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.platforms')}" class="ng-scope">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-MyPlatforms"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> My Platforms </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('app.platforms.download')}">
                                        <a ui-sref="app.platforms.download" href="/en/platforms">
                                            <span class="title"> Download Platforms </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.platforms.webtrader')}">
                                        <a ui-sref="app.platforms.webtrader" href="/en/webtrader">
                                            <span class="title"> WebTrader </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.fxtmInvest')}" class="ng-scope">
                                <a ui-sref="app.fxtmInvest" href="/en/fxtm-invest">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-Fxtm_invest-03"></i>
                                        </div>
                                        <div class="item-inner">
                                            <span class="title"> <?php echo APP_NAME; ?> Invest </span>
                                        </div>
                                    </div>
                                </a>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.documents')}" class="ng-scope">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-MyDocuments"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> My Documents </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('app.documents.verifyProfile')}">
                                        <a ui-sref="app.documents.verifyProfile" data-ng-click="callVersaTagSizmek()" href="/en/documents">
                                            <span class="title"> Verify Profile </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.documents.verifyPayment')}">
                                        <a ui-sref="app.documents.verifyPayment" data-ng-click="callVersaTagSizmek()" href="/en/verify-payment">
                                            <span class="title"> Verify Payment </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.profile')}" class="ng-scope">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-MyProfile"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> My Profile </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('app.profile')}">
                                        <a ui-sref="app.profile" href="/en/profile">
                                            <span class="title"> User Profile </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.profile.subscriptions')}">
                                        <a ui-sref="app.profile.subscriptions" href="/en/profile/subscriptions">
                                            <span class="title"> Manage Subscriptions </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.profile.changePassword')}">
                                        <a ui-sref="app.profile.changePassword" href="/en/profile/change-password">
                                            <span class="title"> Change My<?php echo APP_NAME; ?> Password </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.tradingServices') || $state.includes('app.pivotPoints')}" class="ng-scope">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-TradingServices"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> Trading Services </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('app.tradingServices.tradingSignals')}">
                                        <a ui-sref="app.tradingServices.tradingSignals" href="/en/fxtm-signals">
                                            <span class="title"> <?php echo APP_NAME; ?> Trading Signals </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.tradingServices.forexTradingIndicators')}">
                                        <a ui-sref="app.tradingServices.forexTradingIndicators" href="/en/services/indicators">
                                            <span class="title"> MT4 Trading Indicators </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.pivotPoints')}">
                                        <a ui-sref="app.pivotPoints" href="/en/pivot-points">
                                            <span class="title"> <?php echo APP_NAME; ?> Pivot Points Strategy </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.rewards')}" class="ng-scope">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-Rewards"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> Promotions &amp; Contests </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('app.rewards.promotions')}">
                                        <a ui-sref="app.rewards.promotions.list" data-ng-click="callVersaTagSizmek()" href="/en/rewards/promotions">
                                            <span class="title"> Promotions </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.rewards.contests')}">
                                        <a ui-sref="app.rewards.contests" data-ng-click="callVersaTagSizmek()" href="/en/rewards/contests">
                                            <span class="title"> Contests </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.rewards.coupon')}">
                                        <a ui-sref="app.rewards.coupon" href="/en/rewards/coupon">
                                            <span class="title"> Redeem Coupon </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.rewards.referFriend')}" class="can-refer">
                                        <a ui-sref="app.rewards.referFriend" href="/en/rewards/refer-friend">
                                            <span class="title"> Refer a friend </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.education')}" class="ng-scope">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-Education"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> Education </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('app.education.webinars')}">
                                        <a ui-sref="app.education.webinars" href="/en/webinars">
                                            <span class="title"> Webinars </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.education.seminars')}">
                                        <a ui-sref="app.education.seminars" href="/en/seminars">
                                            <span class="title"> Seminars </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.education.ebook')}">
                                        <a ui-sref="app.education.ebook" href="/en/ebook">
                                            <span class="title"> Ebooks </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('app.support')}" class="ng-scope">
                                <a href="javascript:void(0);">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-ClientSupport"></i>
                                        </div>
                                        <div class="item-inner"><span class="title"> Client Support </span><i class="icon-arrow icon-arrow-left"></i></div>
                                    </div>
                                </a>
                                <ul class="sub-menu">
                                    <li ng-class="{'active':$state.includes('open_live_chat:')}">
                                        <a href="#" data-ng-click="openSocialMessengersModal()">
                                            <span class="title"> Chat with us </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('open_website:/forex-time/contact')}">
                                        <a href="open_website:/forex-time/contact" target="_blank">
                                            <span class="title"> Contact us </span>
                                        </a>
                                    </li>
                                    <li ng-class="{'active':$state.includes('app.support.enquiry')}">
                                        <a ui-sref="app.support.enquiry" href="/en/support/enquiry-form">
                                            <span class="title"> Enquiry Form </span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li ng-class="{'active open':$state.includes('open_website:/')}" class="ng-scope">
                                <a href="open_website:/" target="_blank">
                                    <div class="item-content">
                                        <div class="item-media">
                                            <i class="icon-logo"></i>
                                        </div>
                                        <div class="item-inner">
                                            <span class="title"> www.ozzcapital.com</span>
                                        </div>
                                    </div>
                                </a>
                            </li>
                        </ul>
                    </nav>
                </div>
            </div>
            <div class="ps-scrollbar-x-rail" style="left: 0px; bottom: 3px;"><div class="ps-scrollbar-x" style="left: 0px; width: 0px;"></div></div>
            <div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px;"><div class="ps-scrollbar-y" style="top: 0px; height: 0px;"></div></div>
        </div>
    </div>
    <div class="app-content ng-scope" ng-class="{loading: loading}">
        <!-- ngInclude: 'assets/views/partials/top-navbar.html' -->
        <header data-ng-include=" 'assets/views/partials/top-navbar.html' " class="navbar navbar-default navbar-static-top ng-scope">
            <div ng-controller="NavUserCtrl" class="ng-scope">
                <div class="navbar-header text-center">
                    <a class="sidebar-mobile-toggler pull-left hidden-lg" ng-click="toggle('sidebar')"><i class="icon-hamburger_thin"></i> </a>
                    <a class="navbar-brand" ui-sref="app.dashboard" title="Return to My<?php echo APP_NAME; ?> home" href="/en">
                        <div class="hidden-md hidden-sm hidden-xs" style="background-image: url('https://kene.ozzcapital.com/images/favicon.png'); background-color: #151D2A" ></div>
                        <div class="small-logo hidden-lg" style="background-image: url('https://kene.ozzcapital.com/images/favicon.png'); background-color: #151D2A" ></div>
                    </a>
                    <a class="pull-right menu-toggler visible-xs-block" id="menu-toggler" ng-click="collapseTopMenu($event)"><span class="sr-only">toggle_navigation</span> <i class="icon-mobile_right_icon-01"></i> </a>
                    <a class="menu-toggler visible-xs-block navbar-header__coin" id="menu-toggler" ng-href="/en/rewards/refer-friend" href="/en/rewards/refer-friend"><i class="icon-coin-dollar"></i></a>
                </div>
                <div
                    class="navbar-collapse ng-isolate-scope collapse"
                    uib-collapse="navbarCollapsed"
                    off-click="navbarCollapsed = true"
                    off-click-if="!navbarCollapsed"
                    off-click-filter="#menu-toggler"
                    aria-expanded="false"
                    aria-hidden="true" style="background: white;">
                    <div>
                        <!-- ngIf: isCanRefer -->
                    </div>
                    <div class="close-handle visible-xs-block menu-toggler" ng-click="collapseAllMenu($event)">
                        <div class="arrow-left"></div>
                        <div class="arrow-right"></div>
                    </div>
                </div>
            </div>
        </header>
        <div data-ng-controller="PageCtrl" class="ng-scope">
          
            <div data-ng-include=" 'assets/views/partials/main-content.html' " id="main_content" class="main-content ng-scope" ng-class="{'hidden' : hidePageContent, 'wrap-content-dashboard' : (currentPageId == 'app.dashboard')}" style="">
                <!-- uiView:  -->
                <div ui-view="" class="wrap-content container fade-in-up ng-scope" id="container">
                    <!-- uiView:  -->
                    <div ui-view="" class="smooth ng-scope">
                        <!-- uiView:  -->
                        <div ui-view="" class="ng-scope">
                            <!-- ngInclude: undefined -->
                            <data-ng-include src="'assets/views/partials/title.html'" class="ng-scope">
                                <!-- ngInclude: 'assets/views/partials/progress_widget.html' -->
                                <div data-ng-include=" 'assets/views/partials/progress_widget.html' " class="ng-scope" style="">
                                    <div ng-controller="ProgressWidgetCtrl" class="ng-scope">
                                        <!-- ngIf: state.currentStep > 0 -->
                                        <div class="container mt20 ng-scope" ng-if="state.currentStep > 0" style="">
                                            <div class="row">
                                                <div class="col-sm-12">
                                                    <h2 class="h1 mainTitle hidden-xs hidden-sm" ng-class="{'header-collapsed': state.collapsed}">Start Trading in 4 steps:</h2>

                                                    <div id="dodo" class="progress-widget panel panel-light-grey border border-dark" ng-class="{'collapsed': state.collapsed}">
                                                        <!-- ngIf: !isMobile -->
                                                        <button class="progress-widget__btn close progress-widget__btn_close ng-scope" ng-click="changeCollapse()" ng-if="!isMobile">
                                                            <!-- ngIf: !state.collapsed -->
                                                            <span class="icon-close-01 ng-scope" ng-if="!state.collapsed"></span>
                                                            <!-- end ngIf: !state.collapsed -->
                                                            <!-- ngIf: state.collapsed -->
                                                        </button>
                                                        <!-- end ngIf: !isMobile -->
                                                        <!-- ngIf: isMobile -->

                                                        <div class="progress-widget__wrapper">
                                                            <!-- step 1 -->
                                                            <div
                                                                class="progress-widget__item progress-widget__item_4-items current"
                                                                ng-class="{'passed disabled': state.currentStep > 1, 'current': state.currentStep === 1}"
                                                                ng-click="clickOnFirstStep( state.currentStep === 1 )"
                                                            >
                                                                <div
                                                                    class="progress-widget__item-layer"
                                                                    uib-popover="Fill in all your details in the form to take you one step closer to trading!"
                                                                    popover-placement="bottom"
                                                                    popover-trigger="mouseenter"
                                                                >
                                                                    <div class="progress-widget__circle">
                                                                        <div class="progress-widget__step">
                                                                            <!-- ngIf: state.currentStep <= 1 -->
                                                                            <span ng-if="state.currentStep <= 1" class="ng-scope">1</span>
                                                                            <!-- end ngIf: state.currentStep <= 1 -->
                                                                            <!-- ngIf: state.currentStep > 1 -->
                                                                        </div>
                                                                    </div>
                                                                    <div class="progress-widget__title">
                                                                        <span>Complete Profile</span>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <!-- step 2 -->
                                                            <div
                                                                class="progress-widget__item progress-widget__item_4-items"
                                                                ng-class="{'passed': state.currentStep > 2, 'current': state.currentStep === 2}"
                                                                ui-sref="app.accounts.open.live"
                                                                href="/en/accounts/open/live"
                                                            >
                                                                <div class="progress-widget__item-layer" uib-popover="Choose from a wide variety of Standard and ECN accounts" popover-placement="bottom" popover-trigger="mouseenter">
                                                                    <div class="progress-widget__circle">
                                                                        <div class="progress-widget__step">
                                                                            <!-- ngIf: state.currentStep <= 2 -->
                                                                            <span ng-if="state.currentStep <= 2" class="ng-scope">2</span>
                                                                            <!-- end ngIf: state.currentStep <= 2 -->
                                                                            <!-- ngIf: state.currentStep > 2 -->
                                                                        </div>
                                                                    </div>
                                                                    <div class="progress-widget__title">
                                                                        <span>Open Account</span>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <!-- ************************* GLOBAL Version ************************* -->

                                                            <!-- step 3 -->
                                                            <div
                                                                class="progress-widget__item progress-widget__item_4-items"
                                                                ng-class="{'passed': state.currentStep > 3, 'current': state.currentStep === 3 }"
                                                                ui-sref="app.money.deposits"
                                                                href="/en/deposits"
                                                            >
                                                                <div
                                                                    class="progress-widget__item-layer"
                                                                    uib-popover="Don't forget to upload documents for verification within 30 days so you can continue trading!"
                                                                    popover-placement="bottom"
                                                                    popover-trigger="mouseenter"
                                                                >
                                                                    <div class="progress-widget__circle">
                                                                        <div class="progress-widget__step">
                                                                            <!-- ngIf: state.currentStep <= 3 -->
                                                                            <span ng-if="state.currentStep <= 3" class="ng-scope">3</span>
                                                                            <!-- end ngIf: state.currentStep <= 3 -->
                                                                            <!-- ngIf: state.currentStep > 3 -->
                                                                        </div>
                                                                    </div>
                                                                    <div class="progress-widget__title">
                                                                        <span>Make Deposit</span>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <!-- step 4 -->
                                                            <div class="progress-widget__item progress-widget__item_4-items last" ng-class="{'current': state.currentStep === 4 }" ui-sref="app.platforms.download" href="/en/platforms">
                                                                <div
                                                                    class="progress-widget__item-layer"
                                                                    uib-popover="Choose between the MT4 or MT5 platform if you don't already have one"
                                                                    popover-placement="bottom"
                                                                    popover-trigger="mouseenter"
                                                                >
                                                                    <div class="progress-widget__circle">
                                                                        <div class="progress-widget__step">
                                                                            <!-- ngIf: state.currentStep <= 4 -->
                                                                            <span ng-if="state.currentStep <= 4" class="ng-scope">4</span>
                                                                            <!-- end ngIf: state.currentStep <= 4 -->
                                                                            <!-- ngIf: state.currentStep > 4 -->
                                                                        </div>
                                                                    </div>
                                                                    <div class="progress-widget__title">
                                                                        <span>Start Trading</span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- end ngIf: state.currentStep > 0 -->
                                    </div>
                                </div>
                                <!-- ngInclude: 'assets/views/partials/alerts.html' -->
                                <div data-ng-include=" 'assets/views/partials/alerts.html' " class="ng-scope">
                                    <div ng-controller="AlertCtrl" class="PopupAlertDiv ng-scope">
                                        <div class="container-fluid mt20 ng-hide" ng-show="alertsLen > 0">
                                            <div class="row">
                                                <div class="col-sm-12"><!-- ngRepeat: (id, alert) in alerts track by $index --></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div ng-hide="currentPageId === 'app.dashboard'" class="ng-scope">
                                    <section id="page-title" class="padding-top-15 padding-bottom-0 ng-scope" ng-controller="TitleCtrl">
                                        <div class="container-fluid">
                                            <div class="row">
                                                <div class="col-xs-12">
                                                    <h1 class="mainTitle">
                                                        <span ng-bind="title | translate" class="ng-binding">Open New Account</span>
                                                        <!-- ngIf: openAccount.account_group === 'investor' --><!-- ngIf: subtitle -->
                                                    </h1>
                                                </div>
                                            </div>
                                        </div>
                                    </section>
                                </div>
                            </data-ng-include>
                            <div class="container-fluid bg-white ng-scope" data-ng-controller="ProactiveChatOpenAccountCtrl">
                                <div class="row">
                                    <div class="col-xs-12"><!-- ngIf: ::showMeHowForPage.videos.length --></div>
                                </div>
                                <div class="row">
                                    <div class="col-md-12 ng-scope" ng-controller="OpenAccountsMainCtrl">
                                        <div>
                                            <div id="wizard">
                                                <!-- ngInclude: undefined -->
                                                <data-ng-include src="'assets/views/open-account/wizard_steps.html'" class="ng-scope" style="">
                                                    <div class="swMain ng-scope">
                                                        <ul class="hidden-xs">
                                                            <li ng-click="form.goTo(Form, 1)" class="selected">
                                                                <a href="">
                                                                    <div class="stepNumber">
                                                                        <strong class="hidden-xs">1.</strong>
                                                                    </div>
                                                                    <span class="stepDesc">Choose your account type</span>
                                                                </a>
                                                            </li>
                                                            <li ng-click="form.goTo(Form, 2)">
                                                                <div class="stepNumber">
                                                                    <strong class="hidden-xs">2.</strong>
                                                                </div>
                                                                <span class="stepDesc">Customise your trading account</span>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </data-ng-include>
                                                <div class="row" vertilize-container="">
                                                    <div class="col-sm-6 col-md-4" vertilize="" style="height: 792px;">
                                                        <!-- ngInclude: undefined -->
                                                        <data-ng-include src="'assets/views/open-account/standart_accounts.html'" class="ng-scope" style="">
                                                            <div class="panel panel-light-grey border border-dark openAccElement ng-scope">
                                                                <div class="panel-body open-acc-block">
                                                                    <h4 class="ng-binding">
                                                                        <?php echo APP_NAME; ?> Standard Accounts
                                                                        <span
                                                                            class="badge badge-info icon-info-with-circle"
                                                                            uib-popover="Accounts where the broker is more involved. They typically have low margin maintenance requirements, floating spreads and orders are placed with instant execution, allowing for the broker to requote prices"
                                                                            popover-placement="top"
                                                                            popover-trigger="mouseenter"
                                                                            ng-class="popoverGlobalOpts.class"
                                                                            popover-append-to-body="true"
                                                                        >
                                                                        </span>
                                                                    </h4>
                                                                    <div data-ng-bind-html="accountDetails.standart.body | translate | rawHtml" class="ng-binding">
                                                                        <p>
                                                                            <b>Standard (MT4/MT5)</b><br />
                                                                            Trade FX and CFDs with standard conditions and low floating spreads
                                                                        </p>
                                                                        <p><b>Min deposit:</b> $/€/£ 100, ₦40 000</p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>Cent (MT4)</b><br />
                                                                            Trade FX and CFDs with a balance displayed in cents
                                                                        </p>
                                                                        <p><b>Min deposit:</b> $/€/£ 10, ₦2 000</p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>Stock CFDs (MT4)</b><br />
                                                                            Trade price movements of 150+ US and EU stocks
                                                                        </p>
                                                                        <p><b>Min deposit:</b> $/€/£ 100, ₦40 000</p>
                                                                        <hr />
                                                                    </div>
                                                                </div>
                                                                <div class="panel-footer no-border">
                                                                    <!-- ngIf: !isHongKongClient -->
                                                                    <div class="form-group ng-scope" ng-if="!isHongKongClient">
                                                                        <a
                                                                            data-ui-sref="app.accounts.open.live({account: 'forextime.standard',
                                                   available_types: 'forextime.standard,forextime.standard.mt5,forextime.cent,forextime.stock.cfds.mt4'})"
                                                                            class="btn btn-orange btn-wide"
                                                                            href="/en/accounts/open/live?account=forextime.standard&amp;available_types=forextime.standard%2Cforextime.standard.mt5%2Cforextime.cent%2Cforextime.stock.cfds.mt4"
                                                                        >
                                                                            Select
                                                                        </a>
                                                                    </div>
                                                                    <!-- end ngIf: !isHongKongClient -->
                                                                    <!-- ngIf: isHongKongClient -->
                                                                </div>
                                                            </div>
                                                        </data-ng-include>
                                                    </div>
                                                    <div class="col-sm-6 col-md-4" vertilize="" style="height: 792px;">
                                                        <!-- ngInclude: undefined -->
                                                        <data-ng-include src="'assets/views/open-account/ecn_accounts.html'" class="ng-scope" style="">
                                                            <div class="panel panel-light-grey border border-dark openAccElement ng-scope">
                                                                <div class="panel-body open-acc-block">
                                                                    <h4 class="ng-binding">
                                                                        <?php echo APP_NAME; ?> ECN Accounts
                                                                        <span
                                                                            class="badge badge-info icon-info-with-circle"
                                                                            uib-popover="Accounts where the broker is less involved. They typically have high margin maintenance requirements, tighter spreads, and orders are placed with market execution, meaning no requotes"
                                                                            popover-placement="top"
                                                                            popover-trigger="mouseenter"
                                                                            ng-class="popoverGlobalOpts.class"
                                                                            popover-append-to-body="true"
                                                                        >
                                                                        </span>
                                                                    </h4>
                                                                    <div data-ng-bind-html="accountDetails.ecn.body | translate | rawHtml" class="ng-binding">
                                                                        <p>
                                                                            <b>ECN (MT4/MT5)</b><br />
                                                                            Trade FX and CFDs with spreads from 0.1pts
                                                                        </p>
                                                                        <p><b>Min deposit:</b> $/€/£ 500, ₦80 000</p>
                                                                        <p>Strategy manager account available</p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>ECN Zero (MT4/MT5)</b><br />
                                                                            Trade FX and CFDs under ECN conditions and zero commission.
                                                                        </p>
                                                                        <p><b>Min deposit:</b> $/€/£ 200, ₦80 000</p>
                                                                        <p>Strategy manager account available</p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>Stocks (MT5)</b><br />
                                                                            Buy and sell US stocks commission-free
                                                                        </p>
                                                                        <p><b>Min deposit:</b> $/€/£ 100, ₦40 000</p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>Pro (MT4/MT5)</b><br />
                                                                            Trade FX and CFDs with the tightest spreads possible. Built for professional traders.
                                                                        </p>
                                                                        <p><b>Min deposit:</b> $/€/£ 25 000, ₦5 000 000</p>
                                                                        <hr />
                                                                    </div>
                                                                </div>
                                                                <div class="panel-footer no-border">
                                                                    <!-- ngIf: !isHongKongClient -->
                                                                    <div class="form-group ng-scope" ng-if="!isHongKongClient">
                                                                        <!-- add this to unhide stock mt5 for China - && $lang != 'zh' && $lang != 'hk' -->
                                                                        <a
                                                                            data-ui-sref="app.accounts.open.live({account: 'forextime.ecn.mt4',
                                                   available_types: 'forextime.ecn.mt4,forextime.ecn.mt5,forextime.ecn.zero,ecn.zero.mt5,forextime.pro,forextime.pro.mt5,forextime.stocks.mt5'})"
                                                                            class="btn btn-orange btn-wide"
                                                                            href="/en/accounts/open/live?account=forextime.ecn.mt4&amp;available_types=forextime.ecn.mt4%2Cforextime.ecn.mt5%2Cforextime.ecn.zero%2Cecn.zero.mt5%2Cforextime.pro%2Cforextime.pro.mt5%2Cforextime.stocks.mt5"
                                                                        >
                                                                            Select
                                                                        </a>
                                                                    </div>
                                                                    <!-- end ngIf: !isHongKongClient -->
                                                                    <!-- ngIf: isHongKongClient -->
                                                                </div>
                                                            </div>
                                                        </data-ng-include>
                                                    </div>
                                                    <div class="col-sm-6 col-md-4" vertilize="" style="height: 792px;">
                                                        <!-- ngInclude: undefined -->
                                                        <data-ng-include src="'assets/views/open-account/demo_accounts.html'" class="ng-scope" style="">
                                                            <div class="panel panel-light-grey border border-dark openAccElement ng-scope">
                                                                <div class="panel-body open-acc-block">
                                                                    <h4 class="ng-binding">
                                                                        Demo Trading
                                                                        <span
                                                                            class="badge badge-info icon-info-with-circle"
                                                                            uib-popover="Build your skills and practice trading in real market conditions - without risking your own money."
                                                                            popover-placement="top"
                                                                            popover-trigger="mouseenter"
                                                                            ng-class="popoverGlobalOpts.class"
                                                                        >
                                                                        </span>
                                                                    </h4>
                                                                    <div data-ng-bind-html="accountDetails.demo.body | translate | rawHtml" class="ng-binding">
                                                                        <p>
                                                                            <b>Standard (MT4/MT5)</b><br />
                                                                            Practice FX and CFD trading with low floating spreads
                                                                        </p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>Cent (MT4)</b><br />
                                                                            Practice FX and CFD trading with a balance displayed in cents
                                                                        </p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>ECN (MT4/MT5)</b><br />
                                                                            Practice trading FX and CFDs with spreads from 0.1pts
                                                                        </p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>ECN Zero (MT4/MT5)</b><br />
                                                                            Practice trading FX and CFDs under ECN conditions and zero commission.
                                                                        </p>
                                                                        <hr />
                                                                        <p>
                                                                            <b>Pro (MT4/MT5)</b><br />
                                                                            Practice trading FX and CFDs with the tightest spreads possible.
                                                                        </p>
                                                                    </div>
                                                                </div>
                                                                <div class="panel-footer no-border">
                                                                    <div class="form-group">
                                                                        <a data-ui-sref="app.accounts.open.demo" class="btn btn-light-blue btn-wide" href="/en/accounts/open/demo">Select</a>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </data-ng-include>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="live-chat-main-container ng-scope" data-ng-controller="ProactiveChatCtrl">
                            <div class="proactive-chat-container" id="proactive-chat">
                                <img src="assets/images/proactive-chat-img.png" />
                                <h3 class="color-orange mb25">Do you need help?</h3>
                                <div><button class="btn btn-orange btn-lg mr10 chatbot" data-ng-click="onChatOpen();">Yes</button> <button class="btn btn-lg color-orange" data-ng-click="closeProactive();">No</button></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- ngInclude: 'assets/views/partials/footer.html' -->
    <footer data-ng-include=" 'assets/views/partials/footer.html' " id="footer" class="ng-scope">
        <div class="footer-inner ng-scope">
            <div class="pull-left">
                <p class="m0">
                    © <?php echo APP_NAME; ?> 2011-2021<br />
                 </p>
                <!-- ngIf: footerAddText -->
            </div>
            <div class="pull-right">
                <span class="go-top" ng-click="toTheTop()"><i style="font-size: 30px;" class="icon-angle-up"></i></span>
            </div>
            <!-- ngIf: !isMobileApp --><!-- ngInclude: 'assets/views/partials/livechat.html' -->
          
            <!-- end ngIf: !isMobileApp -->
        </div>
    </footer>
</div>

<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script>
    $(document).ready(function() {
       $('.progress-widget__btn').click(function() {
           $('#dodo').toggleClass('collapsed');
       });
    });
</script>

        </body>
</html>

