mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Lots of UI cleanups and update, gave a dark look for modals, bunch of icon changes etc
This commit is contained in:
100
client_files.php
100
client_files.php
@@ -1,42 +1,84 @@
|
||||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM files WHERE client_id = $client_id ORDER BY file_id DESC"); ?>
|
||||
<?php $sql_files_images = mysqli_query($mysqli,"SELECT * FROM files WHERE client_id = $client_id AND (file_ext LIKE 'JPG' OR file_ext LIKE 'jpg' OR file_ext LIKE 'png' OR file_ext LIKE 'PNG') ORDER BY file_id DESC"); ?>
|
||||
|
||||
<?php $sql_files_other = mysqli_query($mysqli,"SELECT * FROM files WHERE client_id = $client_id AND file_ext NOT LIKE 'JPG' AND file_ext NOT LIKE 'jpg' AND file_ext NOT LIKE 'png' AND file_ext NOT LIKE 'PNG' ORDER BY file_id DESC"); ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-paperclip"></i> Files</h6>
|
||||
<h6 class="float-left mt-1"><i class="fa fa-file"></i> Uploaded Files</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientFileModal"><i class="fa fa-cloud-upload-alt"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php
|
||||
<div class="row mb-5">
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$file_id = $row['file_id'];
|
||||
$file_name = $row['file_name'];
|
||||
|
||||
?>
|
||||
<div class="col-xl-3 col-lg-3 col-md-6 col-sm-6 mb-3">
|
||||
<div class="card">
|
||||
<a href="#" data-toggle="modal" data-target="#viewClientFileModal<?php echo $file_id; ?>">
|
||||
<img class="img-fluid" src="<?php echo $file_name; ?>">
|
||||
</a>
|
||||
<div class="card-footer p-1">
|
||||
<center>
|
||||
<a href="<?php echo $file_name; ?>" download="<?php echo $file_name; ?>" class="text-secondary float-left ml-1"><i class="fa fa-cloud-download-alt"></i></a>
|
||||
<small class="text-secondary"><?php echo basename($file_name); ?></small>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql_files_images)){
|
||||
$file_id = $row['file_id'];
|
||||
$file_name = $row['file_name'];
|
||||
$file_ext = $row['file_ext'];
|
||||
|
||||
?>
|
||||
|
||||
<a href="post.php?delete_file=<?php echo $file_id; ?>" class="text-secondary float-right mr-1"><i class="fa fa-times"></i></a>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include("view_client_file_modal.php");
|
||||
}
|
||||
?>
|
||||
<div class="col-xl-3 col-lg-3 col-md-6 col-sm-6 mb-3">
|
||||
<div class="card">
|
||||
<a href="#" data-toggle="modal" data-target="#viewClientFileModal<?php echo $file_id; ?>">
|
||||
<img class="img-fluid" src="<?php echo $file_name; ?>">
|
||||
</a>
|
||||
<div class="card-footer p-1">
|
||||
<center>
|
||||
<a href="<?php echo $file_name; ?>" download="<?php echo $file_name; ?>" class="text-secondary float-left ml-1"><i class="fa fa-cloud-download-alt"></i></a>
|
||||
<small class="text-secondary"><?php echo basename($file_name); ?></small>
|
||||
|
||||
<a href="post.php?delete_file=<?php echo $file_id; ?>" class="text-secondary float-right mr-1"><i class="fa fa-times"></i></a>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include("view_client_file_modal.php");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<table class="table">
|
||||
|
||||
<?php
|
||||
while($row = mysqli_fetch_array($sql_files_other)){
|
||||
$file_id = $row['file_id'];
|
||||
$file_name = $row['file_name'];
|
||||
$file_ext = $row['file_ext'];
|
||||
if($file_ext == 'pdf'){
|
||||
$file_icon = "file-pdf";
|
||||
}elseif($file_ext == 'gz' or $file_ext == 'tar' or $file_ext == 'zip' or $file_ext == '7z' or $file_ext == 'rar'){
|
||||
$file_icon = "file-archive";
|
||||
}elseif($file_ext == 'txt'){
|
||||
$file_icon = "file-alt";
|
||||
}elseif($file_ext == 'doc' or $file_ext == 'docx'){
|
||||
$file_icon = "file-word";
|
||||
}elseif($file_ext == 'xls' or $file_ext == 'xlsx' or $file_ext == 'ods'){
|
||||
$file_icon = "file-excel";
|
||||
}elseif($file_ext == 'mp3' or $file_ext == 'wav' or $file_ext == 'ogg'){
|
||||
$file_icon = "file-audio";
|
||||
}else{
|
||||
$file_icon = "file";
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="<?php echo $file_name; ?>" class="text-secondary"><i class="fa fa-fw fa-2x fa-<?php echo $file_icon; ?> mr-3"></i> <?php echo basename($file_name); ?></a></td>
|
||||
<td>
|
||||
<a href="<?php echo $file_name; ?>" download="<?php echo $file_name; ?>" class="text-secondary float-left ml-1"><i class="fa fa-cloud-download-alt"></i></a>
|
||||
<a href="post.php?delete_file=<?php echo $file_id; ?>" class="text-secondary float-right mr-1"><i class="fa fa-times"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user