<?php
/**
* XS2:
*
* This file is developed by Solutecs, LLC for the purpose of the company
* and is provided together with XS2 Framework as and inherent part of the
* system. This file can be used on the terms of License Agreement.
*
* +7 (495) 585-0833 / 13 Rusakovskaya street, Moscow 107140 Russia
*
* @link http://www.solutecs.com
* @copyright ©1998-2007 Solutecs, LLC
* @package XS2-MODCOM
* @subpackage proc-polls
* @version 1.XX
*/
// Если в текущем опросе еще нет объекта results, в который
// сохраняются результаты, то этот объект создается автоматически
$results = xs2GetChildren(array('ParId'=>$_POST['poll'],'NType'=>"results"));
if (!$results) {
$results[0]['NodId'] = xs2InsertNode(
array(
'NType'=>'results',
'ParId'=>$_POST['poll'],
'NFlag'=>1,
'NName'=>'Результаты'
)
);
}
//Сохраняем ответ пользователя в сериализованом виде в объекте result
xs2InsertNode(
array(
'ParId'=>$results[0]['NodId'],
'NType'=>'result',
'NFlag'=>1,
'Answer'=>serialize($_POST['q']),
'Extensions'=>serialize($_POST['exts'])
)
);
?>
|
|