Project

General

Profile

eventview.php

Tingjun Yang, 03/23/2015 02:15 PM

 
1
<?php
2

    
3
// PHP File Tree
4

    
5
include("php_file_tree.php");
6

    
7

    
8

    
9
//TAB 4 Image Gallery // 
10

    
11
include_once('resources/UberGallery.php'); 
12

    
13

    
14

    
15
$default_file_path_tab1 =  "Histograms_Tab123/EventView/histogram/";
16

    
17
$default_file_path_tab1_run1 = "Histograms_Tab123/EventView/histogram/Run1";
18

    
19

    
20

    
21
$default_file_path_tab2 =  "Histograms_Tab123/EventView/histogram/";
22

    
23
$default_file_path_tab2_run1 = "Histograms_Tab123/EventView/histogram/Run1";
24

    
25

    
26

    
27
$default_file_path_tab3 =  "Histograms_Tab123/EventView/histogram/";
28

    
29
$default_file_path_tab3_run1 = "Histograms_Tab123/EventView/histogram/Run1";
30

    
31

    
32

    
33

    
34

    
35
$root_directory_path_tab1 = "Histograms_Tab123/EventView";
36

    
37
$directory_for_uplane_images_tab1 = "VW";
38

    
39
$directory_for_vplane_images_tab1 = "histogramV";
40

    
41
$directory_for_zplane_images_tab1 = "histogramZ";
42

    
43

    
44

    
45
$root_directory_path_tab2 = "Histograms_Tab123/EventView";
46

    
47
$directory_for_uplane_images_tab2 = "VW";
48

    
49
$directory_for_vplane_images_tab2 = "histogramV";
50

    
51
$directory_for_zplane_images_tab2 = "histogramZ";
52

    
53

    
54

    
55
$root_directory_path_tab3 = "Histograms_Tab123/EventView";
56

    
57
$directory_for_uplane_images_tab3 = "VW";
58

    
59
$directory_for_vplane_images_tab3 = "histogramV";
60

    
61
$directory_for_zplane_images_tab3 = "histogramZ";
62

    
63

    
64

    
65
?>
66

    
67

    
68

    
69

    
70

    
71
<!DOCTYPE html>
72

    
73
<!--[if gt IE 8]> --> <html class="no-js"> 
74

    
75
        <!-- 
76

77
                                        Requirement Specification for web hosting 
78

79
                                                                Web Server : Apache 2.4.4 or Above
80

81
                                                                PHP Version : PHP 5.4.12 or above
82

83
        -->
84

    
85
    <head>
86

    
87
        <meta charset="utf-8">
88

    
89
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
90

    
91
        <title>LBNE Monitoring and Event Display</title>
92

    
93
        <meta name="description" content="">
94

    
95
        <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
96

    
97
        <!--meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"--> <!--don't delete-->
98

    
99
        <link rel="stylesheet" href="Content/normalize.css">
100

    
101
        <link rel="stylesheet" type="text/css" href="Content/jquery.mobile-1.3.2.min.css" media="screen , handheld"/>
102

    
103
        <link rel="stylesheet" href="Content/main.css">
104

    
105
                <link rel="stylesheet" type="text/css" href="Content/handheld-screens.css"/> 
106

    
107
                <link href="template1/tabcontent.css" rel="stylesheet" type="text/css" />
108

    
109
                <link rel="stylesheet" href="tabs/tab1.css">
110

    
111
                <link rel="stylesheet" href="tabs/tab2.css">
112

    
113
                <link rel="stylesheet" href="tabs/tab3.css">
114

    
115
                <link rel="stylesheet" href="tabs/tab4.css">
116

    
117
                <link rel="stylesheet" href="styles/default/default.css"  type="text/css" media="screen" />
118

    
119
                <script src="php_file_tree.js" type="text/javascript"></script>
120

    
121
                
122

    
123
                <!-- Jquery from bottom of the file -->
124

    
125
                <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
126

    
127
        <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
128

    
129
        <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
130

    
131
        <script>window.jQuery || document.write('<script src="js/jquery.mobile-1.3.0-rc.1.min.js"><\/script>')</script>
132

    
133
                <!-- ENDS -->
134

    
135
                
136

    
137
                <!-- TAB 4 IMAGE GALLERY STARTS -->
138

    
139
                <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
140

    
141
                <link rel="shortcut icon" href="images/favicon.png" />
142

    
143
                <link rel="stylesheet" type="text/css" href="css/rebase-min.css" />
144

    
145
                <link rel="stylesheet" type="text/css" href="css/style.css" />
146

    
147
                <link rel="stylesheet" type="text/css" href="resources/UberGallery.css" />
148

    
149
                <link rel="stylesheet" type="text/css" href="resources/colorbox/1/colorbox.css" />
150

    
151
                <script type="text/javascript" src="resources/colorbox/jquery.colorbox.js"></script>
152

    
153
                <script type="text/javascript">
154

155
                        function showMessage(value)
156

157
                        {
158

159
                                //alert("alert eventview: " + value);
160

161
                                $("a[rel="+value+"]").colorbox({maxWidth: "90%", maxHeight: "90%", opacity: ".5"});
162

163
                                //alert("alert eventview 2:");
164

165
                        }
166

    
167
                </script>
