getUser( $login, $password ); if ( $user!= null && $user->role==2 ) { $_SESSION['user'] = $user->id; $_SESSION['loginOK'] = 1; } else $errorMsg = "No or invalid account data!"; } else if ( isset($cmdLogout) ) { unset( $_SESSION['user'] ); unset( $_SESSION['loginOK'] ); } else if ( isset($cmdAvantar) ) { $nFileName = "avatar/" . $_SESSION['user'] . '.jpg'; $nFileNameSmall = "avatar/" . $_SESSION['user'] . '-small.jpg'; @unlink( $nFileName ); if ( @move_uploaded_file ( $_FILES['fileName']['tmp_name'], $nFileName ) ) { chmod( $nFileName, 0644); $con=true; $max_dimension = 45; $source_file = $nFileName; list($img_width,$img_height, $type) = getimagesize($source_file); // Get the original dimentions if ( $type == 1 ) { $img_source = imagecreatefromgif($source_file); } else if ( $type == 2 ) { $img_source = imagecreatefromjpeg($source_file); } else if ( $type == 3 ) { $img_source = imagecreatefrompng($source_file); } else if ( $type == 15 ) { $img_source = imagecreatefromwbmp($source_file); } else $con=false; if ( $con==true ) { $aspect_ratio = $img_width / $img_height; if ( ($img_width > $max_dimension) || ($img_height > $max_dimension) ) // If either dimension is too big... { if ( $img_width > $img_height ) // For wide images... { $new_width = $max_dimension; $new_height = $new_width / $aspect_ratio; } elseif ( $img_width < $img_height ) // For tall images... { $new_height = $max_dimension; $new_width = $new_height * $aspect_ratio; } elseif ( $img_width == $img_height ) // For square images... { $new_width = $max_dimension; $new_height = $max_dimension; } else { echo "Error reading image size."; return FALSE; } } else { $new_width = $img_width; $new_height = $img_height; } // If it's already smaller, don't change the size. $image_small = imagecreatetruecolor($new_width, $new_height); // create new image imagecopyresampled($image_small, $img_source, 0,0, 0,0, $new_width, $new_height, $img_width, $img_height ); imagedestroy($img_source); unlink( $nFileNameSmall ); imagejpeg( $image_small, $nFileNameSmall, 90 ); imagedestroy( $image_small ); chmod( $nFileNameSmall, 0777); } } $errorMsg = "Avatar uploaded!"; } else if ( isset($cmd) ) { $um = new UserManager(); $vm = new VideoManager(); $user = $um->getById( $_SESSION['user'] ); if ( $_SESSION['loginOK'] == 1 ) { if ( $confirm=="1" ) { if ( $_FILES['fileName']['error'] == 0 ) { $path_parts = pathinfo( $_FILES['fileName']['name'] ); $nFileName2 = "v" . time() . "-" . rand() ."."; $nFileName = $nFileName2 . $path_parts["extension"]; if ( @move_uploaded_file ( $_FILES['fileName']['tmp_name'], "videos/" . $nFileName ) ) { chmod( "videos/" . $nFileName , 0644); $vobj = new DBVideo(); $vobj->orgFileName = $_FILES['fileName']['name']; $vobj->size = $_FILES['fileName']['size']; $vobj->mimeType = $_FILES['fileName']['type']; $vobj->fileName = $nFileName2.'flv'; $vobj->userID = $user->id; $vobj->creation = time(); $vobj->lable = intval($tag1 | $tag2 | $tag3 | $tag4 | $tag5); $vobj->id = $vm->write( $vobj ); $dname = rand(); mkdir( $dname ); chmod( $dname , 0777); $outp = array(); exec( './mplayer -nosound -frames 100 -vo jpeg:outdir='.$dname.' videos/'.$nFileName, $outp ); $fn = sprintf( "%s/%08d.jpg", $dname, 1 ); if ( file_exists($fn) ) { $bcc = 0; $bfn = $fn; for ( $vr=1; $vr<=100; $vr++ ) { $fn = sprintf( "%s/%08d.jpg", $dname, $vr ); if ( file_exists($fn) ) { $cc = checkFile( $fn ); if ( $cc>$bcc ) { $bcc = $cc; $bfn = $fn; } # if ( $cc>20 ) # break; } } if ( @rename( $bfn, 'thumbs/'.$nFileName2.'flv-full.jpg' ) == false ) { @unlink( "videos/" . $nFileName ); $vm->deleteByID( $vobj->id ); $errorMsg .= "File doesn't seem to be a video!"; } else { for ( $vr=1; $vr<=100; $vr++ ) { $fn = sprintf( "%s/%08d.jpg", $dname, $vr ); if ( file_exists($fn) ) @unlink( $fn ); } $outp[] = ""; $outp[] = ""; $outp[] = ""; # exec( './mencoder videos/'.$nFileName.' -ofps 25 -o videos/'.$nFileName2.'flv -of lavf -oac mp3lame -lameopts abr:br=64 -srate 22050 -ovc lavc -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -lavcopts vcodec=flv:keyint=50:vbitrate=300:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vop scale=640:480', $outp ); exec( './mencoder videos/'.$nFileName.' -ofps 25 -o videos/'.$nFileName2.'flv -of lavf -oac mp3lame -lameopts abr:br=64 -srate 22050 -ovc lavc -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -lavcopts vcodec=flv:keyint=50:vbitrate=300:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vop scale=320:240', $outp ); $uploadDone = true; } } else { @unlink( "videos/" . $nFileName ); $vm->deleteByID( $vobj->id ); $errorMsg .= "File doesn't seem to be a video!"; } rmdir( $dname ); } } else $errorMsg = "Error while uploading the file."; } else $errorMsg = "Please confirm your upload!"; } else $errorMsg = "No or invalid account data!"; } if ( $dcmd=="DOWNLOAD" ) { $dname=str_replace( "..", "", $dname ); $dname=str_replace( "/", "", $dname ); $dname=str_replace( "\\", "", $dname ); $dname=str_replace( "\n", "", $dname ); $dname=str_replace( "\r", "", $dname ); Header( "Location: downloads/$dname" ); exit(0); } function checkFile( $fileName ) { $im = @imagecreatefromjpeg($fileName); $temp = getimagesize($fileName); $maxX = imagesx($im); $maxY = imagesy($im); $dd = array(); if ($im) { for( $y=0; $y<$maxY; $y++ ) { for ( $x=0; $x<$maxX; $x++ ) { $rgb = imagecolorat($im, $x, $y); $r = intval( ((($rgb >> 16) & 0xFF)+16)/16 ); $g = intval( ((($rgb >> 8) & 0xFF)+16)/16 ); $b = intval( (($rgb & 0xFF)+16)/16 ); $rgb = ($r-1)*256+($g-1)*16+($b-1); $dd[$rgb]++; } } } return count($dd); } $scripts[] = "normalstuff.js"; $scripts[] = "upload.js"; include_once ( 'header.php' ); ?>

LOGIN

Before you can upload anything you need to login


your email


password

NEW?
REGISTER
0 ) { ?>



Upload Avatar



submission only as jpeg


Upload Video


Tags FormCheckbox( 'tag1', '0', '1' ) . 'seducer
'; echo $htmlHelper->FormCheckbox( 'tag2', '0', '2' ) . 'fucker
'; echo $htmlHelper->FormCheckbox( 'tag3', '0', '4' ) . 'loser
'; echo $htmlHelper->FormCheckbox( 'tag4', '0', '8' ) . 'lover
'; echo $htmlHelper->FormCheckbox( 'tag5', '0', '16' ) . 'forever
'; ?>
submission in various formats, not to exceed 10mb
by submitting, you agree to publish and share your soapisodes as part of MobiOpera

upload by mms your clip and file tag
mms: upload@mobiopera.mobi


please wait! processing data ...

file uploaded
0 ) { ?>