<head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Perfil - Dashboard</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous"> <link rel="stylesheet" href="css/all.css"> <link rel="stylesheet" href="css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css"> <script src="js/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.css"/> <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.js"></script> <script defer src="https://use.fontawesome.com/releases/v5.0.13/js/solid.js" integrity="sha384-tzzSw1/Vo+0N5UhStP3bvwWPq+uvzCMfrN1fEFe+xBmv1C/AtVX5K0uZtmcHitFZ" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous"> </head> <script type="text/javascript"> $(document).ready(function () { $(".list-unstyled").find('li').removeClass("active"); $("#perfil").addClass("active"); }); </script> <?php include('sidebar.php') ?> <div id="content"> <?php include('header.php') ?> <div class="content-section"> <div class="main"> <h1 class="breadcrumb-header">Perfil</h1> <div class="row"> <div class="col-md-12"> <div class="panel"> <div class="row"> <div class="col-md-4"> <div class="img-container"> <img src="images/man.png"> </div> </div> <div class="col-md-8"> <div class="custom-file-upload"> <input type="file" id="file" name="myfiles[]" multiple readonly /> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="inputs_config"> <p>Datos personales</p> <label>Nombre</label> <input type="text" name="nombre_user" placeholder="Fernando Vásquez"> <label>Puesto / Profesión</label> <input type="text" name="puesto" placeholder="Gerente general"> <label>Dirección</label> <input type="text" name="direccion" placeholder="Melbourn, Australia"> <label>Número</label> <input type="number" name="numero" placeholder="12345678"> </div> </div> <div class="col-md-6"> <div class="inputs_config"> <p>Redes sociales</p> <label>Facebook</label> <input type="text" name="facebook" placeholder="Link de Facebook"> <label>Linkein</label> <input type="text" name="linkedin" placeholder="Link de Linkedin"> <label>Instagram</label> <input type="text" name="instagram" placeholder="Link de Instagram"> <label>Correo</label> <input type="email" name="instagram" placeholder="Correo electrónico"> </div> </div> </div> <div class="boton_guardar_info"> <div class="success_btn"> <a href="#">Guardar</a> </div> </div> </div> </div> </div> </div> <?php include('footer.php') ?> </div> </div> <script> ;(function($) { // Browser supports HTML5 multiple file? var multipleSupport = typeof $('<input/>')[0].multiple !== 'undefined', isIE = /msie/i.test( navigator.userAgent ); $.fn.customFile = function() { return this.each(function() { var $file = $(this).addClass('custom-file-upload-hidden'), // the original file input $wrap = $('<div class="file-upload-wrapper">'), $input = $('<input type="text" class="file-upload-input" disabled placeholder="Ningún archivo seleccionado" />'), // Button that will be used in non-IE browsers $button = $('<button type="button" class="file-upload-button">Subir foto</button>'), // Hack for IE $label = $('<label class="file-upload-button" for="'+ $file[0].id +'">Subir foto</label>'); // Hide by shifting to the left so we // can still trigger events $file.css({ position: 'absolute', left: '-9999px' }); $wrap.insertAfter( $file ) .append( $file, $input, ( isIE ? $label : $button ) ); // Prevent focus $file.attr('tabIndex', -1); $button.attr('tabIndex', -1); $button.click(function () { $file.focus().click(); // Open dialog }); $file.change(function() { var files = [], fileArr, filename; // If multiple is supported then extract // all filenames from the file array if ( multipleSupport ) { fileArr = $file[0].files; for ( var i = 0, len = fileArr.length; i < len; i++ ) { files.push( fileArr[i].name ); } filename = files.join(', '); // If not supported then just take the value // and remove the path to just show the filename } else { filename = $file.val().split('\\').pop(); } $input.val( filename ) // Set the value .attr('title', filename) // Show filename in title tootlip .focus(); // Regain focus }); $input.on({ blur: function() { $file.trigger('blur'); }, keydown: function( e ) { if ( e.which === 13 ) { // Enter if ( !isIE ) { $file.trigger('click'); } } else if ( e.which === 8 || e.which === 46 ) { // Backspace & Del // On some browsers the value is read-only // with this trick we remove the old input and add // a clean clone with all the original events attached $file.replaceWith( $file = $file.clone( true ) ); $file.trigger('change'); $input.val(''); } else if ( e.which === 9 ){ // TAB return; } else { // All other keys return false; } } }); }); }; // Old browser fallback if ( !multipleSupport ) { $( document ).on('change', 'input.customfile', function() { var $this = $(this), // Create a unique ID so we // can attach the label to the input uniqId = 'customfile_'+ (new Date()).getTime(), $wrap = $this.parent(), // Filter empty input $inputs = $wrap.siblings().find('.file-upload-input') .filter(function(){ return !this.value }), $file = $('<input type="file" id="'+ uniqId +'" name="'+ $this.attr('name') +'"/>'); // 1ms timeout so it runs after all other events // that modify the value have triggered setTimeout(function() { // Add a new input if ( $this.val() ) { // Check for empty fields to prevent // creating new inputs when changing files if ( !$inputs.length ) { $wrap.after( $file ); $file.customFile(); } // Remove and reorganize inputs } else { $inputs.parent().remove(); // Move the input so it's always last on the list $wrap.appendTo( $wrap.parent() ); $wrap.find('input').focus(); } }, 1); }); } }(jQuery)); $('input[type=file]').customFile(); </script>