168

    
169
                <!-- TAB 4 IMAGE GALLERY STARTS -->
170

    
171
                <style>
172

173
                        .banner 
174

175
                                                {
176

177
                                                        text-align:center; 
178

179
                                                        border:1px solid #ccc; 
180

181
                                                        padding: 0px
182

183
                                                        margin-left:1em;
184

185
                                                }
186

187

188

189
                        .banner h1 
190

191
                                                {
192

193
                                                        color: #438710; 
194

195
                                                        margin: 1em 6em 0 1em;
196

197
                                                }
198

199

200

201
                        .hidden 
202

203
                                                { 
204

205
                                                        display: none; 
206

207
                                                }
208

209
                        .button_tab4
210

211
                                                { 
212

213
                                                        background-color: #FFFFFF; 
214

215
                                                        color: #FFFFFF; 
216

217
                                                        width: 5%; 
218

219
                                                        float: left; 
220

221
                                                        padding: 5px; 
222

223
                                                        border-radius: 5px; 
224

225
                                                }
226

    
227

    
228

    
229
                        
230

    
231
                </style>
232

    
233

    
234

    
235

    
236

    
237
</head>
238

    
239
    <body id="page" style="background:#F6F9FC; font-family:Arial;">
240

    
241
        
242

    
243
                
244

    
245
       
246

    
247
                <div style="width: 100%; margin: 0 auto; padding: 12px 0 40px;">
248

    
249
                        
250

    
251
                        <header class="header">
252

    
253
                                <aside class="banner">
254

    
255
                                        <img class="banner_im" src="Images/lbnelogo.png" />
256

    
257
                                        <h1>LBNE Monitoring and Event Display</h1>
258

    
259
                                        
260

    
261
                                </aside>
262

    
263
                        </header><!-- header ends -->
264

    
265
                                   
266

    
267
                        <ul class="tabs" data-persist="true">
268

    
269
                                <li><a href="#view1">Event View</a></li>
270

    
271
                                <li><a href="#view2">Time vs Channel</a></li>
272

    
273
                                <li><a href="#view3">ADC Vs Time</a></li>
274

    
275
                                <li><a href="#view4">Monitoring Plots</a></li>
276

    
277
                        </ul>
278

    
279
                        <div class="tabcontents">
280

    
281
                        <!-- TAB 1 :: VIEW2 :: EVENTVIEW :: BEGINS -->
282

    
283
                                <div id="view1">
284

    
285
                                        <nav class="folder_struct_tab1">
286

    
287
                                        <section class="title_tree_tab1">Filters</section>
288

    
289

    
290

    
291
                                                <div class="Run_text_tab1">
292

    
293
                                                                <a style="font-size:35px"> Run: </a>
294

    
295
                                                </div>
296

    
297

    
298

    
299
                                                <?php
300

    
301
                                                        
302

    
303
                                                        echo "<div class=\"dropdown_tab1\" width=\"30px\" height=\"50px\">";
304

    
305
                                                        echo "<select name='files_tab1' id= 'files_tab1' >";
306

    
307
                                                        
308

    
309
                                                        $files_tab1 = array_map("htmlspecialchars", scandir($default_file_path_tab1));
310

    
311
                                                        foreach ($files_tab1 as $file)
312

    
313
                                                        {
314

    
315
                                                                if($file != '.' && $file != '..')
316

    
317
                                                                {
318

    
319
                                                                        $run_no = str_split($file,3);
320

    
321
                                                                        //echo "<script type='text/javascript'>alert('".$default_file_path_tab1."$file');</script>";
322

    
323
                                                                        echo "<option   value='$default_file_path_tab1$file' name='$default_file_path_tab1$file'>$run_no[1]</option>";
324

    
325
                                                                }
326

    
327
                                                        }
328

    
329
                                                        echo "</select>";
330

    
331
                                                        echo "</div>";
332

    
333
                                                        
334

    
335
                                                        
336

    
337
                                                ?>
338

    
339
                                                
340

    
341
                                                <div id="hide"  class="hidden">
342

    
343
                                                        <select  id="second_choice_tab1" onchange='favBrowser()'>
344

    
345
                                                                <?php
346

    
347
                                                                        
348

    
349
                                                                        $files_tab1 = array_map("htmlspecialchars", scandir("$default_file_path_tab1_run1"));
350

    
351
                                                                        foreach($files_tab1 as $file)
352

    
353
                                                                        {
354

    
355
                                                                                if($file != '.' && $file != '..')
356

    
357
                                                                                {
358

    
359
                                                                                        echo "<option value='$default_file_path_tab1_run1$file' name='$default_file_path_tab1_run1$file'>$file</option>";
360

    
361
                                                                                }
362

    
363
                                                                        }
364

    
365
                                                                        
366

    
367
                                                                ?>
368

    
369
                                                        </select>
370

    
371
                                                </div>
372

    
373
                                                
374

    
375
                                                
376

    
377
                                                
378

    
379
                                                <div class="Event_text_tab1">
380

    
381
                                                                <a style="font-size:35px"> Event: </a>
382

    
383
                                                </div>
384

    
385
                                                
386

    
387
                                                <div class="button_prev_tab1">
388

    
389
                                                        <input id="button_prev_tab1" width="10px" height="50px" type="button" value="<" onclick="previous_image_tab1()"/>
