$extens = '.png';
                             break;
                     }
                 } else {
                     $errored = 1;
                     $txterror = $this->lang('global_post_txterror3') . ': ' . $images_post['name'][$i];
                     break;
                 }
                 $tmp_photos[] = $images_post['tmp_name'][$i];
                 $photos[] = $codep . '-' . $i . $extens;
             }
             if ($errored == 0) {
                 foreach ($photos as $key => $fname) {
                     move_uploaded_file($tmp_photos[$key], '../' . $C->FOLDER_PHOTOS . $fname);
                     $thumbnail = new SmartImage('../' . $C->FOLDER_PHOTOS . $fname, true);
                     $thumbnail->mycrop($C->widthPhotoThumbail, $C->widthPhotoThumbail, 'center');
                     $thumbnail->saveImage('../' . $C->FOLDER_PHOTOS . 'min1/' . $fname);
                     $thumbnail->close();
                 }
                 unset($mythumb);
                 $txttypeattach = 'photo';
             }
             $endtxtatach = implode(',', $photos);
         }
     }
     break;
 case 2:
     // is video attached
     if (!empty($txtvalueatach)) {
         if (substr($txtvalueatach, 0, 20) == "https://youtube.com/" || substr($txtvalueatach, 0, 24) == "https://www.youtube.com/" || substr($txtvalueatach, 0, 16) == "www.youtube.com/" || substr($txtvalueatach, 0, 12) == "youtube.com/" || substr($txtvalueatach, 0, 19) == "http://youtube.com/" || substr($txtvalueatach, 0, 23) == "http://www.youtube.com/" || substr($txtvalueatach, 0, 16) == "http://youtu.be/") {
             parse_str(parse_url($txtvalueatach, PHP_URL_QUERY), $my_array_of_vars);
     $this->db1->query("UPDATE users SET cover='" . $finalphoto . "' WHERE iduser="******"1: " . $txtreturn;
         return;
     } else {
         $txtreturn = $this->lang('dashboard_mi_mcov_form_msg9');
         echo "0: " . $txtreturn;
         return;
     }
 } else {
     $txtreturn = $this->leng('dashboard_1_mi_form_mi_msg5');
     echo "0: " . $txtreturn;