forked from schatzlab/genomescope
-
Notifications
You must be signed in to change notification settings - Fork 18
/
header.html
executable file
·138 lines (114 loc) · 6.13 KB
/
header.html
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
<head>
<title>GenomeScope</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>GenomeScope</title>
<!--Dropzone-->
<link href="css/dropzone.css" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/theme.css" rel="stylesheet">
<!-- <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css"> -->
<!-- custom styles-->
<link href="css/custom_styles.css" rel="stylesheet">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73314063-1', 'auto');
ga('send', 'pageview');
</script>
<!-- <link rel="shortcut icon" type="image/png" href="images/cat_icon2_black.png"/> -->
<!-- <link rel="icon" type="image/png" href="images/cat_icon2_black.png"/> -->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body role="document">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<!-- <img class="kitty_icon" src="images/cat_icon2_white.png"/> -->
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="."> GenomeScope</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="./">Home</a></li>
<!--<li><a href="./help.php">Help</a></li>-->
<li><a href="./info.php">Info</a></li>
<li class="dropdown">
<a href="" class="dropdown-toggle" data-toggle="dropdown">Examples <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="analysis.php?code=example1">Seabass</a></li>
<li><a href="analysis.php?code=example2">Oyster</a></li>
<li><a href="analysis.php?code=example3">Pear</a></li>
<li><a href="analysis.php?code=example4">Bird</a></li>
<li><a href="analysis.php?code=example5">Drosophila</a></li>
<li><a href="analysis.php?code=example6">Arabidopsis F1</a></li>
<li><a href="analysis.php?code=example7">Coastal Redwood</a></li>
<li><a href="analysis.php?code=example8">Cotton</a></li>
<li><a href="analysis.php?code=example9">Root-knot Nematode</a></li>
<li><a href="analysis.php?code=example10">Potato</a></li>
<li><a href="analysis.php?code=example11">Wheat</a></li>
<!--<li class="divider"></li>-->
<!--<li class="dropdown-header">Nav header</li>-->
<!--<li><a href="#">Separated link</a></li>-->
<!--<li><a href="#">One more separated link</a></li>-->
</ul>
</li>
<?php
$my_datasets = array();
if(isset($_COOKIE["results"])) {
echo '<li class="dropdown">
<a href="" class="dropdown-toggle" data-toggle="dropdown">My results <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">';
$my_datasets = json_decode($_COOKIE["results"], true);
$arrlength = count($my_datasets);
$start_at = 0;
if ($arrlength > 20) {
$start_at = $arrlength - 20;
}
for($x = $start_at; $x < $arrlength; $x++) {
$seconds_ago = time() - $my_datasets[$x]["date"];
$time_ago = $seconds_ago;
if ($seconds_ago > 60) {
$minutes_ago = $seconds_ago/60;
if ($minutes_ago > 60) {
$hours_ago = $minutes_ago/60;
if ($hours_ago > 24) {
$days_ago = $hours_ago/24;
$time_ago = "" . floor($days_ago) . " days";
} else {
$time_ago = "" . floor($hours_ago) . " hours";
}
} else {
$time_ago = "" . floor($minutes_ago) . " minutes";
}
} else {
$time_ago = "" . floor($seconds_ago) . " seconds";
}
echo "<li><a href='analysis.php?code=" . $my_datasets[$x]["codename"] . "'>" . $my_datasets[$x]["description"] . " (" . $time_ago . " ago) </a></li>";
}
echo '</ul>';
}
?>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>