390

    
391
                                                </div>
392

    
393
                                                
394

    
395
                                                <div class='event_dropdown_tab1'>
396

    
397
                                                        <input  type='text' id='event_counter_tab1' name='event_counter_tab1' value='1' onkeydown="return press_tab1(event);">
398

    
399
                                                </div>
400

    
401
                                                
402

    
403
                                                <div class="button_next_tab1">
404

    
405
                                                        <input id="button_next_tab1" width="10px" height="50px" type="button" value=">" onclick="next_image_tab1()" />
406

    
407
                                                </div>
408

    
409
                                                
410

    
411
                                                <div class="button_search_tab1">
412

    
413
                                                        <input id="search_button_tab1" width="10px" height="50px" type="button" value="Search" onclick="search_button_tab1()"/>
414

    
415
                                                </div>
416

    
417
                                        </nav>
418

    
419
                                        
420

    
421
                                        
422

    
423
                                        
424

    
425
                                        <section class="main_cont_tab1">
426

    
427
                                                   <section class="defaultplane_tab1">  
428

    
429
                                                        <?php
430

    
431
                                                                        echo "<h1>U Plane View</h1>";
432

    
433
                                                                        echo "<div class=\"defaultplaneimage_tab1\">";
434

    
435
                                                                        $first_image_tab1 = scandir($default_file_path_tab1_run1);
436

    
437
                                                                        //echo "<script>alert(\"hello.$default_file_path_tab1_run1$first_image_tab1[2].\")</script>";
438

    
439
                                                                        echo "<img src = '$default_file_path_tab1_run1/$first_image_tab1[2]' />";
440

    
441
                                                                        echo "</div>";
442

    
443
                                                        ?>
444

    
445
                                                        </section>
446

    
447
                                                   
448

    
449
                                                   <section class="TimeVsChannelplane_tab1">
450

    
451
                                                   <?php
452

    
453
                                                                        echo "<h1>V Plane View</h1>";
454

    
455
                                                                        echo "<div class=\"TimeVsChannelplaneimage_tab1\">";
456

    
457
                                                                        $first_folder_uplane_tab1 = scandir($root_directory_path_tab1."/".$directory_for_uplane_images_tab1);
458

    
459
                                                                        $image_in_first_folder_uplane_tab1 = scandir($root_directory_path_tab1."/".$directory_for_uplane_images_tab1."/".$first_folder_uplane_tab1[2]);
460

    
461
                                                                        //echo "<script>alert(\"hello1 :$image_in_first_folder_uplane_tab1[2]\")</script>";
462

    
463
                                                                        echo "<img src = \"$root_directory_path_tab1/$directory_for_uplane_images_tab1/$first_folder_uplane_tab1[2]/$image_in_first_folder_uplane_tab1[2]\" />";
464

    
465
                                                                        echo "</div>";
466

    
467
                                                        ?>
468

    
469
                                                        </section>
470

    
471
                                                 
472

    
473
                                                        <section class="uplane_tab1">
474

    
475
                                                        <?php
476

    
477
                                                                        echo "<h1>Z0 Plane View</h1>";
478

    
479
                                                                        echo "<div class=\"uplaneimage_tab1\">";
480

    
481
                                                                        $first_folder_vplane_tab1 = scandir($root_directory_path_tab1."/".$directory_for_vplane_images_tab1);
482

    
483
                                                                        $image_in_first_folder_vplane_tab1 = scandir($root_directory_path_tab1."/".$directory_for_vplane_images_tab1."/".$first_folder_vplane_tab1[2]);
484

    
485
                                                                        //echo "<script>alert(\"hello1 :$image_in_first_folder_vplane_tab1[2]\")</script>";
486

    
487
                                                                        echo "<img src = \"$root_directory_path_tab1/$directory_for_vplane_images_tab1/$first_folder_vplane_tab1[2]/$image_in_first_folder_vplane_tab1[2]\" />";
488

    
489
                                                                        echo "</div>";
490

    
491
                                                        ?>
492

    
493
                                                        </section>
494

    
495
                                                   
496

    
497
                                                   <section class="zplane_tab1">
498

    
499
                                                    <?php
500

    
501
                                                                        echo "<h1>Z1 Plane View</h1>";
502

    
503
                                                                        echo "<div class=\"zplaneimage_tab1\">";
504

    
505
                                                                        $first_folder_zplane_tab1 = scandir($root_directory_path_tab1."/".$directory_for_zplane_images_tab1);
506

    
507
                                                                        $image_in_first_folder_zplane_tab1 = scandir($root_directory_path_tab1."/".$directory_for_zplane_images_tab1."/".$first_folder_zplane_tab1[2]);
508

    
509
                                                                        //echo "<script>alert(\"hello1 :$image_in_first_folder_zplane_tab1[2]\")</script>";
510

    
511
                                                                        echo "<img src = \"$root_directory_path_tab1/$directory_for_zplane_images_tab1/$first_folder_zplane_tab1[2]/$image_in_first_folder_zplane_tab1[2]\" />";
512

    
513
                                                                        echo "</div>";
514

    
515
                                                        ?>
516

    
517
                                                        </section>
518

    
519
                                        </section>
520

    
521
                                </div>
522

    
523
                        <!-- TAB 1 :: VIEW1 :: EVENTVIEW :: ENDS -->
