示例#1
0
     $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);
             } else {
                 if (array_key_exists('btn_table_save', $_POST) && $_POST['tbl_new_name']) {
                     $table_name_new = $_POST['tbl_new_name'];
                     $ok = $oaSchema->tableSave($table, $table_name_new);
                     if ($ok) {
                         $table = $table_name_new;
                     }
                 } else {
                     if (array_key_exists('btn_table_delete', $_POST)) {
                         $oaSchema->tableDelete($table);