Example #1
0
     $img->src_image_name = "../" . $imgurls;
     $img->save_file = $f->waterpath . $f->savename;
     $img->create();
     $imgurls = "../upload/" . date('Ym') . "/watermark/" . $f->savename;
 }
 $met_dis_img = '../' . $met_big_img;
 if ($wate == 3) {
     $met_img_x = $met_productdetail_x;
     $met_img_y = $met_productdetail_y;
 }
 if ($wate == 5) {
     $met_img_x = $met_imgdetail_x;
     $met_img_y = $met_imgdetail_y;
 }
 if ($met_img_x && $met_img_y) {
     $met_dis_imgs = $f->createthumb($met_dis_img, $met_img_x, $met_img_y, 'thumb_dis/');
     if ($f->get_error() == 1) {
         echo $f->get_errorcode();
         die;
     }
     if ($met_big_wate == 1) {
         if ($met_wate_class == 2) {
             $img->met_image_name = $met_wate_bigimg;
             $img->met_image_pos = $met_watermark;
         } else {
             $img->met_text = $met_text_wate;
             $img->met_text_size = $met_text_bigsize;
             $img->met_text_color = $met_text_color;
             $img->met_text_angle = $met_text_angle;
             $img->met_text_pos = $met_watermark;
             $img->met_text_font = $met_text_fonts;
Example #2
0
<?php

require_once './common.inc.php';
require_once '../' . $met_adminfile . '/include/upfile.class.php';
header("Content-type: image/jpeg");
//$thumb_src.'dir=原图路径&x=长&y=宽'
$ext1 = explode("/", $dir);
$count = count($ext1);
$count1 = $ext1[$count - 1];
$ext2 = explode(".", $count1);
$ext3 = $ext2[1];
$path1 = $ext2[0];
$dir1 = '../upload/thumb_src/' . $x . '_' . $y . '/' . $path1 . '.' . $ext3;
if (file_exists($dir1)) {
    readfile("{$dir1}");
} else {
    $f = new upfile();
    $imgurls = $f->createthumb($dir, $x, $y);
    readfile($imgurls);
}
Example #3
0
            }
            $setthumb = explode("/", $met_big_img);
            $f = new upfile($met_img_type, "../../../upload/{$setthumb['2']}/", $met_img_maxsize, '', 1);
            $f->savename = $setthumb[3];
            $met_bigthumb_img = $depth . "../" . $met_big_img;
            $met_big_img_iconv = stristr(PHP_OS, "WIN") ? @iconv("utf-8", "gbk", $met_bigthumb_img) : $met_bigthumb_img;
            if (file_exists($met_big_img_iconv)) {
                //列表和首页缩略图
                if ($met_big_img == str_ireplace("/thumb", "", $val['imgurls'])) {
                    $met_img_x = '';
                    $met_img_y = '';
                    if ($met_img_style == 1) {
                        imgstyle($module);
                    }
                    $met_thumb_img = $depth . "../" . $met_big_img;
                    $imgurls = $f->createthumb($met_thumb_img, $met_img_x, $met_img_y);
                    if ($met_wate_class == 2) {
                        $img->met_image_name = $depth . $met_wate_img;
                    } else {
                        $img->met_text_size = $met_text_size;
                    }
                    $img->src_image_name = $imgurls;
                    $img->save_file = $imgurls;
                    $img->create();
                }
            }
        }
    }
    echo 'ok';
    die;
}
Example #4
0
File: save.php Project: nanfs/lt
    if ($filenameok) {
        metsave('-1', $lang_modFilenameok, $depth);
    }
}
if (!$imgurl && !$imgurls) {
    $imgauto = preg_match('/<img.*src=\\\\"(.*?)\\\\".*?>/i', $content, $out);
    $filenameimg = explode("images/", $out[1]);
    $filenameimg = $filenameimg[count($filenameimg) - 1];
    $new_big_img = '../../../upload/images/' . $filenameimg;
    $new_big_img = str_ireplace("/watermark", "", $new_big_img);
    $new_big_img_iconv = stristr(PHP_OS, "WIN") ? @iconv("utf-8", "gbk", $new_big_img) : $new_big_img;
    if ($filenameimg && file_exists($new_big_img_iconv)) {
        require_once ROOTPATH_ADMIN . 'include/upfile.class.php';
        $f = new upfile($met_img_type, "../../../upload/images/", $met_img_maxsize, '', 1);
        $f->savename = str_ireplace("watermark/", "", $filenameimg);
        $imgurls = $f->createthumb($new_big_img, $met_newsimg_x, $met_newsimg_y);
        if ($met_thumb_wate == 1) {
            require_once ROOTPATH_ADMIN . 'include/watermark.class.php';
            $img = new Watermark();
            if ($met_wate_class == 2) {
                $img->met_image_pos = $met_watermark;
                $img->met_image_name = $depth . $met_wate_img;
            } else {
                $img->met_text = $met_text_wate;
                $img->met_text_color = $met_text_color;
                $img->met_text_angle = $met_text_angle;
                $img->met_text_pos = $met_watermark;
                $img->met_text_font = $depth . $met_text_fonts;
                $img->met_text_size = $met_text_size;
            }
            $img->save_file = $imgurls;
Example #5
0
             $f = new upfile($met_img_type, "../../../upload/{$setthumb['2']}/", $met_img_maxsize, '', 1);
             $f->savename = $setthumb[3];
             $met_dis_img = $depth . "../" . $met_bigdisplay_img;
             $met_bigdisplay_img_iconv = stristr(PHP_OS, "WIN") ? @iconv("utf-8", "gbk", $met_dis_img) : $met_dis_img;
             if (file_exists($met_bigdisplay_img_iconv)) {
                 $met_img_x = '';
                 $met_img_y = '';
                 if ($mou == 3) {
                     $met_img_x = $met_productdetail_x;
                     $met_img_y = $met_productdetail_y;
                 }
                 if ($mou == 5) {
                     $met_img_x = $met_imgdetail_x;
                     $met_img_y = $met_imgdetail_y;
                 }
                 $imgurls = $f->createthumb($met_dis_img, $met_img_x, $met_img_y, 'thumb_dis/');
                 if ($met_big_wate) {
                     if ($met_wate_class == 2) {
                         $img->met_image_name = $depth . $met_wate_bigimg;
                     } else {
                         $img->met_text_size = $met_text_bigsize;
                     }
                     $img->src_image_name = $imgurls;
                     $img->save_file = $imgurls;
                     $img->create();
                 }
             }
         }
     }
 }
 echo 'ok';
