Subversion Repositories personal-webbase

Compare Revisions

Regard whitespace Rev 3 → Rev 10

/trunk_080_wip_cancelled/includes/WBDesignHandler.class.php
File deleted
\ No newline at end of file
/trunk_080_wip_cancelled/includes/WBModuleHandler.class.php
File deleted
\ No newline at end of file
/trunk_080_wip_cancelled/includes/config.inc.php
7,8 → 7,8
$mysql_access_data['server'] = 'localhost';
$mysql_access_data['port'] = '';
$mysql_access_data['prefix'] = 'webbase_';
$mysql_access_data['username'] = 'webbase_dev';
$mysql_access_data['password'] = 'wichsenmachttaub';
$mysql_access_data['username'] = 'root';
$mysql_access_data['password'] = '';
$mysql_access_data['database'] = 'webbase_dev';
$mysql_access_data['use_mysqli'] = false;
 
/trunk_080_wip_cancelled/includes/database.inc.php
58,7 → 58,7
 
if ($e != '')
{
$mess = '<b>MySQL-Fehler!</b><br><br>Folgender MySQL-Fehler ist aufgetreten:<br><br><code>'.$e.'</code><br><br>Folgende Query wurde ausgef&uuml;hrt:<br><br><code>'.htmlentities($inp).'</code><br><br>Die Scriptausf&uuml;hrung wurde aus Sicherheitsgr&uuml;nden abgebrochen.';
$mess = '<b>MySQL-Fehler!</b><br><br>Folgender MySQL-Fehler ist aufgetreten:<br><br><code>'.$e.'</code><br><br>Folgende Query wurde ausgef&uuml;hrt:<br><br><code>'.wb_htmlentities($inp).'</code><br><br>Die Scriptausf&uuml;hrung wurde aus Sicherheitsgr&uuml;nden abgebrochen.';
 
global $modul;
global $m2;
/trunk_080_wip_cancelled/includes/functions.inc.php
6,6 → 6,10
// CODIERUNGSFUNKTIONEN //
//////////////////////////////////////////////////////////////////////////////
 
function wb_htmlentities($x) {
return htmlentities($x, ENT_COMPAT, 'iso-8859-1');
}
 
function encode_critical_html_characters($inp)
{
$inp = str_replace('&', '&amp;', $inp);
29,7 → 33,7
function executable_html_code($inp)
{
// Wenn der Benutzer z.B. ä im HTML-Formular eingegeben hat, würde hier aufgrund von Unicode quatsch rauskommen
$inp = htmlentities($inp, ENT_COMPAT, 'UTF-8');
$inp = wb_htmlentities($inp, ENT_COMPAT, 'UTF-8');
 
$inp = decode_critical_html_characters($inp);
 
307,7 → 311,7
return $return;
}
 
function my_htmlentities($inp, $charset = 'utf-8')
function my_wb_htmlentities($inp, $charset = 'utf-8')
{
// http://www.php.net/manual/de/function.htmlspecialchars.php
// PHP-Version wird nicht kontrolliert...
342,12 → 346,12
if (strtolower($charset) == 'euc-jp') $cs = 'EUC-JP';
if (strtolower($charset) == 'eucjp') $cs = 'EUC-JP';
 
return @htmlentities($inp, ENT_NOQUOTES, $cs);
return @wb_htmlentities($inp, ENT_NOQUOTES, $cs);
}
 
function check_email($email_adresse)
{
if(eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$",$email_adresse))
if(preg_match("|^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$|ismU",$email_adresse))
return true;
else
return false;
531,7 → 535,7
else
$g = 'designs/spacer.gif';
 
return "javascript:oop('".$modul."', '".$seite."', '".htmlentities($module_information->caption)."', '".$g."');";
return "javascript:oop('".$modul."', '".$seite."', '".wb_htmlentities($module_information->caption)."', '".$g."');";
}
 
function wb_list_items($modul, $table, $append, $dir = 0)
680,10 → 684,208
// FUNKTIONEN FÜR MODUL-XML UND DESIGN-XML //
//////////////////////////////////////////////////////////////////////////////
 
require 'includes/WBModulHandler.class.php';
class WebBase_Module_Info
{
private $f_name;
private $f_author;
private $f_version;
private $f_language;
 
require 'includes/WBDesignHandler.class.php';
// 0 = Public Freeware
// 1 = Public Shareware
// 2 = Private Secured
// 3 = Personal WebBase-Core
// 4 = Personal WebBase-Enclosure
private $f_license;
 
function name() {
return $this->f_name;
}
 
function author() {
return $this->f_author;
}
 
function version() {
return $this->f_version;
}
 
function language() {
return $this->f_language;
}
 
function license() {
return $this->f_license;
}
 
function WebBase_Module_Info($name, $author, $version, $language, $license) {
$this->f_name = $name;
$this->f_author = $author;
$this->f_version = $version;
$this->f_language = $language;
$this->f_license = $license;
}
};
 
class WBModuleHandler {
 
private static $cache_module_information = Array();
 
function get_module_information($modulename)
{
if (isset(self::$cache_module_information[$modulename])) {
return self::$cache_module_information[$modulename];
}
 
if (function_exists('getmicrotime')) $ss = getmicrotime();
 
$xml = new xml();
 
if ((!strpos($modulename, '..')) && (file_exists('modules/'.$modulename.'/info.xml')))
{
$object = $xml->xml_file_to_object('modules/'.$modulename.'/info.xml');
 
if ($object->name == 'moduleinfo')
{
$v_expected_name = '';
$v_author = '';
$v_version = '';
$v_language = '';
$v_license = '';
 
foreach ($object->children as $m1 => $m2)
{
if ($object->children[$m1]->name == 'expected_name') $v_expected_name = $object->children[$m1]->content;
if ($object->children[$m1]->name == 'author') $v_author = $object->children[$m1]->content;
if ($object->children[$m1]->name == 'version') $v_version = $object->children[$m1]->content;
if ($object->children[$m1]->name == 'language') $v_language = $object->children[$m1]->content;
if ($object->children[$m1]->name == 'license') $v_license = $object->children[$m1]->content;
}
 
$output = new WebBase_Module_Info($v_expected_name, $v_author, $v_version, $v_language, $v_license);
 
if ($output->caption == '') $output->caption = $modulename;
 
if (function_exists('getmicrotime')) {
$ee = getmicrotime();
global $xml_time;
$xml_time += $ee-$ss;
global $xml_count;
$xml_count++;
}
 
self::$cache_module_information[$modulename] = $output;
 
return $output;
}
else
{
return NULL;
}
}
else
{
return NULL;
}
}
 
}
 
class WebBase_Design_Info
{
private $f_name;
private $f_author;
private $f_version;
 
// 0 = Third-Party-Product
// 1 = Official Product
private $f_license;
 
function name() {
return $this->f_name;
}
 
function author() {
return $this->f_author;
}
 
function version() {
return $this->f_version;
}
 
function license() {
return $this->f_license;
}
 
function WebBase_Design_Info($name, $author, $version, $license) {
$this->f_name = $name;
$this->f_author = $author;
$this->f_version = $version;
$this->f_license = $license;
}
};
 
class WBModuleHandler {
 
private static $cache_design_information = Array();
 
function get_design_information($designname)
{
if (isset(self::$cache_design_information[$designname])) {
return self::$cache_design_information[$designname];
}
 
if (function_exists('getmicrotime')) $ss = getmicrotime();
 
$xml = new xml();
 
if ((!strpos($designname, '..')) && (file_exists('designs/'.$designname.'/info.xml')))
{
$object = $xml->xml_file_to_object('designs/'.$designname.'/info.xml');
 
if ($object->name == 'designinfo')
{
$v_name = '';
$v_author = '';
$v_version = '';
$v_license = '';
 
foreach ($object->children as $m1 => $m2)
{
if ($object->children[$m1]->name == 'name') $v_name = $object->children[$m1]->content;
if ($object->children[$m1]->name == 'author') $v_author = $object->children[$m1]->content;
if ($object->children[$m1]->name == 'version') $v_version = $object->children[$m1]->content;
if ($object->children[$m1]->name == 'license') $v_license = $object->children[$m1]->content;
}
 
$output = new WebBase_Design_Info($v_name, $v_author, $v_version, $v_license);
 
if ($output->name == '') $output->name = $designname;
 
if (function_exists('getmicrotime')) {
$ee = getmicrotime();
global $xml_time;
$xml_time += $ee-$ss;
global $xml_count;
$xml_count++;
}
 
self::$cache_design_information[$designname] = $output;
 
return $output;
}
else
{
return NULL;
}
}
else
{
return NULL;
}
}
}
 
/* Konstanten */
 
define('RELATIVE_DIR', dir_add_trailing_backslash(dirname($_SERVER['PHP_SELF'])));
/trunk_080_wip_cancelled/includes/main.inc.php
37,7 → 37,7
@ini_set('magic_quotes_sybase', 'Off');
 
// 2. Magic Quotes Runtime abschalten
set_magic_quotes_runtime(0);
if (function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);
 
// 3. variables_order / gpc_order ersetzen
@ini_set('register_long_arrays', '1');
45,8 → 45,13
foreach ($types_to_register as $rtype)
{
// 4. Funktion von "Register Globals" ersetzen, wenn es ausgeschaltet ist
if ((!ini_get('register_globals')) && (@count(${'HTTP_'.$rtype.'_VARS'}) > 0))
extract(${'HTTP_'.$rtype.'_VARS'}, EXTR_OVERWRITE);
if (!ini_get('register_globals')) {
if (@count(${'_'.$rtype}) > 0) {
extract(${'_'.$rtype}, EXTR_OVERWRITE);
} else if (@count(${'HTTP_'.$rtype.'_VARS'}) > 0) {
extract(${'_'.$rtype}, EXTR_OVERWRITE);
}
}
 
// Workaround, wenn register_long_arrays nicht auf 1 gesetzt werden konnte
if (ini_get('register_long_arrays') == '1')
62,7 → 67,7
{
$$m1 = stripslashes($$m1);
${'HTTP_'.$rtype.'_VARS'}[$m1] = stripslashes(${'HTTP_'.$rtype.'_VARS'}[$m1]);
${'_'.$rtype}[$m1] = stripslashes(${'_'.$rtype}[$m1]);
# ${'_'.$rtype}[$m1] = stripslashes(${'_'.$rtype}[$m1]);
}
 
unset($m1);
77,7 → 82,7
foreach ($$ch AS $m1 => $m2)
{
$$m1 = encode_critical_html_characters($$m1);
${'HTTP_'.$rtype.'_VARS'}[$m1] = encode_critical_html_characters(${'HTTP_'.$rtype.'_VARS'}[$m1]);
# ${'HTTP_'.$rtype.'_VARS'}[$m1] = encode_critical_html_characters(${'HTTP_'.$rtype.'_VARS'}[$m1]);
${'_'.$rtype}[$m1] = encode_critical_html_characters(${'_'.$rtype}[$m1]);
}
 
/trunk_080_wip_cancelled/includes/revision.inc.php
3,7 → 3,7
if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
 
// Revision-Informationen
$revision = '0.80 Developer';
$revision = '0.80 Developer (2022 Test)';
$rev_datum = '12.08.2009';
 
?>