| 1 | function loadcontent( hash, page ) {
|
|---|
| 2 | var xmlHttp;
|
|---|
| 3 | try {
|
|---|
| 4 | xmlHttp = new XMLHttpRequest();
|
|---|
| 5 | }
|
|---|
| 6 | catch ( e ) {
|
|---|
| 7 | try {
|
|---|
| 8 | xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP" );
|
|---|
| 9 | }
|
|---|
| 10 | catch ( e ) {
|
|---|
| 11 | try {
|
|---|
| 12 | xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" );
|
|---|
| 13 | } catch ( e ) {
|
|---|
| 14 | alert( "Your browser does not support AJAX!" );
|
|---|
| 15 | return false;
|
|---|
| 16 | }
|
|---|
| 17 | }
|
|---|
| 18 | }
|
|---|
| 19 | xmlHttp.onreadystatechange = function() {
|
|---|
| 20 | switch ( xmlHttp.readyState ) {
|
|---|
| 21 | case 0 : {
|
|---|
| 22 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 0;
|
|---|
| 23 | break;
|
|---|
| 24 | }
|
|---|
| 25 | case 1 : {
|
|---|
| 26 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Requesting...';
|
|---|
| 27 | break;
|
|---|
| 28 | }
|
|---|
| 29 | case 2 : {
|
|---|
| 30 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 2;
|
|---|
| 31 | break;
|
|---|
| 32 | }
|
|---|
| 33 | case 3 : {
|
|---|
| 34 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Processing...';
|
|---|
| 35 | break;
|
|---|
| 36 | }
|
|---|
| 37 | case 4 : {
|
|---|
| 38 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = xmlHttp.responseText;
|
|---|
| 39 | break;
|
|---|
| 40 | }
|
|---|
| 41 | default : {
|
|---|
| 42 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = '.';
|
|---|
| 43 | break;
|
|---|
| 44 | }
|
|---|
| 45 | }
|
|---|
| 46 | }
|
|---|
| 47 | xmlHttp.open( 'GET', '?mod=torrent&hash=' + hash + '&page=' + page + '&ajax=true', true );
|
|---|
| 48 | xmlHttp.send( null );
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | function loadcontent_filepriority( iurl, hash, id, filepriority ) {
|
|---|
| 52 | var xmlHttp;
|
|---|
| 53 | try {
|
|---|
| 54 | xmlHttp = new XMLHttpRequest();
|
|---|
| 55 | }
|
|---|
| 56 | catch ( e ) {
|
|---|
| 57 | try {
|
|---|
| 58 | xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP" );
|
|---|
| 59 | }
|
|---|
| 60 | catch ( e ) {
|
|---|
| 61 | try {
|
|---|
| 62 | xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" );
|
|---|
| 63 | } catch ( e ) {
|
|---|
| 64 | alert( "Your browser does not support AJAX!" );
|
|---|
| 65 | return false;
|
|---|
| 66 | }
|
|---|
| 67 | }
|
|---|
| 68 | }
|
|---|
| 69 | xmlHttp.onreadystatechange = function() {
|
|---|
| 70 | switch ( xmlHttp.readyState ) {
|
|---|
| 71 | case 0 : {
|
|---|
| 72 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 0;
|
|---|
| 73 | break;
|
|---|
| 74 | }
|
|---|
| 75 | case 1 : {
|
|---|
| 76 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Requesting...';
|
|---|
| 77 | break;
|
|---|
| 78 | }
|
|---|
| 79 | case 2 : {
|
|---|
| 80 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 2;
|
|---|
| 81 | break;
|
|---|
| 82 | }
|
|---|
| 83 | case 3 : {
|
|---|
| 84 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Processing...';
|
|---|
| 85 | break;
|
|---|
| 86 | }
|
|---|
| 87 | case 4 : {
|
|---|
| 88 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = xmlHttp.responseText;
|
|---|
| 89 | break;
|
|---|
| 90 | }
|
|---|
| 91 | default : {
|
|---|
| 92 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = '.';
|
|---|
| 93 | break;
|
|---|
| 94 | }
|
|---|
| 95 | }
|
|---|
| 96 | }
|
|---|
| 97 | xmlHttp.open( 'GET', iurl + '?mod=changefilepriority&hash=' + hash + '&id=' + id + '&filepriority=' + filepriority + '&ajax=true', true );
|
|---|
| 98 | xmlHttp.send( null );
|
|---|
| 99 | }
|
|---|
| 100 |
|
|---|
| 101 | function loadcontent_trackerenabled( iurl, hash, id, trackerenabled ) {
|
|---|
| 102 | var xmlHttp;
|
|---|
| 103 | try {
|
|---|
| 104 | xmlHttp = new XMLHttpRequest();
|
|---|
| 105 | }
|
|---|
| 106 | catch ( e ) {
|
|---|
| 107 | try {
|
|---|
| 108 | xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP" );
|
|---|
| 109 | }
|
|---|
| 110 | catch ( e ) {
|
|---|
| 111 | try {
|
|---|
| 112 | xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" );
|
|---|
| 113 | } catch ( e ) {
|
|---|
| 114 | alert( "Your browser does not support AJAX!" );
|
|---|
| 115 | return false;
|
|---|
| 116 | }
|
|---|
| 117 | }
|
|---|
| 118 | }
|
|---|
| 119 | xmlHttp.onreadystatechange = function() {
|
|---|
| 120 | switch ( xmlHttp.readyState ) {
|
|---|
| 121 | case 0 : {
|
|---|
| 122 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 0;
|
|---|
| 123 | break;
|
|---|
| 124 | }
|
|---|
| 125 | case 1 : {
|
|---|
| 126 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Requesting...';
|
|---|
| 127 | break;
|
|---|
| 128 | }
|
|---|
| 129 | case 2 : {
|
|---|
| 130 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 2;
|
|---|
| 131 | break;
|
|---|
| 132 | }
|
|---|
| 133 | case 3 : {
|
|---|
| 134 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Processing...';
|
|---|
| 135 | break;
|
|---|
| 136 | }
|
|---|
| 137 | case 4 : {
|
|---|
| 138 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = xmlHttp.responseText;
|
|---|
| 139 | break;
|
|---|
| 140 | }
|
|---|
| 141 | default : {
|
|---|
| 142 | document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = '.';
|
|---|
| 143 | break;
|
|---|
| 144 | }
|
|---|
| 145 | }
|
|---|
| 146 | }
|
|---|
| 147 | xmlHttp.open( 'GET', iurl + '?mod=changetrackerenabled&hash=' + hash + '&id=' + id + '&trackerenabled=' + trackerenabled + '&ajax=true', true );
|
|---|
| 148 | xmlHttp.send( null );
|
|---|
| 149 | }
|
|---|
| 150 |
|
|---|