Project

General

Profile

« Previous | Next » 

Revision 1818

Added by Dietmar almost 12 years ago

  1. bugfix Ticket 10 usergroup show homefolder in media
    ! update users, create username homefolder in media/homefolders
  2. add mssing values in table settings by installing WebsiteBaker

View differences:

branches/2.8.x/CHANGELOG
13 13

  
14 14

  
15 15

  
16
16 Nov-2012 Build 1818 Dietmar Woellbrink (Luisehahne)
17
# bugfix Ticket 10 usergroup show homefolder in media
18
! update users, create username homefolder in media/homefolders
19
# add mssing values in table settings by installing WebsiteBaker
16 20
11 Nov-2012 Build 1817 Dietmar Woellbrink (Luisehahne)
17 21
# Bugfix upgrde-script, syntaxerror in sql strict statement
18 22
11 Nov-2012 Build 1816 Dietmar Woellbrink (Luisehahne)
branches/2.8.x/wb/admin/media/rename2.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         media
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
9 8
 * @link			http://www.websitebaker2.org/
10 9
 * @license         http://www.gnu.org/licenses/gpl.html
11 10
 * @platform        WebsiteBaker 2.8.x
12 11
 * @requirements    PHP 5.2.2 and higher
13 12
 * @version         $Id$
14
 * @filesource		$HeadURL:  $
15
 * @lastmodified    $Date:  $
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
16 15
 *
17 16
 */
18 17

  
19
// Create admin object
20
require('../../config.php');
21
require_once(WB_PATH.'/framework/class.admin.php');
22
$admin = new admin('Media', 'media_rename', false);
18
if(!defined('WB_URL'))
19
{
20
    $config_file = realpath('../../config.php');
21
    if(file_exists($config_file) && !defined('WB_URL'))
22
    {
23
    	require($config_file);
24
    }
25
}
26
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
23 27

  
28
$admin = new admin('Media', 'media', false);
29

  
24 30
// Include the WB functions file
25 31
require_once(WB_PATH.'/framework/functions.php');
26 32

  
......
33 39
$rootlink = 'browse.php?dir=';
34 40
// $file_id = intval($admin->get_post('id'));
35 41

  
42
// Get the current dir
43
$currentHome = $admin->get_home_folder();
44
// check for correct directory
45
if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$rootlink,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
46
	$rootlink = $currentHome;
