zallery/WebContent/header.jsp

185 lines
7.8 KiB
Text

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page import="zall.bean.*" %>
<%@ page import="zall.*, zall.util.msg.UserMessage, zall.util.msg.UserMessage.*" %>
<%
String page_url = (String)request.getAttribute("page");
if( page_url == null ) page_url = "";
User user = (User)session.getAttribute("user");
UserMessage message = UserMessage.getUserMessage(session);
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<title><%=Zallery.getWebsiteName() %></title>
<!-- GLOBAL -->
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/zallery.css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript" src="js/gallery.js"></script>
<script type="text/javascript" src="js/colortip-1.0-jquery.js"></script>
<link rel="stylesheet" type="text/css" href="js/colortip-1.0-jquery.css">
<% if( page_url.startsWith("media") ){ %>
<!-- IMAGE -->
<script type="text/javascript" src="js/fancyzoom/js-global/FancyZoom.js"></script>
<script type="text/javascript" src="js/fancyzoom/js-global/FancyZoomHTML.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
<% } %>
<% if( page_url.startsWith("slideshow") ){ %>
<!-- SLIDESHOW -->
<script type="text/javascript" src="js/galleria/galleria-1.2.2.min.js"></script>
<% } %>
<% if( page_url.startsWith("upload") ){ %>
<!-- UPLOAD -->
<script type="text/javascript" src="uploadserv?js"></script>
<% } %>
<script type="text/javascript">
jQuery(document).ready(function(){
/* Adding a colortip to any tag with a title attribute: */
jQuery("a").colorTip({
color: 'black',
timeout: 0
});
});
jQuery.validator.addMethod( "firstLastName", function(value, element) {
var check = false;
var re = new RegExp("^[^0-9_]+ [^0-9_]+$");
return re.test(value);
}, "Please enter your first and last name" );
</script>
<!-- Facebook -->
<script type="text/javascript">
// Google Analythics
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-310804-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Google translate -->
<meta name="google-translate-customization" content="2ed4e94374eecdd6-9478f2e9269794a2-ge4734ab0ad9c470f-6"></meta>
</head>
<% if( page_url.startsWith("upload") || page_url.startsWith("users") || page_url.startsWith("profile") || page_url.startsWith("login") || page_url.startsWith("register") ){ %>
<body class="page">
<% }else if( page_url.startsWith("gallery") || page_url.startsWith("Zallery") ){ %>
<body class="wordpress home blog not-singular">
<% }else if( page_url.startsWith("media") ){ %>
<body class="single" onload="setupZoom()">
<% }else{ %>
<body class="single">
<% } %>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '110543555676926',
status : true,
cookie : true,
xfbml : true,
oauth : true,
});
};
(function(d) {
var js, id = 'facebook-jssdk';
if (d.getElementById(id)) {
return;
}
js = d.createElement('script');
js.id = id;
js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<div id="wrapper" class="hfeed">
<div id="header">
<div id="branding">
<div id="blog-title">
<span>
<a href="gallery" title="<%=Zallery.getWebsiteName() %>" rel="home">
<img src="img/logo.png" alt="<%=Zallery.getWebsiteName() %>" />
</a>
</span>
</div>
</div><!-- #branding -->
<div id="access">
<div id="page-menu" class="menu">
<ul id="page-nav" class="sf-menu">
<li class="menu-item menu-item-type-post_type"><a href="status.jsp">Status</a></li>
</ul>
</div>
<div id="category-menu" class="menu">
<ul id="category-nav" class="sf-menu">
<li class="home"><a href="gallery">Home</a></li>
<li class="cat-item"><a href="gallery" title="Main gallery">Gallery</a></li>
<li class="cat-item"><a href="upload" title="Upload files to your album">Upload</a></li>
<li class="cat-item"><a href="users" title="List of all users">Users</a></li>
<li class="cat-item"><a href="profile" title="Your profile page">Profile</a></li>
<% if( user != null ){ %>
<li class="cat-item"><a href="page_geni.jsp" title="Family tree">Geni</a></li>
<li class="cat-item"><a href="page_chat.jsp" title="Video chat with other users">Chat</a></li>
<li class="blog-description"><A id="FB_logout" href="logout" onClick="FB.logout(); return true;">Logout <%=user.getName() %></A></li>
<% } %>
</ul>
</div>
</div><!-- #access -->
<!-- User Messages -->
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(".message").click(function(){
jQuery(this).animate({
opacity: 0
}, 300).animate({
height: 0,
border: 0
}, 300, function(){
jQuery(this).css("display","none");
});
});
/*setTimeout(function(){
jQuery(".message").animate({
opacity: 0
}, 300).animate({
height: 0,
border: 0
}, 300, function(){
jQuery(this).css("display","none");
});
}, 10000);*/
});
</script>
<div class="menu">
<% while( message.next() ){
if( message.getType() == MessageType.WARNING ){%>
<div class="message" style="border: 2px solid #E6E600; padding: 0px; margin: 5px; background: #FFFF99 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
<center><b><%=message.getMessage() %></b></center>
</div>
<%} else if( message.getType() == MessageType.ERROR ){ %>
<div class="message" style="border: 2px solid #FF0000; padding: 0px; margin: 5px; background: #FFDDCC none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
<center><b><%=message.getMessage() %></b></center>
</div>
<%} else if( message.getType() == MessageType.INFO ){ %>
<div class="message" style="border: 2px solid #039C00; padding: 0px; margin: 5px; background: #9BFB66 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
<center><b><%=message.getMessage() %></b></center>
</div>
<% }
}%>
</div>
</div><!-- #header-->