<div class="w97p pdl10">
<div class="transactions index">
	<h2><?php echo __('Pending Network'); ?></h2>
	<table cellpadding="0" cellspacing="0" class="table table-bordered table-strped">
	<tr>
			<th><?php echo 'Network Id'; ?></th>
			<th><?php echo 'Network Title'; ?></th>
			<th><?php echo 'Description'; ?></th>
			<th><?php echo 'Email'; ?></th>
			<th><?php echo 'Created Date'; ?></th>
			
			<th><?php echo 'Status'; ?></th>
			
	</tr>
	<?php foreach ($networks as $pendingnetwork): 
            
	//pr($pendingcourse);
	?>
	<tr>
		<td><?php echo h($pendingnetwork['Network']['id']); ?>&nbsp;</td>
		<td><?php echo h($pendingnetwork['Network']['title']); ?>&nbsp;</td>
		<td><?php echo h($pendingnetwork['Network']['description']); ?>&nbsp;</td>
		<td><?php echo h($pendingnetwork['User']['username']); ?>&nbsp;</td>
		<td><?php echo h($pendingnetwork['Network']['created']); ?>&nbsp;</td>
		
		<td><?php echo $this->Form->input('Activate',array('type'=>'button','class'=>'btn','label'=>false,'div'=>false,'onclick'=>'updateStatus('.$pendingnetwork['Network']['id'].');')); ?>&nbsp;</td>
		
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<!--<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>-->
	<div class="paging">
	<!--<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	--></div>
</div>
    </div>

  <script type="text/javascript">
     var path='<?php echo $this->webroot;?>';
		function updateStatus(id){

			var con=confirm('Are you sure to activated this nerwork?');
			if(con==true){
			 $.ajax({
			     	type: 'POST',
			     	url: path +'networks/updatestatus',
			     	data: {id:id},
			     	success: function(data){
				     	location.href="<?php echo $this->here?>";
			     	}
		     	});
			}
		}
	</script>

