<!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 */?>
<link rel="stylesheet" href="css/jquery-ui.css" />
<!-----hrm-------------->
        <link href="css/AdminLTE_activity.css" rel="stylesheet" type="text/css" />

    
    </head>
    <body class="skin-blue">
       <?php include("header.php");?>
				<?php include("activity_header.php");?><!--grey_bg-->
				
				
		<form name="planact" id="planact" action="" method="post">	
		<input type="hidden" name="userid" id="userid" value="<?php echo $userid;?>">	
		<?php $num_val = mysql_fetch_array(mysql_query("SELECT * FROM project_plan_master "));?>
		
		<input type="hidden" name="resi_dats" id="resi_dats" value="<?php echo date("d-m-Y",strtotime($num_val['date_from']));?>" style="border:0px;"  class="resi_dat" />
		<input type="hidden" name="wek_end" id="wek_end" value="<?php echo date("d-m-Y",strtotime($num_val['date_to']));?>" style="border:0px;"  class="resi_dat" />
				
				<div class="clearfix"></div>
				
				<div class="project_button_area">
				
				<!--blue_header_activityplan-->
								
				</div><!--project_button_area-->
				
		
								<div class="project_button_area">
				
				<div class="blue_header_activityreport">
				<font color="#FFFFFF" size="4px"><b>Activity Report</b></font>
				
				
				
				<div class="activityplan_header_div">
				
								
				  </div><!--activityplan_header_div-->
								
								<div class="activityplan_select_week_div">
								
								
								
								<!--week_activityplan_allign-->
								
								
								<div class="week_activityplan_allign">
								
						
								
								
								</div><!--week_activityplan_allign-->
								
								
								
								<!--activityplan_select_week_div-->
								
								</div><!--week_activityplan_allign-->
								
								
								
				
				
				
				</div><!--blue_header_activityplan-->
				
				
				<div class="activityreport_padding">
				
				
				
								<div class="activityreport_menu_float">
								
								
				
				
				
										<div class="week_activityplan_allign">
														<div class="week_activityplan_text2">Week</div>
				
				<?php		$year           = date('Y');
$firstDayOfYear = mktime(0, 0, 0, 1, 1, $year);
$nextMonday     = strtotime('monday', $firstDayOfYear);
$nextSunday     = strtotime('sunday', $nextMonday);

?>
								<div class="week_activityplan">
								
								
								<select name="sel_wek" id="wek_usrs_ft" >
  	<?php 
	
	$cnts=0;
while (date('Y', $nextMonday) == $year) {$cnts=$cnts+1;
    // date('d-m-Y', $nextMonday), '-', date('d-m-Y', $nextSunday).'<br />';
// $projects_current = $db->fetchQuery("SELECT * FROM project_plan_activity  where  ");
 
    $nextMonday = strtotime('+1 week', $nextMonday);
    $nextSunday = strtotime('+1 week', $nextSunday);
	?>
  <option value="<?php echo $cnts;?>" <?php if($cnts==$projects_act_list_dat['week_no']) {?>selected="selected" <?php } ?>><?php echo $cnts;?></option>
<?php } ?>

</select>
								
								
								</div>
								
								
																<div class="week_activityplan_text"><font color="#848484">From</font></div>

								
								
								<div class="week_activityplan">
								
								<?php //echo date("d-m-Y",strtotime($num_val['date_from']));?>
								<?php //echo date("d-m-Y",strtotime($num_val['date_to']));class="resi_dat"?>
<input type="text" name="wek_from1" id="wek_from1" value="<?php echo date("d-m-Y");?>" readonly >
								
								
								</div><!--week_activityplan-->
								
								<div class="week_activityplan_text"><font color="#848484">To</font></div>
								
								
																<div class="week_activityplan">
								
								
<input type="text" name="wek_to1" id="wek_to1" value="<?php echo date("d-m-Y");?>"  readonly>					
								
								</div><!--week_activityplan-->
								
	<div class="form_div_2">&nbsp;<button type="button" class="add_projects" id="srchclick" onClick="search_projp();" style="height: 28px;line-height: 19px;">Search</button></div>
								</div><!--week_activityplan-->
								
								
								
								
								</div><!--activityreport_menu_float-->

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

						
								
				</div>

		
			</form>	
		
				

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

				
				
						<div id="m_divs"> </div>
				
				
				
				</div>

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

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


        <!-- jQuery 2.0.2 -->
		               <?php 
	include("footer-js.php");
?>

<input type="hidden" name="hid_week" id="hid_week" value="<?php echo $weekNumber = date("W"); ?>">
    </body>
	



<link rel="stylesheet" href="css/jquery.ui.all.css">


<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/jqueryresigned-emp-ui.js"></script>
<!-- Jquery Package End -->
	<script src="js/activity.js" type="text/javascript"></script>
<script src="js/bootstrap-popover.js"></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 user='<?php echo $userid;?>'
     var dataString = 'pageId='+ pageId+'&userid='+user;
     $.ajax({
           type: "POST",
           //url: "loadact_completedata.php",
		   url: "admin_complete_data.php",
           data: dataString,
           cache: false,
           success: function(result){
           $(".flash").hide();
                 $("#m_divs").html(result);
				 $('.example').tooltip();
           }
      });
}


var wek_val=$('#hid_week').val();
/*$('#wek_usrs_ft').val(wek_val);*/
change_week(wek_val);

function row_expan(id,cnt)
{
var currentDetails = $('#parent_expand'+id).next('#child_expand'+id);

for(i=1;i<=cnt;i++)
{
if(i!=id)
{
$('#child_expand'+i).hide();
}
}
				
				currentDetails.toggle();

}

function search_projp()
{
//alert($('#planact').serialize());
     //var dataString = 'pageId='+ pageId+'&userid='+users;
     $.ajax({
           type: "POST",
           url: "admin_complete_data.php",
           data: $('#planact').serialize(),
           cache: false,
           success: function(result){
           $(".flash").hide();
                 $("#m_divs").html(result);
           }
      });
}
</script>
	
</html>