94 Zeilen
		
	
	
	
		
			3,3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			94 Zeilen
		
	
	
	
		
			3,3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/**
 | 
						|
 * file semmelstatzR_startup.php
 | 
						|
 *
 | 
						|
 * @package     SemmelstatzR
 | 
						|
 * @version     $Rev$
 | 
						|
 * @since       1.0.0
 | 
						|
 * @author      SEM-Team
 | 
						|
 * @copyright   (c)2011 SEM-Team
 | 
						|
 * @link        http://sourceforge.net/projects/semmelstatz/
 | 
						|
 * @license     http://www.gnu.org/licenses/gpl-3.0.html
 | 
						|
 * 
 | 
						|
 * This program is free software: you can redistribute it and/or modify
 | 
						|
 * it under the terms of the GNU General Public License as published by
 | 
						|
 * the Free Software Foundation, either version 3 of the License, or
 | 
						|
 * (at your option) any later version.
 | 
						|
 * 
 | 
						|
 * This program is distributed in the hope that it will be useful,
 | 
						|
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
						|
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
						|
 * GNU General Public License for more details.
 | 
						|
 * 
 | 
						|
 * You should have received a copy of the GNU General Public License
 | 
						|
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.  
 | 
						|
 *
 | 
						|
 * $Id$
 | 
						|
 * 
 | 
						|
 */
 | 
						|
/**  
 | 
						|
 * based upon semmelstatz
 | 
						|
 * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de)
 | 
						|
 *    
 | 
						|
 * @license http://www.gnu.org/licenses/gpl-2.0.html
 | 
						|
 * This program is free software; you can redistribute it and/or modify
 | 
						|
 * it under the terms of the GNU General Public License (version 2) as
 | 
						|
 * published by the Free Software Foundation.
 | 
						|
 *
 | 
						|
 * This program is distributed in the hope that it will be useful,
 | 
						|
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
						|
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 | 
						|
 * GNU General Public License for more details.
 | 
						|
 *
 | 
						|
 * You should have received a copy of the GNU General Public License along
 | 
						|
 * with this program; if not, write to the Free Software Foundation, Inc.,
 | 
						|
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
						|
*/
 | 
						|
### constants
 | 
						|
define('SEMMELSTATZR_VERSION', '1.0.0 RC');
 | 
						|
define('SEMMELSTATZR_SRVPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
 | 
						|
define('SEMMELSTATZR_HTML_RELPATH', WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)));
 | 
						|
	
 | 
						|
### Deklaration der Tabellennamen
 | 
						|
global $wpdb;
 | 
						|
$wpdb->statz = $wpdb->prefix . 'statz';
 | 
						|
$wpdb->statzhist = $wpdb->prefix . 'statzhist';
 | 
						|
    
 | 
						|
### Auslesen des Domainnamens
 | 
						|
global $homehost;
 | 
						|
if(substr($_SERVER['SERVER_NAME'],0,4) == 'www.') {
 | 
						|
    $homehost = '%' . substr($_SERVER['SERVER_NAME'],4) . '%';
 | 
						|
} else {
 | 
						|
    $homehost = '%' . $_SERVER['SERVER_NAME'] . '%';
 | 
						|
}
 | 
						|
 | 
						|
### localization
 | 
						|
if(!load_plugin_textdomain('semmelstatzR')) {
 | 
						|
    $plugin_dir = basename(dirname(__FILE__));
 | 
						|
    load_plugin_textdomain('semmelstatzR',null,$plugin_dir.'/locale/');
 | 
						|
}
 | 
						|
 | 
						|
// includes
 | 
						|
include_once SEMMELSTATZR_SRVPATH.'includes/functions.semr.php';
 | 
						|
include_once SEMMELSTATZR_SRVPATH.'includes/functions.semr_template.php';
 | 
						|
include_once SEMMELSTATZR_SRVPATH.'includes/class.upgrademe.php';
 | 
						|
 | 
						|
// define some vars
 | 
						|
$semr_hook = array();
 | 
						|
 | 
						|
// init upgrade stuff
 | 
						|
if(class_exists("Upgrademe")) {
 | 
						|
    function semmelstatzR_upgrademe() {
 | 
						|
        // will be changed to sf.net soon as website is ready
 | 
						|
        //return 'http://semmelstatz.sourceforge.net/semr_update.php'; 
 | 
						|
        return 'http://www.php-backoffice.de/updates/test/semr_update.php';
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
// function wrappers for older wp versions
 | 
						|
if(!function_exists("plugin_dir_path")) {
 | 
						|
    function plugin_dir_path($file) {
 | 
						|
        return trailingslashit(dirname($file));
 | 
						|
    }
 | 
						|
}
 | 
						|
?>
 |