Route::get('share/{uniid}/file/{fileid}', function ($uniid, $fileid) { $user_media = ShareMedia::where('uni_id', '=', $uniid)->first(); if (count($user_media) == 0) { } else { $media = Media::where('id', '=', $user_media->media_id)->first(); $file = MediaLike::where('id', '=', $fileid)->where('media_id', '=', $user_media->media_id)->first(); if (isset($file->id)) { include_once '/opt/nginx/html/vendor/secure_link_share.php'; if (Auth::guest()) { $this_user = $user_media->user_id . '-0'; } else { $this_user = $user_media->user_id . '-' . Auth::user()->id; } $URL = new secURL($media->id, $file->id, false, '', false, $this_user); $URL->createlink(); $file_link = $URL->getlink(); $file_size = getfilesize($file->size); $data = array('media' => $media, 'link' => $file_link, 'file' => $file, 'file_size' => $file_size, 'user_media' => $user_media); return View::make('widgets.share', $data); } } }); Route::post('torrent/{uniid}/file/{fileid}/subs', function ($uniid, $fileid) { if (Auth::guest()) { } else { $user_media = UserMedia::where('uni_id', '=', $uniid)->where('user_id', '=', Auth::user()->id)->first(); if (count($user_media) == 0) { } else { $lang = Input::get('l'); $file = MediaLike::where('id', '=', $fileid)->where('media_id', '=', $user_media->media_id)->first(); if (empty($file)) {
if (!empty($file_convert)) { $convert_prog = $file_convert->percent; $actionfile = "<img src=\"/snaps/thumbs/{$media->id}/{$file->id}/1.jpg\" height=\"130\" width=\"130\"><span class=\"prog-text\">{$convert_prog} %</span>"; } else { $actionfile = "<img src=\"/snaps/thumbs/{$media->id}/{$file->id}/1.jpg\" height=\"130\" width=\"130\"><span class=\"prog-text\"></span>"; } } $filetype = "video"; $actionlink = "<a class=\"nbsmbox fancybox.ajax\" id=\"{$file->id}\" href=\"/torrent/{$user_media->uni_id}/file/{$file->id}\">"; $showthis = 1; break; case "mp3": include_once '/opt/nginx/html/vendor/secure_link.php'; $URL = new secURL($media->id, $file->id); $URL->createlink(); $link_music = urlencode($URL->getlink()); $filetype = "sound"; $actionfile = "<img src=\"/include/img/filetype/music.png\" height=\"130\" width=\"130\">"; $actionlink = "<a class=\"nbsmbox fancybox.ajax\" id=\"{$file->id}\" href=\"/torrent/{$user_media->uni_id}/file/{$file->id}\">"; if (!$downloading) { $actionfile .= "<div class=\"fl-au-player\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object type=\"application/x-shockwave-flash\" data=\"/include/player/player_mp3_maxi.swf\" width=\"25\" height=\"20\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<param name=\"movie\" value=\"/include/player/player_mp3_maxi.swf\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<param name=\"bgcolor\" value=\"#ffffff\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<param name=\"FlashVars\" value=\"mp3={$link_music}&width=25&showslider=0&bgcolor1=444444&bgcolor2=444444&buttonovercolor=dddddd&bgcolor=7d7d7d\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>"; } $showthis = 1; break; default: $filetype = "other"; $actionlink = "<a class=\"nbsmbox fancybox.ajax\" id=\"{$file->id}\" href=\"/torrent/{$user_media->uni_id}/file/{$file->id}\">"; $actionfile = "<img src=\"/include/img/filetype/other.png\" height=\"130\" width=\"130\">"; $showthis = 1; } if (strlen($file->name) <= 19) {