<?php 
$show_menu=0;
$today_date=strtotime(date('Y-m-d'));
$str_feedback_start_date=strtotime($feedback_start_date);
$str_feedback_end_date=strtotime($feedback_end_date);
if($feedback_active==1 && $today_date>=$str_feedback_start_date && $today_date <= $str_feedback_end_date){
	$show_menu=1;
}
?>
<script type="text/javascript">
Ext.onReady(function(){
Ext.QuickTips.init(); 	
	// Sub Sub menu code
	// Sub menu code
var feedback = new Ext.menu.Menu({ id:'feedback', items: [<?php if($show_menu==1){ ?>{text:'Give Feedback',href:'give-feedback.php'},<?php } ?>{text:'Feedback Report',href:'report-feedback.php'}]}); 
var master = new Ext.menu.Menu({ id:'master', items: [
	{text:'My Profile',href:'my-profile.php'}
 	,{text:'View Fees Info.',href:'student-fees-report.php'}
	,{text:'View Result Info.',href:'student-result-report.php'}
	,{text:'View Attendance Info.',href:'student-attendence-report.php'}
	,{text:'Download',href:'student-download.php'}
	,{text:'view Issue Book',href:'view-book-issue.php'}
	,{text:'Search Book',href:'search-book.php'}
]}); 

	
	//Sub menu code	
	var tb = new Ext.Toolbar();
    tb.render('main-menu');	
    tb.add (
			{ 
		   	xtype:'tbbutton',
            text:'Home',
			handler: function(btn)
				{ var redirect = 'loginhome.php';
				  window.location = redirect;	
				}
  			},
	{text:'Master',menu:master},
	{text:'Faculty Feedback',menu:feedback},
	'-',
	/*{       xtype:'tbbutton',
            text: 'Utility',
            //tooltip: {text:'This is a an example QuickTip for a toolbar item', title:'Tip Title'},
            iconCls: 'blist',
            menu : {
            items: [
				
				{
                	text:'Change Password',
				    href:'change-password.php'
					
                }
				]
            }
	    },*/
		{ 
		   	xtype:'tbbutton',
            text:'Logout',
			handler: function(btn)
				{ 
				  var redirect ='logout.php';
				  window.location = redirect;	
				}
    	}
	);
	tb.doLayout();
});
</script>