I get Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING.
Here's the whole section having to do with the image verification:
PHP Code:
if (is_array($this->userfile) && $this->userfile['userfile']['tmp_name'] != 'none' && (strpos($this->userfile['userfile']['type'], 'image') === 0))
{
$extension = array('1' => 'gif','2' => 'jpg','3' => 'png', '6' => 'bmp');
if ($this->userfile['userfile']['size'] > $this->db->VARS['max_img_size'])
{
return $this->db->gb_error($this->db->LANG['ErrorPost6']);
}
else
{
move_uploaded_file($this->userfile['userfile']['tmp_name'], $this->include_path.'/'.$GB_TMP.'/img-'.$the_time.'.tmp');
$size = GetImageSize("$this->include_path/$GB_TMP/img-$the_time.tmp");
if ((($size[2] > 0) && ($size[2] < 4)) || ($size[2] == 6))
{
$this->image_file = "img-$the_time.".$extension[$size[2]];
$img = new gb_image();
$img->set_destdir("$this->include_path/$GB_UPLOAD");
$img->set_border_size($this->db->VARS['img_width'], $this->db->VARS['img_height']);
if ($type == 'preview')
{
rename("$this->include_path/$GB_TMP/img-$the_time.tmp", "$this->include_path/$GB_TMP/$this->image_file");
chmod($this->include_path.'/'.$GB_TMP.'/'.$this->image_file, 0755);
$new_img_size = $img->get_img_size_format($size[0], $size[1]);
$GB_UPLOAD = $GB_TMP;
$row['p_filename'] = $this->image_file;
$row['width'] = $size[0];
$row['height'] = $size[1];
eval("\$this->tmp_image = \"".$this->template->get_template('user_pic')."\";");
}
else
{
rename("$this->include_path/$GB_TMP/img-$the_time.tmp", "$this->include_path/$GB_UPLOAD/$this->image_file");
chmod($this->include_path.'/'.$GB_UPLOAD.'/'.$this->image_file, 0755);
if ($this->db->VARS['thumbnail'] == 1)
{
$min_size = 1024*$this->db->VARS['thumb_min_fsize'];
$img->set_min_filesize($min_size);
$img->set_prefix("t_");
$img->create_thumbnail("$this->include_path/$GB_UPLOAD/$this->image_file","$this->image_file");
}
}
}
else
{
return $this->db->gb_error($this->db->LANG['ErrorPost7']);
}
}
}
if (!empty($this->user_img))
{
$this->image_file = trim($this->user_img);
}
Bookmarks