root/afridex/plugins/Flutter/ajax/canvas-import.php @ 21

Revision 21, 479 bytes (checked in by admin, 18 years ago)
RevLine 
[21]1<?php
2
3// Import the layout from XML
4
5if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER ['HTTP_X_REQUESTED_WITH']  == 'XMLHttpRequest') {
6        require( dirname(__FILE__) . '/../../../../wp-config.php' );
7        if (!(is_user_logged_in() && current_user_can('edit_posts')))
8                die("Athentication failed!");
9
10       
11        canvas_import_layout($_POST['path_to_xml']);
12        if($_POST["restore"] == 'true') echo 'Success! Now, <a href="javascript:window.location.reload()">reload your Canvas</a>.';
13}
14?>
Note: See TracBrowser for help on using the browser.