| 1 | <?php
 | 
  
    | 2 | /**
 | 
  
    | 3 |  *
 | 
  
    | 4 |  * @category        admin
 | 
  
    | 5 |  * @package         admintools
 | 
  
    | 6 |  * @author          WebsiteBaker Project
 | 
  
    | 7 |  * @copyright       2004-2009, Ryan Djurovich
 | 
  
    | 8 |  * @copyright       2009-2011, Website Baker Org. e.V.
 | 
  
    | 9 |  * @link			http://www.websitebaker2.org/
 | 
  
    | 10 |  * @license         http://www.gnu.org/licenses/gpl.html
 | 
  
    | 11 |  * @platform        WebsiteBaker 2.8.x
 | 
  
    | 12 |  * @requirements    PHP 5.2.2 and higher
 | 
  
    | 13 |  * @version         $Id: parameters.php 1473 2011-07-09 00:40:50Z Luisehahne $
 | 
  
    | 14 |  * @filesource		$HeadURL:  $
 | 
  
    | 15 |  * @lastmodified    $Date:  $
 | 
  
    | 16 |  *
 | 
  
    | 17 |  */
 | 
  
    | 18 | 
 | 
  
    | 19 | // Must include code to stop this file being access directly
 | 
  
    | 20 | if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
 | 
  
    | 21 | 
 | 
  
    | 22 | function __unserialize($sObject) {  // found in php manual :-)
 | 
  
    | 23 | 	$__ret =preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
 | 
  
    | 24 | 	return unserialize($__ret);
 | 
  
    | 25 | }
 | 
  
    | 26 | $pathsettings = array();
 | 
  
    | 27 | $query = $database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" );
 | 
  
    | 28 | if ($query && $query->numRows() > 0) {
 | 
  
    | 29 | 	$settings = $query->fetchRow();
 | 
  
    | 30 | 	$pathsettings = __unserialize($settings['value']);
 | 
  
    | 31 | } else {
 | 
  
    | 32 | 	$database->query ( "INSERT INTO ".TABLE_PREFIX."settings (`name`,`value`) VALUES ('mediasettings','')" );
 | 
  
    | 33 | }
 | 
  
    | 34 | 
 |