1
0
Fork 0
Dieser Commit ist enthalten in:
Oldperl 2011-11-14 08:13:34 +00:00
Ursprung f757d702b1
Commit a8fe432ec3
4 geänderte Dateien mit 220 neuen und 110 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,72 @@
<?php
/**
* File: class.semmelstatzR.php
*
* @package SemmelstatzR
* @version $Rev$
* @since 2011/11/07 v 1.0.0 Beta
* @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$
*
*/
/**
*
*/
class semmelstatzR {
protected $_oDb;
/**
*
* @global type $wpdb
*/
public function __construct() {
$this->_initDb();
}
/* public */
/* protected */
/* private */
/**
*
* @global wpdb $wpdb
* @return boolean
*/
private function _initDb() {
global $wpdb;
if($this->_oDb instanceof $wpdb) {
return true;
} else if($wpdb instanceof wpdb) {
$this->_oDb = $wpdb;
return true;
} else {
return false;
}
}
}
?>

Datei anzeigen

@ -8,16 +8,17 @@
* @author Andreas 'Redunzl' Mueller
* @copyright (c)2011 PHP-Backoffice
* @copyright (c)2005-2009 kopfhoch-studio
* @link http://www.php-backoffice.de/projects/semmelstatzR
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-2.0.html
*
* $Id$
*/
if(!current_user_can('manage_statz')) {
die('Zugriff verweigert');
}
define('SEMMELSTATZR_VERSION', '1.0.0 Beta');
define('SEMMELSTATZR_SRVPATH', dirname(__FILE__));
define('SEMMELSTATZR_HTML_RELPATH', WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)));
if(current_user_can('manage_statz')) {
global $wpdb;
$pre = $wpdb->prefix; $lenpre = strlen($pre);
@ -87,4 +88,8 @@ if(!current_user_can('manage_statz')) {
print "</div>";
} else {
echo '<p>No permission to access this area</p>';
}
?>

Datei anzeigen

@ -1,31 +1,47 @@
<?php
/*
Plugin Name: SemmelstatzR
Plugin Name: semmelstatzR
Plugin URI: http://sourceforge.net/projects/semmelstatz/
Description: Visitorstatistic for Wordpress, based upon the original wp-plugin semmelstatz by Andreas 'Redunzl' Mueller (http://www.kopfhoch-studio.de)
Version: 1.0.0 beta
Author: Ortwin Pinke
Author URI: http://www.ortwinpinke.de
Version: 1.0.0 Beta
Author: SEM-Team
Author URI: http://semmelstatz.sf.net
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
/**
* file semmelstatzR.php
*
* @package SemmelstatzR
* @version $Rev$
* @author Ortwin Pinke <info@php-backoffice.de>
* @author Ortwin Pinke <me@ortwinpinke.de>
* @author Andreas 'Redunzl' Mueller
* @copyright (c)2011 PHP-Backoffice
* @copyright (c)2011 SEM-Team
* @copyright (c)2005-2009 kopfhoch-studio
* @link http://www.php-backoffice.de/projects/semmelstatzR
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @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)
* Copyright (c) 2011- Ortwin Pinke (info@php-backoffice.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.
@ -40,32 +56,7 @@ Author URI: http://www.ortwinpinke.de
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
### constants
define('SEMMELSTATZR_VERSION', '1.0.0 Beta');
define('SEMMELSTATZR_SRVPATH', dirname(__FILE__));
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','/wp-content/languages/')) {
$plugin_dir = basename(dirname(__FILE__));
load_plugin_textdomain('semmelstatzR',null,$plugin_dir.'/locale/');
//}
include_once SEMMELSTATZR_SRVPATH.'/includes/functions.semr.php';
include_once SEMMELSTATZR_SRVPATH.'/includes/functions.semr_template.php';
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'semmelstatzR_startup.php';
if(is_admin() == true) {

42
semmelstatzR_startup.php Normale Datei
Datei anzeigen

@ -0,0 +1,42 @@
<?php
/**
* file semmelstatzR_startup.php
*
* @package SemmelstatzR
* @version $Rev$
* @author Ortwin Pinke <info@dceonline.de>
* @author Andreas 'Redunzl' Mueller
* @copyright (c)2011 PHP-Backoffice
* @copyright (c)2005-2009 kopfhoch-studio
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-2.0.html
*
* $Id$
*/
### constants
define('SEMMELSTATZR_VERSION', '1.0.0 Beta');
define('SEMMELSTATZR_SRVPATH', dirname(__FILE__));
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/');
}
include_once SEMMELSTATZR_SRVPATH.'/includes/functions.semr.php';
include_once SEMMELSTATZR_SRVPATH.'/includes/functions.semr_template.php';
?>