[ Index ] |
|
Code source de e107 0.7.8 |
1 global $pref; 2 if (preg_match("#\.php\?.*#",$code_text)){return "";} 3 global $IMAGES_DIRECTORY, $FILES_DIRECTORY, $e107; 4 $search = array('"', '{E_IMAGE}', '{E_FILE}'); 5 $replace = array(''', $e107->base_path.$IMAGES_DIRECTORY, $e107->base_path.$FILES_DIRECTORY); 6 $code_text = str_replace($search, $replace, $code_text); 7 unset($imgParms); 8 $imgParms['class']="bbcode"; 9 $imgParms['alt']=''; 10 $imgParms['style']="vertical-align:middle; border:0"; 11 12 $code_text = $tp -> toAttribute($code_text); 13 14 if($parm) { 15 $parm = preg_replace('#onerror *=#i','',$parm); 16 $parm = str_replace("amp;", "&", $parm); 17 parse_str($parm,$tmp); 18 foreach($tmp as $p => $v) { 19 $imgParms[$p]=$v; 20 } 21 } 22 $parmStr=""; 23 foreach($imgParms as $k => $v) { 24 $parmStr .= $tp -> toAttribute($k)."='".$tp -> toAttribute($v)."' "; 25 } 26 27 28 if(file_exists(e_IMAGE."newspost_images/".$code_text)) 29 { 30 $code_text = e_IMAGE."newspost_images/".$code_text; 31 } 32 33 if (!$postID) { 34 return "<img src='".$code_text."' {$parmStr} />"; 35 } else { 36 if(strstr($postID,'class:')) { 37 $uc = substr($postID,6); 38 } 39 if ($pref['image_post']) { 40 if(!isset($uc) || ($uc == '')) { 41 if (!function_exists('e107_userGetuserclass')) { 42 require_once(e_HANDLER.'user_func.php'); 43 } 44 $uc = e107_userGetuserclass($postID); 45 } 46 if (check_class($pref['image_post_class'],$uc)) { 47 return "<img src='".$code_text."' {$parmStr} />"; 48 } 49 else 50 { 51 return ($pref['image_post_disabled_method'] ? "[ image disabled ]" : "Image: $code_text"); 52 } 53 } 54 else 55 { 56 if ($pref['image_post_disabled_method']) { 57 return '[ image disabled ]'; 58 } else { 59 return "Image: $code_text"; 60 } 61 } 62 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |