Subversion Repositories SmartDukaan

Rev

Rev 18167 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
15085 anikendra 1
<html>
15203 anikendra 2
<head>
3
  <title>Redirect</title>
18167 amit.gupta 4
  <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
5
  <meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
15085 anikendra 6
<script type="text/javascript">
15203 anikendra 7
String.prototype.capitalizeFirstLetter = function() {
8
    return this.charAt(0).toUpperCase() + this.slice(1);
9
}
15085 anikendra 10
function pass_it_on() {
11
   var l=window.location+"";
12
   var dsp=document.getElementById("display");
20145 naman 13
   var qsloc=l.indexOf("?");<html>
14
   <head>
15
   <title>Redirect</title>
16
   <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
17
   <meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
18
 <script type="text/javascript">
19
 String.prototype.capitalizeFirstLetter = function() {
20
     return this.charAt(0).toUpperCase() + this.slice(1);
21
 }
22
 function pass_it_on() {
23
    var l=window.location+"";
24
    var dsp=document.getElementById("display");
25
    var qsloc=l.indexOf("?");
26
    if(qsloc>=0) {
27
       var link = document.createElement('a');
28
       var query_string=unescape(l.substring(qsloc+1));
29
       link.setAttribute('href', Base64.decode(query_string));
30
       url=Base64.decode(query_string);
31
       window.location=url;
32
       //dsp.innerHTML="<a id='noreferrer' rel = 'noreferrer' href='"+url+"'>Redirecting to " + link.hostname + "</a>";
33
       //document.getElementById('noreferrer').click();
34
    }
35
 }
36
 var Base64 = {
37
 
38
 
39
     _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
40
 
41
 
42
     encode: function(input) {
43
         var output = "";
44
         var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
45
         var i = 0;
46
 
47
         input = Base64._utf8_encode(input);
48
         while (i < input.length) {
49
 
50
             chr1 = input.charCodeAt(i++);
51
             chr2 = input.charCodeAt(i++);
52
             chr3 = input.charCodeAt(i++);
53
 
54
             enc1 = chr1 >> 2;
55
             enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
56
             enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
57
             enc4 = chr3 & 63;
58
 
59
             if (isNaN(chr2)) {
60
                 enc3 = enc4 = 64;
61
             } else if (isNaN(chr3)) {
62
                 enc4 = 64;
63
             }
64
 
65
             output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
66
 
67
         }
68
 
69
         return output;
70
     },
71
 
72
 
73
     decode: function(input) {
74
         var output = "";
75
         var chr1, chr2, chr3;
76
         var enc1, enc2, enc3, enc4;
77
         var i = 0;
78
 
79
         input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
80
 
81
         while (i < input.length) {
82
             enc1 = this._keyStr.indexOf(input.charAt(i++));
83
             enc2 = this._keyStr.indexOf(input.charAt(i++));
84
             enc3 = this._keyStr.indexOf(input.charAt(i++));
85
             enc4 = this._keyStr.indexOf(input.charAt(i++));
86
 
87
             chr1 = (enc1 << 2) | (enc2 >> 4);
88
             chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
89
             chr3 = ((enc3 & 3) << 6) | enc4;
90
 
91
             output = output + String.fromCharCode(chr1);
92
 
93
             if (enc3 != 64) {
94
                 output = output + String.fromCharCode(chr2);
95
             }
96
             if (enc4 != 64) {
97
                 output = output + String.fromCharCode(chr3);
98
             }
99
 
100
         }
101
 
102
         output = Base64._utf8_decode(output);
103
 
104
         return output;
105
 
106
     },
107
 
108
     _utf8_encode: function(string) {
109
         string = string.replace(/\r\n/g, "\n");
110
         var utftext = "";
111
 
112
         for (var n = 0; n < string.length; n++) {
113
 
114
             var c = string.charCodeAt(n);
115
             if (c < 128) {
116
                 utftext += String.fromCharCode(c);
117
             }
118
             else if ((c > 127) && (c < 2048)) {
119
                 utftext += String.fromCharCode((c >> 6) | 192);
120
                 utftext += String.fromCharCode((c & 63) | 128);
121
             }
122
             else {
123
                 utftext += String.fromCharCode((c >> 12) | 224);
124
                 utftext += String.fromCharCode(((c >> 6) & 63) | 128);
125
                 utftext += String.fromCharCode((c & 63) | 128);
126
             }
127
 
128
         }
129
 
130
         return utftext;
131
     },
132
 
133
     _utf8_decode: function(utftext) {
134
         var string = "";
135
         var i = 0;
136
         var c = c1 = c2 = 0;
137
 
138
         while (i < utftext.length) {
139
 
140
             c = utftext.charCodeAt(i);
141
 
142
             if (c < 128) {
143
                 string += String.fromCharCode(c);
144
                 i++;
145
             }
146
             else if ((c > 191) && (c < 224)) {
147
                 c2 = utftext.charCodeAt(i + 1);
148
                 string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
149
                 i += 2;
150
             }
151
             else {
152
                 c2 = utftext.charCodeAt(i + 1);
153
                 c3 = utftext.charCodeAt(i + 2);
154
                 string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
155
                 i += 3;
156
             }
157
 
158
         }
159
 
160
         return string;
161
     }
162
 
163
 }
164
 </script>
165
 </head>
166
 <body onload="pass_it_on();">
167
 
168
 <div id="display" style="text-align:center;">
169
 </div>
170
 </body>
171
 </html>
172
 
173
 
15085 anikendra 174
   if(qsloc>=0) {
15203 anikendra 175
      var link = document.createElement('a');          
15085 anikendra 176
      var query_string=unescape(l.substring(qsloc+1));
18167 amit.gupta 177
      link.setAttribute('href', Base64.decode(query_string));
178
      url=Base64.decode(query_string);
179
      window.location=url;
180
      //dsp.innerHTML="<a id='noreferrer' rel = 'noreferrer' href='"+url+"'>Redirecting to " + link.hostname + "</a>";
181
      //document.getElementById('noreferrer').click();
15085 anikendra 182
   }
183
}
15203 anikendra 184
var Base64 = {
185
 
186
 
187
    _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
188
 
189
 
190
    encode: function(input) {
191
        var output = "";
192
        var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
193
        var i = 0;
194
 
195
        input = Base64._utf8_encode(input);
196
 
197
        while (i < input.length) {
198
 
199
            chr1 = input.charCodeAt(i++);
200
            chr2 = input.charCodeAt(i++);
201
            chr3 = input.charCodeAt(i++);
202
 
203
            enc1 = chr1 >> 2;
204
            enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
205
            enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
206
            enc4 = chr3 & 63;
207
 
208
            if (isNaN(chr2)) {
209
                enc3 = enc4 = 64;
210
            } else if (isNaN(chr3)) {
211
                enc4 = 64;
212
            }
213
 
214
            output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
215
 
216
        }
217
 
218
        return output;
219
    },
220
 
221
 
222
    decode: function(input) {
223
        var output = "";
224
        var chr1, chr2, chr3;
225
        var enc1, enc2, enc3, enc4;
226
        var i = 0;
227
 
228
        input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
229
 
230
        while (i < input.length) {
231
 
232
            enc1 = this._keyStr.indexOf(input.charAt(i++));
233
            enc2 = this._keyStr.indexOf(input.charAt(i++));
234
            enc3 = this._keyStr.indexOf(input.charAt(i++));
235
            enc4 = this._keyStr.indexOf(input.charAt(i++));
236
 
237
            chr1 = (enc1 << 2) | (enc2 >> 4);
238
            chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
239
            chr3 = ((enc3 & 3) << 6) | enc4;
240
 
241
            output = output + String.fromCharCode(chr1);
242
 
243
            if (enc3 != 64) {
244
                output = output + String.fromCharCode(chr2);
245
            }
246
            if (enc4 != 64) {
247
                output = output + String.fromCharCode(chr3);
248
            }
249
 
250
        }
251
 
252
        output = Base64._utf8_decode(output);
253
 
254
        return output;
255
 
256
    },
257
 
258
    _utf8_encode: function(string) {
259
        string = string.replace(/\r\n/g, "\n");
260
        var utftext = "";
261
 
262
        for (var n = 0; n < string.length; n++) {
263
 
264
            var c = string.charCodeAt(n);
265
 
266
            if (c < 128) {
267
                utftext += String.fromCharCode(c);
268
            }
269
            else if ((c > 127) && (c < 2048)) {
270
                utftext += String.fromCharCode((c >> 6) | 192);
271
                utftext += String.fromCharCode((c & 63) | 128);
272
            }
273
            else {
274
                utftext += String.fromCharCode((c >> 12) | 224);
275
                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
276
                utftext += String.fromCharCode((c & 63) | 128);
277
            }
278
 
279
        }
280
 
281
        return utftext;
282
    },
283
 
284
    _utf8_decode: function(utftext) {
285
        var string = "";
286
        var i = 0;
287
        var c = c1 = c2 = 0;
288
 
289
        while (i < utftext.length) {
290
 
291
            c = utftext.charCodeAt(i);
292
 
293
            if (c < 128) {
294
                string += String.fromCharCode(c);
295
                i++;
296
            }
297
            else if ((c > 191) && (c < 224)) {
298
                c2 = utftext.charCodeAt(i + 1);
299
                string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
300
                i += 2;
301
            }
302
            else {
303
                c2 = utftext.charCodeAt(i + 1);
304
                c3 = utftext.charCodeAt(i + 2);
305
                string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
306
                i += 3;
307
            }
308
 
309
        }
310
 
311
        return string;
312
    }
313
 
314
}
15085 anikendra 315
</script>
316
</head>
317
<body onload="pass_it_on();">
318
 
15767 anikendra 319
<div id="display" style="text-align:center;">
15085 anikendra 320
</div>
321
</body>
322
</html>