forked from scratch/seasonwatch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
header_body.php
285 lines (250 loc) · 8.11 KB
/
header_body.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
<?php
?>
<div class="container top" style="background-image:url('images/pagetopstrip.png'); background-repeat:no-repeat; background-position:top left; margin-left:10px; width:990px; padding-top:30px; background-color:#fff; margin-left:auto; margin-right:auto;">
<div class="left" style="background-image:url('images/lefttorightfullpage.png'); background-repeat:repeat-y; padding-left:15px;">
<div class="container logo-box" style=" margin-left:auto; margin-right:auto; height:110px; margin-top:0px; padding-bottom:10px;">
<div style="float:left;clear:none;">
<a href='index.php'><img style="margin-left:20" src="images/swlogo.jpg" alt="SeasonWatch" title="SeasonWatch"></a>
</div>
<div style="float:right;margin-top:26px;padding-left:relative;">
<div style="float:right;">
<form action="login.php" method="post" name="logForm" id="logForm" >
<table>
<tr>
<td width="45%"></td>
<td>
<table style="margin-bottom: 0.7em">
<?php
if( $_SESSION['user_id'] ) { ?>
<tr>
<td style='text-align:right;'>
<?php echo $_SESSION['user_name']; ?> (
<a href='logout.php?cmd=logout'>Log Out</a> ) </td>
</tr>
<? } else {
?>
<tr>
<td class="small-link" style="margin:0;padding:0;font-size:10px;">
<table style="margin:0;padding:0;width:390px;">
<tr>
<td style="text-align:right;width:150px"><a title="register" href="register.php">signup!</a></td>
<td style="padding-left:35px">
<a title="forgot password ?" href="forgot.php">forgot?</a>
</td>
<td style="text-align:right;padding-right:33px">
<a title="remember me" class="rememberme" href="#">remember me</a>
<a style="display:none" class="rememberme" href="#">remembered</a>
<input type="hidden" value="0" id="remember" name="remember">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:0;margin:0;">
<input class="default-value login-box" type="text" name="usr_email" value="email id" />
<input id="password-clear" class="login-box" type="text" value="password" autocomplete="off"/>
<input class="login-box" id="password-password" type="password" name="pwd" value="" autocomplete="off" />
<input type="hidden" name="cmd" value="login" />
<input name="doLogin" style="width:30px;border:solid 1px #666" type="submit" value="go" id="doLogin3" onclick="javascript:return validate();">
</td>
</tr>
<?php } ?>
</table>
</td>
</tr>
</table>
</form>
<?php
if( $_SESSION['user_id'] ) { ?>
<table style="margin-bottom: 0.4em">
<tr>
<td width="45%"></td>
<td>
<table class="main-links" style="margin-bottom: 0.4em">
<tr>
<td style=""><a href="contrib.php">my home</a></td>
<td style=''>|</td>
<td style=""><a href="addtree_options.php">add tree</a></td>
<td style=''>|</td>
<td style=""><a href="listtree.php">edit tree</a></td>
<td style=''>|</td>
<td style=""><a href="listtree_for_observation.php">add observation</a></td>
<td style=''>|</td>
<td style=""><a href="listobservations.php">edit observation</a></td>
<td style=''>|</td>
<td style=""><a href="mysettings.php">my profile</a></td>
</tr>
</table>
</td>
</tr>
</table>
<?php } ?>
</div>
</div>
</div> <!-- END OF LOGO BOX -->
<div class="container main_banner" style="width:950px; height:160px; margin-top:-20px; background-color:#fff; background-image:url('images/sw_banner.jpg'); background-repeat:no-repeat;">
</div>
<div class="container menu_links" style="color:#d95c15;width:950px; height:40px; padding-top:4px; background-image: url('images/shim.gif'); background-repeat:repeat-x; font-size:17px;"> <!-- background-image: url('images/shim.gif'); background-repeat:repeat-x; -->
<ul id="jsddm">
<!--<li><a href="http://localhost/seasonwatch/register.php">join</a>
</li><li>|</li>-->
<li ><a href="../wordpress/?p=1">why join</a></li>
<!--
<ul>
<li><a href="#">watch migrants</a></li>
<li><a href="#">identify migrants</a></li>
<li><a href="#">submit data</a></li>
</ul>-->
<!--<?php
if( $_SESSION['user_id'] )
{
$sql = mysql_query("SELECT user_tree_id FROM user_tree_table WHERE user_id='$_SESSION[user_id]'");
while($row = mysql_fetch_array($sql))
{
$var = $row['user_tree_id'];
}
}
?>-->
<!--<li><a href="#" onmouseover= "gettree_nickname('$var');">My Species</a>
<ul id="tree_nicknamediv">
<li>
<a href="#">
<div id="tree_nicknamediv">
</div>
</a>
</li>
</li>
<!--<li><a href="participants.php">individuals</a></li>
<li><a href="#">groups</a></li>
<li><a href="#">map</a></li>
</ul><li>|</li>
</li>-->
<li><a href="../wordpress/?p=15">tree reports</a></li>
<!--<ul>
<li><a href="#">migrants we watch</a></li>
<li><a href="#">highlighted species</a></li>
<li><a href="#">all species</a></li>
</ul>-->
<li><a href="../wordpress/?p=38">participants</a> </li>
<!--<ul>
<li><a href="participants.php">individuals</a></li>
<li><a href="#">groups</a></li>
<li><a href="#">map</a></li>
</ul>-->
<li><a href="../wordpress/?p=49">about seasonwatch</a></li>
<!--<ul>
<li><a href="#">view data/maps</a></li>
<li><a href="#">latest summaries</a></li>
<li><a href="#">terms of use</a></li>
</ul>-->
<li><a href="../wordpress/?p=54">resources</a></li>
<!--<ul>
<li><a href="#">getting started with indian birds</a></li>
<li><a href="#">bird migration and climate change</a></li>
<li><a href="#">citizen science projects</a></li>
<li><a href="#">publications</a></li>
</ul>-->
<li><a href="../wordpress/?p=56">news</a></li>
<!--<ul>
<li><a href="#">media</a></li>
</ul>-->
</ul>
<!--
<div style="float:right">
<form id="search_form" action="search/index.php" method="get">
<input type="text" name="query" id="query" style="border:solid 1px #666;" value="search" autocomplete="off" delay="1500">
<input type="hidden" name="search" value="1">
<input type="submit" class="submit" value="go">
</form>
</div>
-->
</div>
<!-- This script must be in body-Pavanesh-->
<script>
var timeout = 500;
var closetimer = 0;
var ddmenuitem = 0;
function jsddm_open()
{ jsddm_canceltimer();
jsddm_close();
ddmenuitem = $(this).find('ul').css('visibility', 'visible');}
function jsddm_close()
{ if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}
function jsddm_timer()
{ closetimer = window.setTimeout(jsddm_close, timeout);}
function jsddm_canceltimer()
{ if(closetimer)
{ window.clearTimeout(closetimer);
closetimer = null;}}
$(document).ready(function()
{ $('#jsddm > li').bind('mouseover', jsddm_open)
$('#jsddm > li').bind('mouseout', jsddm_timer)});
document.onclick = jsddm_close;
</script>
<script type="text/javascript">
$('.default-value').each(function() {
var default_value = this.value;
$(this).css('color', '#666'); // this could be in the style sheet instead
$(this).focus(function() {
if(this.value == default_value) {
this.value = '';
$(this).css('color', '#333');
}
});
$(this).blur(function() {
if(this.value == '') {
$(this).css('color', '#666');
this.value = default_value;
}
});
});
$('#password-clear').show();
$('#password-password').hide();
$('#password-clear').focus(function() {
$('#password-clear').hide();
$('#password-password').show();
$('#password-password').focus();
});
$('#password-password').blur(function() {
if($('#password-password').val() == '') {
$('#password-clear').show();
$('#password-password').hide();
}
});
var toggle = false;
$(".rememberme").click(function () {
if( toggle == false) {
$('#remember').val('1');
toggle = true;
} else {
$('#remember').val('0'); toggle = false;
}
$(".rememberme").toggle();
});
</script>
<!-- <script>
$(document).ready(function(){
$('#query').autocomplete("autocomplete.php", {
// width: 388,
selectFirst: false,
matchSubset :true,
matchContains: false,
formatItem: formatItem
});
$("#query").result(function(event, data, formatted) {
document.location.href= "../guide.php?id="+ data[1];
});
});
function formatItem(row) {
var completeRow;
completeRow = new String(row);
var scinamepos = completeRow.lastIndexOf("(");
var rest = completeRow.substr(0,scinamepos)
var sciname = completeRow.substr(scinamepos);
var commapos = sciname.lastIndexOf(",");
sciname = sciname.substr(0,commapos);
var newrow = rest + '<br><i>' + sciname + '</i>';
return newrow;
}
</script> -->