1 | <?php |
---|
2 | |
---|
3 | $visible=(isset($visible))?$visible:false; |
---|
4 | $cl_version=isset($cl_version)?$cl_version:""; |
---|
5 | $cl_plugin=isset($cl_plugin)?$cl_plugin:""; |
---|
6 | $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : |
---|
7 | (isset($_GET['cl_visible'])?$_GET['cl_visible']:'true'); |
---|
8 | //============================================================================== |
---|
9 | $DEBUG_autosize = isset($_POST['cl_debug']) ? $_POST['cl_debug'] : "false" ; |
---|
10 | $DEBUG_autosize = isset($_GET['cl_debug']) ? $_GET['cl_debug'] : $DEBUG_autosize ; |
---|
11 | $DEBUG_autosize = isset($conf['cl_debug']) ? $conf['cl_debug'] : $DEBUG_autosize ; |
---|
12 | //=========================================================================== |
---|
13 | $cookies="' x '"; |
---|
14 | |
---|
15 | $img_width=isset($imgScaledWH)?$imgSizeWH[0]:"480"; |
---|
16 | $img_height=isset($imgScaledWH)?$imgSizeWH[1]:"320"; |
---|
17 | |
---|
18 | $img_scaled_width=isset($imgScaledWH)?$imgScaledWH[0]:"480"; |
---|
19 | $img_scaled_height=isset($imgScaledWH)?$imgScaledWH[1]:"320"; |
---|
20 | |
---|
21 | $src_img_h=isset($_POST['src_img_h'])?$_POST['src_img_h']: $img_height ; |
---|
22 | $src_img_w= isset($_POST['src_img_w'])?$_POST['src_img_w']: $img_width ; |
---|
23 | |
---|
24 | $window_height= isset($_SESSION['windowHeight'])?$_SESSION['windowHeight']: $img_scaled_height ; |
---|
25 | $window_width= isset($_SESSION['windowWidth'])?$_SESSION['windowWidth']: $img_scaled_width ; |
---|
26 | |
---|
27 | global $size ; |
---|
28 | $size= array( |
---|
29 | 'src_img_h' => $src_img_h, |
---|
30 | 'src_img_w' => $src_img_w, |
---|
31 | 'window_height' =>$window_height, |
---|
32 | 'window_width' => $window_width |
---|
33 | ); |
---|
34 | |
---|
35 | $my_path = AUTOSIZE_PATH_ABS; |
---|
36 | $theme=$user['theme']; |
---|
37 | |
---|
38 | |
---|
39 | $user_status = $user['status'] ; |
---|
40 | |
---|
41 | $template->assign( array( |
---|
42 | 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS, |
---|
43 | 'ROOT_URL' => ROOT_URL, |
---|
44 | 'AUTOSIZE_PATH' => AUTOSIZE_PATH, |
---|
45 | ) |
---|
46 | ); |
---|
47 | if (!isset($conf['prefix_thumbnail'])) $conf['prefix_thumbnail']="TN_"; |
---|
48 | //====================================================== |
---|
49 | |
---|
50 | //=== type possible === |
---|
51 | if(isset($defined_types)) |
---|
52 | foreach ($defined_types as $type_size){ |
---|
53 | $value = $type_size; |
---|
54 | $options[$value] = $type_size; |
---|
55 | } |
---|
56 | |
---|
57 | //=========================================== |
---|
58 | $template->assign( |
---|
59 | array( |
---|
60 | 'select_type' =>$select_type, |
---|
61 | 'select_map' =>$select_type, |
---|
62 | |
---|
63 | 'pictureDeriv' =>$pictureDeriv , |
---|
64 | |
---|
65 | 'maxi_img' =>$maxi_img , |
---|
66 | 'ratio' =>$img_scaled_width/$img_scaled_height , |
---|
67 | |
---|
68 | |
---|
69 | 'webmaster_type' => array( |
---|
70 | 'OPTIONS' => $options, |
---|
71 | 'SELECTED' => $autosize_parametres->webmaster_type |
---|
72 | ), |
---|
73 | 'admin_type' => array( |
---|
74 | 'OPTIONS' => $options, |
---|
75 | 'SELECTED' => $autosize_parametres->admin_type |
---|
76 | ), |
---|
77 | 'generic_type' => array( |
---|
78 | 'OPTIONS' => $options, |
---|
79 | 'SELECTED' => $autosize_parametres->generic_type |
---|
80 | ), |
---|
81 | 'guest_type' => array( |
---|
82 | 'OPTIONS' => $options, |
---|
83 | 'SELECTED' => $autosize_parametres->guest_type |
---|
84 | ), |
---|
85 | 'normal_type' => array( |
---|
86 | 'OPTIONS' => $options, |
---|
87 | 'SELECTED' => $autosize_parametres->normal_type |
---|
88 | ), |
---|
89 | 'DEBUG_autosize' => $DEBUG_autosize , |
---|
90 | 'cl_visible' => $cl_visible, |
---|
91 | 'cl_version' => $cl_version, |
---|
92 | 'cl_plugin' => $cl_plugin, |
---|
93 | |
---|
94 | 'fade_in' => $autosize_parametres->fade_in, |
---|
95 | 'thumbnail' => $conf['prefix_thumbnail'], |
---|
96 | 'visible' => $visible, |
---|
97 | |
---|
98 | 'theme' => $theme, |
---|
99 | |
---|
100 | 'windowHeight' => $window_height, |
---|
101 | 'windowWidth' => $window_width, |
---|
102 | |
---|
103 | 'SCALED_WIDTH' => $img_scaled_width, |
---|
104 | 'SCALED_HEIGHT' => $img_scaled_height, |
---|
105 | |
---|
106 | 'IMG_WIDTH' => $img_width, |
---|
107 | 'IMG_HEIGHT' => $img_height, |
---|
108 | |
---|
109 | 'MINI_HEIGHT' => $autosize_parametres->mini_height, |
---|
110 | 'MINI_WIDTH' => $autosize_parametres->mini_width, |
---|
111 | |
---|
112 | 'MINI_HEIGHT2' => $autosize_parametres->mini_height2, |
---|
113 | 'MINI_WIDTH2' => $autosize_parametres->mini_width2, |
---|
114 | |
---|
115 | 'MARGE_BASSE' => $autosize_parametres->marge_basse, |
---|
116 | 'ECHELLE_MAX' => $autosize_parametres->echelle_max, |
---|
117 | |
---|
118 | |
---|
119 | 'check_icon_v' => ($autosize_parametres->check_icon_v == 'on') ? 'checked="checked"' : '' , |
---|
120 | 'check_desc_v' => ($autosize_parametres->check_desc_v == 'on') ? 'checked="checked"' : '' , |
---|
121 | |
---|
122 | |
---|
123 | 'webmaster_enabled' => ($autosize_parametres->webmaster_enabled == 'on') ? 'checked="checked"' : '' , |
---|
124 | 'admin_enabled' => ($autosize_parametres->admin_enabled == 'on') ? 'checked="checked"' : '' , |
---|
125 | 'generic_enabled' => ($autosize_parametres->generic_enabled == 'on') ? 'checked="checked"' : '' , |
---|
126 | 'guest_enabled' => ($autosize_parametres->guest_enabled == 'on') ? 'checked="checked"' : '' , |
---|
127 | 'normal_enabled' => ($autosize_parametres->normal_enabled == 'on') ? 'checked="checked"' : '' , |
---|
128 | |
---|
129 | 'user_status' => get_user_status($user_status) , |
---|
130 | 'SRC_IMG' => $SRC_IMG, |
---|
131 | 'liste_type' => $liste_type , |
---|
132 | 'Size' => $size |
---|
133 | |
---|
134 | ) |
---|
135 | ); |
---|
136 | |
---|
137 | |
---|
138 | //unset($_POST); |
---|
139 | ?> |
---|