Zamky sice zatim nic nezamykaji, ale ukazuji varovani nahore v zahlavi
authorThomas Mudrunka <tomas@mudrunka.cz>
Sat, 28 Jul 2012 23:35:35 +0000 (01:35 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Sat, 28 Jul 2012 23:35:35 +0000 (01:35 +0200)
index.php

index 439ffae800a1644b381708540cea21b030c4d148..3200b84314f4205b17f21935d39a175c55009b2c 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -185,7 +185,7 @@ class HTML {
 * @author   Tomas Mudrunka
 */
 class Sklad_HTML extends HTML { //TODO: Split into few more methods
-       function header($title='', $user=array()) {
+       function header($title='', $user=array(), $headerhtml) {
                $home = URL_HOME;
                $script = $_SERVER['SCRIPT_NAME'];
                $search = htmlspecialchars(@trim($_GET['q']));
@@ -308,7 +308,7 @@ EOF;
 </div>
 <hr style="clear: both;" />
 <div style="background-color:#FFDDDD;">
-       <font color="red">$message</font>
+       <font color="red">$headerhtml $message</font>
 </div>
 <div style="text-align:right; color:darkgreen;">
 $fortune
@@ -1096,8 +1096,11 @@ class Sklad_UI {
                $PATH_CHUNKS = preg_split('/\//', $PATH_INFO);
                //Sephirot:
                if(!isset($PATH_CHUNKS[1])) $PATH_CHUNKS[1]='';
-               if($_SERVER['REQUEST_METHOD'] != 'POST' && $PATH_CHUNKS[1]!='barcodeimg' && $PATH_CHUNKS[1]!='api') //TODO: tyhle podminky naznacujou, ze je v navrhu nejaka drobna nedomyslenost...
-                       echo $this->html->header($PATH_INFO,$this->db->auth->get_user());
+               if($_SERVER['REQUEST_METHOD'] != 'POST' && $PATH_CHUNKS[1]!='barcodeimg' && $PATH_CHUNKS[1]!='api') { //TODO: tyhle podminky naznacujou, ze je v navrhu nejaka drobna nedomyslenost...
+           $result = $this->db->safe_query_fetch("SELECT * FROM `lock`;");
+       $headerhtml = !empty($result) ? T('There are locks:').' '.$this->html->render_item_table($result) : '';
+                       echo $this->html->header($PATH_INFO,$this->db->auth->get_user(),$headerhtml);
+               }
                switch($PATH_CHUNKS[1]) { //TODO: Move some branches to plugins if possible
                        case 'test':    //test
                                die('Tell me why you cry');
This page took 0.112275 seconds and 4 git commands to generate.