global $database; $data = array(); foreach ($profiles as $pro) { $a = $auth_model->byProfile($pro['ID']); $link_title = "Send mail to " . $pro['first_name'] . ' ' . $pro['last_name'] . ' or right click to copy URL\'s email address'; $access = ''; $acls = explode(",", $a['acl']); foreach ($acls as $ac) { if (strlen($level = trim($ac)) > 0) { $access .= '<span class="acl">' . $ac . '</span>'; } } $data[] = array($a['username'], $pro['first_name'] . ' ' . $pro['last_name'], '<a href="mailto:' . $pro['email'] . '" title="' . $link_title . '" alt="' . $link_title . '" class="bare">' . $pro['email'] . '</a>', $access, Auth::ACL("admin") || Auth::ACL("su") ? '<a class="buttonsmred margined" title="Edit User: '******'username'] . '" href="profile.edit?ID=' . $a['ID'] . '"><span class="fi-page-edit"></span></a>' : ''); } $table = new TableHelper(array('table' => "table wide", 'thead' => "tablehead", 'th' => "tablehead", 'td' => "tablecell", 'headings' => array('Username', 'Name', 'Email', 'Access', ' '), 'data' => $data)); $table->Render($table); $html = '<span class="breadcrumbs">Leaderboard</span>'; $html .= '<div class="formboundary">'; $html .= $table; $html .= '</div>'; $p->HTML($html); $counted = count($profile_model->All()); if ($counted >= $page_limit) { Pager($p, "profiles?", $getpost['start'], $page_limit, $counted); } $p->HTML('<a class="buttonlink" href="profile.new">+ Add User Account</a>'); // Footer if (!$p->ajax) { $p->HTML('footer.html'); } $p->Render();
<?php $page = isset($_GET['page']) ? (int) $_GET['page'] : 1; $type = isset($_GET['type']) ? $_GET['type'] : NULL; $cat = isset($_GET['cat']) ? $_GET['cat'] : NULL; $count = countMessages($mysql_link, $type, $cat); if ($count != 0) { $messages = getMessages($mysql_link, $type, $cat, $page, PERPAGE); if (is_array($messages)) { $messages = messageIntro($messages); } $pager = Pager($page, $count, PERPAGE); } else { $messages = FALSE; $pager = FALSE; } if ($type) { $type = '&type=' . $type; } if ($cat) { $cat = '&cat=' . $cat; } $content = template('content.tpl.php', array('title' => 'Главная страница', 'messages' => $messages, 'pager' => $pager, 'type' => $type, 'cat' => $cat));