[11699] | 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 | { |
---|
[12048] | 9 | $config = array( |
---|
| 10 | 'color_main' => 'E6554F', |
---|
| 11 | 'column_width' => 170, |
---|
| 12 | 'thumbnail_width' => 150, |
---|
| 13 | 'every_x' => 20, |
---|
| 14 | 'starting_to' => 1, |
---|
[13894] | 15 | 'catthumb' => 'none' //none - same - all |
---|
| 16 | ); |
---|
| 17 | $query = " |
---|
[11923] | 18 | INSERT INTO " . CONFIG_TABLE . " (param,value,comment) |
---|
| 19 | VALUES ('stripped_black_bloc' , '".pwg_db_real_escape_string(serialize($config))."' , 'color_main#column_width#thumbnail_width#thumbnail(generated - auto - piwigo)');"; |
---|
[13894] | 20 | pwg_query($query); |
---|
| 21 | load_conf_from_db(); |
---|
[11699] | 22 | } |
---|
[12048] | 23 | elseif (count(unserialize( $conf['stripped_black_bloc'] ))!=6) |
---|
| 24 | { |
---|
| 25 | $config = array( |
---|
| 26 | 'color_main' => 'E6554F', |
---|
| 27 | 'column_width' => 170, |
---|
| 28 | 'thumbnail_width' => 150, |
---|
| 29 | 'every_x' => 20, |
---|
| 30 | 'starting_to' => 1, |
---|
[13894] | 31 | 'catthumb' => 'none' //none - same - all |
---|
| 32 | ); |
---|
[12048] | 33 | conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config))); |
---|
[13894] | 34 | load_conf_from_db(); |
---|
[11823] | 35 | } |
---|
[13894] | 36 | elseif ($conff=unserialize($conf['stripped_black_bloc']) and ( !isset($conff['catthumb']) or empty($conff['catthumb'])) ) |
---|
| 37 | { |
---|
| 38 | $config = array( |
---|
| 39 | 'color_main' => $conff['color_main'], |
---|
| 40 | 'column_width' => $conff['column_width'], |
---|
| 41 | 'thumbnail_width' => $conff['thumbnail_width'], |
---|
| 42 | 'every_x' => $conff['every_x'], |
---|
| 43 | 'starting_to' => $conff['starting_to'], |
---|
| 44 | 'catthumb' => 'none' //none - same - all |
---|
| 45 | ); |
---|
| 46 | conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config))); |
---|
| 47 | load_conf_from_db(); |
---|
| 48 | } |
---|
[11699] | 49 | ?> |
---|