<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="ltr">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="description" content="Guru Commodity">
    <meta name="keywords" content="Guru Commodity">
    <meta name="author" content="Guru Commodity">
    <title>Guru Commodity User Dashboard</title>
    <link rel="apple-touch-icon" href="<?php echo base_url();?>assets/images/ico/apple-icon-120.png">
    <link rel="shortcut icon" type="image/x-icon" href="https://pixinvent.com/demo/crypto-ico-admin/app-assets/images/ico/favicon.ico">
    <link href="https://fonts.googleapis.com/css?family=Muli:300,300i,400,400i,600,600i,700,700i|Comfortaa:300,400,500,700" rel="stylesheet">
    <!-- BEGIN VENDOR CSS-->
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/vendors.min.css">
    <!-- END VENDOR CSS-->
    <!-- BEGIN MODERN CSS-->
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/app.min.css">
    <!-- END MODERN CSS-->
    <!-- BEGIN Page Level CSS-->
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/core/menu/menu-types/vertical-compact-menu.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/pages/dashboard-ico.min.css">
    <!-- END Page Level CSS-->
    <!-- BEGIN Custom CSS-->
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/style.css">
     <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">    
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <!-- Latest compiled JavaScript -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js"></script>
    <style>.menu-title{ display:block;}</style>
    <script>
var socket=io.connect("http://trade-crypto-planet.com:4002");
$(document).ready(function(){
	socket.on("tr_emit",function(data){
		console.log(data.trid);
		$("tr#"+data.trid).html(data.trdata);
		$("tr#"+data.trid+" td:nth-child(2)").css("background-color",data.color);
		setTimeout(function(){ $("tr#"+data.trid+" td:nth-child(2)").css("background","none"); }, 2000);
	});
	socket.on("tr_emit_user",function(data){
		console.log(data.trid);
		$("tr#"+data.trid).html(data.tr);
//		$("tr#"+data.trid+" td:nth-child(2)").css("background-color",data.color);
//		setTimeout(function(){ $("tr#"+data.trid+" td:nth-child(2)").css("background","none"); }, 2000);
	});
	setInterval(function(){
				var cur_rate_class=$("#cur_rate").attr("class");
				//console.log(cur_rate_class);
				//$(".GOLD_ticker").text($("tr#GOLD td:nth-child(2)").text());
				if(cur_rate_class!=""){
				var v=$("tr#"+cur_rate_class+" td:nth-child(2)").text();
				}
				$("#cur_rate").val(v);
				}, 1000);
	$("#metal_select").change(function(){
				var vall=$(this).val();
				var t=vall.split("-");
				$("#cur_rate").attr("class",t[0]);
			//	$("#limit").attr("class",t[0]+"_ticker form-control");
			});
			$("#marketprice").click(function(){
				if ($('input[type="checkbox"]').is(':checked')){
					$("#limit").attr('disabled',true);
				}else{
					$("#limit").removeAttr('disabled');
				}
				//
			});
});
</script>
    <!-- END Custom CSS-->
  </head>
  <body class="vertical-layout vertical-compact-menu 2-columns   menu-expanded fixed-navbar" data-open="click" data-menu="vertical-compact-menu" data-col="2-columns">

    <!-- fixed-top-->
    <nav class="header-navbar navbar-expand-md navbar navbar-with-menu navbar-without-dd-arrow fixed-top navbar-light navbar-bg-color">
      <div class="navbar-wrapper">
        <div class="navbar-header d-md-none">
          <ul class="nav navbar-nav flex-row">
            <li class="nav-item mobile-menu d-md-none mr-auto"><a class="nav-link nav-menu-main menu-toggle hidden-xs" href="#"><i class="ft-menu font-large-1"></i></a></li>
            <li class="nav-item d-md-none"><a class="navbar-brand" href="<?php echo base_url();?>"><img class="brand-logo d-none d-md-block" alt="crypto ico admin logo" src="<?php echo base_url();?>assets/images/logo/logo2.png"><img class="brand-logo d-sm-block d-md-none" alt="crypto ico admin logo sm" src="<?php echo base_url();?>assets/images/logo/logo-sm.png"></a> </li>
            <li class="nav-item d-md-none"><a class="nav-link open-navbar-container" data-toggle="collapse" data-target="#navbar-mobile"><i class="la la-ellipsis-v">   </i></a></li>
          </ul>
         
        </div>
        <div class="navbar-container">
          <div class="collapse navbar-collapse" id="navbar-mobile">
            <ul class="nav navbar-nav mr-auto float-left">
