Project

General

Profile

« Previous | Next » 

Revision 1457

Added by Dietmar almost 13 years ago

Preparing 2.8.2 stable, last tests

View differences:

tool.php
27 27
	// a module language file exists for the language defined by the user, load it
28 28
	require_once(WB_PATH .'/modules/jsadmin/languages/'.LANGUAGE .'.php');
29 29
}
30

  
30
/*
31 31
// check if backend.css file needs to be included into the <body></body>
32 32
if(!method_exists($admin, 'register_backend_modfiles') && file_exists(WB_PATH .'/modules/jsadmin/backend.css')) {
33 33
	echo '<style type="text/css">';
34 34
	include(WB_PATH .'/modules/jsadmin/backend.css');
35 35
	echo "\n</style>\n";
36 36
}
37

  
37
*/
38 38
require_once(WB_PATH.'/modules/jsadmin/jsadmin.php');
39 39

  
40 40
// Check if user selected what add-ons to reload
41
if(isset($_POST['submit']) AND $_POST['submit'] != '') {
41
if(isset($_POST['save_settings']))  {
42 42
	if (!$admin->checkFTAN())
43 43
	{
44
		$admin->print_header();
44 45
		$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'],$_SERVER['REQUEST_URI']);
45
		exit();
46 46
	}
47
	$admin->print_header();
47 48

  
48 49
	// Include functions file
49 50
	require_once(WB_PATH.'/framework/functions.php');
50 51
	save_setting('mod_jsadmin_persist_order', isset($_POST['persist_order']));
51 52
	save_setting('mod_jsadmin_ajax_order_pages', isset($_POST['ajax_order_pages']));
52 53
	save_setting('mod_jsadmin_ajax_order_sections', isset($_POST['ajax_order_sections']));
53
	echo '<div style="border: solid 2px #9c9; background: #ffd; padding: 0.5em; margin-top: 1em">'.$MESSAGE['SETTINGS']['SAVED'].'</div>';
54
   // 	echo '<div style="border: solid 2px #9c9; background: #ffd; padding: 0.5em; margin-top: 1em">'.$MESSAGE['SETTINGS']['SAVED'].'</div>';
55
	// check if there is a database error, otherwise say successful
56
	if($database->is_error()) {
57
		$admin->print_error($database->get_error(), $js_back);
58
	} else {
59

  
60
		$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/admintools/tool.php?tool=jsadmin');
61
	}
62

  
63
} else {
64
	// $admin->print_header();
54 65
}
55 66

  
56 67
// Display form
57
$persist_order = get_setting('mod_jsadmin_persist_order', true) ? 'checked="checked"' : '';
58
$ajax_order_pages = get_setting('mod_jsadmin_ajax_order_pages', true) ? 'checked="checked"' : '';
59
$ajax_order_sections = get_setting('mod_jsadmin_ajax_order_sections', true) ? 'checked="checked"' : '';
60
?>
61
<?php
68
	$persist_order = get_setting('mod_jsadmin_persist_order', true) ? 'checked="checked"' : '';
69
	$ajax_order_pages = get_setting('mod_jsadmin_ajax_order_pages', true) ? 'checked="checked"' : '';
70
	$ajax_order_sections = get_setting('mod_jsadmin_ajax_order_sections', true) ? 'checked="checked"' : '';
62 71

  
63 72
// THIS ROUTINE CHECKS THE EXISTING OFF ALL NEEDED YUI FILES
64 73
  $YUI_ERROR=false; // ist there an Error
......
73 82
	}
74 83
	if($YUI_ERROR)
75 84
	{
76
    ?><div id="jsadmin_install" style="border: solid 2px #c99; background: #ffd; padding: 0.5em; margin-top: 1em">
85
?>
86
	<div id="jsadmin_install" style="border: solid 2px #c99; background: #ffd; padding: 0.5em; margin-top: 1em">
77 87

  
78 88
     <?php echo $MOD_JSADMIN['TXT_ERROR_INSTALLINFO_B'].$YUI_PUT_MISSING_Files; ?>
79 89
      </div>
80
      <?php
90
<?php
81 91
  }
82 92
  else
83 93
  {
84 94
  ?>
85
   <form id="jsadmin_form" style="margin-top: 1em; display: true;" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
95
   <form id="jsadmin_form" name="store_settings" style="margin-top: 1em; display: true;" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
86 96
	<?php echo $admin->getFTAN(); ?>
87 97
   <table cellpadding="4" cellspacing="0" border="0">
88 98
   <tr>
......
103 113
   <tr>
104 114
	     <td>&nbsp;</td>
105 115
	     <td>
106
		   <input type="submit" name="submit" value="<?php echo $TEXT['SAVE']; ?>" />
116
		   <input type="submit" name="save_settings" value="<?php echo $TEXT['SAVE']; ?>" />
107 117
	    </td>
108 118
   </tr>
109 119
   </table>
110 120
   </form>
111 121
 <?php
112 122
 }
113
?>
114 123

  

Also available in: Unified diff