Project

General

Profile

« Previous | Next » 

Revision 1674

Added by Dietmar about 12 years ago

  1. fixed add-ons upload error (tks to DBS)
    + add tool_icon.png to core module
    ! update outpu_filter success an error messages
    ! small redesign wb_themes
  2. fixed old.format.inc.php fileformat to unix

View differences:

tool.php
21 21
/* -------------------------------------------------------- */
22 22

  
23 23
	$modPath = str_replace('\\', '/', dirname(__FILE__)).'/';
24
	$msgTxt = '';
24
	$msgOk = '';
25
	$msgError = '';
25 26
	$msgCls = 'msg-box';
27
	$js_back = ADMIN_URL.'/admintools/tool.php?tool=output_filter';
26 28
// include the modules language definitions
27 29
	if(!is_readable($modPath.'languages/'.LANGUAGE .'.php')) {
28 30
		require_once($modPath.'languages/EN.php');
29 31
	} else {
30 32
		require_once($modPath.'languages/'.LANGUAGE .'.php');
31 33
	}
32
// check if data was submitted
33
	if($doSave) {
34

  
35
	// check if data was submitted
36
	if(isset($_POST['save_settings']))
37
	{
34 38
	// take over post - arguments
35 39
		$data = array();
36 40
		$data['sys_rel']       = (int)(intval(isset($_POST['sys_rel']) ? $_POST['sys_rel'] : 0) != 0);
......
48 52
					  '`dot_replacement`=\''.mysql_real_escape_string($data['dot_replacement']).'\'';
49 53
			if($database->query($sql)) {
50 54
			//anything ok
51
				$msgTxt = $MESSAGE['RECORD_MODIFIED_SAVED'];
55
				$msgOk = $MESSAGE['RECORD_MODIFIED_SAVED'];
52 56
				$msgCls = 'msg-box';
53 57
			}else {
54 58
			// database error
55
				$msgTxt = $MESSAGE['RECORD_MODIFIED_FAILED'];
59
				$msgError = $MESSAGE['RECORD_MODIFIED_FAILED'];
56 60
				$msgCls = 'error-box';
57 61
			}
58
		}else {
62
		} else {
59 63
		// FTAN error
60
			$msgTxt = $MESSAGE['GENERIC_SECURITY_ACCESS'];
64
			$msgError = $MESSAGE['GENERIC_SECURITY_ACCESS'];
61 65
			$msgCls = 'error-box';
62 66
		}
63
	}else {
67

  
68
		if(!$admin_header) { $admin->print_header(); }
69

  
70
		if( $msgError != '')
71
		{
72
			$admin->print_error($msgError, $js_back);
73
		}
74
		if( $msgOk != '')
75
		{
76
			$admin->print_success($msgOk, $js_back);
77
		}
78

  
79
	}  else {
80
}
64 81
	// read settings from the database to show
65 82
		require_once($modPath.'filter-routines.php');
66 83
		$data = getOutputFilterSettings();
67
	}
68
	// write out header if needed
69
	if(!$admin_header) { $admin->print_header(); }
70
	if( $msgTxt != '') {
71
	// write message box if needed
72
		echo '<div class="'.$msgCls.'">'.$msgTxt.'</div>';
73
	}
74 84
?>
75 85
<h2><?php echo $MOD_MAIL_FILTER['HEADING']; ?></h2>
76 86
<p><?php echo $MOD_MAIL_FILTER['HOWTO']; ?></p>
77 87
<p><?php echo $MOD_MAIL_FILTER['HOWTOTIP']; ?></p>
78 88
<form name="store_settings" action="<?php echo $_SERVER['REQUEST_URI'];?>" method="post">
79 89
	<?php echo $admin->getFTAN(); ?>
80
	<input type="hidden" name="action" value="save" />
90
	<input type="hidden" name="save_settings" value="save" />
81 91
	<table summary="" width="98%" cellspacing="0" cellpadding="5" class="row_a">
82 92
	<tr><td colspan="2"><strong><?php echo $MOD_MAIL_FILTER['BASIC_CONF'];?>:</strong></td></tr>
83 93
	<tr>

Also available in: Unified diff