[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <08-Nov-2006 17:10:02 ks> 4 // 5 // Copyright (C) 1999-2006 eZ systems as. All rights reserved. 6 // 7 8 include_once ( "lib/ezutils/classes/ezini.php" ); 9 include_once ( "lib/ezutils/classes/ezsys.php" ); 10 11 // This function is needed for compatibility with 3.6/3.7 and 3.8 releases prior to 3.8.7 12 function imagePath( $imgName ) 13 { 14 $OEini =& eZINI::instance( 'ezdhtml.ini' ); 15 $withHost = true; 16 if ( $OEini->hasVariable( 'SystemSettings', 'RelativeURL' ) && 17 $OEini->variable( 'SystemSettings', 'RelativeURL' ) == 'enabled' ) 18 { 19 $withHost = false; 20 } 21 22 if ( $withHost ) 23 { 24 // Check if SSL port is defined in site.ini 25 $ini =& eZINI::instance(); 26 $sslPort = 443; 27 if ( $ini->hasVariable( 'SiteSettings', 'SSLPort' ) ) 28 { 29 $sslPort = $ini->variable( 'SiteSettings', 'SSLPort' ); 30 } 31 32 if ( eZSys::serverPort() == $sslPort ) 33 $protocol = 'https'; 34 else 35 $protocol = 'http'; 36 37 $imgSrc = extension_path( 'ezdhtml', true, true, $protocol ); 38 } 39 else 40 $imgSrc = '/' . extension_path( 'ezdhtml' ); 41 42 $imgSrc .= '/design/standard/images/ezdhtml/' . $imgName; 43 44 return $imgSrc; 45 } 46 47 function serverURL() 48 { 49 $OEini =& eZINI::instance( 'ezdhtml.ini' ); 50 if ( $OEini->hasVariable( 'SystemSettings', 'RelativeURL' ) && 51 $OEini->variable( 'SystemSettings', 'RelativeURL' ) == 'enabled' ) 52 { 53 return ''; 54 } 55 56 $domain = eZSys::hostname(); 57 $protocol = 'http'; 58 59 // Default to https if SSL is enabled 60 // Check if SSL port is defined in site.ini 61 $sslPort = 443; 62 $ini =& eZINI::instance(); 63 if ( $ini->hasVariable( 'SiteSettings', 'SSLPort' ) ) 64 { 65 $sslPort = $ini->variable( 'SiteSettings', 'SSLPort' ); 66 } 67 68 if ( eZSys::serverPort() == $sslPort ) 69 { 70 $protocol = 'https'; 71 } 72 73 $URL = $protocol . "://" . $domain; 74 $URL .= eZSys::wwwDir(); 75 76 return $URL; 77 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |