<?php /* Smarty version 2.6.14, created on 2006-07-30 08:09:53
         compiled from I:%5Cdouya.cn/meta/module/module_save.php */ ?>
<?php echo '<?php'; ?>
 
//print_r( $_REQUEST );

include_once( ROOT . 'lib/vf.function.php'  );
include_once( ROOT . 'lib/biz.function.php'  );

check_user( 1 );

$id = <?php echo $this->_tpl_vars['module_id']; ?>
;

$fields = get_module_fields_by_id( $id );
check_form_input( get_meta_from_fields( $fields ) );

$_REQUEST['id'] = '__DY__NULL';
$_REQUEST['dy_uid'] = $_SESSION['dy_uid'];
$_REQUEST['dy_nickname'] = $_SESSION['dy_nickname'];
$_REQUEST['dy_addtime'] = '__DY__NOW';
$pda = new pda( 'dy_content_' . $id );
if($pda->insert())
{
	$tags = format_tags( $_REQUEST['dy_tags'] );
	if( !empty( $tags ) )
	{
		$cid = mysql_insert_id();
		add_related_tags( $id , $cid , $tags );
		add_tag( $id , $cid , $tags );
	}
		

	info_page( '<a href="?u=<?php echo $this->_tpl_vars['dy_module_en_name']; ?>
_list">数据已经成功保存,点击这里返回列表</a>' );
	
	exit;
}

<?php echo '?>'; ?>