diff --git a/_css/default.css b/_css/default.css index 29823ce..fab5677 100644 --- a/_css/default.css +++ b/_css/default.css @@ -460,6 +460,35 @@ table.log tr.delete:hover { cursor: pointer; } +.navigator { + display: block; + text-align: center; + margin: 10px 0px; +} + +.navigator img { + width: 40px; +} + +.navigator div { + width: 100px; + display: inline-block; +} + +.navigator .previous img { + -moz-transform: scaleX(-1); + -o-transform: scaleX(-1); + -webkit-transform: scaleX(-1); + transform: scaleX(-1); + filter: FlipH; + -ms-filter: "FlipH"; +} + +.grayscale { + opacity: 0.3; + filter: alpha(opacity=30); /* For IE8 and earlier */ +} + @media (min-width: 680px) { diff --git a/_image/previous.png b/_image/previous.png new file mode 100644 index 0000000..b3c24a4 Binary files /dev/null and b/_image/previous.png differ diff --git a/_include/include_log.php b/_include/include_log.php index 935620c..df441af 100644 --- a/_include/include_log.php +++ b/_include/include_log.php @@ -1,23 +1,44 @@ num_of_rows("SELECT * FROM log ORDER BY log_date DESC;"); + +$previous_link = true; +$next_link = true; if ($this->is_id()) { - # LOG DEATAILS + # LOG LIST FILTERED + //50esével megyünk + $from = ($this->get_id() - 1) * 50; + $log_query = "SELECT * FROM log ORDER BY log_date DESC LIMIT ".$from.",50;"; + //echo $log_count; + if ($log_count <= $this->get_id()*50) { + $next_link = false; + } + $smarty->assign('next_id', ($next_link?$this->get_id()+1:false)); + $smarty->assign('previous_id', ($this->get_id()>1?$this->get_id()-1:false)); } else { # LOG LIST + header("Location: /admin/log/1"); + /* $log_query = "SELECT * FROM log ORDER BY log_date DESC LIMIT 50;"; - $log_assoc_array = $sql->assoc_array($log_query); - $log_array = array(); - foreach ($log_assoc_array as $log_list_array) { - $current_log = new log(); - $current_log->set_log_data_by_id($log_list_array['log_id']); - $log_array[] = $current_log; - } - - $smarty->assign('log_array', $log_array); - $smarty->display('log.tpl'); - + $previous_link = false; + $smarty->assign('next_id', '2'); + */ } +$log_assoc_array = $sql->assoc_array($log_query); +$log_array = array(); +foreach ($log_assoc_array as $log_list_array) { + $current_log = new log(); + $current_log->set_log_data_by_id($log_list_array['log_id']); + $log_array[] = $current_log; +} + + + + +$smarty->assign('log_array', $log_array); +$smarty->display('log.tpl'); + ?> \ No newline at end of file diff --git a/template/templates/log.tpl b/template/templates/log.tpl index e39fce5..d1f2534 100644 --- a/template/templates/log.tpl +++ b/template/templates/log.tpl @@ -1,3 +1,24 @@ + +
{foreach $log_array as $log} @@ -18,4 +39,25 @@ {/foreach}
+
+ + \ No newline at end of file