| 1 | 
        
            989
         | 
        
            aldus
         | 
        <?php
  | 
      
      
        | 2 | 
        
            991
         | 
        
            Ruebenwurz
         | 
        
  | 
      
      
        | 3 | 
        
         | 
        
         | 
        // $Id$
  | 
      
      
        | 4 | 
        
         | 
        
         | 
        
  | 
      
      
        | 5 | 
        
            989
         | 
        
            aldus
         | 
        /*
  | 
      
      
        | 6 | 
        
         | 
        
         | 
        *	@version	1.0
  | 
      
      
        | 7 | 
        
         | 
        
         | 
        *	@author		Ruud Eisinga (Ruud) John (PCWacht)
  | 
      
      
        | 8 | 
        
         | 
        
         | 
        *	@date		June 2009
  | 
      
      
        | 9 | 
        
         | 
        
         | 
        *
  | 
      
      
        | 10 | 
        
         | 
        
         | 
        *
  | 
      
      
        | 11 | 
        
         | 
        
         | 
        *	droplets are small codeblocks that are called from anywhere in the template.
  | 
      
      
        | 12 | 
        
         | 
        
         | 
        * 	To call a droplet just use [[dropletname]]. optional parameters for a droplet can be used like [[dropletname?parameter=value¶meter2=value]]
  | 
      
      
        | 13 | 
        
         | 
        
         | 
        */
  | 
      
      
        | 14 | 
        
         | 
        
         | 
        
  | 
      
      
        | 15 | 
        
            995
         | 
        
            aldus
         | 
        if(!defined('WB_PATH')) die(header('Location: ../../index.php'));
 | 
      
      
        | 16 | 
        
            989
         | 
        
            aldus
         | 
        
  | 
      
      
        | 17 | 
        
            995
         | 
        
            aldus
         | 
        $table = TABLE_PREFIX .'mod_droplets';
  | 
      
      
        | 18 | 
        
         | 
        
         | 
        
  | 
      
      
        | 19 | 
        
         | 
        
         | 
        $info = $database->query("SELECT * from `$table` limit 0,1" );
 | 
      
      
        | 20 | 
        
         | 
        
         | 
        $fields = $info->fetchRow();
  | 
      
      
        | 21 | 
        
            997
         | 
        
            aldus
         | 
        if (!array_key_exists("admin_edit", $fields)) {
 | 
      
      
        | 22 | 
        
            995
         | 
        
            aldus
         | 
        	/**
  | 
      
      
        | 23 | 
        
         | 
        
         | 
        	 *	Call from the upgrade-script
  | 
      
      
        | 24 | 
        
         | 
        
         | 
        	 */
  | 
      
      
        | 25 | 
        
         | 
        
         | 
        
  | 
      
      
        | 26 | 
        
         | 
        
         | 
        	if (function_exists('db_add_field')) {
 | 
      
      
        | 27 | 
        
            998
         | 
        
            ruud
         | 
        		db_add_field("admin_edit", 'mod_droplets', "INT NOT NULL default '0'");
 | 
      
      
        | 28 | 
        
         | 
        
         | 
        		db_add_field("admin_view", 'mod_droplets', "INT NOT NULL default '0'");
 | 
      
      
        | 29 | 
        
         | 
        
         | 
        		db_add_field("show_wysiwyg", 'mod_droplets', "INT NOT NULL default '0'");
 | 
      
      
        | 30 | 
        
            995
         | 
        
            aldus
         | 
        	} else {
 | 
      
      
        | 31 | 
        
         | 
        
         | 
        		/**
  | 
      
      
        | 32 | 
        
         | 
        
         | 
        		 * Not call by the upgrade-script
  | 
      
      
        | 33 | 
        
         | 
        
         | 
        		 */
  | 
      
      
        | 34 | 
        
         | 
        
         | 
        		$database->query("ALTER TABLE `$table` (
 | 
      
      
        | 35 | 
        
         | 
        
         | 
        			`admin_edit` INT NOT NULL default '0',
  | 
      
      
        | 36 | 
        
         | 
        
         | 
        			`admin_view` INT NOT NULL default '0',
  | 
      
      
        | 37 | 
        
         | 
        
         | 
        			`show_wysiwyg` INT NOT NULL default '0'
  | 
      
      
        | 38 | 
        
            998
         | 
        
            ruud
         | 
        			)");
  | 
      
      
        | 39 | 
        
            995
         | 
        
            aldus
         | 
        	}
  | 
      
      
        | 40 | 
        
         | 
        
         | 
        }
  | 
      
      
        | 41 | 
        
            989
         | 
        
            aldus
         | 
        ?>
  |