524

    
525
                                
526

    
527
                        <!-- TAB 2 :: VIEW2 :: TIMEVSCHANNEL :: BEGINS -->
528

    
529
                                <div id="view2">
530

    
531
                                        <nav class="folder_struct_tab2">
532

    
533
                                        <section class="title_tree_tab2">Filters</section>
534

    
535

    
536

    
537
                                                <div class="Run_text_tab2">
538

    
539
                                                                <a style="font-size:35px"> Run: </a>
540

    
541
                                                </div>
542

    
543

    
544

    
545
                                                <?php
546

    
547
                                                        
548

    
549
                                                        echo "<div class=\"dropdown_tab2\" width=\"30px\" height=\"50px\">";
550

    
551
                                                        echo "<select name='files_tab2' id= 'files_tab2' >";
552

    
553
                                                        
554

    
555
                                                        $files_tab2 = array_map("htmlspecialchars", scandir($default_file_path_tab2));
556

    
557
                                                        foreach ($files_tab2 as $file)
558

    
559
                                                        {
560

    
561
                                                                if($file != '.' && $file != '..')
562

    
563
                                                                {
564

    
565
                                                                        $run_no = str_split($file,3);
566

    
567
                                                                        echo "<option  value='$default_file_path_tab2$file' name='$default_file_path_tab2$file'>$run_no[1]</option>";
568

    
569
                                                                }
570

    
571
                                                        }
572

    
573
                                                        echo "</select>";
574

    
575
                                                        echo "</div>";
576

    
577
                                                ?>
578

    
579
                                                
580

    
581
                                                <div id="hide"  class="hidden">
582

    
583
                                                        <select  id="second_choice_tab2" onchange='favBrowser()'>
584

    
585
                                                                <?php
586

    
587
                                                                        
588

    
589
                                                                        $files_tab2 = array_map("htmlspecialchars", scandir("$default_file_path_tab2_run1"));
590

    
591
                                                                        foreach($files_tab2 as $file)
592

    
593
                                                                        {
594

    
595
                                                                                if($file != '.' && $file != '..')
596

    
597
                                                                                {
598

    
599
                                                                                        echo "<option value='$default_file_path_tab2_run1$file' name='$default_file_path_tab2_run1$file'>$file</option>";
600

    
601
                                                                                }
602

    
603
                                                                        }
604

    
605
                                                                        
606

    
607
                                                                ?>
608

    
609
                                                        </select>
610

    
611
                                                </div>
612

    
613
                                                
614

    
615
                                                <div class="Event_text_tab2">
616

    
617
                                                                <a style="font-size:35px"> Event: </a>
618

    
619
                                                </div>
620

    
621
                                                
622

    
623
                                                <div class="button_prev_tab2">
624

    
625
                                                        <input id="button_prev_tab2" width="10px" height="50px" type="button" value="<" onclick="previous_image_tab2()"/>
626

    
627
                                                </div>
628

    
629
                                                
630

    
631
                                                <div class='event_dropdown_tab2'>
632

    
633
                                                        <input  type='text' id='event_counter_tab2' name='event_counter_tab2' value='1' onkeydown="return press_tab2(event);">
634

    
635
                                                </div>
636

    
637
                                                
638

    
639
                                                <div class="button_next_tab2">
640

    
641
                                                        <input id="button_next_tab2" width="10px" height="50px" type="button" value=">" onclick="next_image_tab2()" />
642

    
643
                                                </div>
644

    
645
                                                
646

    
647
                                                <div class="button_search_tab2">
648

    
649
                                                        <input id="search_button_tab2" width="10px" height="50px" type="button" value="Search" onclick="search_button_tab2()"/>
650

    
651
                                                </div>
652

    
653
                                        </nav>
654

    
655
                                        
656

    
657
                                        <section class="main_cont_tab2">
658

    
659
                                                        <section class="defaultplane_tab2">  
660

    
661
                                                        <?php
662

    
663
                                                                        echo "<h1>U Plane View</h1>";
664

    
665
                                                                        echo "<div class=\"defaultplaneimage_tab2\">";
666

    
667
                                                                        $first_image_tab2 = scandir($default_file_path_tab2_run1);
668

    
669
                                                                        echo "<img src = '$default_file_path_tab2_run1/$first_image_tab2[2]' />";
670

    
671
                                                                        echo "</div>";
672

    
673
                                                        ?>
674

    
675
                                                        </section>
676

    
677
                                                        
678

    
679
                                                        <section class="TimeVsChannelplane_tab2">
680

    
681
                                                        <?php
682

    
683
                                                                        echo "<h1>V Plane View</h1>";
684

    
685
                                                                        echo "<div class=\"TimeVsChannelplaneimage_tab2\">";
686

    
687
                                                                        $first_folder_uplane_tab2 = scandir($root_directory_path_tab2."/".$directory_for_uplane_images_tab2);
688

    
689
                                                                        $image_in_first_folder_uplane_tab2 = scandir($root_directory_path_tab2."/".$directory_for_uplane_images_tab2."/".$first_folder_uplane_tab2[2]);
690

    
691
                                                                        echo "<img src = \"$root_directory_path_tab2/$directory_for_uplane_images_tab2/$first_folder_uplane_tab2[2]/$image_in_first_folder_uplane_tab2[2]\" />";
