alert("' . $lang['L_PRIMARYKEYS_CHANGED'] . '"); </script>'; } else { echo '<script language="JavaScript"> alert("' . $lang['L_PRIMARYKEYS_CHANGINGERROR'] . '"); </script>'; } } else { if ($_POST["indexType"] == "unique") { $newIndexType = "UNIQUE"; } elseif ($_POST["indexType"] == "fulltext") { $newIndexType = "FULLTEXT"; } else { $newIndexType = "INDEX"; } $res = setNewKeys($databases['Name'][$dbid], $_GET['tablename'], $newKeysArray, $newIndexType, $_POST['indexName'], $newKeySizesArray); if ($res) { echo '<script language="JavaScript"> alert("' . $lang['L_KEY_ADDED'] . '"); </script>'; } else { echo '<script language="JavaScript"> alert("' . $lang['L_KEY_ADDERROR'] . '"); </script>'; } } } //Andere Indizes löschen if (isset($_GET['killIndex'])) { $res = killKey($databases['Name'][$dbid], $_GET['tablename'], $_GET['killIndex']); if ($res) {
function fo_save_postdata($post_id) { if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return; } if (!wp_verify_nonce($_POST['fo_noncename'], plugin_basename(__FILE__))) { return; } // 权限验证 if ('post' == $_POST['post_type']) { if (!current_user_can('edit_post', $post_id)) { return; } } // 获取编写文章时填写的固定字段的值,多个字段依此类推 $blogUrl = 'http://' . $_SERVER['HTTP_HOST']; $flag = $_POST['flag_new_field']; $flashPic = str_replace($blogUrl, '', $_POST['flashPic_new_field']); setNewKeys($post_id, 'flag', $flag); setNewKeys($post_id, 'flashPic', $flashPic); }