|
Revision 21, 0.8 kB
(checked in by admin, 18 years ago)
|
|
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER ['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { |
|---|
| 4 | require( dirname(__FILE__) . '/../../../../wp-config.php' ); |
|---|
| 5 | if (!(is_user_logged_in() && current_user_can('edit_posts'))) |
|---|
| 6 | die("Athentication failed!"); |
|---|
| 7 | |
|---|
| 8 | if(isset($_GET["element"]) && isset($_GET["definition"]) && isset($_GET["value"])) { |
|---|
| 9 | $wpdb->query("UPDATE ".$table_prefix.'ink'." SET ".urldecode($_GET["definition"])." = '".urldecode($_GET["value"])."' WHERE element = '".urldecode($_GET["element"])."' AND theme = '".get_option('template')."'"); |
|---|
| 10 | write_ink_definitions(); |
|---|
| 11 | } |
|---|
| 12 | |
|---|
| 13 | if(isset($_GET["option"]) && isset($_GET["value"])) { |
|---|
| 14 | update_option($_GET["option"], $_GET["value"]); |
|---|
| 15 | } |
|---|
| 16 | |
|---|
| 17 | if(isset($_GET["restore"]) && $_GET["restore"] == 'true') { |
|---|
| 18 | ink_clean_install(); |
|---|
| 19 | canvas_check_theme(); |
|---|
| 20 | } |
|---|
| 21 | } |
|---|
| 22 | ?> |
|---|