Location: PHPKode > projects > Havalite > havalite/hava_head.php
<?php
//header("Cache-Control: no-cache");
require('hava_func.php');

// for limiting result according to this page 
if(isset($_GET['fpage'])) $fpage = $_GET['fpage'];
else $fpage = 0;

/************** Note data *********************/
$noteRes = hava_single_query("SELECT * FROM notes WHERE user= ?", $userName); 
if($noteRes){
	$noteText = $noteRes['note'];
	$noteW = $noteRes['w'];
	$noteH = $noteRes['h'];
}
else{
	$noteText = 'Here comes your note';
	$noteW = 300;
	$noteH = 130;
}
/*************************************************/

?><!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><?php echo hava_options('title'); ?> - <?php echo $hava_lang['administration']; ?></title>
<link rel="SHORTCUT ICON" href="sys/favicon.ico" type="image/x-icon">

<link rel="stylesheet" type="text/css" href="sys/sys.css" />
<link rel="stylesheet" type="text/css" href="sys/jquery/development-bundle/css/smoothness/jquery-ui-1.8.16.custom.css" />	
<link rel="stylesheet" type="text/css" href="sys/jquery/tablesorter/css/gray/style.css" media="print, projection, screen" />
<link rel="stylesheet" type="text/css" href="sys/jquery/fancybox/fancybox/jquery.fancybox-1.3.4.css" />
<link rel="stylesheet" media="screen" href="sys/jquery/fileupload/jquery.fileupload-ui.css">
<link rel="stylesheet" type="text/css" href="sys/jquery/ddsmoothmenu/ddsmoothmenu.css" />
<link rel="stylesheet" type="text/css" href="sys/jquery/autocomplete/jquery.autocomplete.css" />

<script type="text/javascript" src="sys/jquery/js/jquery-1.7.2.min.js">/* jQuery */</script>
<script type="text/javascript" src="sys/jquery/js/jquery-ui-1.8.16.custom.min.js">/* UI */</script>
<script type="text/javascript" src="sys/jquery/datetime/jquery-ui-timepicker-addon.js">/* Time picker */</script>
<script type="text/javascript" src="sys/jquery/nestedSortable/jquery.ui.nestedSortable.js"></script>
<script type="text/javascript" src="sys/jquery/tablesorter/jquery.tablesorter.min.js"></script>

<script type="text/javascript" src="sys/jquery/zebra_dialog/public/javascript/zebra_dialog.js"></script>
<script type="text/javascript" src="sys/jquery/zebra_dialog/public/javascript/functions.js">/* Zebra_Dialog */</script>
<link rel="stylesheet" type="text/css" href="sys/jquery/zebra_dialog/public/css/zebra_dialog.css">

<script type="text/javascript" src="sys/jquery/autocomplete/jquery.autocomplete.min.js"></script>

<script type="text/javascript" src="sys/editor/ckeditor.js"></script>
<script type="text/javascript" src="sys/jquery/fancybox/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="sys/jquery/fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="sys/jquery/ddsmoothmenu/ddsmoothmenu.js">/* upper menu */</script>
<script type="text/javascript" src="sys/jquery/stickyNote/jquery.stickyNote.js"></script>
<script type="text/javascript" src="sys/jquery/placeholder/formfiller-1.0.0.js"> /* input placeholder */ </script>

<script type="text/javascript" src="http://havalite.com/version/v.txt">/* Check Version */</script>
<script type="text/javascript">
// latest Version compare-----------------
$(document).ready(function () {
	var myVersion = '<?php echo $version; ?>';
	var upgradeMsg = '<br><?=$hava_lang['currentVersion']; ?>: '+ myVersion + '<br>';
	if(havaliteUpgrade != '' && havaliteUpgrade != myVersion){
		upgradeMsg += '<span id="red" style=" text-transform:uppercase;"><?=$hava_lang['newUpgrade']; ?></span> <span id="allPostsNav"><a href="http://havalite.com/?p=15"><?=$hava_lang['download']; ?>: Havalite ' + havaliteUpgrade + '</a> or <a href="#" onclick=" openSafeFolder(\'updater.php\')">Do Live Update</a></span>';
	}
	$('#upgradeMsg').html(upgradeMsg);

});

