i try change home page table panel with cards
and this is result with admin user
and this result with User ( have some table permission )
this result when hide link in Homepage
about my code
i make new page name panel02.php with following Code
Code: Select all
<style>
.wrimagecard{
margin-top: 0;
margin-bottom: 1.5rem;
text-align: left;
position: relative;
background: #fff;
box-shadow: 12px 15px 20px 0px rgba(46,61,73,0.15);
border-radius: 4px;
transition: all 0.3s ease;
}
.wrimagecard .fa{
position: relative;
font-size: 70px;
}
.wrimagecard-topimage_header{
padding: 20px;
}
a.wrimagecard:hover, .wrimagecard-topimage:hover {
box-shadow: 2px 4px 8px 0px rgba(46,61,73,0.2);
}
.wrimagecard-topimage a {
width: 100%;
height: 100%;
display: block;
}
.wrimagecard-topimage_title {
padding: 20px 24px;
height: 80px;
padding-bottom: 0.75rem;
position: relative;
}
.wrimagecard-topimage a {
border-bottom: none;
text-decoration: none;
color: #525c65;
transition: color 0.3s ease;
}
</style>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
<div class="container-fluid">
<div class="row">
<?php
//echo "Hello";
//$t_perm = getTablePermissions($tn);
//print_r ($tc);
foreach($groups as $grp => $tables) {
foreach($tables as $tn) {
$tg[$tn] = $grp;
//echo $grp;
//echo $tn;
//print_r ($tc);
$tc = $arrTables[$tn];
$sql_from = get_sql_from($tn, false, true);
$count_records = ($sql_from ? sqlValue("select count(1) from " . $sql_from) : 0);
//Array ( [Caption] => Users [Description] => Show Users [tableIcon] => resources/table_icons/administrator.png [group] => Users [homepageShowCount] => 1 )
?>
<div class="col-md-3 col-sm-4">
<div class="wrimagecard wrimagecard-topimage">
<a href="#">
<div class="wrimagecard-topimage_header" style="background-color:rgba(187, 120, 36, 0.1) ">
<center><img src="<?php echo $tc['tableIcon']; ?>"></center>
</div>
<div class="wrimagecard-topimage_title">
<h4><?php echo $tc['Description']; ?>
<div class="pull-right badge"><?php echo $count_records; ?></div></h4>
</div>
</a>
</div>
</div>
<?php
}
}
?>
</div>
</div>
Code: Select all
include_once(__DIR__ . '/hooks/panel02.php');