5 Jappix - An open social platform
6 This is the design configuration reader
8 -------------------------------------------------
12 Last revision: 28/12/10
16 // Someone is trying to hack us?
17 if(!defined('JAPPIX_BASE'))
20 // Get the available backgrounds
21 $backgrounds = getBackgrounds();
22 $backgrounds_number = count($backgrounds);
24 // Read the background configuration
25 $background = readBackground();
27 // Backgrounds are missing?
28 if(!$backgrounds_number && ($background['type'] == 'image'))
29 $background['type'] = 'default';
31 switch($background['type']) {
32 // Simple notice input
34 $background_image = ' checked=""';
35 $background_default = '';
39 // Advanced notice input
41 $background_color = ' checked=""';
42 $background_default = '';
47 switch($background['image_repeat']) {
50 $background_image_repeat_no = ' selected=""';
51 $background_image_repeat_x = '';
57 $background_image_repeat_all = ' selected=""';
58 $background_image_repeat_x = '';
64 $background_image_repeat_y = ' selected=""';
65 $background_image_repeat_x = '';
70 switch($background['image_horizontal']) {
73 $background_image_horizontal_left = ' selected=""';
74 $background_image_horizontal_center = '';
80 $background_image_horizontal_right = ' selected=""';
81 $background_image_horizontal_center = '';
86 switch($background['image_vertical']) {
89 $background_image_vertical_top = ' selected=""';
90 $background_image_vertical_center = '';
96 $background_image_vertical_bottom = ' selected=""';
97 $background_image_vertical_center = '';
102 if($background['image_adapt'] == 'on')
103 $background_image_adapt = ' checked=""';
105 // Read the notice configuration
106 $notice_conf = readNotice();
107 $notice_text = $notice_conf['notice'];
109 switch($notice_conf['type']) {
110 // Simple notice input
112 $notice_simple = ' checked=""';
117 // Advanced notice input
119 $notice_advanced = ' checked=""';