<?php
$t = "Помощь";
$biglogo = 1;
include_once '../core/core.php';
if ($id != 0 && $db->Count("changelog_versions","WHERE `cid` = '".$id."'") != 0){
	$c = $db->getObject("SELECT * FROM `changelog_versions` WHERE `cid` = '".$id."'");
	$t = $c->name." - Последние изменения";
	$msg = $core->drawUpdate($c->sms);
	include_once '../core/head.php';
	echo '<div class="title">'.$c->name.'</div>';
	echo '<div class="text">'.$msg.'</div>';
	echo '<div class="text">Дата добавления: '.$core->RealTime($c->timeadd).'</div>';
	echo b("?");
	echo h();
	include_once '../core/foot.php';
	die();
}
$t = 'ChangeLog';
include_once '../core/head.php';
echo '<div class="title">ChangeLog</div>';
if ($db->Count("changelog_versions") == 0){
	echo '<div class="error">Обновления еще не выпускались</div>';
}
$max = 10;
$k_post = $db->Count("changelog_versions");
$k_page = $core->k_page($k_post,$max);
$page = $core->page($k_page);
$start = $max*$page-$max;
$_tmp = $db->Query("SELECT * FROM `changelog_versions` ORDER BY `cid` DESC LIMIT $start, $max"); 
while ($data = mysqli_fetch_assoc($_tmp)){
	echo l("?id=".$data["cid"],$data["name"],$data["icons"],"link",false,mb_strimwidth($data["sms"],0,60,"..."),1);
}
if($k_page>1) echo $core->str('?',$k_page,$page);
echo h();
include_once '../core/foot.php';
?>