Example #6
0
File: thumb.php Project: nanfs/lt
require_once './common.inc.php';
require_once '../' . $met_adminfile . '/include/upfile.class.php';
header("Content-type: image/jpeg");
//$thumb_src.'dir=原图路径&x=长&y=宽'
$dir = '../' . str_replace('../', '', $dir);
if (is_numeric($x) && is_numeric($y)) {
    $ext1 = explode("/", $dir);
    $count = count($ext1);
    $count1 = $ext1[$count - 1];
    $ext2 = explode(".", $count1);
    $ext3 = $ext2[1];
    $path1 = $ext2[0];
    $dir1 = '../upload/thumb_src/' . $x . '_' . $y . '/' . $path1 . '.' . $ext3;
    if (strtolower($ext3) == 'jpg' || strtolower($ext3) == 'jpeg' || strtolower($ext3) == 'bmp' || strtolower($ext3) == 'png' || strtolower($ext3) == 'gif') {
        if (stristr(PHP_OS, "WIN")) {
            $dir1 = @iconv("utf-8", "GBK", $dir1);
        }
        if (file_exists($dir1)) {
            readfile("{$dir1}");
        } else {
            $f = new upfile($met_img_type, '../upload/thumb_src/', $met_img_maxsize, '', 1);
            $f->savename = $path1 . '.' . $ext3;
            $imgurls = $f->createthumb($dir, $x, $y, $x . '_' . $y . '/');
            if (stristr(PHP_OS, "WIN")) {
                $imgurls = @iconv("utf-8", "GBK", $imgurls);
            }
            readfile($imgurls);
        }
    }
}