copy($tempImg, $tempImg_);
         $imgWidth_ = $imgWidth;
         $imgHeight_ = $imgWidth;
     }
     $seed = substr(md5(time()), 0, 10);
     $query = "\r\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO `GroupsGallery` SET \r\n\t\t\t\t\t\t\t\t\t\t\t\t`groupID` = {$groupID},\r\n\t\t\t\t\t\t\t\t\t\t\t\t`ext`     = '{$Ext}',\r\n\t\t\t\t\t\t\t\t\t\t\t\t`width`   = {$imgWidth},\r\n\t\t\t\t\t\t\t\t\t\t\t\t`height`  = {$imgHeight},\r\n\t\t\t\t\t\t\t\t\t\t\t\t`width_`  = {$imgWidth_},\r\n\t\t\t\t\t\t\t\t\t\t\t\t`height_` = {$imgHeight_},\r\n\t\t\t\t\t\t\t\t\t\t\t\t`by`      = {$memberID},\r\n\t\t\t\t\t\t\t\t\t\t\t\t`seed`    = '{$seed}'\r\n\t\t\t\t\t\t\t\t\t\t\t";
     db_res($query);
     $imgID = mysql_insert_id();
     rename($tempImg, $oGroups->sGrpGalPath . "{$groupID}_{$imgID}_{$seed}.{$Ext}");
     rename($tempImg_, $oGroups->sGrpGalPath . "{$groupID}_{$imgID}_{$seed}_.{$Ext}");
     rename($tempImg_icon, $oGroups->sGrpGalPath . "{$groupID}_{$imgID}_{$seed}_icon.{$Ext}");
     chmod($oGroups->sGrpGalPath . "{$groupID}_{$imgID}_{$seed}.{$Ext}", 0644);
     chmod($oGroups->sGrpGalPath . "{$groupID}_{$imgID}_{$seed}_.{$Ext}", 0644);
     chmod($oGroups->sGrpGalPath . "{$groupID}_{$imgID}_{$seed}_icon.{$Ext}", 0644);
     if ($_POST['set_def'] == 'yes' and $arrGroup['creatorID'] == $memberID) {
         $oGroups->setGroupThumb($groupID, $imgID);
     }
     //if( $_POST['back'] == 'home' )
     $getBackUrl = "grp.php?action=group&ID={$groupID}";
     //else
     //	$getBackUrl = "grp.php?action=gallery&ID={$groupID}";
     $getBackCode = " (<a href=\"{$getBackUrl}\">" . _t('_Back to group', $arrGroup['Name']) . "</a>)";
     $_page['header'] = _t("_Upload to group gallery");
     $_page['header_text'] = _t("_Upload to group gallery");
     $_page_cont[$_ni]['page_main_code'] = MsgBox(_t('_Upload succesfull') . $getBackCode);
 } else {
     $_page['header'] = _t("_Upload to group gallery error");
     $_page['header_text'] = _t("_Upload to group gallery error");
     $_page_cont[$_ni]['page_main_code'] = MsgBox(_t('_You should select correct image file'));
 }
 break;