Example #1
0
 } else {
     if (array_key_exists('btn_field_del', $_POST) && $_POST['field_name']) {
         $field = $_POST['field_name'];
         $oaSchema->fieldDelete($table, $field);
     } else {
         if (array_key_exists('btn_index_del', $_POST) && $_POST['index_name']) {
             $index = $_POST['index_name'];
             $oaSchema->indexDelete($table, $index);
         } else {
             if (array_key_exists('btn_index_add', $_POST) && $_POST['idx_fld_add'] && $_POST['index_add']) {
                 $index_fields = $_POST['idx_fld_add'];
                 $index_name = $_POST['index_add'];
                 $sort_desc = $_POST['idx_fld_desc'];
                 $unique = $_POST['idx_unique'];
                 $primary = $_POST['idx_primary'];
                 $oaSchema->indexAdd($table, $index_name, $index_fields, $primary, $unique, $sort_desc);
             } else {
                 if (array_key_exists('btn_index_save', $_POST) && $_POST['index_name']) {
                     $index_name = $_POST['index_name'];
                     $index_no = $_POST['index_no'];
                     $index_def = $_POST['idx'][$index_no];
                     $oaSchema->indexSave($table, $index_name, $index_def);
                 } else {
                     if (array_key_exists('btn_link_del', $_POST) && $_POST['link_name']) {
                         $link_name = $_POST['link_name'];
                         $oaSchema->linkDelete($table, $link_name);
                     } else {
                         if (array_key_exists('btn_link_add', $_POST) && $_POST['link_add'] && $_POST['link_add_target']) {
                             $link_add = $_POST['link_add'];
                             $link_add_target = $_POST['link_add_target'];
                             $oaSchema->linkAdd($table, $link_add, $link_add_target);