692

    
693
                                                                        echo "</div>";
694

    
695
                                                        ?>
696

    
697
                                                        </section>
698

    
699
                                                 
700

    
701
                                                        <section class="uplane_tab2">
702

    
703
                                                        <?php
704

    
705
                                                                        echo "<h1>Z0 Plane View</h1>";
706

    
707
                                                                        echo "<div class=\"uplaneimage_tab2\">";
708

    
709
                                                                        $first_folder_vplane_tab2 = scandir($root_directory_path_tab2."/".$directory_for_vplane_images_tab2);
710

    
711
                                                                        $image_in_first_folder_vplane_tab2 = scandir($root_directory_path_tab2."/".$directory_for_vplane_images_tab2."/".$first_folder_vplane_tab2[2]);
712

    
713
                                                                        echo "<img src = \"$root_directory_path_tab2/$directory_for_vplane_images_tab2/$first_folder_vplane_tab2[2]/$image_in_first_folder_vplane_tab2[2]\" />";
714

    
715
                                                                        echo "</div>";
716

    
717
                                                        ?>
718

    
719
                                                        </section>
720

    
721
                                                        
722

    
723
                                                        <section class="zplane_tab2">
724

    
725
                                                        <?php
726

    
727
                                                                        echo "<h1>Z1 Plane View</h1>";
728

    
729
                                                                        echo "<div class=\"zplaneimage_tab2\">";
730

    
731
                                                                        $first_folder_zplane_tab2 = scandir($root_directory_path_tab2."/".$directory_for_zplane_images_tab2);
732

    
733
                                                                        $image_in_first_folder_zplane_tab2 = scandir($root_directory_path_tab2."/".$directory_for_zplane_images_tab2."/".$first_folder_zplane_tab2[2]);
734

    
735
                                                                        echo "<img src = \"$root_directory_path_tab2/$directory_for_zplane_images_tab2/$first_folder_zplane_tab2[2]/$image_in_first_folder_zplane_tab2[2]\" />";
736

    
737
                                                                        echo "</div>";
738

    
739
                                                        ?>
740

    
741
                                                        </section>
742

    
743
                                        </section>
744

    
745
                                </div>
746

    
747
                        <!-- TAB 2 :: VIEW2 :: TIMEVSCHANNEL :: ENDS -->
748

    
749
                                
750

    
751
                        <!-- TAB 3 :: VIEW3 :: ADCVsTime :: BEGINS -->
752

    
753
                        <div id="view3">
754

    
755
                                        <nav class="folder_struct_tab3">
756

    
757
                                        <section class="title_tree_tab3">Filters</section>
758

    
759

    
760

    
761
                                                <div class="Run_text_tab3">
762

    
763
                                                                <a style="font-size:35px"> Run: </a>
764

    
765
                                                </div>
766

    
767

    
768

    
769
                                                <?php
770

    
771
                                                        
772

    
773
                                                        echo "<div class=\"dropdown_tab3\" width=\"30px\" height=\"50px\">";
774

    
775
                                                        echo "<select name='files_tab3' id= 'files_tab3' >";
776

    
777
                                                        
778

    
779
                                                        $files_tab3 = array_map("htmlspecialchars", scandir("$default_file_path_tab2"));
780

    
781
                                                        foreach ($files_tab3 as $file)
782

    
783
                                                        {
784

    
785
                                                                if($file != '.' && $file != '..')
786

    
787
                                                                {
788

    
789
                                                                        $run_no = str_split($file,3);
790

    
791
                                                                        echo "<option   value='$default_file_path_tab2$file' name='$default_file_path_tab2$file'>$run_no[1]</option>";
792

    
793
                                                                }
794

    
795
                                                        }
796

    
797
                                                        echo "</select>";
798

    
799
                                                        echo "</div>";
800

    
801
                                                ?>
802

    
803
                                                
804

    
805
                                                <div id="hide"  class="hidden">
806

    
807
                                                        <select  id="second_choice_tab3" onchange='favBrowser()'>
808

    
809
                                                                <?php
810

    
811
                                                                        
812

    
813
                                                                        $files_tab3 = array_map("htmlspecialchars", scandir("$default_file_path_tab2_run1"));
814

    
815
                                                                        foreach($files_tab3 as $file)
816

    
817
                                                                        {
818

    
819
                                                                                if($file != '.' && $file != '..')
820

    
821
                                                                                {
822

    
823
                                                                                        echo "<option value='$default_file_path_tab2_run1$file' name='$default_file_path_tab2_run1$file'>$file</option>";
824

    
825
                                                                                }
826

    
827
                                                                        }
828

    
829
                                                                        
830

    
831
                                                                ?>
832

    
833
                                                        </select>
834

    
835
                                                </div>
836

    
837
                                                
838

    
839
                                                <div class="Event_text_tab3">
840

    
841
                                                                <a style="font-size:35px"> Event: </a>
842

    
843
                                                </div>
844

    
845
                                                
846

    
847
                                                <div class="button_prev_tab3">
848

    
849
                                                        <input id="button_prev_tab3" width="10px" height="50px" type="button" value="<" onclick="previous_image_tab3()"/>
850

    
851
                                                </div>
852

    
853
                                                
854

    
855
                                                <div class='event_dropdown_tab3'>
