root/afridex/plugins/Flutter/ajax/canvas-rescan.php @ 23

Revision 21, 1.1 kB (checked in by admin, 18 years ago)
Line 
1<?php
2
3if(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
9        if($_GET["action"] == 'rescan')
10                if($message = canvas_reload()) echo '<p>The Canvas block and plugin directories were successfully scanned.</p>'."\n".$message;
11                        else echo '<p>An error was encountered while rescanning. Please notify Canvas <a href="http://forums.freshpursuits.com/">support</a>.</p>';
12        if($_GET["action"] == 'reinstall') 
13                if(canvas_clean_install()) echo '<p>Canvas has been successfully reinstalled.</p>';
14                        else echo '<p>An error was encountered during installation. Please notify Canvas <a href="http://forums.freshpursuits.com/">support</a>.</p>';
15        if($_GET["action"] == 'restore') 
16                if(canvas_install_options()) echo '<p>Canvas defaults have been restored.</p>';
17                        else echo '<p>An error was encountered during restoration. Please notify Canvas <a href="http://forums.freshpursuits.com/">support</a>.</p>';
18}
19?>
Note: See TracBrowser for help on using the browser.