Файл: user/inc/apps.php
Строк: 14
<?php
only_reg();
$set['title'] = 'Приложения';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `apps` "), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<span class='fa fa-info-circle fa-fw'></span> " . lang('Еще не добавлено');
echo "</div>";
}
$z = 2;
$q = mysql_query("SELECT * FROM `apps` ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while ($apps = mysql_fetch_assoc($q)) {
echo "<div class='list-group-item'>";
++$z;
echo "<a href='/apps/" . ($apps['name_lat'] != null ? $apps['name_lat'] : $apps['id']) . "'>" . output_text($apps['name']) . "</a><br />";
echo output_text($apps['opis']) . '<br />';
echo "<a href='/apps/" . ($apps['name_lat'] != null ? $apps['name_lat'] : $apps['id']) . "'>" . lang('Запуск') . "</a>";
echo "</div>";
}
if ($k_page > 1) {
str("?", $k_page, $page);
}