1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | global $prefixeTable, $conf; |
---|
6 | |
---|
7 | if (!isset($conf['stripped_black_bloc'])) |
---|
8 | { |
---|
9 | $config = array( |
---|
10 | 'color_main' => 'E6554F', |
---|
11 | 'column_width' => 170, |
---|
12 | 'thumbnail_width' => 150, |
---|
13 | 'every_x' => 20, |
---|
14 | 'starting_to' => 1, |
---|
15 | 'catthumb' => 'none', //none - same - all |
---|
16 | 'orientation_option' => 'none' //none - max_heigth -big_landscape |
---|
17 | ); |
---|
18 | $query = " |
---|
19 | INSERT INTO " . CONFIG_TABLE . " (param,value,comment) |
---|
20 | VALUES ('stripped_black_bloc' , '".pwg_db_real_escape_string(serialize($config))."' , 'color_main#column_width#thumbnail_width#catthumb(none - same - all)');"; |
---|
21 | pwg_query($query); |
---|
22 | load_conf_from_db(); |
---|
23 | } |
---|
24 | elseif (count(unserialize( $conf['stripped_black_bloc'] ))!=7) |
---|
25 | { |
---|
26 | $conff=unserialize($conf['stripped_black_bloc']); |
---|
27 | $config = array( |
---|
28 | 'color_main' => (isset($conff['color_main'])) ? $conff['color_main'] :'E6554F', |
---|
29 | 'column_width' => (isset($conff['column_width'])) ? $conff['column_width'] :170, |
---|
30 | 'thumbnail_width' => (isset($conff['thumbnail_width'])) ? $conff['thumbnail_width'] :150, |
---|
31 | 'every_x' => (isset($conff['every_x'])) ? $conff['every_x'] : 20, |
---|
32 | 'starting_to' => (isset($conff['starting_to'])) ? $conff['starting_to'] :1, |
---|
33 | 'catthumb' => (isset($conff['catthumb'])) ? $conff['catthumb'] :'none', //none - same - all |
---|
34 | 'orientation_option' => (isset($conff['orientation_option'])) ? $conff['orientation_option'] :'none' //none - max_heigth -big_landscape |
---|
35 | ); |
---|
36 | conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config))); |
---|
37 | load_conf_from_db(); |
---|
38 | } |
---|
39 | ?> |
---|