<?php
if (!defined('DATALIFEENGINE')) {
die("Hacking attempt!");
}
$tpl->result['users'] = dle_cache("users", $config['skin'], true);
$is_change = false;
if ($config['allow_cache'] != "1") {
$config['allow_cache'] = "1";
$is_change = true;
}
if ($tpl->result['users'] === false) {
$limit = 3;
$sql = $db->query("SELECT user_id, name, email FROM " . PREFIX . "_users WHERE user_id > 1 ORDER by user_id ASC LIMIT 0," . $limit . "");
$i = 0;
while ($row = $db->get_row($sql)) {
$i++;
$tpl->load_template('users.tpl');
$tpl->set('{i}', $i);
$tpl->set('{user_id}', $row['user_id']);
$tpl->set('{name}', $row['name']);
$tpl->set('{email}', $row['email']);
$tpl->compile('users');
$i++;
}
$tpl->clear();
$db->free();
create_cache("users", $tpl->result['users'], $config['skin'], true);
}
echo $tpl->result['users'];
if ($is_change)
$config['allow_cache'] = false;
?>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td><br /> - <b>N:</b> {i}</td>
</tr>
<tr>
<td><br /> - <b>ID:</b> {user_id}</td>
</tr>
<tr>
<td><br /> - <b>Имя:</b> {name}</td>
</tr>
<tr>
<td><br /> - <b>E-mail:</b> {email}</td>
</tr>
</table>
<br />
<div style="border-bottom:1px solid #ccc"></div>
<br />