// jQuery UI ----------------------------
$(function(){
	// Accordion
	$("#accordion").accordion({ header: "h3", autoHeight: false });
	// Tabs
	$('#tabs').tabs();
	// Dialog			
	$('#dialog').dialog({
		autoOpen: false,
		width: 600,
		buttons: {
			"<?=$hava_lang['save']; ?>": function() { document.forms["commEditor"].submit();  }, 
			"<?=$hava_lang['cancel']; ?>": function() { $(this).dialog("close"); } 
		}
	});
	// Accordion
	$("#accordion").accordion({ header: "h3" });
});

// for comments -----------------------------
function openDialogBox(id, content, commPostId){
	$('#dialog').dialog('open');
	$('#commId').val(id);
	content = content.replace(/<br \/>/g, "\r\n");
	$('#commEdit').val(content);
	$('#commPostId').val(commPostId);
	return false;
}

function openSafeFolder(fileName){
if(!fileName) fileName = 'index.php';
$('<div align="center" style="width: 400px; height: 300px"><iframe src="data/' + fileName + '" width="100%" frameborder="0" height="100%"></iframe></div>').dialog({
        width: 600,
        height: 500,
        title: 'Safe Folder'
    })
      .css({padding:0, overflow:'hidden'});
}

// TableSorter ------------------------------------
$(document).ready(function(){
	// fancybox ------------------
	$("a[rel=img_group]").fancybox({		
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	// tablesorter ---------------
	$("#tablesorter").tablesorter({widthFixed: true, widgets: ['zebra']} );
	$("#postTitle, #postCat").formFiller({'attr':'placeholder', 'color':'#ccc'});
	
});

// Dropdown Menu -----------------------------
ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

// CKEditor config -------------------------------------------

function post_notify(note){
	$( "#postTitle" ).animate({
					backgroundColor: "green",
					color: "#fff"
				}, 500 );
	setTimeout(function(){
    $( "#postTitle" ).animate({
					backgroundColor: "#fff",
					color: "#000"
				}, 3000 );
	},4000);
}

// zebra dialog Test -------------
function zebraDialog(textDialog, title, typ, modal, buttons, autoClose){
	$.Zebra_Dialog(textDialog, {
		'title':    title,
		'type':     typ,
		'modal': 	modal,
		'buttons':  buttons,
		'auto_close': autoClose
	});
}
// zebra Confirm Test -------------
function zebraConfirm(textDialog, title, action, typ, modal){
	$.Zebra_Dialog(textDialog, {
		'title':    title,
		'type':     typ,
		'modal': 	modal,
		'buttons':  ['Yes', 'No'],
		'onClose':  function(caption) {
			if(caption == 'Yes')  window.location.href = action;
		}
	});
}
</script>

</head>
<style>
.ui-dialog-buttonset, .ui-dialog-buttonpane,  ui-helper-clearfix, .ui-dialog-title-dialog1 {background-color:#F0F0F6; }

#myBox{
	width:<?=$noteW; ?>px; height:<?=$noteH; ?>px; background-color:#FFF6B7; position:absolute; z-index:100; left:8px; margin-top:0px; font-size:12px; font-family:"Courier New", Courier, monospace; display:none; overflow:hidden; padding:7px;
	-webkit-box-shadow: 12px 12px 9px -7px #999999;	-moz-box-shadow: 12px 12px 9px -7px #999999; box-shadow: 12px 12px 9px -7px #999999;   -webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;
}
/* css for timepicker */
.ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
.ui-timepicker-div dl{ text-align: left; }
.ui-timepicker-div dl dt{ height: 25px; }
.ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }
input.holder { color: #ccc; }
<?php echo hava_options('add_styles'); ?>
</style>

<body>

<div id="blog_title"><? if(isset($commWait)) echo $commWait; ?> <a href="../index.php"><?php echo hava_options('title'); ?></a></div>

<div id="smoothmenu1" class="ddsmoothmenu">
<ul>
<li><a href="index.php"><img src="sys/jquery/ddsmoothmenu/home.png" border="0" /> <?php echo $hava_lang['dashboard']; ?></a></li>

<?php 
if($userLvl < 5){ // Menu Post and Media only for Level 0 - 4 ***********************************
?>
<li><a href="hava_all_posts.php"><img src="sys/jquery/ddsmoothmenu/posts.png" border="0" /> <?php echo $hava_lang['posts']; ?></a>
  <ul>
<?php 
if($userLvl < 3){ // Pages only for Level 0 - 2 ------------------
?>
  <li><a href="hava_all_posts.php?cat=<?=$pagesCat; ?>"><?php echo $hava_lang['pages']; ?> (<?=$pagesCat; ?>)</a></li>
  <li>-------------</li>
<?php
} // -------------------------------------------------------
?>
  <li><a href="hava_post.php"><?php echo $hava_lang['newPost']; ?></a></li>
<?php 
if($userLvl < 3){ // Categories only for Level 0 - 2 ------------------------
?>
<li><a href="hava_cat.php"><?php echo $hava_lang['categories']; ?></a></li>
<?php
} // -------------------------------------------------------------
?>
<?php 
if($userLvl < 4){ // Comments and Links only for Level 0 - 3 ------------------------
?>
  <li><a href="hava_comm.php"><?php echo $hava_lang['comments']; ?></a></li>
  <li><a href="hava_link.php"><?php echo $hava_lang['links']; ?></a></li>
<?php
} // -------------------------------------------------------------
?>
  </ul>
</li>

<li><a href="hava_img.php"><img src="sys/jquery/ddsmoothmenu/images.png" border="0" /> <?php echo $hava_lang['media']; ?></a>
  <ul>

  <li><a href="hava_img_upload.php"> <?php echo $hava_lang['mediaUp']; ?></a></li>
<?php 
if($userLvl < 3){ // Images Categories only for Level 0 - 2 ------------------------
?>
  <li><a href="hava_img_cat.php"> <?php echo $hava_lang['categories']; ?></a></li>
<?php
} // -------------------------------------------------------------
?>
  </ul>
<?php
} // **************************************************************************************
?>

</li>

<?php
if($userLvl < 2){ // Settings and Plugins only for Admins -----------------------------
?>
<li><a href="hava_settings.php"><img src="sys/jquery/ddsmoothmenu/settings.png" border="0" /> <?php echo $hava_lang['settings']; ?></a></li>
<li><a href="hava_plugin.php"><img src="sys/jquery/ddsmoothmenu/plugins.png" border="0" /> <?php echo $hava_lang['plugins']; ?></a><ul><li><a href="hava_widget.php"><img src="sys/img/widget16.png" /> <?php echo $hava_lang['widgets']; ?></a></li></ul></li>
<?php
} // -------------------------------------------------------------
?>
<li><a href="hava_user.php"><img src="sys/jquery/ddsmoothmenu/users.png" border="0" /> <?php echo $hava_lang['users']; ?></a>
  <ul>
<?php 
if($userLvl < 3){ // New User only for Level 0 - 2 ----------------------------------
?> <li><a href="hava_user.php?userId=new"><?php echo $hava_lang['newUser']; ?></a></li>
<?php 
} // ------------------------------------------------------------------------------
if($userLvl < 5){ // Profile only for Level 0 - 4 ---------------------------------
?>
  <li><a href="hava_user.php?userId=<?=$user_id; ?>"><?php echo $hava_lang['profile']; ?></a></li>
<?php 
} // ------------------------------------------------------------------------------
?>
  <li><a href="hava_login.php?l=logout&user=<?php echo $userName; ?>">**<?php echo $hava_lang['logout'].' ('.$userName.')'; ?> </a></li>
  </ul>
</li>

<li id="stickyNotis"><img id="stickyNote" src="sys/img/sticky_note.png" border="0"><span id="myBox"><pre id="myBoxInner"><?=$noteText; ?></pre></span></li>

</ul>
<br style="clear: left" />
</div>


<div id="search_div">
<form id="search_post" name="search_post" method="post" action="hava_all_posts.php">
      <input type="submit" id="search_submit" value=" " title="Seach" /> <input name="search_word" type="text" id="search_word" />
    </form>
</div>
Return current item: Havalite