-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.inc.php
154 lines (142 loc) · 4.44 KB
/
header.inc.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Digg Header by CSS-Tricks</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#zone-bar li em").click(function() {
var hidden = $(this).parents("li").children("ul").is(":hidden");
$("#zone-bar>ul>li>ul").hide()
$("#zone-bar>ul>li>a").removeClass();
if (hidden) {
$(this)
.parents("li").children("ul").toggle()
.parents("li").children("a").addClass("zoneCur");
}
});
});
</script>
<script type="text/javascript" src="js/md5.js"></script>
<script type="text/javascript">
function login() {
var loginForm = document.getElementById("loginForm");
if (loginForm.username.value == "") {
alert("Please enter your user name.");
return false;
}
if (loginForm.password.value == "") {
alert("Please enter your password.");
return false;
}
var submitForm = document.getElementById("submitForm");
submitForm.username.value = loginForm.username.value;
submitForm.response.value =
hex_md5(loginForm.challenge.value+hex_md5(loginForm.password.value));
//alert(submitForm.response.value);
submitForm.submit();
}
</script>
</head>
<body>
<div id="page-wrap">
<div id="top-bar">
<img src="images/logo.png" alt="DZone" class="floatleft" />
<div id="right-side">
<?php
if($userid!=0)
{
$ergebnis = mysql_query("SELECT ffvw_user.id as iu, ffvw_user.name as nu FROM ffvw_user WHERE ffvw_user.id = ".$userid.";");
while($row = mysql_fetch_object($ergebnis))
{
echo '<img src="images/usericon.jpg" alt="user icon" /> ';
echo '<a href="user.php?id='.$row->iu.'" class="first">'.$row->nu.'</a> ';
echo '<a href="login.php">Logout</a>  ';
}
}
else
{
echo '<a href="login.php" class="first">Login</a>  ';
}
?>
<form id="main-search">
<label for="search-field" id="search-field-label">Search</label>
<input type="text" tabindex="1" maxlength="255" id="search-field"/>
<input type="image" alt="Search" value="Search" src="images/search.png" id="search-button"/>
</form>
</div>
</div>
<div id="zone-bar">
<ul>
<?php
if($userid!=0)
{
?>
<li>
<a href="#"><span>
Actions
<em class="opener-technology">
<img src="images/zonebar-downarrow.png" alt="dropdown" />
</em>
</span></a>
<ul class="technologysublist">
<?php
$sql = "SELECT ffvw_acclogin.name AS na, ffvw_acclogin.id AS ia,
ffvw_group.name as ng,
ffvw_user.name as nu
FROM ffvw_acclogin
LEFT JOIN ffvw_isacc ON ffvw_acclogin.id = ffvw_isacc.accid
RIGHT JOIN ffvw_group ON ffvw_group.id = ffvw_isacc.groupid
RIGHT JOIN ffvw_isgroup ON ffvw_group.id = ffvw_isgroup.groupid
RIGHT JOIN ffvw_user ON ffvw_user.id = ffvw_isgroup.userid WHERE ffvw_user.id = ".$userid.";";
//echo $sql;
$ergebnis = mysql_query($sql);
$ergebnis_num = mysql_num_rows($ergebnis);
if($ergebnis_num>0)
{
while($row = mysql_fetch_object($ergebnis))
{
echo '<li><a href="update.php?id='.$row->ia.'">Status Update "'.$row->na.'"</a></li>';
}
echo '<li><a href="update.php?id=0">Status Update ALL</a></li>';
}
else
{
echo '<li><a href="#">No Account</a></li>';
}
?>
</ul>
</li>
<li>
<a href="#"><span>
Options
<em class="opener-world">
<img src="images/zonebar-downarrow.png" alt="dropdown" />
</em>
</span></a>
<ul class="worldsublist">
<li><a href="user.php">Users</a></li>
<li><a href="group.php">Groups</a></li>
<li><a href="account.php">Accounts</a></li>
</ul>
</li>
<?php
}
else
{
?>
<li>
<a href="login.php"><span>
Login
<em class="opener-world">
<img src="images/zonebar-downarrow.png" alt="dropdown" />
</em>
</span></a>
</li>
<?php
}
?>
</ul>
</div>