HTTP Auth Realm nyni obsahuje retezec identifikujici autorizacni backend
[mirrors/SokoMan.git] / index.php
index 02cdfe5d4607c1bc4bb380dd32639a3e4ffdce2e..caf25a0ef3039c92e95f2ea419b87abbc7565589 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -91,6 +91,7 @@ class HTML {
        }
 
        function input($name=false, $value=false, $type='text', $placeholder=false, $options=false, $prefix='') {
+               if($type == 'textarea') return $this->textarea($name, $value, $placeholder, $options, $prefix);
                $html = T($prefix)."<input type='$type' ";
                if($name) $html.= "name='$name' ";
                if(!is_bool($value)) {
@@ -150,10 +151,16 @@ class HTML {
                return "<div$options>$html</div>";
        }
 
+       function favicon($url='/favicon.ico') {
+               return '<link rel="shortcut icon" href="'.$url.'" /><link href="'.$url.'" rel="icon" type="image/gif" />';
+
+       }
+
        function head($title=false,$charset='UTF-8',$more='') {
                $title = $title ? "\n<title>$title</title>" : '';
                $html= '<head>';
                $html.= '<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />'.$title.$more;
+               $html.= $this->favicon(dirname($_SERVER['SCRIPT_NAME']).'/favicon.ico');
                $html.= '</head>';
                return $html;
        }
@@ -399,6 +406,10 @@ EOF;
        }
 
        function render_insert_inputs($class,$columns,$selectbox,$current,$hidecols,$update) {
+               $textarea = array(
+                       'item' => array('item_note'),
+                       'model' => array('model_descript')
+               );
                $html = '';
                foreach($columns as $column)    {
                        $html.=T($class).':<b>'.T($column['Field']).'</b>: ';
@@ -413,9 +424,11 @@ EOF;
                                case isset($selectbox[$column['Field']]):
                                        $html.=$this->select($name,$selectbox[$column['Field']],$val);
                                        break;
-                               default: //TODO: textarea
+                               case isset($textarea[$class]) && in_array($column['Field'],$textarea[$class]):
+                                       $html.=$this->input($name, $val, 'textarea');
+                                       break;
+                               default:
                                        $html.=$this->input($name, $val);
-                                       //$html.=$this->textarea($name, $val);
                                        break;
                        }
                        $html.='<br />';
@@ -829,7 +842,7 @@ class Sklad_UI {
        }
 
        function check_auth() {
-               new HTTP_Auth('SkladovejSystem', true, array($this->db->auth,'check_auth'));
+               new HTTP_Auth('WareHouse ['.BACKEND_AUTH.']', true, array($this->db->auth,'check_auth'));
        }
 
        function post_redirect_get($location, $message='', $error=false, $translate=true) {
This page took 0.142791 seconds and 4 git commands to generate.