Fix connection to data base and thumb preview

Fixed two problems finded: 
 - Connection to data base. Fixed changing the data base manager
 - It didn't preview good the image of the video. Fixed changing the parameters passed to getfile.php, and changing the resource and the conditions.