47
}
48

  
36 49
// first Check to see if it contains ..
37 50
if (!check_media_path($directory)) {
38
	$admin->print_error($MESSAGE['MEDIA']['DIR_DOT_DOT_SLASH'],$rootlink, false);
51
	$admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH'],$rootlink, false);
39 52
}
40 53

  
41 54
// Get the temp id
......
93 106
$file_id = $admin->getIDKEY($file_id);
94 107

  
95 108
if(!isset($rename_file)) {
96
	$admin->print_error($MESSAGE['MEDIA']['FILE_NOT_FOUND'], $dirlink, false);
109
	$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
97 110
}
98 111

  
99 112
// Check if they entered a new name
100 113
if(media_filename($admin->get_post('name')) == "") {
101
	$admin->print_error($MESSAGE['MEDIA']['BLANK_NAME'], "rename.php?dir=$directory&id=$file_id", false);
114
	$admin->print_error($MESSAGE['MEDIA_BLANK_NAME'], "rename.php?dir=$directory&id=$file_id", false);
102 115
} else {
103 116
	$old_name = $admin->get_post('old_name');
104 117
	$new_name =  media_filename($admin->get_post('name'));
......
107 120
// Check if they entered an extension
108 121
if($type == 'file') {
109 122
	if(media_filename($admin->get_post('extension')) == "") {
110
		$admin->print_error($MESSAGE['MEDIA']['BLANK_EXTENSION'], "rename.php?dir=$directory&id=$file_id", false);
123
		$admin->print_error($MESSAGE['MEDIA_BLANK_EXTENSION'], "rename.php?dir=$directory&id=$file_id", false);
111 124
	} else {
112 125
		$extension = media_filename($admin->get_post('extension'));
113 126
	}
......
123 136
$dots = (substr($info['basename'], 0, 1) == '.') || (substr($info['basename'], -1, 1) == '.');
124 137

  
125 138
if( preg_match('/'.$forbidden_file_types.'$/i', $ext) || $dots == '.' ) {
126
	$admin->print_error($MESSAGE['MEDIA']['CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
139
	$admin->print_error($MESSAGE['MEDIA_CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
127 140
}
128 141

  
129 142
// Check if the name contains ..
130 143
if(strstr($name, '..')) {
131
	$admin->print_error($MESSAGE['MEDIA']['NAME_DOT_DOT_SLASH'], "rename.php?dir=$directory&id=$file_id", false);
144
	$admin->print_error($MESSAGE['MEDIA_NAME_DOT_DOT_SLASH'], "rename.php?dir=$directory&id=$file_id", false);
132 145
}
133 146

  
134 147
// Check if the name is index.php
135 148
if($name == 'index.php') {
136
	$admin->print_error($MESSAGE['MEDIA']['NAME_INDEX_PHP'], "rename.php?dir=$directory&id=$file_id", false);
149
	$admin->print_error($MESSAGE['MEDIA_NAME_INDEX_PHP'], "rename.php?dir=$directory&id=$file_id", false);
137 150
}
138 151

  
139 152
// Check that the name still has a value
140 153
if($name == '') {
141
	$admin->print_error($MESSAGE['MEDIA']['BLANK_NAME'], "rename.php?dir=$directory&id=$file_id", false);
154
	$admin->print_error($MESSAGE['MEDIA_BLANK_NAME'], "rename.php?dir=$directory&id=$file_id", false);
142 155
}
143 156

  
144 157
$info = pathinfo(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$rename_file);
......
146 159
$dots = (substr($info['basename'], 0, 1) == '.') || (substr($info['basename'], -1, 1) == '.');
147 160

  
148 161
if( preg_match('/'.$forbidden_file_types.'$/i', $ext) || $dots == '.' ) {
149
	$admin->print_error($MESSAGE['MEDIA']['CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
162
	$admin->print_error($MESSAGE['MEDIA_CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
150 163
}
151 164

  
152 165
// Check if we should overwrite or not
153 166
if($admin->get_post('overwrite') != 'yes' AND file_exists(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name) == true) {
154 167
	if($type == 'folder') {
155
		$admin->print_error($MESSAGE['MEDIA']['DIR_EXISTS'], "rename.php?dir=$directory&id=$file_id", false);
168
		$admin->print_error($MESSAGE['MEDIA_DIR_EXISTS'], "rename.php?dir=$directory&id=$file_id", false);
156 169
	} else {
157
		$admin->print_error($MESSAGE['MEDIA']['FILE_EXISTS'], "rename.php?dir=$directory&id=$file_id", false);
170
		$admin->print_error($MESSAGE['MEDIA_FILE_EXISTS'], "rename.php?dir=$directory&id=$file_id", false);
158 171
	}
159 172
}
160 173

  
......
164 177
    // feature freeze
165 178
	// require_once(ADMIN_PATH.'/media/dse.php');
166 179

  
167
	$admin->print_success($MESSAGE['MEDIA']['RENAMED'], $dirlink);
180
	$admin->print_success($MESSAGE['MEDIA_RENAMED'], $dirlink);
168 181
} else {
169
	$admin->print_error($MESSAGE['MEDIA']['CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
182
	$admin->print_error($MESSAGE['MEDIA_CANNOT_RENAME'], "rename.php?dir=$directory&id=$file_id", false);
170 183
}
171 184

  
branches/2.8.x/wb/admin/media/setparameter.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         media
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 8
 * @link			http://www.websitebaker2.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10 10
 * @platform        WebsiteBaker 2.8.x
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL:  $
14
 * @lastmodified    $Date:  $
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15 15
 *
16 16
 */
17 17

  
18
require('../../config.php');
19
require_once(WB_PATH.'/framework/class.admin.php');
18
if(!defined('WB_URL'))
19
{
20
    $config_file = realpath('../../config.php');
21
    if(file_exists($config_file) && !defined('WB_URL'))
22
    {
23
    	require($config_file);
24
    }
25
}
26
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
27

  
20 28
$admin = new admin('Media', 'media', false);
21 29
// Include the WB functions file
22 30
require_once(WB_PATH.'/framework/functions.php');
......
29 37
	// a theme language file exists for the language defined by the user, load it
30 38
	require_once(THEME_PATH .'/languages/'.LANGUAGE .'.php');
31 39
}
40
// Get the current homedir
41
$currentHome = WB_PATH.MEDIA_DIRECTORY.$admin->get_home_folder();
42
$currentHome = str_replace(WB_PATH, '', $currentHome);
43
$currentHome = str_replace(array('/',' '),'_',$currentHome);
32 44

  
33 45
//Save post vars to the parameters file
34 46
if ( !is_null($admin->get_post_escaped("save"))) {
......
39 51
	}
40 52
*/
41 53

  
42
	if(DEFAULT_THEME != ' wb_theme') {
54
	$pathsettings = array();
55
	if(DEFAULT_THEME != '') {
43 56
		//Check for existing settings entry, if not existing, create a record first!
44 57
		if (!$database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" )) {
45 58
			$database->query ( "INSERT INTO ".TABLE_PREFIX."settings (`name`,`value`) VALUES ('mediasettings','')" );
......
48 61
		$pathsettings = array();
49 62
	}
50 63

  
64
	$pathsettings['global']['admin_only'] = ($admin->get_post_escaped('admin_only')!='' ? 'checked="checked"' : '');
65
	$pathsettings['global']['show_thumbs'] = ($admin->get_post_escaped('show_thumbs')!='' ? 'checked="checked"' : '');
66

  
51 67
	$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
68

  
52 69
	$dirs[] = WB_PATH.MEDIA_DIRECTORY;
53 70
	foreach($dirs AS $name) {
54 71
		$r = str_replace(WB_PATH, '', $name);
55 72
		$r = str_replace(array('/',' '),'_',$r);
56 73
		$w = (int)$admin->get_post_escaped($r.'-w');
57 74
		$h = (int)$admin->get_post_escaped($r.'-h');
58
		$pathsettings[$r]['width']=$w; 
75
		$pathsettings[$r]['width']=$w;
59 76
		$pathsettings[$r]['height']=$h;
60 77
	}
61
	$pathsettings['global']['admin_only'] = ($admin->get_post_escaped('admin_only')!=''?'checked':'');
62
	$pathsettings['global']['show_thumbs'] = ($admin->get_post_escaped('show_thumbs')!=''?'checked':'');
78
//	$pathsettings['global']['admin_only'] = ($admin->get_post_escaped('admin_only')!='' ? 'checked="checked"' : '');
79
//	$pathsettings['global']['show_thumbs'] = ($admin->get_post_escaped('show_thumbs')!='' ? 'checked="checked"' : '');
63 80
	$fieldSerialized = serialize($pathsettings);
64 81
	$database->query ( "UPDATE ".TABLE_PREFIX."settings SET `value` = '$fieldSerialized' WHERE `name`='mediasettings'" );
65 82
	header ("Location: browse.php");
66 83
}
67 84

  
68 85
include ('parameters.php');
69
if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global']['admin_only']) {
86
if ($_SESSION['GROUP_ID'] != 1 && (isset($pathsettings['global']['admin_only']) && $pathsettings['global']['admin_only']) ) {
70 87
	echo "Sorry, settings not available";
71 88
	exit();
72 89
}
......
82 99
if ($_SESSION['GROUP_ID'] != 1) {
83 100
	$template->set_var('DISPLAY_ADMIN', 'hide');
84 101
}
85
$template->set_var(array( 
102
$template->set_var(array(
86 103
				'TEXT_HEADER' => $TEXT['TEXT_HEADER'],
87 104
				'SAVE_TEXT' => $TEXT['SAVE'],
88 105
				'BACK' => $TEXT['BACK'],
......
92 109
$template->set_block('main_block', 'list_block', 'list');
93 110
$row_bg_color = '';
94 111
$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
112

  
95 113
$dirs[] = WB_PATH.MEDIA_DIRECTORY;
96 114

  
97 115
$array_lowercase = array_map('strtolower', $dirs);
......
101 119
	$relative = str_replace(WB_PATH, '', $name);
102 120
	$safepath = str_replace(array('/',' '),'_',$relative);
103 121
	$cur_width = $cur_height = '';
104
	if (isset($pathsettings[$safepath]['width'])) $cur_width = $pathsettings[$safepath]['width'];
105
	if (isset($pathsettings[$safepath]['height'])) $cur_height = $pathsettings[$safepath]['height'];
106
	$cur_width = ($cur_width ? (int)$cur_width : '-');
107
	$cur_height = ($cur_height ? (int)$cur_height : '-');
122
	if (isset($pathsettings[$safepath]['width'])){ $cur_width = $pathsettings[$safepath]['width'];}
123
	if (isset($pathsettings[$safepath]['height'])){ $cur_height = $pathsettings[$safepath]['height'];}
124
	$cur_width = ($cur_width ? (int)$cur_width : '');
125
	$cur_height = ($cur_height ? (int)$cur_height : '');
126
//
127
    $bPathCanEdit = (preg_match('/'.$currentHome.'/i', $safepath)) ? true : false;
108 128

  
109
	if($row_bg_color == 'DEDEDE') $row_bg_color = 'EEEEEE';
110
	else $row_bg_color = 'DEDEDE';
129
//	if($row_bg_color == 'DEDEDE') $row_bg_color = 'EEEEEE';
130
//	else $row_bg_color = 'DEDEDE';
131
    $row_bg_color = ($row_bg_color == '#dedede') ? '#fff' : '#dedede';
111 132

  
112
	$template->set_var(array( 
133
	$template->set_var(array(
113 134
					'ADMIN_URL' => ADMIN_URL,
114 135
					'PATH_NAME' => $relative,
115 136
					'WIDTH' => $TEXT['WIDTH'],
116 137
					'HEIGHT' => $TEXT['HEIGHT'],
117 138
					'FIELD_NAME_W' => $safepath.'-w',
118 139
					'FIELD_NAME_H' => $safepath.'-h',
140
					'CAN_EDIT_CLASS' => ($bPathCanEdit==false) ? '' : 'bold',
141
					'READ_ONLY_DIR' => ($bPathCanEdit==false) ? ' readonly="readonly"' : '',
142
					'CUR_HEIGHT' => $cur_height,
119 143
					'CUR_WIDTH' => $cur_width,
120
					'CUR_HEIGHT' => $cur_height,
121 144
					'SETTINGS' => $TEXT['SETTINGS'],
122 145
					'ADMIN_ONLY' => $TEXT['ADMIN_ONLY'],
123
					'ADMIN_ONLY_SELECTED' => $pathsettings['global']['admin_only'],
146
					'ADMIN_ONLY_SELECTED' => isset($pathsettings['global']['admin_only']) ? $pathsettings['global']['admin_only']:'',
124 147
					'NO_SHOW_THUMBS' => $TEXT['NO_SHOW_THUMBS'],
125
					'NO_SHOW_THUMBS_SELECTED' => $pathsettings['global']['show_thumbs'],
148
					'NO_SHOW_THUMBS_SELECTED' => isset($pathsettings['global']['show_thumbs']) ? $pathsettings['global']['show_thumbs']:'',
126 149
					'ROW_BG_COLOR' => $row_bg_color,
127 150
					'FTAN' => $admin->getFTAN()
128 151
				)
129 152

  
branches/2.8.x/wb/admin/media/browse.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         media
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 8
 * @link			http://www.websitebaker2.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10 10
 * @platform        WebsiteBaker 2.8.x
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL:  $
14
 * @lastmodified    $Date:  $
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15 15
 *
16 16
 */
17 17

  
18 18
// Create admin object
19
require('../../config.php');
19
if(!defined('WB_URL'))
20
{
21
    $config_file = realpath('../../config.php');
22
    if(file_exists($config_file) && !defined('WB_URL'))
23
    {
24
    	require($config_file);
25
    }
26
}
20 27
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
28

  
21 29
$admin = new admin('Media', 'media', false);
22 30

  
23 31
$starttime = explode(" ", microtime());
......
122 130

  
123 131
// Get the current dir
124 132
$currentHome = $admin->get_home_folder();
133
// set directory if you call from menu
125 134
$directory =	(($currentHome) AND (!array_key_exists('dir',$_GET)))
126 135
				?
127 136
				$currentHome
128 137
				:
129 138
				$admin->strip_slashes($admin->get_get('dir')) ;
130 139

  
140
// check for correct directory
141
if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$directory,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
142
	$directory = $currentHome;
143
}
144

  
131 145
if($directory == '/' OR $directory == '\\') {
132 146
	$directory = '';
133 147
}
......
152 166
	exit(0);
153 167
}
154 168

  
155
if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global_admin_only']) { // Only show admin the settings link
169
if ($_SESSION['GROUP_ID'] != 1 && (isset($pathsettings['global']['admin_only']) && $pathsettings['global']['admin_only']) ) { // Only show admin the settings link
156 170
	$template->set_var('DISPLAY_SETTINGS', 'hide');
157 171
}
158 172

  
......
200 214
		if(substr($file, 0, 1) != '.' AND $file != '.svn' AND $file != 'index.php') {
201 215
			if( !preg_match('/'.$forbidden_file_types.'$/i', $ext) ) {
202 216
				if(is_dir(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$file)) {
203
					if(!isset($home_folders[$directory.'/'.$file])) {
217
//					if( !isset($home_folders[$directory.'/'.$file]) ) {
218
                	if(!isset($home_folders[$directory.'/'.$file]) || $currentHome =='' )
219
                    {
204 220
						$DIR[] = $file;
205 221
					}
206 222
				} else {
......
267 283
			$icon = '';
268 284
			$tooltip = '';
269 285

  
270

  
271
			if (!$pathsettings['global_show_thumbs']) {
286
			if ( (isset($pathsettings['global']['show_thumbs']) && ($pathsettings['global']['show_thumbs']==false) ) ) {
272 287
				$info = getimagesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name);
273 288
				if ($info[0]) {
274 289
					$imgdetail = fsize(filesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name)).'<br /> '.$info[0].' x '.$info[1].' px';
......
315 330
	$template->set_var('DISPLAY_NONE_FOUND', 'hide');
316 331
}
317 332

  
333
if($currentHome=='') {
318 334
// Insert permissions values
319
if($admin->get_permission('media_rename') != true) {
320
	$template->set_var('DISPLAY_RENAME', 'hide');
335
    if($admin->get_permission('media_rename') != true) {
336
    	$template->set_var('DISPLAY_RENAME', 'hide');
337
    }
338
    if($admin->get_permission('media_delete') != true) {
339
    	$template->set_var('DISPLAY_DELETE', 'hide');
340
    }
321 341
}
322
if($admin->get_permission('media_delete') != true) {
323
	$template->set_var('DISPLAY_DELETE', 'hide');
324
}
325 342

  
326 343
// Insert language text and messages
327 344
$template->set_var(array(
328 345

  
branches/2.8.x/wb/admin/media/delete.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         admintools
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
9 8
 * @link			http://www.websitebaker2.org/
10 9
 * @license         http://www.gnu.org/licenses/gpl.html
11 10
 * @platform        WebsiteBaker 2.8.x
12 11
 * @requirements    PHP 5.2.2 and higher
13 12
 * @version         $Id$
14
 * @filesource		$HeadURL:  $
15
 * @lastmodified    $Date:  $
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
16 15
 *
17 16
 */
18 17

  
19
// Create admin object
20
require('../../config.php');
21
require_once(WB_PATH.'/framework/class.admin.php');
22
$admin = new admin('Media', 'media_delete', false);
18
if(!defined('WB_URL'))
19
{
20
    $config_file = realpath('../../config.php');
21
    if(file_exists($config_file) && !defined('WB_URL'))
22
    {
23
    	require($config_file);
24
    }
25
}
26
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
23 27

  
28
$admin = new admin('Media', 'media', false);
29

  
24 30
// Include the WB functions file
25 31
require_once(WB_PATH.'/framework/functions.php');
26 32

  
......
31 37
$dirlink = 'browse.php?dir='.$directory;
32 38
$rootlink = 'browse.php?dir=';
33 39

  
40
// Get the current dir
41
$currentHome = $admin->get_home_folder();
42
// check for correct directory
43
if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$rootlink,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
44
	$rootlink = $currentHome;
45
}
46

  
34 47
// Check to see if it contains ..
35 48
if (!check_media_path($directory)) {
36 49
	// $admin->print_header();
37
	$admin->print_error($MESSAGE['MEDIA']['DIR_DOT_DOT_SLASH'],$rootlink,false );
50
	$admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH'],$rootlink,false );
38 51
}
39 52

  
40 53
// Get the file id
......
93 106

  
94 107
// Check to see if we could find an id to match
95 108
if(!isset($delete_file)) {
96
	$admin->print_error($MESSAGE['MEDIA']['FILE_NOT_FOUND'], $dirlink, false);
109
	$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
97 110
}
98 111
$relative_path = WB_PATH.MEDIA_DIRECTORY.'/'.$directory.'/'.$delete_file;
99 112
// Check if the file/folder exists
100 113
if(!file_exists($relative_path)) {
101
	$admin->print_error($MESSAGE['MEDIA']['FILE_NOT_FOUND'], $dirlink, false);
114
	$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
102 115
}
103 116

  
104 117
// Find out whether its a file or folder
105 118
if($type == 'folder') {
106 119
	// Try and delete the directory
107 120
	if(rm_full_dir($relative_path)) {
108
		$admin->print_success($MESSAGE['MEDIA']['DELETED_DIR'], $dirlink);
121
		$admin->print_success($MESSAGE['MEDIA_DELETED_DIR'], $dirlink);
109 122
	} else {
110
		$admin->print_error($MESSAGE['MEDIA']['CANNOT_DELETE_DIR'], $dirlink, false);
123
		$admin->print_error($MESSAGE['MEDIA_CANNOT_DELETE_DIR'], $dirlink, false);
111 124
	}
112 125
} else {
113 126
	// Try and delete the file
114 127
	if(unlink($relative_path)) {
115
		$admin->print_success($MESSAGE['MEDIA']['DELETED_FILE'], $dirlink);
128
		$admin->print_success($MESSAGE['MEDIA_DELETED_FILE'], $dirlink);
116 129
	} else {
117
		$admin->print_error($MESSAGE['MEDIA']['CANNOT_DELETE_FILE'], $dirlink, false);
130
		$admin->print_error($MESSAGE['MEDIA_CANNOT_DELETE_FILE'], $dirlink, false);
118 131
	}
119 132
}
120

  
121
?>
122 133

  
branches/2.8.x/wb/admin/media/create.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         admintools
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
9 8
 * @link			http://www.websitebaker2.org/
10 9
 * @license         http://www.gnu.org/licenses/gpl.html
11 10
 * @platform        WebsiteBaker 2.8.x
12 11
 * @requirements    PHP 5.2.2 and higher
13 12
 * @version         $Id$
14
 * @filesource		$HeadURL:  $
15
 * @lastmodified    $Date:  $
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
16 15
 *
17 16
 */
18 17

  
19
// Print admin header
20
require('../../config.php');
21

  
22
require_once(WB_PATH.'/framework/class.admin.php');
18
if(!defined('WB_URL'))
19
{
20
    $config_file = realpath('../../config.php');
21
    if(file_exists($config_file) && !defined('WB_URL'))
22
    {
23
    	require($config_file);
24
    }
25
}
26
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
23 27
// Include the WB functions file
24 28
require_once(WB_PATH.'/framework/functions.php');
25 29

  
......
33 37
// Check to see if name or target contains ../
34 38
if(strstr($name, '..')) {
35 39
	$admin->print_header();
36
	$admin->print_error($MESSAGE['MEDIA']['NAME_DOT_DOT_SLASH']);
40
	$admin->print_error($MESSAGE['MEDIA_NAME_DOT_DOT_SLASH']);
37 41
}
38 42

  
39 43
// Remove bad characters
......
52 56
$admin->print_header();
53 57

  
54 58
if (!check_media_path($target, false)) {
55
	$admin->print_error($MESSAGE['MEDIA']['TARGET_DOT_DOT_SLASH']);
59
	$admin->print_error($MESSAGE['MEDIA_TARGET_DOT_DOT_SLASH']);
56 60
}
57 61

  
58 62
// Create relative path of the new dir name
......
60 64

  
61 65
// Check to see if the folder already exists
62 66
if(file_exists($directory)) {
63
	$admin->print_error($MESSAGE['MEDIA']['DIR_EXISTS']);
67
	$admin->print_error($MESSAGE['MEDIA_DIR_EXISTS']);
64 68
}
65 69

  
66 70
if ( sizeof(createFolderProtectFile( $directory )) )
67 71
{
68
	$admin->print_error($MESSAGE['MEDIA']['DIR_NOT_MADE']);
72
	$admin->print_error($MESSAGE['MEDIA_DIR_NOT_MADE']);
69 73
} else {
70 74
	$usedFiles = array();
71 75
    // feature freeze
72 76
	// require_once(ADMIN_PATH.'/media/dse.php');
73
	$admin->print_success($MESSAGE['MEDIA']['DIR_MADE']);
77
	$admin->print_success($MESSAGE['MEDIA_DIR_MADE']);
74 78
}
75 79

  
76 80
// Print admin
77 81

  
branches/2.8.x/wb/admin/media/parameters.php
10 10
 * @platform        WebsiteBaker 2.8.x
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL:  $
14
 * @lastmodified    $Date:  $
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15 15
 *
16 16
 */
17 17

  
......
19 19
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
20 20

  
21 21
function __unserialize($sObject) {  // found in php manual :-)
22
	$__ret =preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
22
    if($sObject=='') { return array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );}
23
	$__ret = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
23 24
	return unserialize($__ret);
24 25
}
25
$pathsettings = array();
26
if(DEFAULT_THEME != ' wb_theme') {
26

  
27
$pathsettings = array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );
28
if(DEFAULT_THEME != '') {
27 29
	$query = $database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" );
28 30
	if ($query && $query->numRows() > 0) {
29 31
		$settings = $query->fetchRow();
30 32

  
branches/2.8.x/wb/admin/media/index.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         admintools
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 8
 * @link			http://www.websitebaker2.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10 10
 * @platform        WebsiteBaker 2.8.x
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL:  $
14
 * @lastmodified    $Date:  $
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15 15
 *
16 16
 */
17 17

  
18 18
// Print admin header
19
require('../../config.php');
20
require_once(WB_PATH.'/framework/class.admin.php');
19
if(!defined('WB_URL'))
20
{
21
    $config_file = realpath('../../config.php');
22
    if(file_exists($config_file) && !defined('WB_URL'))
23
    {
24
    	require($config_file);
25
    }
26
}
27
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
28

  
21 29
$admin = new admin('Media', 'media');
22 30

  
23 31
$starttime = explode(" ", microtime());
......
41 49
$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
42 50
$currentHome = $admin->get_home_folder();
43 51

  
44
if ($currentHome){
52
if ($currentHome!=''){
45 53
	$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY.$currentHome);
46 54
}
47 55
else
48 56
{
49 57
	$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
50 58
}
59

  
51 60
$array_lowercase = array_map('strtolower', $dirs);
52 61
array_multisort($array_lowercase, SORT_ASC, SORT_STRING, $dirs);
53 62
foreach($dirs AS $name) {
54
	if(!isset($home_folders[str_replace(WB_PATH.MEDIA_DIRECTORY, '', $name)])) {
63

  
64
	if(!isset($home_folders[str_replace(WB_PATH.MEDIA_DIRECTORY, '', $name)]) || $currentHome =='' )
65
    {
55 66
		$template->set_var('NAME', str_replace(WB_PATH, '', $name));
56 67
		$template->parse('dir_list', 'dir_list_block', true);
57 68
	}
......
64 75
if($admin->get_permission('media_upload') != true) {
65 76
	$template->set_var('DISPLAY_UPLOAD', 'hide');
66 77
}
67
if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global']['admin_only']) { // Only show admin the settings link
78
if ($_SESSION['GROUP_ID'] != 1 && (isset($pathsettings['global']['admin_only']) && $pathsettings['global']['admin_only'])) {
79
    // Only show admin the settings link
68 80
	$template->set_var('DISPLAY_SETTINGS', 'hide');
69 81
}
70 82
// Workout if the up arrow should be shown
......
94 106
// Insert language text and messages
95 107
$template->set_var(array(
96 108
					'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,
109
//					'MEDIA_DIRECTORY' => ($currentHome!='') ? MEDIA_DIRECTORY : $currentHome,
97 110
					'TEXT_NAME' => $TEXT['TITLE'],
98 111
					'TEXT_RELOAD' => $TEXT['RELOAD'],
99 112
					'TEXT_TARGET_FOLDER' => $TEXT['TARGET_FOLDER'],
100 113

  
branches/2.8.x/wb/admin/media/rename.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         media
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 8
 * @link			http://www.websitebaker2.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10 10
 * @platform        WebsiteBaker 2.8.x
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL:  $
14
 * @lastmodified    $Date:  $
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15 15
 *
16 16
 */
17 17

  
18
// Create admin object
19
require('../../config.php');
20
require_once(WB_PATH.'/framework/class.admin.php');
21
$admin = new admin('Media', 'media_rename', false);
18
if(!defined('WB_URL'))
19
{
20
    $config_file = realpath('../../config.php');
21
    if(file_exists($config_file) && !defined('WB_URL'))
22
    {
23
    	require($config_file);
24
    }
25
}
26
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
22 27

  
28
$admin = new admin('Media', 'media', false);
29

  
23 30
// Include the WB functions file
24 31
require_once(WB_PATH.'/framework/functions.php');
25 32

  
......
31 38
$rootlink = 'browse.php?dir=';
32 39
// $file_id = intval($admin->get_get('id'));
33 40

  
41
// Get the current dir
42
$currentHome = $admin->get_home_folder();
43
// check for correct directory
44
if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$rootlink,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
45
	$rootlink = $currentHome;
46
}
47

  
34 48
// first Check to see if it contains ..
35 49
if (!check_media_path($directory)) {
36
	$admin->print_error($MESSAGE['MEDIA']['DIR_DOT_DOT_SLASH'],$rootlink, false);
50
	$admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH'],$rootlink, false);
37 51
}
38 52

  
39 53
// Get the temp id
......
91 105
}
92 106

  
93 107
if(!isset($rename_file)) {
94
	$admin->print_error($MESSAGE['MEDIA']['FILE_NOT_FOUND'], $dirlink, false);
108
	$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
95 109
}
96 110

  
97 111
// Setup template object, parse vars to it, then parse it
98 112

  
branches/2.8.x/wb/admin/skel/themes/htt/setparameter.htt
1
<!-- BEGIN main_block -->
2 1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 2
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 3
<head>
5 4
<title>Set Upload Parameters</title>
5
<!-- BEGIN main_block -->
6 6

  
7

  
8 7
<style type="text/css">
9 8
body,td,th,input,textarea {
10 9
	font-family: Verdana, Arial, Helvetica, sans-serif;
11
	font-size: 10px;
10
	font-size: 11px;
11
    text-align:left;
12 12
}
13 13
body {
14 14
	background-color: #FFF;
......
30 30
	text-decoration: none;
31 31
	color: #336699;
32 32
}
33
.bold { color: #2C50A3; }
34
.path-name { width: 65%;}
35
tbody.path-option tr th  { font-weight: normal;}
36

  
33 37
</style>
34 38
</head>
35 39
<body>
36 40

  
37 41
<table summary="" cellpadding="4" cellspacing="0" border="0" width="100%" style="border-bottom: 1px solid #666; width: 100%;">
38
<tr style="background-color: #DDD;">
39
	<td align="center">{TEXT_HEADER}</td>
42
<tr style="background-color: #ddd;">
43
	<td>{TEXT_HEADER}</td>
40 44
</tr>
41 45
</table>
42 46
<form method="post" action="{ADMIN_URL}/media/setparameter.php">
43 47
	{FTAN}
44 48
<table summary="" cellpadding="4" cellspacing="0" border="0" width="100%" class="{DISPLAY_LIST_TABLE}">
45
	<tr><td>{SETTINGS}</td><td><input type="checkbox" name="show_thumbs" {NO_SHOW_THUMBS_SELECTED}> {NO_SHOW_THUMBS}</td></tr>
46
	<tr class="{DISPLAY_ADMIN}"><td></td>&nbsp;<td><input type="checkbox" name="admin_only" {ADMIN_ONLY_SELECTED}> {ADMIN_ONLY}</td></tr>
47
	<tr><td colspan="2" style="border-bottom: 1px solid #666; line-height: 1px;">&nbsp;</td></tr>
49
<tbody class="path-option">
50
	<tr><th>{SETTINGS}</th><th><input type="checkbox" name="show_thumbs" {NO_SHOW_THUMBS_SELECTED} /> {NO_SHOW_THUMBS}</th></tr>
51
	<tr class="{DISPLAY_ADMIN}"><th>&nbsp;</th><th><input type="checkbox" name="admin_only" {ADMIN_ONLY_SELECTED} /> {ADMIN_ONLY}</th></tr>
52
	<tr><th colspan="2" style="border-bottom: 1px solid #666; line-height: 1px;">&nbsp;</th></tr>
53
</tbody>
54
</table>
55

  
56
<table summary="" cellpadding="4" cellspacing="0" border="0" width="100%" class="{DISPLAY_LIST_TABLE}">
57
<tbody>
48 58
<!-- BEGIN list_block -->
49
	<tr style="background-color: #{ROW_BG_COLOR};">
50
		<td>{PATH_NAME}</td>
51
		<td>{WIDTH} <input size="5" type="text" name="{FIELD_NAME_W}" value="{CUR_WIDTH}"> {HEIGHT} <input size="5" type="text" name="{FIELD_NAME_H}" value="{CUR_HEIGHT}"></td>
59
	<tr style="background-color: {ROW_BG_COLOR};" class="{CAN_EDIT_CLASS}">
60
		<td class="path-name">{PATH_NAME}</td>
61
		<td>
62
        {WIDTH}
63
        <input size="5" type="text" name="{FIELD_NAME_W}" value="{CUR_WIDTH}"{READ_ONLY_DIR} />
64
        {HEIGHT}
65
        <input size="5" type="text" name="{FIELD_NAME_H}" value="{CUR_HEIGHT}"{READ_ONLY_DIR} />
66
        </td>
52 67
	</tr>
53 68
<!-- END list_block -->
54 69
	<tr>
55
		<td><input type="button" onclick="javascript: window.location = 'browse.php'" value="{BACK}"></td>
56
		<td><input type="submit" name="save" value="{SAVE_TEXT}"></td>
70
		<td><input type="button" onclick="javascript:window.location='browse.php'" value="{BACK}" /></td>
71
		<td><input type="submit" name="save" value="{SAVE_TEXT}" /></td>
57 72
	</tr>
73
</tbody>
58 74
</table>
59 75
</form>
60 76
</body>
branches/2.8.x/wb/admin/skel/themes/htt/media_rename.htt
30 30
		</script>
31 31
	</td>
32 32
	<td width="50" class="{DISPlAY_EXTENSION}">
33
		<input type="text" name="extension" style="width: 50px;" value="{EXTENSION}" />
33
		<input type="text" name="extension" readonly="readonly" style="width: 50px;" value="{EXTENSION}" />
34 34
	</td>
35 35
</tr>
36 36
<tr>
branches/2.8.x/wb/admin/skel/themes/htt/media.htt
37 37
            <td ><input type="file" name="file1" /> </td>
38 38
          </tr>
39 39
          <tr>
40
            <td><input type="file" size="20" name="file2" id="file2" style="visibility: visible;" /> </td>
40
            <td><input type="file" name="file2" id="file2" style="visibility: visible;" /> </td>
41 41
          </tr>
42 42
          <tr>
43 43
            <td><input type="file" name="file3" id="file3" style="visibility: visible;" /> </td>
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1817');
54
if(!defined('REVISION')) define('REVISION', '1818');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/admin/users/save.php
164 164
            	$username_code = '';
165 165
            }
166 166

  
167
            // Include the WB functions file
168
            if(!function_exists('media_filename')) { require(WB_PATH.'/framework/functions.php'); }
169

  
170
            // Remove bad characters
171
            $sHomeFolder = WB_PATH.MEDIA_DIRECTORY.'/home/'.( media_filename($username) );
172
            if ( sizeof(createFolderProtectFile( $sHomeFolder )) )
173
            {
174
//            	msgQueue::add($MESSAGE['MEDIA_DIR_NOT_MADE']);
175
            }
176

  
167 177
			$sql  = 'UPDATE `'.TABLE_PREFIX.'users` SET ';
168 178
            // Update the database
169 179
            if($password == "") {
branches/2.8.x/wb/admin/users/add.php
141 141
		{
142 142
            //if user is in administrator-group, get this group else just get the first one
143 143
            if($admin->is_group_match($groups_id,'1')) { $group_id = 1; $groups_id = '1'; }
144

  
145
            // Include the WB functions file
146
            if(!function_exists('media_filename')) { require(WB_PATH.'/framework/functions.php'); }
147

  
148
            // Remove bad characters
149
            $sHomeFolder = WB_PATH.MEDIA_DIRECTORY.'/home/'.( media_filename($username) );
150
            if ( sizeof(createFolderProtectFile( $sHomeFolder )) )
151
            {
152
            	msgQueue::add($MESSAGE['MEDIA_DIR_NOT_MADE'].' ('.basename($sHomeFolder).') ' );
153
            }
144 154
            // Inser the user into the database
145 155
			$sql  = 'INSERT INTO `'.TABLE_PREFIX.'users` SET '.
146 156
                    '`group_id`     = '.intval($group_id).', '.
branches/2.8.x/wb/templates/wb_theme/css/screen.css
17 17
.input_large { width :300px; }
18 18
.input_full { width :100%; }
19 19
/*  */
20
table { border-collapse :separate; width :100%; }
20
table {
21
   border-collapse :separate;
22
   width :100%;
23
   table-layout:fixed;
24
}
21 25
table.layout { table-layout :auto; }
22 26
table.header { margin :auto; width :100%; }
23 27
table.header td { min-width :10%; }
......
115 119
.note { border :2px #448844 solid; padding :10px; margin :10px auto; background :#eeffee; color :#004400; }
116 120
.important { border :2px #888844 solid; padding :10px; margin-bottom :1em; background :#ffffee; color :#444400; }
117 121
.warning { border :2px #884444 solid; padding :10px; margin-bottom :1em; background :#ffeeee; color :#440000; }
118
.section { background-color :#fdfdfd; border :1px solid #999999; font-size :0.9em; height :85px; margin :5px; padding :0; width :98%; }
119 122
.graphic { border :4px solid #fdfdfd; height :50px; padding-left :3px; width :50px; }
120 123
.graphic img { background-color :#ffffff; border :1px solid #d0d0d0; padding :4px; vertical-align :middle; width :50px; height :50px; }
124

  
125
.section {
126
   background-color :#fdfdfd;
127
   border :1px solid #999999;
128
   font-size :0.9em;
129
   height :85px;
130
   margin :5px;
131
   padding :0;
132
   width :98%;
133
}
121 134
.description { padding :4px 0 0; text-align :left; }
122 135
.title { text-align :left; padding :4px 5px 0px 3px; font-weight :bold; font-size :1.2em; margin-bottom :5px; }
123 136
   span.title { display :block; }
......
128 141
div.settings_table { margin :0 auto; width :90%; }
129 142
form.settings_table { border :1px none #eeee; font-family :verdana,arial,helvetica,sans-serif; margin :5px auto; padding :5px; }
130 143
   form.settings_table fieldset { border :1px none #eeeeee; display :block; line-height :1.0em; margin :1px auto; padding :3px 0px 3px 0px; }
131
   form input[type="file"] { width :80%; border :1px solid #000000; background-color :#ccccff; }
144
   input[type="file"] { width :100%; border :1px solid #000000; background-color :#ccccff; }
132 145
   legend.settings_table ,
133 146
   form.settings_table legend { border :none; color :#006699; font-size :140%; margin :5px; padding :0; }
134 147
   form.settings_table div.sub-row { background-color :transparent !important; background-color :#eeeeee; }
......
178 191
table.permission_box thead { text-align :left; background :#d2e8e8; }
179 192
table.permission_box tbody { text-align :left; }
180 193
table.permission_box td label { text-align :left; vertical-align :text-top; font-size :0.8em; }
181
/**/
194
/* */
182 195
div.pages_list { font-size :0.6em; width :100%; }
183 196
table.pages_list table td, 
184 197
table.pages_view td { font-size :1.2em; padding :0 2px; vertical-align :middle; margin :0 auto; height :30px; }
......
192 205
a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
193 206
a:visited { color :#0066cc; }
194 207
a:hover { color :#6699ff; text-decoration :underline; }
195
/**/
208
/* */
196 209
.header_list_actions { text-align :left; width :150px; }
197 210
.header_list_block { text-align :left; width :120px; }
198 211
.header_list_page_id { padding-right :15px; text-align :right; width :30px; }
199 212
.header_list_page_title, 
200 213
.list_page_title { width :350px; }
201
.list_page_title, .list_menu_title, .header_list_menu_title, .header_list_type { text-align :left; vertical-align :middle; }
214
/**/
215
.list_page_title, .list_menu_title, 
216
.header_list_menu_title, .header_list_type { text-align :left; vertical-align :middle; }
217

  
202 218
.header_list_pubdate_start, 
203 219
.header_list_pubdate_end, 
204 220
.list_pubdate_start, 
205
.list_pubdate_end { text-align :left; white-space :nowrap; width :185px; }
206
.header_list_sections_actions { text-align :left; width :30px; }
207
.header_list_type { font-size :1em; padding :4px 0; text-align :left; }
221
.list_pubdate_end {
222
   text-align :left;
223
   white-space :nowrap;
224
   width :185px;
225
}
226
.header_list_sections_actions {
227
   text-align :left;
228
   width :30px;
229
}
230
.header_list_type {
231
   font-size :1em;
232
   padding :4px 0;
233
   text-align :left;
234
   width :30%;
235
}
208 236
.jsadmin_drag img { cursor :pointer; margin-top :0px; padding :0px 0; vertical-align :baseline; }
209 237
.list_actions { height :20px; padding :0 1px; text-align :left; width :20px; }
210 238
.list_page_code, 
......
220 248
.page_list_show li { display :block; }
221 249
.pages_list 
222 250
.icon_col td img { border-style :none; display :inline; float :left; padding-right :7px; }
223
.pages_list 
251
.pages_list {  } 
224 252
.icon_col td img { border-style :none; display :inline; float :left; padding-right :7px; }
225 253
.pages_list table { background-color :#dcdcdc; font-size :1.3em; margin :0 auto; table-layout :fixed; width :100%; }
226 254
.pages_list ul { font-weight :normal; margin :0; padding :0px; }
227 255
.pages_list ul li { list-style-type :none; margin :1px 0; padding :0; vertical-align :baseline; }
256

  
228 257
.sectionrow { font-size :1.1em; height :30px; table-layout :fixed; }
229 258
.sectionrow a:link { color :#003366; font-weight :bold; text-decoration :none; }
230 259
.sectionrow a:hover { color :#6699ff; }
260
.sections_list { padding :2px 0px 2px 5px; font-size :1.0em; width :100%; }
231 261
.sections_list { background :#dddddd; font-size :1em; font-weight :bold; padding-left :10px; }
232 262
.sections_list,
233 263
.pages_list_header { font-weight :bold; line-height :1.5em; margin-bottom :5px; text-align :left; }
234
.sections_list { padding :2px 0px 2px 5px; font-size :1.0em; }
235 264
.pages_list_header { padding :2px 0px 2px 5px; font-size :1.3em; height :25px; }
236 265
.header_list_menu_title { padding-left :30px; }
237 266
.value_page_code { color :#006400; font-weight :400; width :240px; }
branches/2.8.x/wb/templates/wb_theme/css/browse.css
3 3
hr {margin:0;color:#003366;height:1px;}
4 4
.hide {display:none;}
5 5
a:link, a:visited, a:active {color:#003366;text-decoration:none;}
6
a:hover {text-decoration:none;color:#336699;}
6
a:hover {text-decoration:none;color:#336699;}
7
.bold { font-weight :bold; }
branches/2.8.x/wb/install/save.php
427 427
	$database->query($settings);
428 428

  
429 429
	$settings_rows=	"INSERT INTO `".TABLE_PREFIX."settings` "
430
	." (name, value) VALUES "
431
	." ('wb_version', '".VERSION."'),"
432
	." ('wb_revision', '".REVISION."'),"
433
 	." ('wb_sp', '".SP."'),"
434
	." ('website_title', '$website_title'),"
435
	." ('website_description', ''),"
436
	." ('website_keywords', ''),"
437
	." ('website_header', ''),"
438
	." ('website_footer', ''),"
439
	." ('wysiwyg_style', 'font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;'),"
440
	." ('er_level', ''),"
441
	." ('default_language', '$default_language'),"
442
	." ('app_name', 'wb_$session_rand'),"
443
	." ('sec_anchor', 'section_'),"
444
	." ('default_timezone', '$default_timezone'),"
445
	." ('default_date_format', 'M d Y'),"
446
	." ('default_time_format', 'g:i A'),"
447
	." ('redirect_timer', '1500'),"
448
	." ('home_folders', 'true'),"
449
	." ('warn_page_leave', '1'),"
450
	." ('default_template', 'round'),"
451
	." ('default_theme', 'wb_theme'),"
452
	." ('default_charset', 'utf-8'),"
453
	." ('multiple_menus', 'true'),"
454
	." ('page_level_limit', '4'),"
455
	." ('intro_page', 'false'),"
456
	." ('page_trash', 'inline'),"
457
	." ('homepage_redirection', 'false'),"
458
	." ('page_languages', 'true'),"
459
	." ('wysiwyg_editor', 'fckeditor'),"
460
	." ('manage_sections', 'true'),"
461
	." ('section_blocks', 'true'),"
462
	." ('smart_login', 'false'),"
463
	." ('frontend_login', 'false'),"
464
	." ('frontend_signup', 'false'),"
465
	." ('search', 'public'),"
466
	." ('page_extension', '.php'),"
467
	." ('page_spacer', '-'),"
468
	." ('dev_infos', 'false'),"
469
	." ('pages_directory', '/pages'),"
470
	." ('page_icon_dir', '/templates/*/title_images'),"
471
	." ('rename_files_on_upload', 'ph.*?,cgi,pl,pm,exe,com,bat,pif,cmd,src,asp,aspx'),"
472
	." ('media_directory', '/media'),"
473
	." ('operating_system', '$operating_system'),"
474
	." ('string_file_mode', '$file_mode'),"
475
	." ('string_dir_mode', '$dir_mode'),"
476
	." ('wbmailer_routine', 'phpmail'),"
477
	." ('server_email', '$admin_email'),"		// avoid that mail provider (e.g. mail.com) reject mails like yourname@mail.com
478
	." ('wbmailer_default_sendername', 'WB Mailer'),"
479
	." ('wbmailer_smtp_host', ''),"
480
	." ('wbmailer_smtp_auth', ''),"
481
	." ('wbmailer_smtp_username', ''),"
482
	." ('wbmailer_smtp_password', ''),"
483
	." ('fingerprint_with_ip_octets', '2'),"
484
	." ('secure_form_module', ''),"
485
    ." ('groups_updated', '".time()."' ),"
486
	." ('page_extended', 'true'),"
487
	." ('mediasettings', '')";
430
	." (setting_id, name, value) VALUES "
431
	." ( 1, 'wb_version', '".VERSION."'),"
432
	." ( 2, 'website_title', '$website_title'),"
433
	." ( 3, 'website_description', ''),"
434
	." ( 4, 'website_keywords', ''),"
435
	." ( 5, 'website_header', ''),"
436
	." ( 6, 'website_footer', ''),"
437
	." ( 7, 'wysiwyg_style', 'font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;'),"
438
	." ( 8, 'rename_files_on_upload', 'ph.*?,cgi,pl,pm,exe,com,bat,pif,cmd,src,asp,aspx,js,txt'),"
439
	." ( 9, 'er_level', '0'),"
440
	." (10, 'default_language', '$default_language'),"
441
	." (11, 'app_name', 'wb_$session_rand'),"
442
	." (12, 'sec_anchor', 'section_'),"
443
	." (13, 'default_timezone', '$default_timezone'),"
444
	." (14, 'default_date_format', 'M d Y'),"
445
	." (15, 'default_time_format', 'h:i A'),"
446
	." (16, 'redirect_timer', '1500'),"
447
	." (17, 'home_folders', 'true'),"
448
	." (18, 'warn_page_leave', '1'),"
449
	." (19, 'default_template', 'round'),"
450
	." (20, 'default_theme', 'wb_theme'),"
451
	." (21, 'default_charset', 'utf-8'),"
452
	." (22, 'multiple_menus', 'true'),"
453
	." (23, 'page_level_limit', '6'),"
454
	." (24, 'intro_page', 'false'),"
455
	." (25, 'page_trash', 'inline'),"
456
	." (26, 'homepage_redirection', 'false'),"
457
	." (27, 'page_languages', 'true'),"
458
	." (28, 'wysiwyg_editor', 'fckeditor'),"
459
	." (29, 'manage_sections', 'true'),"
460
	." (30, 'section_blocks', 'false'),"
461
	." (31, 'smart_login', 'false'),"
462
	." (32, 'frontend_login', 'false'),"
463
	." (33, 'frontend_signup', 'false'),"
464
	." (34, 'search', 'public'),"
465
	." (35, 'page_extension', '.php'),"
466
	." (36, 'page_spacer', '-'),"
467
	." (37, 'pages_directory', '/pages'),"
468
	." (38, 'rename_files_on_upload', 'ph.*?,cgi,pl,pm,exe,com,bat,pif,cmd,src,asp,aspx,js,txt'),"
469
	." (39, 'media_directory', '/media'),"
470
	." (40, 'operating_system', '$operating_system'),"
471
	." (41, 'string_file_mode', '$file_mode'),"
472
	." (42, 'string_dir_mode', '$dir_mode'),"
473
	." (43, 'wbmailer_routine', 'phpmail'),"
474
	." (44, 'server_email', '$admin_email'),"
475
	." (45, 'wbmailer_default_sendername', 'WebsiteBaker Mailer'),"
476
	." (46, 'wbmailer_smtp_host', ''),"
477
	." (47, 'wbmailer_smtp_auth', ''),"
478
	." (48, 'wbmailer_smtp_username', ''),"
479
	." (49, 'wbmailer_smtp_password', ''),"
480
	." (50, 'fingerprint_with_ip_octets', '2'),"
481
	." (51, 'secure_form_module', ''),"
482
	." (52, 'mediasettings', ''),"
483
	." (53, 'wb_revision', '".REVISION."'),"
484
 	." (54, 'wb_sp', '".SP."'),"
485
	." (55, 'page_icon_dir', '/templates/*/title_images'),"
486
	." (56, 'dev_infos', 'false'),"
487
	." (57, 'groups_updated', '".time()."'),"
488
	." (58, 'website_signature', ''),"
489
	." (59, 'confirmed_registration', '1'),"
490
	." (60, 'page_extended', 'true'),"
491
	." (61, 'modules_upgrade_list', 'news,wysiwyg,form'),"
492
	." (62, 'system_locked', '0')";
488 493
	$database->query($settings_rows);
489 494

  
490 495
	// Users table
......
626 631
	$insert_search_module_order = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'module_order', '$search_module_order', '')";
627 632
	$database->query($insert_search_module_order);
628 633
	// Search max lines of excerpt
629
	$search_max_excerpt = addslashes('15');
634
	$search_max_excerpt = addslashes('5');
630 635
	$insert_search_max_excerpt = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'max_excerpt', '$search_max_excerpt', '')";
631 636
	$database->query($insert_search_max_excerpt);
632 637
	// max time to search per module
......
690 695
		set_error($database->get_error());
691 696
	}
692 697

  
698
if ( sizeof(createFolderProtectFile( WB_PATH.MEDIA_DIRECTORY )) ) {  }
699
if ( sizeof(createFolderProtectFile( WB_PATH.MEDIA_DIRECTORY.'/home' )) ) {  }
700
if ( sizeof(createFolderProtectFile( WB_PATH.PAGES_DIRECTORY )) ) {  }
701

  
693 702
// end of if install_tables
694 703

  
695 704
$ThemeUrl = WB_URL.$admin->correct_theme_source('warning.html');

Also available in: Unified diff