Changeset 18716 for extensions/Autosize/include/affiche.php
- Timestamp:
- Oct 22, 2012, 4:47:26 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/include/affiche.php
r18325 r18716 6 6 $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 7 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 8 //=========================================================================== 13 9 $cookies="' x '"; 10 global $imgSizeWH ; 11 $windowHeight=$_COOKIE['windowHeight']; 12 $windowWidth=$_COOKIE['windowWidth']; 13 global $size ; 14 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"; 15 if(!isset($imgSizeWH)){ 16 $imgSizeWH[0]=100; 17 $imgSizeWH[1]=100; 18 } 20 19 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 20 $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 _width21 'src_img_h' => $imgSizeWH[1], 22 'src_img_w' => $imgSizeWH[0], 23 'window_height' =>$windowHeight, 24 'window_width' => $windowWidth 33 25 ); 34 26 27 35 28 $my_path = AUTOSIZE_PATH_ABS; 36 29 $theme=$user['theme']; … … 49 42 50 43 //=== type possible === 44 $defined_types = array_keys(ImageStdParams::get_defined_type_map()); 51 45 if(isset($defined_types)) 52 46 foreach ($defined_types as $type_size){ … … 54 48 $options[$value] = $type_size; 55 49 } 56 50 $autosize_parametres = cl_autosize_Get_Options(); 57 51 //=========================================== 52 $COOKIE_PATH= cookie_path() ; 53 global $DEBUG_autosize; 54 58 55 $template->assign( 59 56 array( 60 'select_type' =>$select_type, 61 'select_map' =>$select_type, 62 'pictureDeriv' =>$pictureDeriv , 63 'maxi_img' =>$maxi_img , 64 'ratio' =>$img_scaled_width/$img_scaled_height , 57 'has_pamoorama' => $has_pamoorama, 58 'pictureMap' => $pictureDeriv , 59 'pictureDeriv' => $pictureDeriv , 60 'pictureSelType' => $pictureSelType, 61 62 'SRC_IMG' => $SRC_IMG, 63 'liste_type' => $liste_type , 64 'COOKIE_PATH' => $COOKIE_PATH , 65 66 'ratio' =>$imgSizeWH[0]/$imgSizeWH[1] , 67 65 68 'webmaster_type' => array( 66 69 'OPTIONS' => $options, … … 83 86 'SELECTED' => $autosize_parametres->normal_type 84 87 ), 88 85 89 'DEBUG_autosize' => $DEBUG_autosize , 86 90 'cl_visible' => $cl_visible, … … 94 98 'theme' => $theme, 95 99 96 'windowHeight' => $window _height,97 'windowWidth' => $window _width,100 'windowHeight' => $windowHeight, 101 'windowWidth' => $windowWidth, 98 102 99 'SCALED_WIDTH' => $img _scaled_width,100 'SCALED_HEIGHT' => $img _scaled_height,103 'SCALED_WIDTH' => $imgSizeWH[0], 104 'SCALED_HEIGHT' => $imgSizeWH[1], 101 105 102 ' IMG_WIDTH' => $img_width,103 ' IMG_HEIGHT' => $img_height,106 'theImageWidth' => isset($_COOKIE['theMainImageWidth'])?$_COOKIE['theMainImageWidth']: $imgSizeWH[0], 107 'theImageHeight' => isset($_COOKIE['theMainImageHeight'])?$_COOKIE['theMainImageHeight']:$imgSizeWH[1], 104 108 105 109 'MINI_HEIGHT' => $autosize_parametres->mini_height, … … 115 119 'check_icon_v' => ($autosize_parametres->check_icon_v == 'on') ? 'checked="checked"' : '' , 116 120 'check_desc_v' => ($autosize_parametres->check_desc_v == 'on') ? 'checked="checked"' : '' , 117 121 'defaut_type' => ($autosize_parametres->defaut_type == 'on') ? 'checked="defaut_type"' : '' , 118 122 119 123 'webmaster_enabled' => ($autosize_parametres->webmaster_enabled == 'on') ? 'checked="checked"' : '' , … … 124 128 125 129 'user_status' => get_user_status($user_status) , 126 'SRC_IMG' => $SRC_IMG, 127 'liste_type' => $liste_type , 130 128 131 'Size' => $size 129 132
Note: See TracChangeset
for help on using the changeset viewer.