X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=index.php;h=cee0e79a61c9bc3a0b9bd168e371c714cfb3c7e4;hb=1f74892d01741330f526551309a17b7245a75807;hp=96bfce3262814958fda3d3c96158ea14826f6c76;hpb=10562613e3993be2741043c8e8b882319aa6da85;p=mirrors%2FSokoMan.git
diff --git a/index.php b/index.php
index 96bfce3..cee0e79 100755
--- a/index.php
+++ b/index.php
@@ -1,7 +1,7 @@
@@ -45,33 +54,42 @@ class Sklad_HTML {
+
+ $message
+
EOF;
}
- function row_print($row) {
- echo('');
+ function row($row) {
+ $html='
';
foreach($row as $var) {
if(trim($var) == '') $var = ' ';
- echo("$var | ");
+ $html.="$var | ";
}
- echo('
');
+ $html.='';
+ return $html;
}
- function table_print(&$table, $params='border=1') {
- echo("");
+ function table(&$table, $params='border=1') {
+ $html="";
$header=true;
foreach($table as $row) {
if($header) {
- $this->row_print(array_keys($row));
+ $html.=$this->row(array_keys($row));
$header=false;
}
- $this->row_print($row);
+ $html.=$this->row($row);
}
- echo('
');
+ $html.='
';
+ return $html;
+ }
+
+ function internal_url($link) {
+ return $_SERVER['SCRIPT_NAME'].'/'.$link;
}
function link($title='n/a', $link='#void', $internal=true) {
- if($internal) $link = $_SERVER['SCRIPT_NAME'].'/'.$link;
+ if($internal) $link = $this->internal_url($link);
return "$title";
}
@@ -124,11 +142,11 @@ EOF;
$table = $table_sorted;
}
- function print_item_table($table) {
+ function render_item_table($table) {
$this->table_add_images($table);
$this->table_collapse($table);
$this->table_sort($table);
- return $this->table_print($table);
+ return $this->table($table);
}
function input($name=false, $value=false, $type='text', $placeholder=false, $options=false) {
@@ -157,7 +175,7 @@ EOF;
return $html;
}
- function print_insert_form($class, $columns, $selectbox=array(), $current=false, $multi_insert=true) {
+ function render_insert_form($class, $columns, $selectbox=array(), $current=false, $multi_insert=true) {
//echo(''); print_r($selectbox);
//echo(''); print_r($current);
$update = false;
@@ -166,33 +184,32 @@ EOF;
$current = array_shift($current);
}
- echo('