summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-24 05:35:45 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-24 05:35:45 +0000
commit505acfb155eb4f9265fe1d803997cd0f2a24c569 (patch)
tree20b3a736c0858e67cc379af7c54339274a5f694e /frontends/php/include
parent9a1e779bc865fddde2adc39dde378f0a0439594a (diff)
- update images. Thanks to James Wells. (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2216 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php24
-rw-r--r--frontends/php/include/locales/de_de.inc.php3
-rw-r--r--frontends/php/include/locales/en_gb.inc.php3
-rw-r--r--frontends/php/include/locales/fr_fr.inc.php3
-rw-r--r--frontends/php/include/locales/it_it.inc.php3
-rw-r--r--frontends/php/include/locales/ja_jp.inc.php3
-rw-r--r--frontends/php/include/locales/lv_lv.inc.php3
-rw-r--r--frontends/php/include/locales/ru_ru.inc.php3
-rw-r--r--frontends/php/include/locales/sp_sp.inc.php3
9 files changed, 48 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index ad021cbc..6567942a 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -1502,6 +1502,30 @@ echo "</head>";
}
}
+ function update_image($imageid,$name,$imagetype,$files)
+ {
+ if(isset($files))
+ {
+ if($files["image"]["error"]==0)
+ if($files["image"]["size"]<1024*1024)
+ {
+ $image=addslashes(fread(fopen($files["image"]["tmp_name"],"r"),filesize($files["image"]["tmp_name"])));
+ $sql="update images set name='$name',imagetype='$imagetype',image='$image' where imageid='$imageid'";
+ return DBexecute($sql);
+ }
+ else
+ {
+ error("Image size must be less than 1Mb");
+ return FALSE;
+ }
+ }
+ else
+ {
+ error("Select image to download");
+ return FALSE;
+ }
+ }
+
function delete_image($imageid)
{
$sql="delete from images where imageid=$imageid";
diff --git a/frontends/php/include/locales/de_de.inc.php b/frontends/php/include/locales/de_de.inc.php
index 76b79e31..a7c78d9a 100644
--- a/frontends/php/include/locales/de_de.inc.php
+++ b/frontends/php/include/locales/de_de.inc.php
@@ -208,6 +208,9 @@
"S_CANNOT_ADD_IMAGE"=> "Grafik konnte nicht gespeichert werden",
"S_IMAGE_DELETED"=> "Grafik gel&ouml;scht",
"S_CANNOT_DELETE_IMAGE"=> "Grafik konnte nicht gel&ouml;scht werden",
+ "S_IMAGE_UPDATED"=> "Grafik updated",
+ "S_CANNOT_UPDATE_IMAGE"=> "Grafik konnte nicht update",
+ "S_UPDATE_SELECTED_IMAGE"=> "Update selected image?",
"S_AUTODISCOVERY"=> "Automatische Auswahl",
// Latest values
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php
index eaba7dfe..039b0d60 100644
--- a/frontends/php/include/locales/en_gb.inc.php
+++ b/frontends/php/include/locales/en_gb.inc.php
@@ -212,6 +212,9 @@
"S_CANNOT_ADD_IMAGE"=> "Cannot add image",
"S_IMAGE_DELETED"=> "Image deleted",
"S_CANNOT_DELETE_IMAGE"=> "Cannot delete image",
+ "S_IMAGE_UPDATED"=> "Image updated",
+ "S_CANNOT_UPDATE_IMAGE"=> "Cannot update image",
+ "S_UPDATE_SELECTED_IMAGE"=> "Update selected image?",
"S_AUTOREGISTRATION"=> "Autoregistration",
"S_AUTOREGISTRATION_RULES_BIG"=> "AUTOREGISTRATION RULES",
"S_PRIORITY"=> "Priority",
diff --git a/frontends/php/include/locales/fr_fr.inc.php b/frontends/php/include/locales/fr_fr.inc.php
index 18bb3c8a..b863f071 100644
--- a/frontends/php/include/locales/fr_fr.inc.php
+++ b/frontends/php/include/locales/fr_fr.inc.php
@@ -201,6 +201,9 @@
"S_CANNOT_ADD_IMAGE"=> "Impossible d'ajouter l'image",
"S_IMAGE_DELETED"=> "Image supprime",
"S_CANNOT_DELETE_IMAGE"=> "Impossible de supprimer l'image",
+ "S_IMAGE_UPDATED"=> "Image updated",
+ "S_CANNOT_UPDATE_IMAGE"=> "Cannot update image",
+ "S_UPDATE_SELECTED_IMAGE"=> "Update selected image?",
"S_AUTODISCOVERY"=> "Autodcouverte",
// Latest values
diff --git a/frontends/php/include/locales/it_it.inc.php b/frontends/php/include/locales/it_it.inc.php
index 85136ffc..1cf46027 100644
--- a/frontends/php/include/locales/it_it.inc.php
+++ b/frontends/php/include/locales/it_it.inc.php
@@ -203,6 +203,9 @@
"S_CANNOT_ADD_IMAGE"=> "Non posso aggiongere l'immagine",
"S_IMAGE_DELETED"=> "Immagine rimossa",
"S_CANNOT_DELETE_IMAGE"=> "Non posso rimuovere l'immagine",
+ "S_IMAGE_UPDATED"=> "Image updated",
+ "S_CANNOT_UPDATE_IMAGE"=> "Cannot update image",
+ "S_UPDATE_SELECTED_IMAGE"=> "Update selected image?",
"S_AUTODISCOVERY"=> "Ricerca automatica",
// Latest values
diff --git a/frontends/php/include/locales/ja_jp.inc.php b/frontends/php/include/locales/ja_jp.inc.php
index 849830ad..d69a846c 100644
--- a/frontends/php/include/locales/ja_jp.inc.php
+++ b/frontends/php/include/locales/ja_jp.inc.php
@@ -212,6 +212,9 @@
"S_CANNOT_ADD_IMAGE"=> "イメージを追加できません",
"S_IMAGE_DELETED"=> "イメージを削除しました",
"S_CANNOT_DELETE_IMAGE"=> "イメージを削除できません",
+ "S_IMAGE_UPDATED"=> "Image updated",
+ "S_CANNOT_UPDATE_IMAGE"=> "Cannot update image",
+ "S_UPDATE_SELECTED_IMAGE"=> "Update selected image?",
"S_AUTOREGISTRATION"=> "自動登録",
"S_AUTOREGISTRATION_RULES_BIG"=> "自動登録ルール",
"S_PRIORITY"=> "優先順位",
diff --git a/frontends/php/include/locales/lv_lv.inc.php b/frontends/php/include/locales/lv_lv.inc.php
index f295a9e8..299f9a88 100644
--- a/frontends/php/include/locales/lv_lv.inc.php
+++ b/frontends/php/include/locales/lv_lv.inc.php
@@ -201,6 +201,9 @@
"S_CANNOT_ADD_IMAGE"=> "Cannot add image",
"S_IMAGE_DELETED"=> "Image deleted",
"S_CANNOT_DELETE_IMAGE"=> "Cannot delete image",
+ "S_IMAGE_UPDATED"=> "Image updated",
+ "S_CANNOT_UPDATE_IMAGE"=> "Cannot update image",
+ "S_UPDATE_SELECTED_IMAGE"=> "Update selected image?",
"S_AUTODISCOVERY"=> "Autodiscovery",
// Latest values
diff --git a/frontends/php/include/locales/ru_ru.inc.php b/frontends/php/include/locales/ru_ru.inc.php
index 5e422c6b..6d5535e2 100644
--- a/frontends/php/include/locales/ru_ru.inc.php
+++ b/frontends/php/include/locales/ru_ru.inc.php
@@ -201,6 +201,9 @@
"S_CANNOT_ADD_IMAGE"=> "Cannot add image",
"S_IMAGE_DELETED"=> "Image deleted",
"S_CANNOT_DELETE_IMAGE"=> "Cannot delete image",
+ "S_IMAGE_UPDATED"=> "Image updated",
+ "S_CANNOT_UPDATE_IMAGE"=> "Cannot update image",
+ "S_UPDATE_SELECTED_IMAGE"=> "Update selected image?",
"S_AUTODISCOVERY"=> "Autodiscovery",
// Latest values
diff --git a/frontends/php/include/locales/sp_sp.inc.php b/frontends/php/include/locales/sp_sp.inc.php
index 316a1a01..badfc3dc 100644
--- a/frontends/php/include/locales/sp_sp.inc.php
+++ b/frontends/php/include/locales/sp_sp.inc.php
@@ -201,6 +201,9 @@
"S_CANNOT_ADD_IMAGE"=> "No se puede agregar la imagen",
"S_IMAGE_DELETED"=> "Imagen borrada",
"S_CANNOT_DELETE_IMAGE"=> "No se puede borrar la imagen",
+ "S_IMAGE_UPDATED"=> "Image updated",
+ "S_CANNOT_UPDATE_IMAGE"=> "Cannot update image",
+ "S_UPDATE_SELECTED_IMAGE"=> "Update selected image?",
"S_AUTODISCOVERY"=> "Auto-descubrimiento",
// Latest values