[6912] | 1 | <?php |
---|
[7917] | 2 | |
---|
[17503] | 3 | $visible=(isset($visible))?$visible:false; |
---|
[18735] | 4 | global $cl_version,$cl_plugin; |
---|
| 5 | |
---|
[7912] | 6 | $cl_version=isset($cl_version)?$cl_version:""; |
---|
[7917] | 7 | $cl_plugin=isset($cl_plugin)?$cl_plugin:""; |
---|
[18735] | 8 | |
---|
[11961] | 9 | $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : |
---|
[17503] | 10 | (isset($_GET['cl_visible'])?$_GET['cl_visible']:'true'); |
---|
[16931] | 11 | //=========================================================================== |
---|
[17503] | 12 | $cookies="' x '"; |
---|
[18716] | 13 | global $imgSizeWH ; |
---|
[18724] | 14 | if(isset($_COOKIE['windowHeight'])){ |
---|
[18716] | 15 | $windowHeight=$_COOKIE['windowHeight']; |
---|
| 16 | $windowWidth=$_COOKIE['windowWidth']; |
---|
[18724] | 17 | }else{ |
---|
| 18 | $windowHeight=600; |
---|
| 19 | $windowWidth=800; |
---|
| 20 | } |
---|
[18716] | 21 | global $size ; |
---|
[11961] | 22 | |
---|
[18716] | 23 | if(!isset($imgSizeWH)){ |
---|
| 24 | $imgSizeWH[0]=100; |
---|
| 25 | $imgSizeWH[1]=100; |
---|
| 26 | } |
---|
[16931] | 27 | |
---|
[11961] | 28 | $size= array( |
---|
[18716] | 29 | 'src_img_h' => $imgSizeWH[1], |
---|
| 30 | 'src_img_w' => $imgSizeWH[0], |
---|
| 31 | 'window_height' =>$windowHeight, |
---|
| 32 | 'window_width' => $windowWidth |
---|
[11961] | 33 | ); |
---|
[18716] | 34 | |
---|
| 35 | |
---|
[11461] | 36 | $my_path = AUTOSIZE_PATH_ABS; |
---|
[10845] | 37 | $theme=$user['theme']; |
---|
[18949] | 38 | |
---|
[10845] | 39 | $user_status = $user['status'] ; |
---|
[8912] | 40 | $template->assign( array( |
---|
| 41 | 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS, |
---|
| 42 | 'ROOT_URL' => ROOT_URL, |
---|
[18949] | 43 | 'AUTOSIZE_PATH' => AUTOSIZE_PATH |
---|
[8057] | 44 | ) |
---|
[8912] | 45 | ); |
---|
[16931] | 46 | if (!isset($conf['prefix_thumbnail'])) $conf['prefix_thumbnail']="TN_"; |
---|
[17503] | 47 | //====================================================== |
---|
[16931] | 48 | |
---|
[17503] | 49 | //=== type possible === |
---|
[18716] | 50 | $defined_types = array_keys(ImageStdParams::get_defined_type_map()); |
---|
[17503] | 51 | if(isset($defined_types)) |
---|
| 52 | foreach ($defined_types as $type_size){ |
---|
| 53 | $value = $type_size; |
---|
[19844] | 54 | if($type_size != "square" && $type_size != "thumb" ) |
---|
[17503] | 55 | $options[$value] = $type_size; |
---|
| 56 | } |
---|
[18716] | 57 | $autosize_parametres = cl_autosize_Get_Options(); |
---|
[17503] | 58 | //=========================================== |
---|
[18716] | 59 | $COOKIE_PATH= cookie_path() ; |
---|
| 60 | global $DEBUG_autosize; |
---|
[19003] | 61 | |
---|
[19030] | 62 | $user_type= get_user_status($user_status)."_type"; |
---|
| 63 | $user_type= $autosize_parametres->$user_type ; |
---|
| 64 | $select_type=ImageStdParams::get_by_type($user_type); |
---|
| 65 | $ideal_size = $select_type->sizing->ideal_size ; |
---|
| 66 | if($user_type=="Autosize" || $user_type=="SelMaxi"){ |
---|
| 67 | $ideal_size[0]=$imgSizeWH[0]; |
---|
| 68 | $ideal_size[1]=$imgSizeWH[1]; |
---|
| 69 | } |
---|
| 70 | |
---|
[19003] | 71 | $slide_show = isset($page['slideshow'])?$page['slideshow']:false; |
---|
| 72 | |
---|
[17503] | 73 | $template->assign( |
---|
| 74 | array( |
---|
[19030] | 75 | 'ideal_size_width' => $ideal_size[0] , |
---|
| 76 | 'ideal_size_height' => $ideal_size[1] , |
---|
[18716] | 77 | 'has_pamoorama' => $has_pamoorama, |
---|
| 78 | 'pictureMap' => $pictureDeriv , |
---|
| 79 | 'pictureDeriv' => $pictureDeriv , |
---|
| 80 | 'pictureSelType' => $pictureSelType, |
---|
| 81 | |
---|
| 82 | 'SRC_IMG' => $SRC_IMG, |
---|
| 83 | 'liste_type' => $liste_type , |
---|
| 84 | 'COOKIE_PATH' => $COOKIE_PATH , |
---|
[19003] | 85 | 'slide_show' => $slide_show, |
---|
[18716] | 86 | |
---|
| 87 | 'ratio' =>$imgSizeWH[0]/$imgSizeWH[1] , |
---|
| 88 | |
---|
[16931] | 89 | 'webmaster_type' => array( |
---|
| 90 | 'OPTIONS' => $options, |
---|
| 91 | 'SELECTED' => $autosize_parametres->webmaster_type |
---|
| 92 | ), |
---|
| 93 | 'admin_type' => array( |
---|
| 94 | 'OPTIONS' => $options, |
---|
| 95 | 'SELECTED' => $autosize_parametres->admin_type |
---|
| 96 | ), |
---|
| 97 | 'generic_type' => array( |
---|
| 98 | 'OPTIONS' => $options, |
---|
| 99 | 'SELECTED' => $autosize_parametres->generic_type |
---|
| 100 | ), |
---|
| 101 | 'guest_type' => array( |
---|
| 102 | 'OPTIONS' => $options, |
---|
| 103 | 'SELECTED' => $autosize_parametres->guest_type |
---|
| 104 | ), |
---|
| 105 | 'normal_type' => array( |
---|
| 106 | 'OPTIONS' => $options, |
---|
| 107 | 'SELECTED' => $autosize_parametres->normal_type |
---|
| 108 | ), |
---|
[18716] | 109 | |
---|
[10845] | 110 | 'DEBUG_autosize' => $DEBUG_autosize , |
---|
[10445] | 111 | 'cl_visible' => $cl_visible, |
---|
[18735] | 112 | 'cl_version' => $cl_version , |
---|
| 113 | 'Version_pwg' => PHPWG_VERSION , |
---|
[10445] | 114 | 'cl_plugin' => $cl_plugin, |
---|
[7899] | 115 | |
---|
[10445] | 116 | 'fade_in' => $autosize_parametres->fade_in, |
---|
| 117 | 'thumbnail' => $conf['prefix_thumbnail'], |
---|
| 118 | 'visible' => $visible, |
---|
[8912] | 119 | |
---|
[10445] | 120 | 'theme' => $theme, |
---|
[17503] | 121 | |
---|
[18716] | 122 | 'windowHeight' => $windowHeight, |
---|
| 123 | 'windowWidth' => $windowWidth, |
---|
[17503] | 124 | |
---|
[18716] | 125 | 'SCALED_WIDTH' => $imgSizeWH[0], |
---|
| 126 | 'SCALED_HEIGHT' => $imgSizeWH[1], |
---|
[16931] | 127 | |
---|
[18716] | 128 | 'theImageWidth' => isset($_COOKIE['theMainImageWidth'])?$_COOKIE['theMainImageWidth']: $imgSizeWH[0], |
---|
| 129 | 'theImageHeight' => isset($_COOKIE['theMainImageHeight'])?$_COOKIE['theMainImageHeight']:$imgSizeWH[1], |
---|
[10445] | 130 | |
---|
| 131 | 'MINI_HEIGHT' => $autosize_parametres->mini_height, |
---|
| 132 | 'MINI_WIDTH' => $autosize_parametres->mini_width, |
---|
[17503] | 133 | |
---|
[10445] | 134 | 'MINI_HEIGHT2' => $autosize_parametres->mini_height2, |
---|
| 135 | 'MINI_WIDTH2' => $autosize_parametres->mini_width2, |
---|
[7962] | 136 | |
---|
[10445] | 137 | 'MARGE_BASSE' => $autosize_parametres->marge_basse, |
---|
| 138 | 'ECHELLE_MAX' => $autosize_parametres->echelle_max, |
---|
[7962] | 139 | |
---|
[16931] | 140 | |
---|
| 141 | 'check_icon_v' => ($autosize_parametres->check_icon_v == 'on') ? 'checked="checked"' : '' , |
---|
[10445] | 142 | 'check_desc_v' => ($autosize_parametres->check_desc_v == 'on') ? 'checked="checked"' : '' , |
---|
[18716] | 143 | 'defaut_type' => ($autosize_parametres->defaut_type == 'on') ? 'checked="defaut_type"' : '' , |
---|
[7962] | 144 | |
---|
[10445] | 145 | 'webmaster_enabled' => ($autosize_parametres->webmaster_enabled == 'on') ? 'checked="checked"' : '' , |
---|
| 146 | 'admin_enabled' => ($autosize_parametres->admin_enabled == 'on') ? 'checked="checked"' : '' , |
---|
| 147 | 'generic_enabled' => ($autosize_parametres->generic_enabled == 'on') ? 'checked="checked"' : '' , |
---|
[16931] | 148 | 'guest_enabled' => ($autosize_parametres->guest_enabled == 'on') ? 'checked="checked"' : '' , |
---|
[10445] | 149 | 'normal_enabled' => ($autosize_parametres->normal_enabled == 'on') ? 'checked="checked"' : '' , |
---|
[7394] | 150 | |
---|
[11961] | 151 | 'user_status' => get_user_status($user_status) , |
---|
[18716] | 152 | |
---|
[17503] | 153 | 'Size' => $size |
---|
[7316] | 154 | |
---|
[6912] | 155 | ) |
---|
| 156 | ); |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | //unset($_POST); |
---|
| 160 | ?> |
---|