<!DOCTYPE html>
<html>
    <head>
<?php include("header-js.php");?>	
		
		
<!-----hrm-------------->		
<?php /*?><link rel="stylesheet" href="css/style.css" />
<!-- Responsive -->
<link rel="stylesheet" href="css/responsive.css" /><?php */?>

<!-----hrm-------------->
        <link href="css/AdminLTE_activity.css" rel="stylesheet" type="text/css" />

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body class="skin-blue">
       <?php include("header.php");?>
				<?php include("activity_header.php");?><!--grey_bg-->
				
				
				<div class="clearfix"></div>
				
				<div class="project_button_area">
				
				<div class="project_button_area_left"><b><font size="4px">	<?php if($_SESSION['usertype']=='Superadmin' || $_SESSION['branchadmin']=='Y'){?>Add Projects<?php } else{?>Project List<?php }?></font></b></div>
				
				</div><!--project_button_area-->
				
		
								<div class="add_project_div">
				
							<form name="ad_proj" id="ad_proj" action=""  method="post">	
							<?php if($_SESSION['usertype']=='Superadmin' || $_SESSION['branchadmin']=='Y'){?>
								<div class="clearfix"></div>

				<div class="project_free_div">
				
				
				<div class="add_project_div_left">
				
				<div class="project_id_text">Project ID</div>
				
				<div class="form_div_3">
				
<input type="text" name="proj_id" id="proj_id" value="">
				</div>
				
				</div>
				
												
				
								<div class="add_project_div_left">
								
								<div class="project_id_text">&nbsp;Project Name</div>
				<div class="form_div_2">
		<input type="text" name="proj_name" id="proj_name"proj_name value="">

				</div>
				</div>
				
				
								<div class="clearfix"></div>

				</div>
				
				<div class="clearfix"></div>
				
				<div class="button_position">
								<div class="add_projects"><button type="button" class="add_projects" id="savclick" onClick="save_proj();">Submit</button></div>
												
				  </div>

<?php }?>

				</form>
				
				</div>
			
				
				
				

				<section>
				<div class="project_id">
				

	
				<div class="clearfix"></div>
		<div id="m_divs" style="width:100%">

				
				
			</div>	
				
				</div>

				
				
				
				</section>
				
				<div class="clearfix"></div>
				
				

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->


        <!-- jQuery 2.0.2 -->
		               <?php 
	include("footer-js.php");
?>
<?php /*?>        <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="js/plugins/bootstrap.min.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="js/plugins/AdminLTE/app.js" type="text/javascript"></script>
<?php */?>
    </body>
	<script type="text/javascript">
	function clone_dv()
	{
	
	 var container = $('#main_div');
    var clone =$('.stages_div:first').clone(true);
	
    clone.attr('id','div_'+$('#main_div').find('div').length);
    clone.addClass('cdivs');
	clone.find('input').css({'margin-top':'6px'});
   // container.append(clone);
   $('.stages_div:last').after(clone);
	clone.find('input').val('');
	

	}
	
	
	$('#proj_id').click(function(){
    	$('#savclick').attr('disabled',false);
});
	
	function save_proj()
	{
	var p_stage=$('#proj_stage').val();	
	var p_id=$('#proj_id').val();	
	var p_name=$('#proj_name').val();
	if(p_stage=='' || p_id=='' || p_name=='')
	{
	alert("Please Enter All Fields");
	}
	else
	{
		$('#savclick').attr('disabled',true);
	dataString = $('#ad_proj').serialize(); 

	
$.post("project_add.php?action=grt_insert",dataString,function(data){/*

	//	var timing = data.timing;
	

	if(timing.cntss==0)
	{	
	$("#m_divs").html('');	
		$('#m_divs').append( '<div class="box_one">'+
				
								'<div class="project_id_heading_3">'+timing.proj_id+'</div>'+
								'<div class="project_id_heading_3">'+timing.proj_name+'</div>'
				
								+'</div>');
	}
	else
	{
			$('.box_one:first').before( '<div class="box_one">'+
				
								'<div class="project_id_heading_3">'+timing.proj_id+'</div>'+
								'<div class="project_id_heading_3">'+timing.proj_name+'</div>'
					+'</div>');
	}							
	
	
		*/},'json');
		
		
		
	$('#proj_stage').val('');	
	$('#proj_id').val('');	
	$('#proj_name').val('');	
	$('.stage').val('');
	$('.cdivs').remove();
	
			alert("Project Added Successfully");
			window.document.location.reload();
}	
		
	}
	</script>
	<style>
div.pagination {
padding: 3px;
margin: 3px;
text-align:center;
}

div.pagination a {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #AAAADD;

text-decoration: none; /* no underline */
color: #000099;
}
div.pagination a:hover, div.digg a:active {
border: 1px solid #000099;

color: #000;
}
div.pagination span.current {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #B0B7D1;

font-weight: bold;
background-color: #939399;
color: #FFF;
}
div.pagination span.disabled {
padding: 2px 5px 2px 5px;
margin: 2px;
border: 1px solid #EEE;

color: #DDD;
}

</style>

	<script type="text/javascript">
$(document).ready(function(){
changePagination('0');    
});
function changePagination(pageId){
     $(".flash").show();
     $(".flash").fadeIn(400).html
                ('Loading <img src="ajax-loader.gif" />');
     var dataString = 'pageId='+ pageId;
     $.ajax({
           type: "POST",
           url: "loadData.php",
           data: dataString,
           cache: false,
           success: function(result){
           $(".flash").hide();
                 $("#m_divs").html(result);
           }
      });
}
</script>
	
</html>