<?php
defined(
'COT_CODE'
)
or
die
(
'Wrong URL'
);
require_once
cot_incfile(
'forms'
);
$action
= cot_import(
'a'
,
'P'
,
'TXT'
);
$t
=
new
XTemplate(cot_tplfile(
'test'
,
'plug'
));
if
(
$action
==
'asked'
)
{
$t
->parse(
'MAIN.RESULT'
);
}
else
{
$t
->assign(
array
(
'ASK_FORM_ACTION'
=> cot_url(
'plug'
,
'r=test&a=asked'
),
'ASK_FORM_QUESTION'
=> cot_textarea(
'question'
,
$question
, 10, 120,
'id="question"'
,
'input_textarea_minieditor'
),
));
$t
->parse(
'MAIN.AJAXFORM'
);
}