<?php
/* ====================
[BEGIN_COT_EXT]
Hooks=admin
[END_COT_EXT]
==================== */

(defined('COT_CODE') && defined('COT_ADMIN')) or die('Wrong URL.');

list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('faq', 'any');
cot_block($usr['isadmin']);

require_once cot_incfile('faq', 'module');

$adminpath[] = array(cot_url('admin', 'm=extensions'), $L['Extensions']);
$adminpath[] = array(cot_url('admin', 'm=extensions&a=details&mod='.$m), $cot_modules[$m]['title']);
$adminpath[] = array(cot_url('admin', 'm='.$m), $L['Administration']);
$adminsubtitle = 'Вопрос-ответ';

/* === Hook  === */
foreach (cot_getextplugins('faq.admin.first') as $pl)
{
	include $pl;
}
/* ===== */

$parsedids = array();

$t = new XTemplate(cot_tplfile('faq.admin', 'module', true));

$render = cot_faq_render(0, true);
$t->assign(array(
	'ADMIN_FAQ_ROW' => $render['html'],
));

cot_display_messages($t);

/* === Hook  === */
foreach (cot_getextplugins('faq.admin.tags') as $pl)
{
	include $pl;
}
/* ===== */

$t->parse('MAIN');
$adminmain = $t->text('MAIN');
