예제 #1
0
파일: image.php 프로젝트: suxinde2009/www
     $system_handler = new SystemHandler(false);
 } catch (Exception $e) {
     die("Exception");
 }
 Security::protect_session();
 $session = new Session($_GET['session_id']);
 $user = new User($session->get_user_id());
 $session_valid_array = $session->is_valid();
 if ($session_valid_array[0] === true) {
     try {
         $image_cache = new ImageCache($_GET['file_id']);
     } catch (Exception $e) {
         die("Exception");
     }
     if ($_GET['max_width']) {
         $image_cache->set_max_width($_GET['max_width']);
     }
     if ($_GET['max_height']) {
         $image_cache->set_max_height($_GET['max_height']);
     }
     if ($_GET['width']) {
         $file_path = constant("BASE_DIR") . "/filesystem/temp/" . $image_cache->get_image($_GET['width']);
     } elseif ($_GET['height']) {
         $file_path = constant("BASE_DIR") . "/filesystem/temp/" . $image_cache->get_image(null, $_GET['height']);
     } else {
         $file_path = constant("BASE_DIR") . "/filesystem/temp/" . $image_cache->get_image();
     }
     if (!$file_path) {
         $file_path = constant("WWW_DIR") . "/images/access.jpg";
     }
 } else {