commit 3de310f10efb0d0f7a008e5b8f11e9d08e0c32b3 parent 1392ea96d8a84b91f5a7127ca34f4dafd469a818 Author: MTRNord <mtrnord1@gmail.com> Date: Sat, 16 May 2015 13:37:52 +0200 maybe now Diffstat:
| M | themes/jumbotron/admin.php | | | 14 | ++++++++++++++ |
| M | themes/jumbotron/admin_pages/posts.php | | | 24 | +----------------------- |
2 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/themes/jumbotron/admin.php b/themes/jumbotron/admin.php @@ -66,6 +66,20 @@ foreach($langs as $prio => $lang) { // AND SO ON ................. } ?> +<?php +if(!empty($_GET['function'])){ + if(!empty($_GET['id'])){ + $get_function = $_GET['function']; + $get_id = $_GET['id']; + if($get_function="edit"){ + + }else{ + deletePost($get_id); + } + } +} +?> + <!DOCTYPE html> <html> <head> diff --git a/themes/jumbotron/admin_pages/posts.php b/themes/jumbotron/admin_pages/posts.php @@ -16,7 +16,7 @@ echo "<td>$id</td>"; echo "<td>$post_title</td>"; echo "<td></td>"; - echo "<td><button style=\"background-color: transparent;text-decoration: underline;border: none;color: blue;cursor: pointer;\" formaction=\"posts.php?function=edit\" title=\"Edit\">Edit</button> <span class=\"glyphicon glyphicon-pencil\" aria-hidden=\"true\"></span> | <button style=\"background-color: transparent;text-decoration: underline;border: none;color: blue;cursor: pointer;\" formaction=\"posts.php?function=delete\" title=\"Delete\">Delete</button> <span class=\"glyphicon glyphicon-trash\" aria-hidden=\"true\"></span></td>"; + echo "<td><button style=\"background-color: transparent;text-decoration: underline;border: none;color: blue;cursor: pointer;\" formaction=\"admin.php?function=edit\" title=\"Edit\">Edit</button> <span class=\"glyphicon glyphicon-pencil\" aria-hidden=\"true\"></span> | <button style=\"background-color: transparent;text-decoration: underline;border: none;color: blue;cursor: pointer;\" formaction=\"admin.php?function=delete\" title=\"Delete\">Delete</button> <span class=\"glyphicon glyphicon-trash\" aria-hidden=\"true\"></span></td>"; echo "</tr>"; $x = $x+1; $id = $id+1; @@ -24,25 +24,3 @@ } ?> </table> -<?php -if(!empty($_GET['function'])){ - if(!empty($_GET['id'])){ - $get_function = $_GET['function']; - $get_id = $_GET['id']; - if($get_function="edit"){ - - }else{ - deletePost($get_id); - } - - - - - } -} - - - - - -?>