db_Update("user_extended_struct", "user_extended_struct_order=user_extended_struct_order+1 WHERE user_extended_struct_type > 0 AND user_extended_struct_parent = {$_parent} AND user_extended_struct_order ='".($_order-1)."'"); $sql->db_Update("user_extended_struct", "user_extended_struct_order=user_extended_struct_order-1 WHERE user_extended_struct_type > 0 AND user_extended_struct_parent = {$_parent} AND user_extended_struct_id='".$_id."'"); } if (isset($_POST['down_x'])) { $qs = explode(".", $_POST['id']); $_id = $qs[0]; $_order = $qs[1]; $_parent = $qs[2]; $sql->db_Update("user_extended_struct", "user_extended_struct_order=user_extended_struct_order-1 WHERE user_extended_struct_type > 0 AND user_extended_struct_parent = {$_parent} AND user_extended_struct_order='".($_order+1)."'"); $sql->db_Update("user_extended_struct", "user_extended_struct_order=user_extended_struct_order+1 WHERE user_extended_struct_type > 0 AND user_extended_struct_parent = {$_parent} AND user_extended_struct_id='".$_id."'"); } if (isset($_POST['catup_x'])) { $qs = explode(".", $_POST['id']); $_id = $qs[0]; $_order = $qs[1]; $sql->db_Update("user_extended_struct", "user_extended_struct_order=user_extended_struct_order+1 WHERE user_extended_struct_type = 0 AND user_extended_struct_order='".($_order-1)."'"); $sql->db_Update("user_extended_struct", "user_extended_struct_order=user_extended_struct_order-1 WHERE user_extended_struct_type = 0 AND user_extended_struct_id='".$_id."'"); } if (isset($_POST['catdown_x'])) { $qs = explode(".", $_POST['id']); $_id = $qs[0]; $_order = $qs[1]; $sql->db_Update("user_extended_struct", "user_extended_struct_order=user_extended_struct_order-1 WHERE user_extended_struct_type = 0 AND user_extended_struct_order='".($_order+1)."'"); $sql->db_Update("user_extended_struct", "user_extended_struct_order=user_extended_struct_order+1 WHERE user_extended_struct_type = 0 AND user_extended_struct_id='".$_id."'"); } if (isset($_POST['add_field'])) { if($_POST['user_type']==4){ $_POST['user_values'] = array($_POST['table_db'],$_POST['field_id'],$_POST['field_value'],$_POST['field_order']); } $new_values = make_delimited($_POST['user_values']); $new_parms = $tp->toDB($_POST['user_include']."^,^".$_POST['user_regex']."^,^".$_POST['user_regexfail']."^,^".$_POST['user_hide']); admin_update($ue->user_extended_add($_POST['user_field'], $_POST['user_text'], $_POST['user_type'], $new_parms, $new_values, $_POST['user_default'], $_POST['user_required'], $_POST['user_read'], $_POST['user_write'], $_POST['user_applicable'], 0, $_POST['user_parent']), 'insert', EXTLAN_29); } if (isset($_POST['update_field'])) { if($_POST['user_type']==4){ $_POST['user_values'] = array($_POST['table_db'],$_POST['field_id'],$_POST['field_value'],$_POST['field_order']); } $upd_values = make_delimited($_POST['user_values']); $upd_parms = $tp->toDB($_POST['user_include']."^,^".$_POST['user_regex']."^,^".$_POST['user_regexfail']."^,^".$_POST['user_hide']); admin_update($ue->user_extended_modify($sub_action, $_POST['user_field'], $_POST['user_text'], $_POST['user_type'], $upd_parms, $upd_values, $_POST['user_default'], $_POST['user_required'], $_POST['user_read'], $_POST['user_write'], $_POST['user_applicable'], $_POST['user_parent']), 'update', EXTLAN_29); } if (isset($_POST['update_category'])) { $name = trim($tp->toHTML($_POST['user_field'])); admin_update($sql->db_Update("user_extended_struct","user_extended_struct_name = '{$name}', user_extended_struct_read = '{$_POST['user_read']}', user_extended_struct_write = '{$_POST['user_write']}', user_extended_struct_applicable = '{$_POST['user_applicable']}' WHERE user_extended_struct_id = '{$sub_action}'"), 'update', EXTLAN_43); } if (isset($_POST['add_category'])) { $name = $tp->toHTML($_POST['user_field']); admin_update($sql->db_Insert("user_extended_struct","'0', '$name', '', 0, '', '', '', '{$_POST['user_read']}', '{$_POST['user_write']}', '0', '0', '{$_POST['user_applicable']}', '0', '0'"), 'insert', EXTLAN_40); } if ($_POST['eu_action'] == "delext") { list($_id, $_name) = explode(",",$_POST['key']); if($ue->user_extended_remove($_id, $_name)) { $message = EXTLAN_30; } } if ($_POST['eu_action'] == "delcat") { list($_id, $_name) = explode(",",$_POST['key']); if($ue->user_extended_remove($_id, $_name)) { $message = EXTLAN_41; } } if(isset($_POST['activate'])) { $message .= field_activate(); } if(isset($_POST['deactivate'])) { $message .= field_deactivate(); } if($sql->db_Select("user_extended_struct","DISTINCT(user_extended_struct_parent)")) { $plist = $sql->db_getList(); foreach($plist as $_p) { $o = 0; if($sql->db_Select("user_extended_struct", "user_extended_struct_id", "user_extended_struct_parent = {$_p['user_extended_struct_parent']} && user_extended_struct_type != 0 ORDER BY user_extended_struct_order ASC")) { $_list = $sql->db_getList(); foreach($_list as $r) { $sql->db_Update("user_extended_struct", "user_extended_struct_order = '{$o}' WHERE user_extended_struct_id = {$r['user_extended_struct_id']}"); $o++; } } } } if($message) { $ns->tablerender("", "
".EXTLAN_1." | ".EXTLAN_2." | "; // $text .="".EXTLAN_3." | "; $text .="".EXTLAN_4." | ".EXTLAN_5." | ".EXTLAN_6." | ".EXTLAN_7." | ".EXTLAN_8." | |
{$catList[$cn][0]['user_extended_struct_name']} | ||||||||
{$ext['user_extended_struct_name']} [".$tp->toHTML($ext['user_extended_struct_text'], FALSE, "defs")."] |
".$ue->user_extended_edit($ext,$uVal)." | ".($ext['user_extended_struct_required'] == 1 ? LAN_YES : LAN_NO)." | ".r_userclass_name($ext['user_extended_struct_applicable'])." | ".r_userclass_name($ext['user_extended_struct_read'])." | ".r_userclass_name($ext['user_extended_struct_write'])." | |||
".EXTLAN_28." |
".EXTLAN_1." | ".EXTLAN_5." | ".EXTLAN_6." | ".EXTLAN_7." | ".EXTLAN_8." | {$ext['user_extended_struct_name']} | ".r_userclass_name($ext['user_extended_struct_applicable'])." | ".r_userclass_name($ext['user_extended_struct_read'])." | ".r_userclass_name($ext['user_extended_struct_write'])." | "; $i++; } } else { $text .= " |
".EXTLAN_37." |