diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-10-23 07:34:27 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-10-23 07:34:27 +0000 |
| commit | 28a09ed13e41ddbe5e30d63e92a1f5fb3395ef89 (patch) | |
| tree | 8281ccd48964ee0dd11c5ea689091fa3cef706fb /frontends/php/image.php | |
| parent | 495799b2aa61aab23d74d7faa110a0cd09d59bf0 (diff) | |
| download | zabbix-28a09ed13e41ddbe5e30d63e92a1f5fb3395ef89.tar.gz zabbix-28a09ed13e41ddbe5e30d63e92a1f5fb3395ef89.tar.xz zabbix-28a09ed13e41ddbe5e30d63e92a1f5fb3395ef89.zip | |
- developed group permission system (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3371 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/image.php')
| -rw-r--r-- | frontends/php/image.php | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/frontends/php/image.php b/frontends/php/image.php index 5de44406..3717c86f 100644 --- a/frontends/php/image.php +++ b/frontends/php/image.php @@ -19,7 +19,15 @@ **/ ?> <?php - include "include/config.inc.php"; + require_once "include/config.inc.php"; + require_once "include/images.inc.php"; + + $page['file'] = 'image.php'; + $page['title'] = 'S_IMAGE'; + $page['type'] = PAGE_TYPE_IMAGE; + +include_once "include/page_header.php"; + ?> <?php // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION @@ -32,14 +40,6 @@ ?> <?php -# PARAMETERS: - -# imageid - - set_image_header(); - - check_authorisation(); - $resize = 0; if(isset($_REQUEST["width"]) || isset($_REQUEST["height"])) @@ -49,11 +49,11 @@ $th_height = get_request("height",0); } - //$result=DBselect("select image from images where imageid=".$_REQUEST["imageid"]); - //$row=DBfetch($result); - $row = get_image_by_imageid($_REQUEST["imageid"]); - - if($row["image"] == "") exit; + if(!($row = get_image_by_imageid($_REQUEST["imageid"]))) + { + error('Incorrect image index'); + include_once "include/page_footer.php"; + } $source = ImageCreateFromString($row["image"]); @@ -98,11 +98,14 @@ $th_width, $th_height, $src_width, $src_height); - ImageOut($thumb); - ImageDestroy($thumb); - exit; + $source = $thumb; } } ImageOut($source); ImageDestroy($source); ?> +<?php + +include_once "include/page_footer.php"; + +?> |
