diff options
23 files changed, 23 insertions, 6 deletions
@@ -1,5 +1,6 @@ Changes for 1.1alpha1: + - added table 'images' (Alexei) - added small icons for maps (Alexei) - added basic support of background images (Alexei) - added frontends/php/include/html.inc.php (Alexei) diff --git a/create/data/images/Hub.png b/create/data/images/Hub.png Binary files differnew file mode 100644 index 00000000..3f45f255 --- /dev/null +++ b/create/data/images/Hub.png diff --git a/create/data/images/Hub_small.png b/create/data/images/Hub_small.png Binary files differnew file mode 100644 index 00000000..af8db605 --- /dev/null +++ b/create/data/images/Hub_small.png diff --git a/create/data/images/Network.png b/create/data/images/Network.png Binary files differnew file mode 100644 index 00000000..3f45f255 --- /dev/null +++ b/create/data/images/Network.png diff --git a/create/data/images/Network_small.png b/create/data/images/Network_small.png Binary files differnew file mode 100644 index 00000000..c07f5039 --- /dev/null +++ b/create/data/images/Network_small.png diff --git a/create/data/images/Notebook.png b/create/data/images/Notebook.png Binary files differnew file mode 100644 index 00000000..be6e6a6e --- /dev/null +++ b/create/data/images/Notebook.png diff --git a/create/data/images/Notebook_small.png b/create/data/images/Notebook_small.png Binary files differnew file mode 100644 index 00000000..79962e44 --- /dev/null +++ b/create/data/images/Notebook_small.png diff --git a/create/data/images/Phone.png b/create/data/images/Phone.png Binary files differnew file mode 100644 index 00000000..1a74f408 --- /dev/null +++ b/create/data/images/Phone.png diff --git a/create/data/images/Phone_small.png b/create/data/images/Phone_small.png Binary files differnew file mode 100644 index 00000000..e79d92a1 --- /dev/null +++ b/create/data/images/Phone_small.png diff --git a/create/data/images/Printer.png b/create/data/images/Printer.png Binary files differnew file mode 100644 index 00000000..362b5eca --- /dev/null +++ b/create/data/images/Printer.png diff --git a/create/data/images/Printer_small.png b/create/data/images/Printer_small.png Binary files differnew file mode 100644 index 00000000..00a35db8 --- /dev/null +++ b/create/data/images/Printer_small.png diff --git a/create/data/images/Router.png b/create/data/images/Router.png Binary files differnew file mode 100644 index 00000000..3f45f255 --- /dev/null +++ b/create/data/images/Router.png diff --git a/create/data/images/Router_small.png b/create/data/images/Router_small.png Binary files differnew file mode 100644 index 00000000..0f8ebcc8 --- /dev/null +++ b/create/data/images/Router_small.png diff --git a/create/data/images/Satellite.png b/create/data/images/Satellite.png Binary files differnew file mode 100644 index 00000000..d51106e9 --- /dev/null +++ b/create/data/images/Satellite.png diff --git a/create/data/images/Satellite_small.png b/create/data/images/Satellite_small.png Binary files differnew file mode 100644 index 00000000..cde64845 --- /dev/null +++ b/create/data/images/Satellite_small.png diff --git a/create/data/images/Server.png b/create/data/images/Server.png Binary files differnew file mode 100644 index 00000000..a5eb1231 --- /dev/null +++ b/create/data/images/Server.png diff --git a/create/data/images/Server_small.png b/create/data/images/Server_small.png Binary files differnew file mode 100644 index 00000000..e55c1d37 --- /dev/null +++ b/create/data/images/Server_small.png diff --git a/create/data/images/UPS.png b/create/data/images/UPS.png Binary files differnew file mode 100644 index 00000000..cc423e75 --- /dev/null +++ b/create/data/images/UPS.png diff --git a/create/data/images/UPS_small.png b/create/data/images/UPS_small.png Binary files differnew file mode 100644 index 00000000..aa87927d --- /dev/null +++ b/create/data/images/UPS_small.png diff --git a/create/data/images/Workstation.png b/create/data/images/Workstation.png Binary files differnew file mode 100644 index 00000000..efd416f5 --- /dev/null +++ b/create/data/images/Workstation.png diff --git a/create/data/images/Workstation_small.png b/create/data/images/Workstation_small.png Binary files differnew file mode 100644 index 00000000..e844c2ff --- /dev/null +++ b/create/data/images/Workstation_small.png diff --git a/create/mysql/schema.sql b/create/mysql/schema.sql index 39f2f507..121a0e38 100644 --- a/create/mysql/schema.sql +++ b/create/mysql/schema.sql @@ -560,3 +560,16 @@ CREATE TABLE trends ( value_max double(16,4) DEFAULT '0.0000' NOT NULL, PRIMARY KEY (itemid,clock) ) type=InnoDB; + +-- +-- Table structure for table 'images' +-- + +CREATE TABLE images ( + imageid int(4) DEFAULT '0' NOT NULL, + imagetype int(4) DEFAULT '0' NOT NULL, + name varchar(64) DEFAULT '0' NOT NULL, + image blob DEFAULT '' NOT NULL, + PRIMARY KEY (imageid), + UNIQUE (imagetype, name) +) type=InnoDB; diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php index 2fdc5649..40e8d1f5 100644 --- a/frontends/php/sysmap.php +++ b/frontends/php/sysmap.php @@ -270,7 +270,7 @@ echo "Icon"; show_table2_h_delimiter(); echo "<select class=\"biginput\" name=\"icon\" size=1>"; - $icons=array(); +/* $icons=array(); if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1)) { $icons[0]="Server"; @@ -291,17 +291,20 @@ $icons[2]="Printer"; $icons[3]="Hub"; $num=4; - } - for($i=0;$i<$num;$i++) + }*/ + $result=DBselect("select name from images where imagetype=1 order by name"); +/* for($i=0;$i<$num;$i++)*/ + for($i=0;$i<DBnum_rows($result);$i++) { - if(isset($HTTP_GET_VARS["shostid"]) && ($icon==$icons[$i])) + $name=DBget_field($result,$i,0); + if(isset($HTTP_GET_VARS["shostid"]) && ($icon==$name)) // if(isset($HTTP_GET_VARS["hostid"]) && ($HTTP_GET_VARS["icon"]==$icons[$i])) { - echo "<OPTION VALUE='".$icons[$i]."' SELECTED>".$icons[$i]; + echo "<OPTION VALUE='".$name."' SELECTED>".$name; } else { - echo "<OPTION VALUE='".$icons[$i]."'>".$icons[$i]; + echo "<OPTION VALUE='".$name."'>".$name; } } echo "</SELECT>"; |