856

    
857
                                                        <input  type='text' id='event_counter_tab3' name='event_counter_tab3' value='1' onkeydown="return press_tab3(event);">
858

    
859
                                                </div>
860

    
861
                                                
862

    
863
                                                <div class="button_next_tab3">
864

    
865
                                                        <input id="button_next_tab3" width="10px" height="50px" type="button" value=">" onclick="next_image_tab3()" />
866

    
867
                                                </div>
868

    
869
                                                
870

    
871
                                                <div class="button_search_tab3">
872

    
873
                                                        <input id="search_button_tab3" width="10px" height="50px" type="button" value="Search" onclick="search_button_tab3()"/>
874

    
875
                                                </div>
876

    
877
                                        </nav>
878

    
879
                                        
880

    
881
                                        <section class="main_cont_tab3">
882

    
883
                                                   <section class="defaultplane_tab3">
884

    
885
                                                        <?php
886

    
887
                                                                        echo "<h1>U Plane View</h1>";
888

    
889
                                                                        echo "<div class=\"defaultplaneimage_tab3\">";
890

    
891
                                                                        $first_image_tab3 = scandir($default_file_path_tab3_run1);
892

    
893
                                                                        echo "<img src = '$default_file_path_tab3_run1/$first_image_tab3[2]' />";
894

    
895
                                                                        echo "</div>";
896

    
897
                                                        ?>                                                   
898

    
899
                                                        
900

    
901
                                                   </section>
902

    
903
                                                   
904

    
905
                                                        <section class="TimeVsChannelplane_tab3">
906

    
907
                                                                <?php
908

    
909
                                                                        echo "<h1>V Plane View</h1>";
910

    
911
                                                                        echo "<div class=\"TimeVsChannelplaneimage_tab3\">";
912

    
913
                                                                        $first_folder_uplane_tab3 = scandir($root_directory_path_tab3."/".$directory_for_uplane_images_tab3);
914

    
915
                                                                        $image_in_first_folder_uplane_tab3 = scandir($root_directory_path_tab3."/".$directory_for_uplane_images_tab3."/".$first_folder_uplane_tab3[2]);
916

    
917
                                                                        echo "<img src = \"$root_directory_path_tab3/$directory_for_uplane_images_tab3/$first_folder_uplane_tab3[2]/$image_in_first_folder_uplane_tab3[2]\" />";
918

    
919
                                                                        echo "</div>";
920

    
921
                                                                ?>
922

    
923
                                                                
924

    
925
                                                        </section>
926

    
927
                                                 
928

    
929
                                                  <section class="uplane_tab3">
930

    
931
                                                        <?php
932

    
933
                                                                        echo "<h1>Z0 Plane View</h1>";
934

    
935
                                                                        echo "<div class=\"uplaneimage_tab3\">";
936

    
937
                                                                        $first_folder_vplane_tab3 = scandir($root_directory_path_tab3."/".$directory_for_vplane_images_tab3);
938

    
939
                                                                        $image_in_first_folder_vplane_tab3 = scandir($root_directory_path_tab3."/".$directory_for_vplane_images_tab3."/".$first_folder_vplane_tab3[2]);
940

    
941
                                                                        echo "<img src = \"$root_directory_path_tab3/$directory_for_vplane_images_tab3/$first_folder_vplane_tab3[2]/$image_in_first_folder_vplane_tab3[2]\" />";
942

    
943
                                                                        echo "</div>";
944

    
945
                                                        ?>
946

    
947
                                                        
948

    
949
                                                        </section>
950

    
951
                                                   
952

    
953
                                                        <section class="zplane_tab3">
954

    
955
                                                        <?php
956

    
957
                                                                        echo "<h1>Z1 Plane View</h1>";
958

    
959
                                                                        echo "<div class=\"zplaneimage_tab3\">";
960

    
961
                                                                        $first_folder_zplane_tab3 = scandir($root_directory_path_tab3."/".$directory_for_zplane_images_tab3);
962

    
963
                                                                        $image_in_first_folder_zplane_tab3 = scandir($root_directory_path_tab3."/".$directory_for_zplane_images_tab3."/".$first_folder_zplane_tab3[2]);
964

    
965
                                                                        echo "<img src = \"$root_directory_path_tab3/$directory_for_zplane_images_tab3/$first_folder_zplane_tab3[2]/$image_in_first_folder_zplane_tab3[2]\" />";
966

    
967
                                                                        echo "</div>";
968

    
969
                                                        ?>
970

    
971
                                                        
972

    
973
                                                   </section>
974

    
975
                                        </section>
976

    
977
                                </div>
978

    
979
                        <!-- TAB 3 :: VIEW3 :: ADCVsTime :: ENDS -->
980

    
981
                        
982

    
983
                        <!-- TAB 4 :: VIEW4 :: MONITORING PLOTS :: STARTS -->
984

    
985
                                <div id="view4">
986

    
987
                                
988

    
989
                                        <nav id="folder_struct_4" class="folder_struct_view_4">
990

    
991
                                                <section class="title_tree_view_4">Monitoring Plots</section>
992

    
993
                                                        <?php
994

    
995
                                                                echo php_file_tree("Histograms/", "javascript:returns([link]);");
996

    
997
                                                        ?>
998

    
999
                                        </nav>
