| 
      1
     | 
    
      <?php
 
     | 
  
  
    | 
      2
     | 
    
      /**
 
     | 
  
  
    | 
      3
     | 
    
       *
 
     | 
  
  
    | 
      4
     | 
    
       * @category        admin
 
     | 
  
  
    | 
      5
     | 
    
       * @package         media
 
     | 
  
  
    | 
      6
     | 
    
       * @author          Ryan Djurovich, WebsiteBaker Project
 
     | 
  
  
    | 
      7
     | 
    
       * @copyright       WebsiteBaker Org. e.V.
 
     | 
  
  
    | 
      8
     | 
    
       * @link            http://websitebaker.org/
 
     | 
  
  
    | 
      9
     | 
    
       * @license         http://www.gnu.org/licenses/gpl.html
 
     | 
  
  
    | 
      10
     | 
    
       * @platform        WebsiteBaker 2.8.3
 
     | 
  
  
    | 
      11
     | 
    
       * @requirements    PHP 5.3.6 and higher
 
     | 
  
  
    | 
      12
     | 
    
       * @version         $Id: parameters.php 2 2017-07-02 15:14:29Z Manuela $
 
     | 
  
  
    | 
      13
     | 
    
       * @filesource      $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/admin/media/parameters.php $
 
     | 
  
  
    | 
      14
     | 
    
       * @lastmodified    $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
 
     | 
  
  
    | 
      15
     | 
    
       *
 
     | 
  
  
    | 
      16
     | 
    
       */
 
     | 
  
  
    | 
      17
     | 
    
      
 
     | 
  
  
    | 
      18
     | 
    
      // Must include code to stop this file being access directly
 
     | 
  
  
    | 
      19
     | 
    
      if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
     | 
  
  
    | 
      20
     | 
    
      
 
     | 
  
  
    | 
      21
     | 
    
      function __unserialize($sObject) {  // found in php manual :-)
     | 
  
  
    | 
      22
     | 
    
          $_ret = preg_replace_callback(
 
     | 
  
  
    | 
      23
     | 
    
                          '!s:(\d+):"(.*?)";!', 
 
     | 
  
  
    | 
      24
     | 
    
                          function($matches) {return 's:'.strlen($matches[2]).':"'.$matches[2].'";';}, 
     | 
  
  
    | 
      25
     | 
    
                          $sObject 
 
     | 
  
  
    | 
      26
     | 
    
                   );
 
     | 
  
  
    | 
      27
     | 
    
          return unserialize($_ret);
 
     | 
  
  
    | 
      28
     | 
    
      }
 
     | 
  
  
    | 
      29
     | 
    
      $pathsettings = array();
 
     | 
  
  
    | 
      30
     | 
    
      if(DEFAULT_THEME != ' wb_theme') {
     | 
  
  
    | 
      31
     | 
    
          $query = $database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" );
 
     | 
  
  
    | 
      32
     | 
    
          if ($query && $query->numRows() > 0) {
     | 
  
  
    | 
      33
     | 
    
              $settings = $query->fetchRow();
 
     | 
  
  
    | 
      34
     | 
    
              $pathsettings = __unserialize($settings['value']);
 
     | 
  
  
    | 
      35
     | 
    
          } else {
     | 
  
  
    | 
      36
     | 
    
              $database->query ( "INSERT INTO ".TABLE_PREFIX."settings (`name`,`value`) VALUES ('mediasettings','')" );
     | 
  
  
    | 
      37
     | 
    
          }
 
     | 
  
  
    | 
      38
     | 
    
      }
 
     | 
  
  
    | 
      39
     | 
    
      
 
     |