<li class="nav-item d-none pull-left d-md-block"><h3 class="text-center pull-left">Guru Commodities</h3> <!--<a class="nav-link nav-menu-main menu-toggle hidden-xs" href="#"><i class="ft-menu"></i>  </a>--> </li>
              <li>
            </ul>
            <ul class="nav navbar-nav float-right">         
              
              <!--<li class="dropdown dropdown-notification nav-item"><a class="nav-link nav-link-label" href="#" data-toggle="dropdown"><i class="ficon ft-bell"></i><span class="badge badge-pill badge-default badge-danger badge-default badge-up badge-glow">5</span></a>
                <ul class="dropdown-menu dropdown-menu-media dropdown-menu-right">
                  <li class="dropdown-menu-header">
                    <h6 class="dropdown-header m-0"><span class="grey darken-2">Notifications</span></h6><span class="notification-tag badge badge-default badge-danger float-right m-0">5 New</span>
                  </li>
                  <li class="scrollable-container media-list w-100"><a href="javascript:void(0)">
                      <div class="media">
                        <div class="media-left align-self-center"><i class="ft-plus-square icon-bg-circle bg-cyan"></i></div>
                        <div class="media-body">
                          <h6 class="media-heading">You have new order!</h6>
                          <p class="notification-text font-small-3 text-muted">Lorem ipsum dolor sit amet, consectetuer elit.</p><small>
                            <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">30 minutes ago</time></small>
                        </div>
                      </div></a><a href="javascript:void(0)">
                      <div class="media">
                        <div class="media-left align-self-center"><i class="ft-download-cloud icon-bg-circle bg-red bg-darken-1"></i></div>
                        <div class="media-body">
                          <h6 class="media-heading red darken-1">99% Server load</h6>
                          <p class="notification-text font-small-3 text-muted">Aliquam tincidunt mauris eu risus.</p><small>
                            <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Five hour ago</time></small>
                        </div>
                      </div></a><a href="javascript:void(0)">
                      <div class="media">
                        <div class="media-left align-self-center"><i class="ft-alert-triangle icon-bg-circle bg-yellow bg-darken-3"></i></div>
                        <div class="media-body">
                          <h6 class="media-heading yellow darken-3">Warning notifixation</h6>
                          <p class="notification-text font-small-3 text-muted">Vestibulum auctor dapibus neque.</p><small>
                            <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Today</time></small>
                        </div>
                      </div></a><a href="javascript:void(0)">
                      <div class="media">
                        <div class="media-left align-self-center"><i class="ft-check-circle icon-bg-circle bg-cyan"></i></div>
                        <div class="media-body">
                          <h6 class="media-heading">Complete the task</h6><small>
                            <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Last week</time></small>
                        </div>
                      </div></a><a href="javascript:void(0)">
                      <div class="media">
                        <div class="media-left align-self-center"><i class="ft-file icon-bg-circle bg-teal"></i></div>
                        <div class="media-body">
                          <h6 class="media-heading">Generate monthly report</h6><small>
                            <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Last month</time></small>
                        </div>
                      </div></a></li>
                  <li class="dropdown-menu-footer"><a class="dropdown-item text-muted text-center" href="javascript:void(0)">Read all notifications</a></li>
                </ul>
              </li>-->
              <li class="dropdown dropdown-notification nav-item"><a class="nav-link nav-link-label" href="#"><i class="ficon icon-wallet"></i></a></li>
              <li class="dropdown dropdown-user nav-item"><a class="dropdown-toggle nav-link dropdown-user-link" href="#" data-toggle="dropdown">             <span class="avatar avatar-online"><img src="<?php echo base_url();?>assets/images/user.jpg" alt="avatar"></span><span class="mr-1"><?php echo $this->session->userdata("name");?></span><br/>
              <small>Member Since <b class="text-danger"><?php echo date("d M'y",strtotime($this->session->userdata("created")));?></b></small></a>
                <div class="dropdown-menu dropdown-menu-right">  
                <a class="dropdown-item" href="<?php echo base_url();?>home/dashboard"><i class="fa fa-dashboard"></i> Dashboard</a>
                <a class="dropdown-item" href="<?php echo base_url();?>home/deposite"><i class="icon-wallet"></i> Deposites</a>
                <a class="dropdown-item" href="<?php echo base_url();?>home/withdrawls"><i class="ft-check-square"></i> Withdrawls</a>
                <a class="dropdown-item" href="<?php echo base_url();?>home/logout"><i class="ft-power"></i> Logout</a>
                </div>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </nav>
    <div class="main-menu menu-fixed menu-dark menu-bg-default rounded menu-accordion menu-shadow">
      <div class="main-menu-content"><a class="navigation-brand d-none d-md-block d-lg-block d-xl-block" href="<?php echo base_url();?>"><img class="brand-logo" alt="crypto ico admin logo" src="<?php echo base_url();?>assets/images/logo/logo2.png"/></a>
        <ul class="navigation navigation-main" id="main-menu-navigation" data-menu="menu-navigation">
  <li class="active"><a href="<?php echo base_url();?>home/dashboard"><i class="icon-grid"></i><span class="menu-title" data-i18n="">Dashboard</span></a>
  </li>
  <li class=" nav-item"><a href="<?php echo base_url();?>home/deposite"><i class="fa fa-money"></i><span class="menu-title" data-i18n="">Deposites</span></a>
  </li>
<li class=" nav-item"><a href="<?php echo base_url();?>home/withdrawls"><i class="fa fa-money"></i><span class="menu-title" data-i18n="">WithDrawls</span></a>
  </li>
  <li class=" nav-item"><a href="<?php echo base_url();?>home/logout"><i class="icon-support"></i><span class="menu-title" data-i18n="">Logout</span></a>
  </li>
  
        </ul>
      </div>
    </div>