forked from BludotOS/BludotOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex2.php
1917 lines (1821 loc) · 78.7 KB
/
index2.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?
include('include/session.php');
include('include/view_active.php');
include('include/coreBC.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" manifest="manifest2.php">
<?
if ($user != 'Guest') {
};
function load($path)
{
return require $path;
}
$version = '0.72';
$updateinfo = "minor security update with logins<br>Major security update!<br>All user files are now secure<br>Core bug fixes<br>More secure!<br>Developer API Completed!!!";
?>
<?
if (!$isMobile) {
?>
<html scrolling="no" style="position:fixed;height:100%;width:100%;top:0px;left:0px;margin:0px;padding:0px;border:0;">
<?
};
?>
<head id="csslinks">
<meta name="keywords" content="webos, operating system, online os, online operating system, idevice os, oses, apfelsine, apfelsineos, apfelsineoses">
<title>bludot</title>
<link rel="shortcut icon" href="wallpaper/BluDotlogo.png">
<meta itemprop="name" content="ApfelsineOS">
<meta itemprop="description" content="An easy WebOS for on the go. Fast, simple, and small. A new way for cloud computing.">
<meta itemprop="image" content="http://bludotos.com/wallpaper/BluDotlogo.png">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="apple-touch-startup-image" href="images/bludotipod.png" />
<link rel="apple-touch-icon" href="wallpaper/BluDotlogo.png"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="jqnoconflict.js"></script>
<script src="jqezbgresize.js"></script>
<script type="text/javascript" for="jqlibcyc" src="http://malsup.github.io/jquery.cycle.all.js"></script>
<style>
input[type="range"]{
background: white;
width: 130px;
height: 15px;
-webkit-appearance: none;
border-radius: 8px;
-moz-border-radius: 8px;
-wekkit-border-radius: 8px;
-webkit-box-shadow: inset 0px 0px 12px 2px rgba(0, 0, 0, 0.9);
}
input[type="range"]::-webkit-slider-thumb{
-webkit-appearance:none !important;
width:20px;
height:20px;
-webkit-appearance: none;
border-radius: 20px;
border:2px solid rgb(150, 150, 150);;
background-color:rgb(200, 200, 200);
-webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.9);
}
.appdiv:after {
position: absolute;
content: "";
width: 0;
height: 0;
border: 10px solid transparent;
border-top-color: rgba(0, 0, 0, 0.8);
bottom: -20px;
left: 50%;
margin-left: -5px;
}
#popup {
text-align:center;
width:300px;
height:auto;
position:fixed;
top:0px;
left:25%;
background-color: #555;
background-image: -webkit-gradient(linear, left top, left bottom, from(#555), to(#333));
background-image: -webkit-linear-gradient(top, #555, #333);
background-image: -moz-linear-gradient(top, #555, #333);
background-image: -ms-linear-gradient(top, #555, #333);
background-image: -o-linear-gradient(top, #555, #333);
background-image: linear-gradient(top, #555, #333);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#555555', EndColorStr='#333333');
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(255, 255, 255, 0.3), inset 1px 0 0 rgba(255, 255, 255, 0.3), inset -1px 0 0 rgba(255, 255, 255, 0.3), 0 0 4px rgba(0, 0, 0, 0.6);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(255,255,255,0.3), inset 1px 0 0 rgba(255,255,255,0.3), inset -1px 0 0 rgba(255,255,255,0.3), 0 0 4px rgba(0,0,0,0.6);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(255, 255, 255, 0.3), inset 1px 0 0 rgba(255, 255, 255, 0.3), inset -1px 0 0 rgba(255, 255, 255, 0.3), 0 0 4px rgba(0, 0, 0, 0.6);
-webkit-text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
-moz-text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
border: 1px solid #333;
border-bottom-color: #222;
border-top-color: #444;
color: #EEE;
overflow: hidden;
-webkit-transform: translateY(36px);
-moz-transform: translateY(36px);
transform: translateY(36px);
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
transition: all 0.3s ease;
opacity: 1;
z-index: 970;
}
#form {
position:relative;
top:10px;
}
#form input {
position:relative;
background-color: #555;
background-image: -webkit-gradient(linear, left bottom, left bottom, from(#555), to(#333));
background-image: -webkit-linear-gradient(bottom, #555, #333);
border:1px solid grey;
border-radius:8px;
padding-left:8px;
padding-right:8px;
outline:none;
}
#form input:last-child {
background-color: #555;
background-image: -webkit-gradient(linear, left top, left bottom, from(#555), to(#333));
background-image: -webkit-linear-gradient(top, #555, #333);
border:1px solid grey;
border-radius:8px;
padding-left:8px;
padding-right:8px;
outline:none;
border-radius:3px;
margin-bottom:15px;
}
#notifications {
position:fixed;
top:30px;
right:0px;
width:300px;
}
#notifymain {
position:fixed;
right:0px;
width:300px;
height:auto;
background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzI4MjgyOCIgc3RvcC1vcGFjaXR5PSIwLjgiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjgiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
border: 1px solid blue;
padding: 4px;
min-height:50px;
z-index:9999999;
box-shadow:5px 5px 15px black;
border-radius:5px;
}
#notifymain:after {
content: '';
display: block;
position: absolute;
top: 50%;
right:-7px;
width: 10px;
height: 10px;
background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzI4MjgyOCIgc3RvcC1vcGFjaXR5PSIwLjgiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjgiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
border-right:1px solid blue;
border-bottom:1px solid blue;
-moz-transform:rotate(-45deg);
-webkit-transform:rotate(-45deg);
margin-top:-10px;
box-shadow:5px 5px 15px black;
}
#notifylogo {
position:absolute;
top:0px;
left:0px;
width:50px;
height:auto;
float:left;
}
.notifylogo {
position:absolute;
width:50px;
height:50px;
}
#notifycontent {
position:relative;
top:-0px;
left:60px;
width:250px;
height:100%;
}
.notifytext {
position:relative;
width:auto;
height:auto;
color:white;
word-wrap:normal;
}
#notifytest {
position:fixed;
top:0px
left:0px;
}
body {
font-family:arial;
}
</style>
<? if(!$isMobile) { ?>
<link rel="stylesheet" href="loadOS.css" type="text/css"/>
<? }; ?>
<script src="http://rawgithub.com/ajaxorg/ace-builds/master/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
/////////////////////////////////////////////////////////////////////////////////////////////////
// //
// Firefox input fix //
// //
/////////////////////////////////////////////////////////////////////////////////////////////////
/*
html5slider - a JS implementation of <input type=range> for Firefox 16 and up
https://github.com/fryn/html5slider
Copyright (c) 2010-2013 Frank Yan, <http://frankyan.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
(function() {
window.twebkit;
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
var isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
if (isChrome || isSafari)
{
window.twebkit = 'true';
} else {
window.twebkit = 'false';
};
// test for native support
var test = document.createElement('input');
try {
test.type = 'range';
if (test.type == 'range')
return;
} catch (e) {
return;
}
// test for required property support
test.style.background = 'linear-gradient(red, red)';
if (!test.style.backgroundImage || !('MozAppearance' in test.style) ||
!document.mozSetImageElement || !this.MutationObserver)
return;
var scale;
var isMac = navigator.platform == 'MacIntel';
var thumb = {
radius: isMac ? 19 : 16,
width: isMac ? 22 : 12,
height: isMac ? 16 : 25
};
var track = 'linear-gradient(transparent ' + (isMac ?
'6px, #999 6px, #999 7px, #ccc 8px, #bbb 9px, #bbb 10px, transparent 10px' :
'6px, #999 6px, #bbb 10px, #999 20px, #bbb 20px, transparent 23px') +
', transparent)';
var styles = {
'min-width': thumb.width + 'px',
'min-height': thumb.height + 'px',
'max-height': thumb.height + 'px',
//padding: '0 0 ' + (isMac ? '2px' : '1px'),
border: 0,
'border-radius': 0,
cursor: 'default',
'text-indent': '-999999px' // -moz-user-select: none; breaks mouse capture
};
var options = {
attributes: true,
attributeFilter: ['min', 'max', 'step', 'value']
};
var forEach = Array.prototype.forEach;
var onInput = document.createEvent('HTMLEvents');
onInput.initEvent('input', true, false);
var onChange = document.createEvent('HTMLEvents');
onChange.initEvent('change', true, false);
if (document.readyState == 'loading')
document.addEventListener('DOMContentLoaded', initialize, true);
else
initialize();
function initialize() {
// create initial sliders
forEach.call(document.querySelectorAll('input[type=range]'), transform);
// create sliders on-the-fly
new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.addedNodes)
forEach.call(mutation.addedNodes, function(node) {
check(node);
if (node.childElementCount)
forEach.call(node.querySelectorAll('input'), check);
});
});
}).observe(document, { childList: true, subtree: true });
}
function check(input) {
if (input.localName == 'input' && input.type != 'range' &&
input.getAttribute('type') == 'range')
transform(input);
}
function transform(slider) {
var isValueSet, areAttrsSet, isChanged, isClick, prevValue, rawValue, prevX;
var min, max, step, range, value = slider.value;
// lazily create shared slider affordance
if (!scale) {
scale = document.body.appendChild(document.createElement('div'));
style(scale, {
//'-moz-appearance': isMac ? 'scale-horizontal' : 'scalethumb-horizontal',
display: 'block',
visibility: 'visible',
opacity: 1,
position: 'fixed',
top: '-999999px',
background: 'red',
width: '20px',
height: '20px',
'border-radius': '20px',
'border': '2px solid rgb(150, 150, 150)',
'background-color': 'rgb(200, 200, 200)'
});
document.mozSetImageElement('__sliderthumb__', scale);
};
// reimplement value and type properties
var getValue = function() { return '' + value; };
var setValue = function setValue(val) {
value = '' + val;
isValueSet = true;
draw();
delete slider.value;
slider.value = value;
Object.defineProperty(slider, 'value', {
get: getValue,
set: setValue
});
};
Object.defineProperty(slider, 'value', {
get: getValue,
set: setValue
});
Object.defineProperty(slider, 'type', {
get: function() { return 'range'; }
});
// sync properties with attributes
['min', 'max', 'step'].forEach(function(prop) {
if (slider.hasAttribute(prop))
areAttrsSet = true;
Object.defineProperty(slider, prop, {
get: function() { return this.hasAttribute(prop) ? this.getAttribute(prop) : ''; },
set: function(val) { val === null ? this.removeAttribute(prop) : this.setAttribute(prop, val); }
});
});
// initialize slider
slider.readOnly = true;
style(slider, styles);
update();
new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.attributeName != 'value') {
update();
areAttrsSet = true;
}
// note that value attribute only sets initial value
else if (!isValueSet) {
value = slider.getAttribute('value');
draw();
}
});
}).observe(slider, options);
slider.addEventListener('mousedown', onDragStart, true);
slider.addEventListener('keydown', onKeyDown, true);
slider.addEventListener('focus', onFocus, true);
slider.addEventListener('blur', onBlur, true);
function onDragStart(e) {
isClick = true;
setTimeout(function() { isClick = false; }, 0);
if (e.button || !range)
return;
var width = parseFloat(getComputedStyle(this, 0).width);
var multiplier = (width - thumb.width) / range;
if (!multiplier)
return;
// distance between click and center of thumb
var dev = e.clientX - this.getBoundingClientRect().left - thumb.width / 2 -
(value - min) * multiplier;
// if click was not on thumb, move thumb to click location
if (Math.abs(dev) > thumb.radius) {
isChanged = true;
this.value -= -dev / multiplier;
}
rawValue = value;
prevX = e.clientX;
this.addEventListener('mousemove', onDrag, true);
this.addEventListener('mouseup', onDragEnd, true);
}
function onDrag(e) {
var width = parseFloat(getComputedStyle(this, 0).width);
var multiplier = (width - thumb.width) / range;
if (!multiplier)
return;
rawValue += (e.clientX - prevX) / multiplier;
prevX = e.clientX;
isChanged = true;
this.value = rawValue;
}
function onDragEnd() {
this.removeEventListener('mousemove', onDrag, true);
this.removeEventListener('mouseup', onDragEnd, true);
slider.dispatchEvent(onChange);
}
function onKeyDown(e) {
if (e.keyCode > 36 && e.keyCode < 41) { // 37-40: left, up, right, down
onFocus.call(this);
isChanged = true;
this.value = value + (e.keyCode == 38 || e.keyCode == 39 ? step : -step);
}
}
function onFocus() {
if (!isClick)
this.style.boxShadow = !isMac ? '0 0 0 2px #fb0' :
'inset 0 0 20px rgba(0,127,255,.1), 0 0 1px rgba(0,127,255,.4)';
}
function onBlur() {
this.style.boxShadow = '';
}
// determines whether value is valid number in attribute form
function isAttrNum(value) {
return !isNaN(value) && +value == parseFloat(value);
}
// validates min, max, and step attributes and redraws
function update() {
min = isAttrNum(slider.min) ? +slider.min : 0;
max = isAttrNum(slider.max) ? +slider.max : 100;
if (max < min)
max = min > 100 ? min : 100;
step = isAttrNum(slider.step) && slider.step > 0 ? +slider.step : 1;
range = max - min;
draw(true);
}
// recalculates value property
function calc() {
if (!isValueSet && !areAttrsSet)
value = slider.getAttribute('value');
if (!isAttrNum(value))
value = (min + max) / 2;;
// snap to step intervals (WebKit sometimes does not - bug?)
value = Math.round((value - min) / step) * step + min;
if (value < min)
value = min;
else if (value > max)
value = min + ~~(range / step) * step;
}
// renders slider using CSS background ;)
function draw(attrsModified) {
calc();
if (isChanged && value != prevValue)
slider.dispatchEvent(onInput);
isChanged = false;
if (!attrsModified && value == prevValue)
return;
prevValue = value;
var position = range ? (value - min) / range * 100 : 0;
var bg = '-moz-element(#__sliderthumb__) ' + position + '% no-repeat, ';
style(slider, {
background: bg + track,
'border-radius': '100px',
});
}
}
function style(element, styles) {
for (var prop in styles)
element.style.setProperty(prop, styles[prop], 'important');
}
})();
window.ontouchmove = function(e){
e.preventDefault();
}
window.core = (function(){
var core = {
OS: {}
},
priv = {};
core.create = function(type)
{
return document.createElement(type);
};
core.boot = function()
{
};
core.style = function(style, node)
{
node.style.cssText = style;
};
core.loadApps = {
Trash:function ()
{
var dividofapps = "trashwin"
var trash=SimpleWin.create("Trash", "trash", "sysapps/trash.txt");
dock.addclick('Trash', ['close', 'minimize'], [function(){SimpleWin.close(trash);}, function(){SimpleWin.minimize(trash);}]);
trash.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
dock.removeclick('Trash', ['close', 'minimize']);
return true
}
},
Appstore:function ()
{
var Appstore=SimpleWin.create("Appstore", "Appstore", "appstore/");
Appstore.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
return true
}
},
AmoebaChat:function ()
{
<?
if (!$isMobile) {
?>
var AchatS = prompt('Username');
// OR var favorite = window.prompt('What is your favorite color?', 'RED');
// if (favorite) equivalent to if (favorite != null && favorite != "");
if (AchatS) {
window.dock.AddNew({
name: 'images/AmoebaChat',
label: 'AmoebaChat',
extension: '.png',
sizes: [44, 100],
menuItems: ['open'],
menuClick: [function(){this.name();}],
onclick: function (){return false;}
}, dock.findApp('Trash'));
var AmoebaChat=SimpleWin.create("AmoebaChat", "amoebachat", 'http://amoeba.im/#username='+AchatS);
dock.addclick('AmoebaChat', ['close', 'minimize'], [function(){SimpleWin.close(AmoebaChat);}, function(){SimpleWin.minimize(AmoebaChat);}]);
} else {
alert("You pressed Cancel or no value was entered!");
}
<?
} else if ($isMobile) {
?>
var AchatS = prompt('Username');
// OR var favorite = window.prompt('What is your favorite color?', 'RED');
// if (favorite) equivalent to if (favorite != null && favorite != "");
if (AchatS) {
var AmoebaChat=SimpleWin.create("AmoebaChat", "amoebachat", "sysapps/amoebachat.txt");
} else {
alert("You pressed Cancel or no value was entered!");
}
<?
};
?>
AmoebaChat.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
<?
if (!$isMobile) {
?>
dock.removeclick('AmoebaChat', ['close', 'minimize']);
window.dock.removeApp('AmoebaChat');
return true;
<?
} else if ($isMobile) { };
?>
return true;
}
},
DevCenter:function ()
{
var DevCenter=SimpleWin.create("DevCenter", "DevCenter", "users/"+core.user+"/sysapps/DevCenter/?thefile=file.txt&userN="+core.user+"");
<?
if (!$isMobile) {
?>
dock.addclick('DevCenter', ['close', 'minimize'], [function(){SimpleWin.close(DevCenter);}, function(){SimpleWin.minimize(DevCenter);}]);
<?
};
?>
DevCenter.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
<?
if (!$isMobile) {
?>
for (var x=0; x < thisis.length; x++)
{
if(actT == thisis[x])
{
var thisislength = x;
}
}
var renameit = new XMLHttpRequest();
var nameit = window.thisis[actT.x].old.split("/")[window.thisis[actT.x].old.split("/").length-1];
var sendit2 = 'path=../FileNet/HDD/Applications/temp/&old='+encodeURIComponent(nameit+'/')+'&new='+encodeURIComponent('../FileNet/HDD/Applications/'+nameit+'.blu')+'&move='+nameit;
renameit.open('POST', 'users/'+core.user+'/sysapps/DevCenter/build.php', false);
renameit.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
renameit.onreadystatechange = function() {
if (renameit.readyState==4) {
//thisis.old = '../FileNet/HDD/Applications/temp/'+name;
};
};
renameit.send(sendit2);
dock.removeclick('DevCenter', ['close', 'minimize']);
<?
};
?>
return true;
}
},
FileNet:function ()
{
var FileNet=SimpleWin.create("FileNet", "FileNet", "users/"+core.user+"/sysapps/FileNet/?userN="+core.user+"", 400, 750, function(obj){var left = (window.innerWidth-obj.clientWidth)/2; return left;}, function(obj){var top = ((window.innerHeight-obj.clientHeight)/2)-23; return top;});
dock.addclick('FileNet', ['close', 'minimize'], [function(){SimpleWin.close(FileNet);}, function(){SimpleWin.minimize(FileNet);}]);
FileNet.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
dock.removeclick('FileNet', ['close', 'minimize']);
return true
}
},
Prefs:function ()
{
<?
if (!$isMobile) {
?>
window.dock.AddNew({
name: 'icons/Preferences',
label: 'Prefs',
extension: '.png',
sizes: [44, 100],
menuItems: ['open'],
menuClick: [function(){this.name();}],
onclick: function (){return false;}
}, dock.findApp('Trash'));
var Prefer=SimpleWin.create("Preferences", "prefed", "users/"+core.user+"/sysapps/Preferences/index.php?userN="+core.user+"", 420, 540, function(obj){var left = (window.innerWidth-obj.clientWidth)/2; return left;}, function(obj){var top = ((window.innerHeight-obj.clientHeight)/2)-23; return top;});
dock.addclick('Prefs', ['close', 'minimize'], [function(){SimpleWin.close(Prefer);}, function(){SimpleWin.minimize(Prefer);}]);
<?
} else if ($isMobile) {
?>
var Prefer=SimpleWin.create("pref", "prefed", "users/"+core.user+"/sysapps/Preferences/index.php");
<?
};
?>
Prefer.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
<?
if (!$isMobile) {
?>
//dock.removeclick('Prefs', ['close', 'minimize']);
window.dock.removeApp('Prefs');
<?
} else if ($isMobile) { };
?>
return true;
}
},
AdminC:function ()
{
var AdminC=SimpleWin.create("AdminC", "AdminC", "users/"+core.user+"/admin/admin.php")
AdminC.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
return true
}
},
Safari:function ()
{
var googlewin=SimpleWin.create("Safari", "safari", 'browserT/browser.html', 590, 500);
dock.addclick('Safari', ['close', 'minimize'], [function(){SimpleWin.close(googlewin);}, function(){SimpleWin.minimize(googlewin);}]);
googlewin.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
dock.removeclick('Safari', ['close', 'minimize']);
return true;
}
},
AboutOS:function()
{
var aboutos=SimpleWin.create("About", "about", "aboutOSw.php?ver=<? echo $version; ?>", 450, 400, function(obj){var left = (window.innerWidth-obj.clientWidth)/2; return left;}, function(obj){var top = ((window.innerHeight-obj.clientHeight)/2)-23; return top;}, 1, 1);
aboutos.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
return true
}
},
logout:function()
{
setTimeout("location.href = 'process.php';",1500);
var logout=SimpleWin.create("logout", "logout", "sysapps/logout.txt", "width=590px,height=175px,resize=1,scrolling=1,center=1")
logout.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
return true
}
},
Applications:function(node)
{
window.checkthis = node;
if(!window.appdivopen) {
window.appdivopen =1;
window.appdiv = core.create('div');
document.body.appendChild(appdiv);
appdiv.style.cssText = 'background: black;width: 300px;height: 250px;z-index: 2147486;position: fixed;bottom: 60px;border-radius: 20px;right: 486px;border: 2px solid blue;box-shadow: inset 0px 0px 23px -3px white;padding:5px;';
if(dock.skip == 1 || dock.skip == true) {
appdiv.style.bottom = dock.min+'px';
} else if(dock.skip == 0 || dock.skip == false) {
appdiv.style.bottom = dock.max+'px';
};
appdiv.style.left = checkthis.offsetLeft+((window.innerWidth-dock.node.clientWidth)/2)-(appdiv.clientWidth/2)+(node.clientWidth/2)+'px';
docklock = true;
appdiv.className = 'appdiv';
var getapps = new XMLHttpRequest();
getapps.open('GET', 'apps.php?goto=users/'+core.user+'/sysapps/FileNet/apps/', true);
getapps.onreadystatechange = function() {
if(getapps.readyState==4) {
window.respit = JSON.parse(getapps.responseText);
for(var i=0; i < respit.dirs.length; i++) {
var temp = core.create('div');
temp.img = core.create('img');
temp.name = core.create('div');
temp.name.innerHTML = respit.dirs[i];
temp.img.src = '/users/'+core.user+'/sysapps/FileNet/apps/'+respit.dirs[i]+'/img.png';
appdiv.appendChild(temp);
temp.style.cssText = 'position:relative;top:0px;left:0px;float:left;width:75px;height:85px;';
temp.appendChild(temp.img);
temp.img.style.cssText = 'position:relative;top:0px;left:0px;width:75px;height75px;';
temp.appendChild(temp.name);
temp.name.style.cssText = 'position:relative;top:0px;left:0px;width:100%;height75px;color:white;text-align:center;';
temp.onclick = function(){core.openapp(this.name.innerHTML);core.loadApps.Applications(null);if(dock.skip == 1) {dock.skipT(0);setTimeout(function(){dock.skipT(1);}, 5);} else if(dock.skip == false || dock.skip == 0){dock.skipT(0);};};
};
}
}
getapps.send();
} else if (window.appdivopen == 1) {
delete window.appdivopen;
document.body.removeChild(window.appdiv);
docklock = false;
};
}
};
core.openapp = function(name) {
var name = name;
var openapp = new XMLHttpRequest();
var sendit = 'name='+name+'&user='+core.user+'';
openapp.open('POST', 'openapp.php', true);
openapp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
//goto2.setRequestHeader("Content-length", sendit.length);
openapp.onreadystatechange = function() {
if (openapp.readyState==4) {
window.dock.AddNew({
name: 'icons/'+name,
label: name,
extension: '.png',
sizes: [44, 100],
menuItems: ['open'],
menuClick: [function(){return false;}],
onclick: function (){return false;}
}, dock.findApp('Trash'));
var temp = SimpleWin.create(name, name, "users/"+core.user+"/sysapps/FileNet/HDD/Applications/temp/"+name+"/index.php?name="+name+"&userN="+core.user+"");
window.tempname = name;
<?
if ($isMobile) {
?>
dock.addclick(name, ['close', 'minimize'], [function(){SimpleWin.close(temp);}, function(){SimpleWin.minimize(temp);}]);
<?
};
?>
temp.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
<?
if (!$isMobile) {
?>
window.dock.removeApp(thisis[actT.x].id);
var saveapp = new XMLHttpRequest();
var sendit2 = 'path=HDD/Applications/temp/&old='+encodeURIComponent(window.tempname+'/')+'&new='+encodeURIComponent('apps/'+window.tempname+'/'+window.tempname+'.blu')+'&move='+window.tempname;
saveapp.open('POST', 'users/'+core.user+'/sysapps/FileNet/saveapp.php', true);
saveapp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
//goto2.setRequestHeader("Content-length", sendit2.length);
saveapp.onreadystatechange = function() {
if (saveapp.readyState==4) {
}
}
saveapp.send(sendit2);
<?
};
?>
return true;
}
}
}
openapp.send(sendit);
}
core.getstyle = function(path, type, ex, name, callback)
{
var fileref=document.createElement("link");
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
if(name == "check")
{
<? if($isMobile) {?>
fileref.setAttribute("href", ex+'s/'+path+'/themes/'+type+'/mobile.css');
<? } else if(!$isMobile) {?>
fileref.setAttribute("href", ex+'s/'+path+'/themes/'+type+'/desktop.css');
<? }; ?>
} else {
fileref.setAttribute("href", ex+'s/'+path+'/themes/'+type+'/'+name+'.css');
};
document.getElementsByTagName("head")[0].appendChild(fileref);
return true;
};
core.getscript = function(path, ex, name, callback)
{
var fileref=document.createElement('script');
fileref.setAttribute("type","text/javascript");
if(name == "check")
{
<? if($isMobile) {?>
fileref.setAttribute("src", ex+'s/'+path+'/mobile.js');
<? } else if(!$isMobile) {?>
fileref.setAttribute("src", ex+'s/'+path+'/desktop.js');
<? }; ?>
} else {
fileref.setAttribute("src", ex+'s/'+path+'/'+name+'.js');
};
document.getElementsByTagName("head")[0].appendChild(fileref);
if(callback)
{
callback(true);
};
};
core.ajaxlogin = function (user, pass, sub, box)
{
var checkit = new XMLHttpRequest();
var sendit = 'sublogin='+sub+'&user='+user+'&pass='+pass+'&remember='+box;
checkit.open("POST", "process.php", true);
checkit.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
//checkit.setRequestHeader("Content-length", sendit.length);
//checkit.setRequestHeader("Connection", "close");
checkit.onreadystatechange = function() {
if(checkit.readyState == 4){
var resp = JSON.parse(checkit.responseText);
//window.resp = JSON.parse(checkit.responseText);
if (resp.result == 'false'){
alert("LOGIN DOES NOT EXIST");
delete resp.result;
delete checkit;
delete user;
delete pass;
delete sub;
delete box;
document.forms[0].children[2].children[0].value = '';
core.OS.logindiv.body.content.form.action = 'javascript:core.ajaxlogin(document.forms[0].children[0].children[0].value, document.forms[0].children[2].children[0].value, document.forms[0].children[2].children[1].value, document.forms[0].children[4].checked);';
//delete window.resp;
} else if (resp.result == 'true') {
var divit = document.getElementById('logdiv');
document.body.removeChild(divit);
core.user = resp.user;
window.user = resp.user;
core.Admin = resp.Admin;
core.Cversion = <?echo $version;?>;
core.checkupdates();
var checkp = new XMLHttpRequest();
checkp.open("GET", "users/"+window.user+"/config/configB.php", true);
checkp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
checkp.onreadystatechange = function() {
if(checkp.readyState == 4){
window.prefit = JSON.parse(checkp.responseText);
//core.userprefs = prefit;
core.OS.Desktop.background.src = prefit.wallpaper;
if (prefit.Dockmag == 'false') {
prefit.Dockmag = false;
} else if (prefit.Dockmag == 'true') {
prefit.Dockmag = true;
}
core.getstyle(prefit.dock[0], prefit.dock[1], 'dock', prefit.dock[2]);
core.docktheme = prefit.dock[1];
core.getscript(prefit.dock[0], 'dock', prefit.dock[3], function(result){
if(result == true)
{
setTimeout(function(){
window.dockit = [];
//window.i = i;
for(var t=0; t < prefit.Dockapps.length; t++) {
var t = t;
window.temp = {
name: 'icons/'+prefit.Dockapps[t],
label: prefit.Dockapps[t],
extension: '.png',
sizes: [44,100],
menuItems: ['open'],
menuClick: [core.loadApps[prefit.Dockapps[t]]],
onclick: core.loadApps[prefit.Dockapps[t].toString()]
};
window.dockit[t] = window.temp;
};
if (prefit.trash == 'empty') {
window.temp = {
name: 'icons/trash-empty',
label: 'Trash',
extension: '.png',
sizes: [44,100],
menuItems: ['open'],
menuClick: [function(){core.loadApps.Trash();}],
onclick: function(){core.loadApps.Trash();}
};
window.dockit.push(window.temp);
} else if (prefit.trash == 'full') {
window.temp = {
name: 'icons/trash-full',
label: 'Trash',
extension: '.png',
sizes: [44,100],
menuItems: ['open'],
menuClick: [function(){core.loadApps.Trash();}],
onclick: function(){core.loadApps.Trash();}
};
window.dockit.push(window.temp);
};
if (core.Admin == 1 || resp.Dev == 1) {
window.dock = new SimpleDock(
document.getElementById('dock'),
window.dockit,
parseInt(prefit.Dockmin),
parseInt(prefit.Dockmax),
3,
5,
1,
<? if(!$isMobile){?>
prefit.Dockmag);
<? } else if($isMobile){?>
true);
<?};?>
} else if(core.Admin != 1 && reap.Dev != 1) {
window.dockit = [];
for(var i=1; i < prefit.Dockapps.length; i++)
{
var temp = {
name: 'icons/'+prefit.Dockapps[i]+'',
label: prefit.Dockapps[i],
extension: '.png',
sizes: [44,100],
menuItems: ['open'],
menuClick: [function(){prefit.Dockapps[i]();}],
onclick: function(){prefit.Dockapps[i]();}
};
window.dockit[i-1] = temp;
};
window.dock = new SimpleDock(
document.getElementById('dock'),
window.docks,
parseInt(prefit.Dockmin),
parseInt(prefit.Dockmax),
3,
5,