This is the new code that fixes :
<?php
$active3="active";
include "head.php";
include "header.php";
include "aside.php";
? >
<div class="content-wrapper"><!-- Content Wrapper. Contains page content -->
<section class="content-header"><!-- Content Header (Page header) -->
<h1><i class="fa fa-globe"></i> Archivos Compartidos Conmigo</h1>
<ol class="breadcrumb">
<li><a href="home.php"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Compartidos conmigo</li>
</ol>
</section>
<section class="content"><!-- Main content -->
<div class="row"><!-- Small boxes (Stat box) -->
<div class="col-xs-12">
<?php
$user=$_SESSION["user_id"];
$files = mysqli_query($con,"select * from permision where user_id=".$user);
$count = mysqli_num_rows($files);
while ($r=mysqli_fetch_array($files)) {
$id=$r['id'];
}
?>
<?php if(count($files)>0):?>
<div class="box">
<div class="box-header"></div> <!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tbody>
<tr>
<th>Archivo</th>
<th>Descripción</th>
<th>Fecha</th>
</tr>
<?php foreach($files as $fx):
$fx = mysqli_query($con,"select * from permision where id=$id");
while ($rows=mysqli_fetch_array($fx)) {
$file_id=$rows['file_id'];
}
$file = mysqli_query($con,"select * from file where id=$file_id");
while ($row=mysqli_fetch_array($file)) {
$file_is_folder=$row['is_folder'];
$file_filename=$row['filename'];
$file_code=$row['code'];
$file_description=$row['description'];
$file_created_at=$row['created_at'];
}
// echo var_dump($file);
?>
<tr>
<td>
<?php if($file_is_folder):?>
<a href="myfiles.php?folder=<?php echo $file_code;?>">
<i class="fa fa-folder"></i>
<?php else:?>
<a href="file.php?code=<?php echo $file_code;?>">
";
}
// I check if it's audio
elseif ($ ftype [1] == "mp3" || $ ftype [1] == "wav" || $ ftype [1] == "wma" || $ ftype [1] == "ogg" || $ ftype [1] == "mp4") {
threw out "";
}
// comrpuebo if they are zip, rar or others
elseif ($ ftype [1] == "zip" || $ ftype [1] == "rar" || $ ftype [1] == "tgz" || $ ftype [1] == "tar") {
threw out "";
}
// I check if it's a code file
elseif ($ ftype [1] == "php" || $ ftype [1] == "php3" || $ ftype [1] == "html" || $ ftype [1] == "css" || $ ftype [1] == "py" || $ ftype [1] == "java" || $ ftype [1] == "js" || $ ftype [1] == "sql") {
threw out "";
}
// I check if the file is of type pdf
elseif ($ ftype [1] == "pdf") {
threw out "";
}
// I check if the file is excel
elseif ($ ftype [1] == "xlsx") {
threw out "";
}
// I check if the file is from powerpoint
elseif ($ ftype [1] == "pptx") {
threw out "";
}
// I check if the file is from word
elseif ($ ftype [1] == "docx") {
threw out "";
}
// I check if the file is text
elseif ($ ftype [1] == "txt") {
threw out "";
}
// I check if the file is video
elseif ($ ftype [1] == "avi" || $ ftype [1] == "avi" || $ ftype [1] == "asf" || $ ftype [1] == "dvd" || $ ftype [1] == "m1v" || $ ftype [1] == "movie" || $ ftype [1] == "mpeg" || $ ftype [1] == "wn" || $ ftype [1] == "wmv") {
threw out "";
} else {
threw out "";
}
//}
}
//}
? >
No files found in the current folder