true, 'local'=>true) ); global $template; $template->set_prefilter('register', 'adddinfousersT'); $template->set_filename('profile_add', realpath(ADDINFOUSERS_PATH.'profile_add.tpl')); $template->assign_var_from_handle('PROFILE_ADD', 'profile_add'); } function adddinfousersT($content, &$smarty) { $search = '
'; return str_replace($search, '{$PROFILE_ADD}'."\n".$search, $content); } add_event_handler('register_user_check', 'addInfousersT'); function addInfousersT($errors) { global $prefixeTable,$conf; if (count($errors) == 0) { $query = ' SELECT MAX('.$conf['user_fields']['id'].') + 1 FROM '.USERS_TABLE.' ;'; list($next_id) = pwg_db_fetch_row(pwg_query($query)); $q = ' INSERT INTO ' . $prefixeTable . 'AddInfo_users(id,info1,info2,info3,info4,info5,info6,info7)VALUES ("'.$next_id.'","'.$_POST['inser'].'","'.$_POST['inser2'].'","'.$_POST['inser3'].'","'.$_POST['inser4'].'","'.$_POST['inser5'].'","'.$_POST['inser6'].'","'.$_POST['inser7'].'");'; pwg_query($q); } return $errors; } ?>