Source for file loadconfig.php

Documentation is available at loadconfig.php

  1. <?php
  2. /**
  3. * DOM script for loading general settings, this script is included in almost every script via head.php
  4. * @author Gabriele Droege, DNA Bank Network <contact@dnabank-network.org>
  5. * @version 2.0
  6. * @package Load
  7. * @copyright Copyright © 2011 DNA Bank Network http://www.dnabank-network.org<br>The contents of this file are subject to the Mozilla Public License Version 1.1
  8. * @filesource
  9. * @license http://www.mozilla.org/MPL/ MPL
  10. */
  11.  
  12.     $dom = new DOMDocument('1.0', 'UTF-8');
  13.     if(file_exists("load/config.xml"))
  14.     { $dom->load("load/config.xml"); } else { $dom->load("../load/config.xml");}    
  15.  
  16.     $Configurations = $dom->getElementsByTagName('configuration');
  17.  
  18.     foreach ($Configurations as $Configuration) {
  19.  
  20.     $Logopathtest = $Configuration->getElementsByTagName('logopath');
  21.     $Logo_Path = $Logopathtest->item(0)->nodeValue;
  22.     $Logo_Path_Settings = $Logopathtest->item(0)->nodeValue;
  23.     $LogopathAlternativetest = $Configuration->getElementsByTagName('logopathalternative'); //alternative logo path (../)
  24.     $Logo_Path_Alternative = $LogopathAlternativetest->item(0)->nodeValue;
  25.     $Currencytest = $Configuration->getElementsByTagName('currency');
  26.     $Currency = $Currencytest->item(0)->nodeValue;
  27.     $PricePerAliquottest = $Configuration->getElementsByTagName('priceperaliquot');
  28.     $PricePerAliquot = $PricePerAliquottest->item(0)->nodeValue;
  29.     $StandardVolumetest = $Configuration->getElementsByTagName('standardvolume');
  30.     $StandardVolume = $StandardVolumetest->item(0)->nodeValue;
  31.     $Prefixtest = $Configuration->getElementsByTagName('prefix');
  32.     $Prefix = $Prefixtest->item(0)->nodeValue;
  33.     $BackupAliquottest = $Configuration->getElementsByTagName('backupaliquot');
  34.     $BackupAliquot = $BackupAliquottest->item(0)->nodeValue;    
  35.    
  36.     } //foreach ($Configurations as $Configuration)
  37.     
  38.     if(file_exists($Logo_Path))
  39.      { $Path_Logo = "<img src='".$Logo_Path."' height='78' />"; }
  40.     else { $Path_Logo = "<img src='".$Logo_Path_Alternative."' height='78' />"; }
  41.     
  42.     global $Path_Logo;
  43.     
  44.     if(empty($StandardVolume) or !isset($StandardVolume)) { $StandardVolume = '20';  }
  45.     
  46. ?>

Documentation generated on Tue, 29 Nov 2011 10:44:53 +0100 by phpDocumentor 1.4.3