<?php if (PROTECT != 1) { die; } $hq = new hq_framework(); if (!$hq->exists_table('menu')) { $hq->new_table('menu', 'name,link'); } $count = $hq->get_info('menu', 'name'); $name = $hq->get_col('menu', 'name'); $link = $hq->get_col('menu', 'link'); for ($x = 1; $x <= $count; $x++) { if ($name[$x]) { $menu .= '<li><a href="' . href($link[$x]) . '">' . $name[$x] . '</a></li>'; } }
<?php $hq = new hq_framework(); if (!$hq->exists_table('qb')) { $hq->new_table('qb', 'user,text'); } if (PROTECT != 1) { die; } if ($_SESSION['admin']) { $k = $hq->get_info('qb', 'user'); if ($GET[2] == 'del') { if ($GET[3] != 'all') { $GET[3] = abs(intval($GET[3])); if ($GET[3] && $GET[3] <= $k) { $hq->set_record('qb', 'text', $GET[3], 'Сообщение удалено администратором!'); header('location:' . href(THIS, 2)); } else { header('location:' . href(THIS, 2)); } } else { $hq->del_table('qb'); header('location:' . href(THIS, 2)); } } html('<h3>Управление модулем "' . $local['title'] . '"</h3>'); $GET[2] = abs(intval($GET[2])); if (!$GET[2]) { $GET[2] = 1; } $on_page = 25;