Solution Technologies
Управление сайтом без ограничений
<?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-dating
 * @version 1.XX
 */



// Подключаем работу с пользователями
xs2Fetch(array('mod'=>'users', 'met'=>'lib'));
xs2Fetch(array('mod'=>$_THE['QUE']['MOD'], 'met'=>'lib'));

$nodeId = $_THE['PARAMS'][0];

if (!$nodeId) // Не задан ID
  header('location: '.xs2Href($_THE['QUE']['MOD'], $_THE['QUE']['OBJ']));

if (!$myForm || ($myForm['NodId'] != $_THE['PARAMS'][0]))
  // Редактировать анекету может только ее хозяин
  header('location: '.xs2Href(array('mod'=>$_THE['QUE']['MOD'],
                                    'obj'=>'form',
                                    'met'=>'show',
                                    'atr'=>$_THE['PARAMS'][0])));

if ($_POST['action']=='subjForm') {
  $_m = $_POST['subjSexMale'];
  $_f = $_POST['subjSexFemale'];
  $_s = (($_m && $_f) ? 3 : ($_m ? 1 : ($_f ? 2 : 0)));
  xs2UpdateNode(array('About' => $_POST['About'],
                      'Subject' => $_POST['Subject'],
                      'subjAgeBegin' => $_POST['subjAgeBegin'],
                      'subjAgeEnd' => $_POST['subjAgeEnd'],
                      'subjSex' => $_s,
                      'NName' => $_POST['NName'],
                      'NodId' => $nodeId));
}

$_HTML->assign('form', xs2GetNode(array('NodId'=>$nodeId)));

?>
Copyright ©1998-2008 Солютекс. Все права защищены.
Этот сайт сделан в designLab | Работает на технологии XS2
Условия использования | О защите конфиденциальности