- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
if($sedit){
switch ($action) {
case 'insert':
sectionInsert($structure);
insertMessage($_page['right_bottom'],L_MESSAGE_ADD_OK);
sectionInsertForm($_page['right_top'],$structure);
sectionList($out,$structure,$_page[FIELD_ID],$sedit);
$_page['bookmark_1']['content'] = L_INSERT_SECTION;
$_page['bookmark_1']['style'] = 'bookmark_selected';
$_page['bookmark_1']['url'] = URL_STRUCTURE_EDIT.'?sedit=1';
break;
case 'delete':
$structure->deleteBranch($_POST[FIELD_ID]);
insertMessage($_page['right_bottom'],L_MESSAGE_DELETE_OK);
sectionInsertForm($_page['right_top'],$structure);
sectionList($out,$structure,$_page[FIELD_ID],$sedit);
$_page['bookmark_1']['content'] = L_INSERT_SECTION;
$_page['bookmark_1']['style'] = 'bookmark';
$_page['bookmark_1']['url'] = URL_STRUCTURE_EDIT.'?sedit=1';
break;
case 'update':
sectionUpdate($structure);
insertMessage($_page['right_bottom'],L_MESSAGE_CHANGE_OK);
sectionInsertForm($_page['right_top'],$structure,$_page[FIELD_ID]);
sectionList($out,$structure,$_page[FIELD_ID],$sedit);
$_page['bookmark_1']['content'] = L_INSERT_SECTION;
$_page['bookmark_1']['style'] = 'bookmark';
$_page['bookmark_1']['url'] = URL_STRUCTURE_EDIT.'?sedit=1';
break;
case 'add_form':
sectionInsertForm($_page['right_top'],$structure);
sectionList($out,$structure,$_page[FIELD_ID],$sedit);
$_page['bookmark_1']['content'] = L_INSERT_SECTION;
$_page['bookmark_1']['style'] = 'bookmark_selected';
$_page['bookmark_1']['url'] = URL_STRUCTURE_EDIT.'?sedit=1';
break;
default:
sectionInsertForm($_page['right_top'],$structure,$_page[FIELD_ID]);
sectionList($out,$structure,$_page[FIELD_ID],$sedit);
$_page['bookmark_1']['content'] = L_INSERT_SECTION;
$_page['bookmark_1']['style'] = 'bookmark';
$_page['bookmark_1']['url'] = URL_STRUCTURE_EDIT.'?sedit=1';
break;
}
} else{//режим редактора контента
switch ($action) {
case 'insert':
break;
case 'delete':
break;
case 'edit':
break;
case 'move':
break;
case 'update':
break;
default:
sectionList($out,$structure,$_page[FIELD_ID]);
break;
}
}