1000

    
1001
                                        <section class="main_cont_tab4">
1002

    
1003
                                                <div class="pageWrap">
1004

    
1005
                                                        <?php 
1006

    
1007
                                                                        $files = scandir('Histograms/APA0/'); 
1008

    
1009
                                                                        foreach($files as $file)
1010

    
1011
                                                                        {
1012

    
1013
                                                                                $dir = 'Histograms/APA0/'.$file; 
1014

    
1015
                                                                                $file_next_level = scandir("$dir");
1016

    
1017
                                                                                if(!(is_dir("$dir/$file_next_level[2]")))
1018

    
1019
                                                                                {
1020

    
1021
                                                                                        if (is_dir($dir) && $file != '.' && $file != '..')
1022

    
1023
                                                                                        {
1024

    
1025
                                                                                                echo "<h2>".ucwords($dir)."</h2>";
1026

    
1027
                                                                                                $gallery = UberGallery::init()->createGallery($dir, $file); 
1028

    
1029
                                                                                        }
1030

    
1031
                                                                                }
1032

    
1033
                                                                        }
1034

    
1035
                                                        ?>
1036

    
1037
                                                        <?php  
1038

    
1039
                                                                        $files = scandir('Histograms/APA0/'); 
1040

    
1041
                                                                        foreach ($files as $file)
1042

    
1043
                                                                        {
1044

    
1045
                                                                                $dir = 'Histograms/APA0/'.$file; 
1046

    
1047
                                                                                $file_next_level = scandir("$dir");
1048

    
1049
                                                                                if(!(is_dir("$dir/$file_next_level[2]")))
1050

    
1051
                                                                                {
1052

    
1053
                                                                                        if (is_dir($dir) && $file != '.' && $file != '..')
1054

    
1055
                                                                                        {
1056

    
1057
                                                                                                echo '<script> showMessage("'.$file. '"); </script>'; 
1058

    
1059
                                                                                        }
1060

    
1061
                                                                                }
1062

    
1063
                                                                        } 
1064

    
1065
                                                          ?>
1066

    
1067
                                                        </div>
1068

    
1069
                                        </section>
1070

    
1071
                                </div>
1072

    
1073
                        <!-- TAB 4 :: VIEW4 :: MONITORING PLOTS :: STARTS -->
1074

    
1075
                        </div>
1076

    
1077
                </div>
1078

    
1079

    
1080

    
1081
                <script src="tabcontent.js" type="text/javascript"></script>
1082

    
1083
                <script src="js/vendor/modernizr-2.6.2.min.js"></script> 
1084

    
1085
                <script src="js/plugins.js"></script>
1086

    
1087
                <script src="js/main.js"></script>
1088

    
1089
                <script src="tabs/tab1.js"></script>
1090

    
1091
                <script src="tabs/tab2.js"></script>
1092

    
1093
                <script src="tabs/tab3.js"></script>
1094

    
1095
                <script type="text/javascript">
1096

1097

1098

