<div class="panel-heading clearfix">
<form class="input-group col-md-4">
<div class="input-group-btn">
<select class="btn btn-default dropdown-toggle">
<option value="1">Type 1</option>
<option value="2">Type 2 </option>
</select>
</div>
<input type="text" name="search[input]" placeholder="Search..." class="form-control"/>
<div class="input-group-btn">
<button type="submit" class="btn">Search <i class="glyphicon glyphicon-search"></i></button>
</div>
</form>
</div>
<?php
echo apply_filters( 'the_content', get_the_content($ID) );
?>
@media screen and (max-width:767px) {
}
@media screen and (min-width:768px) and (max-width:991px) {
}
@media screen and (min-width:992px) and (max-width:1199px) {
}
@media screen and (min-width: 1200px) {
}
server {
server_name example.com;
listen 80;
root /home/site1/web;
access_log /home/site1/logs/access.log;
error_log /home/site1/logs/error.log;
index index.php;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires max;
}
location ~ /\.ht {
deny all;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/site1.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
[site1]
user = site1
group = site1
listen = /run/php/site1.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 10s
pm.max_requests = 200
chdir = /
<div class="table-title">
<h3>Статистика посещений за последний месяц c <?php echo date('d-m-Y', strtotime('-1 month')); ?> по <?php echo date("d-m-Y"); ?> из разных поисковых систем:</h3>
</div>
<table class="table-fill">
<thead>
<tr>
<th class="text-left">Откуда</th>
<th class="text-left">Количество визитов</th>
<th class="text-left">Показатель отказов</th>
</tr>
</thead>
<tbody class="table-hover">
<?php
$today=date("Ymd");
$month_ago=date('Ymd', strtotime('-1 month'));
$metrika_url = "http://api-metrika.yandex.ru/stat/sources/marketing.json?id=метрика&date1=$month_ago&date2=$today&sort=date&per_page=1000&oauth_token=токен";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $metrika_url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$metrika = curl_exec ($ch);
curl_close ($ch);
$metrika_o = json_decode($metrika,true);
foreach($metrika_o['data'] as $key=>$value){
echo "<tr><td class='text-left'>".$value['name']."</td><td class='text-left'>".$value['visits']."</td><td class='text-left'>".($value['denial']*100)."%</td></tr>";
}
?>
</tbody>
</table>