示例#1
0
        return View::make('page.torrent.share', $data)->with(array('m_id' => $user_media->uni_id, 'zip' => $zip_file_link));
    }
});
Route::post('torrent/{uniid}/status', function ($uniid) {
    if (Auth::guest()) {
    } else {
        $user_media = UserMedia::where('uni_id', '=', $uniid)->where('user_id', '=', Auth::user()->id)->first();
        if (count($user_media) == 0) {
        } else {
            $media = Media::where('id', '=', $user_media->media_id)->first();
            $status["se"] = $media->peersa;
            $status["pe"] = $media->peersc;
            $status["sp"] = getspeed($media->upsd);
            $status["pr"] = $media->perc;
            $status["si"] = getfilesize($media->size);
            $status["rt"] = getremain($media->eta);
            $media_state = $media->state;
            if ($media->userMedia()->max_error === true) {
                $media_state = "max_pause";
            }
            switch ($media_state) {
                case "wait":
                    $state = "checking";
                    $status["rt"] = 0;
                    break;
                case "check":
                    $state = "checking";
                    $status["rt"] = 0;
                    break;
                case "queue":
                    $state = "starting";
示例#2
0
            echo '                  <td align="center"  bgcolor="#FFFFFF">
                  ';
            if (!empty($total2[$j])) {
                echo $total2[$j];
            } else {
                echo "0";
            }
            echo '</td>
				  ';
        }
        echo '				 ';
        for ($j = 1; $j <= 2; $j++) {
            $hh = 0;
            echo '                  <td align="center" bgcolor="#FFFFFF">
                  ';
            echo $hh = getremain($rs["username"], $j);
            echo '</td>
				   ';
        }
        echo '			 
          </tr>
          ';
    }
} else {
    echo '      <tr>
            <td height="20" bgcolor="#FFFFFF" colspan="10"><div align="center"></div></td>
          </tr>
      ';
}
$db->free_result($result);
echo '        </table></td>