1099
                $(document).ready(function()
1100

1101
                {
1102

1103
                        $(function () {
1104

1105
                        $('#event_dropdown_tab1').removeClass('hidden');
1106

1107
                        });
1108

1109
                        
1110

1111
                        $(function () {
1112

1113
                        $('#event_dropdown_tab2').removeClass('hidden');
1114

1115
                        });
1116

1117
                        
1118

1119
                        $(function () {
1120

1121
                        $('#event_dropdown_tab3').removeClass('hidden');
1122

1123
                        });
1124

1125
                        
1126

1127
                        //-------------TAB1 :: On load default parameters :: BEGINS-----------------//
1128

1129
                        default_file_path_tab1_run1 = "<?php echo $default_file_path_tab1_run1;?>"
1130

    
1131
                        $.ajax({
1132

    
1133
                    url: "listimages.php?folder="+default_file_path_tab1_run1
1134

    
1135
                                        }).done(function(data)
1136

    
1137
                                                {
1138

    
1139
                                                        //alert("Ajax called")
1140

    
1141
                                                        data = JSON.parse(data);
1142

    
1143
                                                        global_data_tab1 =data;
1144

    
1145
                                                        var html = '';
1146

    
1147
                                                        
1148

    
1149
                                                        for(i=0;i<data.length;++i)
1150

    
1151
                                                        {
1152

    
1153
                                                                var image_name = data[i].split("/");
1154

    
1155
                                                                html += '<option id="'+data[i]+'" value="'+data[i]+'" name="'+data[i]+'">'+image_name[4]+'</option>';
1156

    
1157
                                                        }
1158

    
1159
                                                        
1160

    
1161
                                                        $('#second_choice_tab1').html(html);
1162

    
1163
                                                });
1164

    
1165
                                
1166

    
1167
                        files_tab1=document.getElementById("second_choice_tab1").value;
1168

    
1169
                        image_pos_tab1=0;
1170

    
1171
                        //-------------TAB1 :: On load default parameters :: ENDS-----------------//
1172

    
1173
                        
1174

    
1175
                        //-------------TAB2 :: On load default parameters :: BEGINS-----------------//
1176

    
1177
                        default_file_path_tab2_run1 = "<?php echo $default_file_path_tab2_run1;?>"
1178

    
1179
                        $.ajax({
1180

    
1181
                    url: "listimages.php?folder="+default_file_path_tab2_run1
1182

    
1183
                                        }).done(function(data)
1184

    
1185
                                                {
1186

    
1187
                                                        data = JSON.parse(data);
1188

    
1189
                                                        global_data_tab2 =data;
1190

    
1191
                                                        var html = '';
1192

    
1193
                                                        
1194

    
1195
                                                        for(i=0;i<data.length;++i)
1196

    
1197
                                                        {
1198

    
1199
                                                                var image_name = data[i].split("/");
1200

    
1201
                                                                html += '<option id="'+data[i]+'" value="'+data[i]+'" name="'+data[i]+'">'+image_name[4]+'</option>';
1202

    
1203
                                                        }
1204

    
1205
                                                        
1206

    
1207
                                                        $('#second_choice_tab2').html(html);
1208

    
1209
                                                });
1210

    
1211
                                
1212

    
1213
                        files_tab2=document.getElementById("second_choice_tab2").value;
1214

    
1215
                        image_pos_tab2=0;
1216

    
1217
                        //-------------TAB2 :: On load default parameters :: ENDS-----------------//
1218

    
1219
                        
1220

    
1221
                        //-------------TAB3 :: On load default parameters :: BEGINS-----------------//
1222

    
1223
                        default_file_path_tab3_run1 = "<?php echo $default_file_path_tab3_run1;?>"
1224

    
1225
                        $.ajax({
1226

    
1227
                    url: "listimages.php?folder="+default_file_path_tab3_run1
1228

    
1229
                                        }).done(function(data)
1230

    
1231
                                                {
1232

    
1233
                                                        //alert("Ajax called")
1234

    
1235
                                                        data = JSON.parse(data);
1236

    
1237
                                                        global_data_tab3 = data;
1238

    
1239
                                                        var html = '';
1240

    
1241
                                                        
1242

    
1243
                                                        for(i=0;i<data.length;++i)
1244

    
1245
                                                        {
1246

    
1247
                                                                var image_name = data[i].split("/");
1248

    
1249
                                                                html += '<option id="'+data[i]+'" value="'+data[i]+'" name="'+data[i]+'">'+image_name[4]+'</option>';
1250

    
1251
                                                        }
1252

    
1253
                                                        
1254

    
1255
                                                        $('#second_choice_tab3').html(html);
1256

    
1257
                                                });
1258

    
1259
                                
1260

    
1261
                        files_tab3=document.getElementById("second_choice_tab3").value;
1262

    
1263
                        image_pos_tab3=0;
1264

    
1265
                        //-------------TAB3 :: On load default parameters :: ENDS-----------------//
1266

    
1267
                        
1268

    
1269
                        
1270

    
1271
                });
1272

    
1273
                
1274

    
1275
                function press_tab1( e ) 
1276

    
1277
                {
1278

    
1279
                        var evt = e || window.event
1280

    
1281
                        if (evt.keyCode === 13)
1282

    
1283
                        {
1284

    
1285
                                $("#search_button_tab1").click();
1286

    
1287
                        }
1288

    
1289
                }
1290

    
1291
                        
1292

    
1293
                function press_tab2( e ) 
1294

    
1295
                {
1296

    
1297
                        var evt = e || window.event
1298

    
1299
                        if (evt.keyCode === 13)
1300

    
1301
                        {
1302

    
1303
                                $("#search_button_tab2").click();
1304

    
1305
                        }
1306

    
1307
                }
1308

    
1309
                
1310

    
1311
                function press_tab3( e ) 
1312

    
1313
                {
1314

    
1315
                        var evt = e || window.event
1316

    
1317
                        if (evt.keyCode === 13)
1318

    
1319
                        {
1320

    
1321
                                $("#search_button_tab3").click();
1322

    
1323
                        }
1324

    
1325
                }
1326

    
1327
                  
1328

    
1329
                var returns = function(id) 
1330

    
1331
                {
1332

    
1333
                        var folder_path = id.split("/");
1334

    
1335
                        var shredded_path;
1336

    
1337
                        for(i=0;i<=folder_path.length-2;i++)
1338

    
1339
                        {
1340

    
1341
                                if(i==0)
1342

    
1343
                                {
1344

    
1345
                                        shredded_path = folder_path[i];
1346

    
1347
                                }
1348

    
1349
                                else
1350

    
1351
                                {
1352

    
1353
                                        shredded_path = shredded_path+folder_path[i];
1354

    
1355
                                }
1356

    
1357
                                
1358

    
1359
                                if(i< folder_path.length-1)
1360

    
1361
                                {
1362

    
1363
                                        shredded_path = shredded_path + "/";
1364

    
1365
                                }
1366

    
1367
                                else
1368

    
1369
                                {
1370

    
1371
                                        // Do Nothing
1372

    
1373
                                }
1374

    
1375
                        }
1376

    
1377
                        
1378

    
1379
                        $.ajax({
1380

    
1381
                                        url: "gallery.php?folder="+shredded_path
1382

    
1383
                                        }).done(function(data)
1384

    
1385
                                                {
1386

    
1387
                                                        $('.pageWrap').html(data);//pageWrap
1388

    
1389
                                                });
1390

    
1391
                }
1392

    
1393
                </script>                   
1394

    
1395
    </body>
1396

    
1397
</html>
1398