Exemple #1
0
 /** 
  * 设置字段
  * @param string $name  需要设置的字段名,为public字段都可以设置
  * @param string $value 需要设置的字段名的值	 
  * thumb_savepath当thumb_save_type为3时置可以是绝对路径,也是相对网站后台根目录的相对路径
  * thumb_savepath当thumb_save_type为2,设置无效
  * thumb_savepath当thumb_save_type为1,thumb_savepath为相对原图的路径
  */
 public function set($name, $value)
 {
     global $_M;
     if ($value === NULL) {
         return false;
     }
     switch ($name) {
         case 'thumb_width':
             $this->thumb_width = $value;
             break;
         case 'thumb_height':
             $this->thumb_height = $value;
             break;
         case 'thumb_savepath':
             if ($this->thumb_save_type == 3) {
                 $this->thumb_savepath = path_absolute($value);
             } else {
                 $this->thumb_savepath = $value;
             }
             $this->thumb_savepath = path_standard($this->thumb_savepath);
             break;
         case 'thumb_save_type':
             $this->thumb_save_type = $value;
             break;
         case 'thumb_bgcolor':
             $this->thumb_bgcolor = $value;
             break;
         case 'thumb_kind':
             $this->thumb_kind = $value;
             break;
     }
 }
Exemple #2
0
 /** 
  * 设置字段
  */
 public function set($name, $value)
 {
     if ($value === NULL) {
         return false;
     }
     switch ($name) {
         case 'savepath':
             $this->savepath = path_standard(PATH_WEB . 'upload/' . $value);
             break;
         case 'format':
             $this->format = $value;
             break;
         case 'maxsize':
             $this->maxsize = min($value * 1048576, $this->maxsize);
             break;
         case 'is_rename':
             $this->is_rename = $value;
             break;
     }
 }
Exemple #3
0
 /** 
  * 设置字段
  * @param string $name  需要设置的字段名,为public字段都可以设置
  * @param string $value 需要设置的字段名的值
  * water_image_name设置可以是绝对路径,也可以是相对网站根目录的相对路径
  * water_text_font置可以是绝对路径,也是相对网站后台根目录的相对路径
  */
 public function set($name, $value)
 {
     global $_M;
     if ($value === NULL) {
         return false;
     }
     switch ($name) {
         case 'water_savepath':
             if ($this->water_save_type == 3) {
                 $this->water_savepath = path_absolute($value);
             } else {
                 $this->water_savepath = $value;
             }
             $this->water_savepath = path_standard($this->water_savepath);
             break;
         case 'water_save_type':
             $this->water_save_type = $value;
             break;
         case 'water_mark_type':
             $this->water_mark_type = $value;
             break;
         case 'is_watermark':
             $this->is_watermark = $value;
             break;
         case 'water_image_name':
             $this->water_image_name = path_absolute($value);
             break;
         case 'water_pos':
             $this->water_pos = $value;
             break;
         case 'water_text':
             $this->water_text = $value;
             break;
         case 'water_text_size':
             $this->water_text_size = $value;
             break;
         case 'water_text_color':
             $this->water_text_color = $value;
             break;
         case 'water_text_angle':
             $this->water_text_angle = $value;
             break;
         case 'water_text_font':
             $this->water_text_font = str_replace(PATH_WEB . $_M['config']['met_adminfile'] . '/', '', $value);
             $this->water_text_font = PATH_WEB . $_M['config']['met_adminfile'] . '/' . str_replace('../', '', $value);
             break;
         case 'met_image_transition':
             $this->met_image_transition = $value;
             break;
         case 'jpeg_quality':
             $this->jpeg_quality = $value;
             break;
     }
 }