<button class="btn btn-default">Кнопка</button>
$_sql = "INSERT INTO $table_orders SET
user_id = '$s_user_id',
order_items = '".addslashes(serialize($s_cart))."',
sessionid = '".session_id()."',
order_sum = '".$s_cart['sum']."',
order_status = 'new',
user_name = '$user_name',
comment = '$comment',
payment_type = '$payway',
d_add = NOW(),
user_phone = '$user_phone', $_sql_common";
$order_id = exec_sql($_sql);
$(document).ready(function () {
$('#form_payway').submit();
})
$currency = simplexml_load_file("test.xml");
foreach($currency->Result->Content as $v){
$valuta = $v->Item;
foreach($valuta as $val){
if($val['SecondCode']=='KZT'&&$val['FirstCode']=='USD'){
echo $val;
}
}
}
if($action == 'public' || $action == 'unpublic') {
if ($action == 'public') $pub = 1;
else if ($action == 'unpublic') $pub = 0;
exec_sql("UPDATE $table_comments SET comments_show = '$pub' WHERE comments_id = $com_id");
}
SELECT COUNT(*) total_items FROM $table_comments WHERE comments_show = 1
<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>