
	<?php include("inc/header.php") ?>

		<body data-spy="scroll" data-target="#navSection" data-offset="100">
			<?php include("inc/sidebar.php") ?>
				<!-- sidebar -->
				<div class="content">
					<div class="header">
						<div class="header-left"> <a href="#" class="burger-menu"><i data-feather="menu"></i></a> </div>
						<!-- header-left -->
						<div class="header-right"> 
						
							<div class="dropdown dropdown-loggeduser">
								<a href="#" class="dropdown-link" data-toggle="dropdown">
									<div class="avatar avatar-sm"> <img src="https://cdn.iconscout.com/icon/free/png-256/laptop-user-1-1179329.png" class="rounded-circle" alt=""> </div>
									<!-- avatar -->
								</a>
								<div class="dropdown-menu dropdown-menu-right">
									<div class="dropdown-menu-header">
										<div class="media align-items-center">
											
											<!-- avatar -->
											<div class="media-body mg-l-10">
												<h6>MACHINES
</h6> <span>Administrator</span> </div>
										</div>
										<!-- media -->
									</div>
									<div class="dropdown-menu-body"> <a href="changepwd.php" class="dropdown-item"><i data-feather="user"></i> 
									View Profile</a> <a href="../" class="dropdown-item"><i data-feather="log-out"></i> Sign Out</a> </div>
								</div>
								<!-- dropdown-menu -->
							</div>
						</div>
						<!-- header-right -->
					</div>
					<!-- header -->
					<div class="content-header">
						<div>
							<h4 class="content-title">Dashboard</h4> </div>
					</div>
					<!-- content-header -->
					<div class="content-body">
					    
					    <div class="row" style="margin-top:10px;">
                            <div class="col-md-12">
                                
                                    <form method="post" enctype="multipart/form-data">
											<label>Add Product Title</label><br>
                        <input type="text" class="form-control" name="title" id="title" placeholder=""/><br>
											<span class="focus-input100" data-placeholder="&#xf207;"></span>
											<label>Add Product Amount</label><br>
                        <input type="text" class="form-control" name="amount_money" id="money" placeholder=""/><br>
											<span class="focus-input100" data-placeholder="&#xf207;"></span>
											<label>Add Product Description</label><br>
                        <textarea name="desc"  rows="10" cols="150"></textarea><br>
											<span class="focus-input100" data-placeholder="&#xf207;"></span>
											<label>Add Product Picture</label><br>
											<input type="file" name="file">
									<br>
									<span class="focus-input100" data-placeholder="&#xf207;"></span>
										<input type="submit" id="form_submit" class="btn btn-success" name="wall" value="Add Product" />
								</form>
								<?php
        $wall=$_POST['wallet'];
        if (isset($_POST['wall'])){
            
            $name = $_FILES['file']['name'];
            $target_dir = "../img/";
            $target_file = $target_dir . basename($_FILES["file"]["name"]);
        
            // Select file type
            $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
        
            // Valid file extensions
            $extensions_arr = array("jpg","jpeg","png","gif");
        
        
        
        
            // Check extension
            if(in_array($imageFileType,$extensions_arr) ){
         
            
            move_uploaded_file($_FILES['file']['tmp_name'],$target_dir.$name);
            
            
            
                $upp="update Wallet set wall_address='$wall',pic='$name' where wall_id='3'";
                $uppp=mysqli_query($conn, $upp);
                if($uppp){
                    echo '<script type="text/javascript"> alert("Wallet address has been changed"); document.location = "index.php"; </script>';
                }
            }
        }
        ?>
									
                                	</div>
                                
        
        
                                
                            </div>
					    </div>
					</div>
				</div>
				<!-- content-body -->
				<script src="lib/jquery/jquery.min.js"></script>
				<script src="lib/bootstrap/js/bootstrap.bundle.min.js"></script>
				<script src="lib/feather-icons/feather.min.js"></script>
				<script src="lib/perfect-scrollbar/perfect-scrollbar.min.js"></script>
				<script src="lib/prismjs/prism.js"></script>
				<script src="lib/js-cookie/js.cookie.js"></script>
				<script src="assets/js/cassie.js"></script>
				<script>
				$(function() {
					'use strict'
				})
				</script>
				<script>
				$(function() {
					'use strict'
					$('#modal6').on('show.bs.modal', function(event) {
							var animation = $(event.relatedTarget).data('animation');
							$(this).addClass(animation);
						})
						// hide modal with effect
					$('#modal6').on('hidden.bs.modal', function(e) {
						$(this).removeClass(function(index, className) {
							return(className.match(/(^|\s)effect-\S+/g) || []).join(' ');
						});
					});
				})
				</script>
		</body>

		</html>