1 |
1479
|
Luisehahne
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category modules
|
5 |
|
|
* @package SecureFormSwitcher
|
6 |
|
|
* @author WebsiteBaker Project
|
7 |
|
|
* @copyright 2004-2009, Ryan Djurovich
|
8 |
|
|
* @copyright 2009-2011, Website Baker Org. e.V.
|
9 |
|
|
* @link http://www.websitebaker2.org/
|
10 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
11 |
|
|
* @platform WebsiteBaker 2.8.2
|
12 |
|
|
* @requirements PHP 5.2.2 and higher
|
13 |
|
|
* @version $Id$
|
14 |
|
|
* @filesource $HeadURL$
|
15 |
|
|
* @lastmodified $Date$
|
16 |
|
|
*
|
17 |
|
|
*/
|
18 |
|
|
|
19 |
|
|
// Must include code to stop this file being access directly
|
20 |
|
|
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
|
21 |
|
|
global $i;
|
22 |
|
|
// load module language file
|
23 |
|
|
$mod_path = (dirname(__FILE__));
|
24 |
|
|
require_once( $mod_path.'/language_load.php' );
|
25 |
|
|
$i = (!isset($i) ? 1 : $i);
|
26 |
|
|
print "<div style=\"margin:1em auto;font-size:1.1em;\">";
|
27 |
|
|
print "<h4>Step $i: Updating SecureForm Switcher</h4>\n";
|
28 |
|
|
$i++;
|
29 |
|
|
$OK = "<span class=\"ok\">OK</span>";
|
30 |
|
|
$FAIL = "<span class=\"error\">FAILED</span>";
|
31 |
|
|
$target = $mod_path.'/files/SecureForm.mtab.php';
|
32 |
|
|
$dest = WB_PATH.'/framework/SecureForm.mtab.php';
|
33 |
|
|
|
34 |
|
|
if(is_writeable(WB_PATH.'/framework')) {
|
35 |
|
|
if((copy($target,$dest) && change_mode($dest)) || file_exists($target)) {
|
36 |
|
|
print "<br /><strong>Updating secure_form_module</strong> $OK<br />\n";
|
37 |
|
|
} else {
|
38 |
|
|
print "<br /><strong>Updating secure_form_module</strong> $FAIL<br />\n";
|
39 |
|
|
}
|
40 |
|
|
}
|
41 |
|
|
print "</div>";
|