|
Menu |
|
|
Home |
| |
|
Discussions |
| |
|
Tools |
| |
|
Affiliates |
| |
|
Content |
| |
|
Info |
| | |
|
|
|
|
|
User Info |
|
Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144
People Online:
Visitors: 65
Members: 0
Total: 65
|
|
|
|
|
|
Full disclosure |
|
|
|
|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
Help decode, PHP files |
|
Posted: Tue Sep 08, 2009 8:32 pm |
|
|
logo |
Regular user |
|
|
Joined: Oct 23, 2008 |
Posts: 19 |
|
|
|
|
|
|
|
All greetings.
Please help decode the three files
index.php, setup.php and copyright.php
http://slil.ru/27966002
Thanks |
|
|
|
|
|
|
|
|
Posted: Tue Sep 08, 2009 10:33 pm |
|
|
Cyko |
Moderator |
|
|
Joined: Jul 21, 2009 |
Posts: 375 |
|
|
|
|
|
|
|
copyright.php:
Code: | <?php
//=================================================================
// KOOBI R7 - CMS - PORTALSOFTWARE(c) DREAM4(r)
// HTTP://WWW.DREAM4.DE
//=================================================================
// ACHTUNG!
// DIESER PROGRAMMCODE IST URHERRECHTLICH GESCHUETZT
// DIE URHEBERRECHTE LIEGEN BEI DEN JEWEILIGEN AUTOREN.
// AENDERUNGEN IN DIESER DATEI ERFOLGEN AUF EIGENE GEFAHR!
// ES IST NICHT GESTATTET, DEN COPYRIGHTHINWEIS ZU AENDERN ODER ZU
// ENTFERNEN. NUR WENN SIE EINE COPYRIGHTHINWEIS-ENTFERNUNG BESTELLT
// HABEN, DUERFEN SIE DIESEN ENTFERNEN.
//================================================================
// BEI FRAGEN WENDEN SIE SICH BITTE AN: KONTAKT@DREAM4.DE
//=================================================================
//$base = dirname('/home/cyko/public_html/byterun/index.php');
if(defined('BASE_DIR'))
{
$base = BASE_DIR;
include_once($base . '/lib/version.ini.php');
} else {
$base = dirname('/home/cyko/public_html/byterun/index.php');
include_once($base . '/version.ini.php');
}
define('COPYNOTICE', 'Powered by <a title="Koobi ist ein komfortables und leistungsfähiges Content-Management-System (CMS) für Privatpersonen, Vereine, kleine und mittelständische Unternehmen, die einen professionellen Internetauftritt realisieren möchten." target="_blank" href="http://www.dream4.de/cms/content/6/koobi/1/">Koobi'.MAJOR_NAME.'</a> '.KOOBI_VERSION.' © <a target="_blank" href="http://www.dream4.de/">dream4®</a>');
define('COPYNOTICE_ADMIN', 'Koobi' . MAJOR_NAME . ' ' . MAIN_VERSION . '<br />© 2003-' . date('Y') . ' <a target="_blank" href="http://www.dream4.de/">dream4®</a>');
function X9sFDgifufiudfuiZZUz7897897978ed($out)
{
$find_c = strpos($out, COPYNOTICE);
if($find_c === false && @$_REQUEST['p'] != 'misc' && !defined('NOOUT'))
{
error('Koobi cannot be run because of modifying the file <em>lib/copyright.php</em>.<br />Please use the Original-File and place the Tag <em>{copyright}</em> at the End of your HTML-Template.');
} else {
echo $out;
}
}
function print_copyright()
{
return COPYNOTICE;
}
?> |
|
|
|
|
|
|
|
|
|
Posted: Tue Sep 08, 2009 10:34 pm |
|
|
Cyko |
Moderator |
|
|
Joined: Jul 21, 2009 |
Posts: 375 |
|
|
|
|
|
|
|
index.php:
Code: | <?php
//=================================================================
// KOOBI R7 - CMS - PORTALSOFTWARE(c) DREAM4(r)
// HTTP://WWW.DREAM4.DE
//=================================================================
// ACHTUNG!
// DIESER PROGRAMMCODE IST URHERRECHTLICH GESCHUETZT
// DIE URHEBERRECHTE LIEGEN BEI DEN JEWEILIGEN AUTOREN.
// AENDERUNGEN IN DIESER DATEI ERFOLGEN AUF EIGENE GEFAHR!
// ES IST NICHT GESTATTET, DEN COPYRIGHTHINWEIS ZU AENDERN ODER ZU
// ENTFERNEN. NUR WENN SIE EINE COPYRIGHTHINWEIS-ENTFERNUNG BESTELLT
// HABEN, DUERFEN SIE DIESEN ENTFERNEN.
//================================================================
// BEI FRAGEN WENDEN SIE SICH BITTE AN: KONTAKT@DREAM4.DE
//=================================================================
ob_start();
define("HPURL", $_SERVER['HTTP_HOST'] . str_replace("/index.php", "", $_SERVER['PHP_SELF']) . "/");
$startzeit = explode(" ", microtime());
$startzeit = $startzeit[0]+$startzeit[1];
@ini_set('arg_separator.input', '&');
@ini_set('arg_separator.output', '&');
@ini_set('url_rewriter.tags', '1');
function Add_Array($array)
{
reset($array);
while (list($feld, $wert) = each($array)){
if (is_string($wert)) {
$array[$feld] = addslashes($wert);
} else {
if (is_array($wert)) {
$array[$feld] = Add_Array($wert);
}
}
}
return $array;
}
function KoobiEncode($string)
{
$string = base64_encode($string);
return $string;
}
function KoobiRecode($string)
{
$string = base64_decode($string);
$string = str_replace('&','&',$string);
return $string;
}
if(isset($_GET['gopage']) && $_GET['gopage'] != '')
{
$gopage = KoobiRecode($_GET['gopage']);
refer("index.php?$gopage");
exit;
}
if (isset($HTTP_POST_VARS))
{
$_POST = $HTTP_POST_VARS;
$_GET = $HTTP_GET_VARS;
$_REQUEST = array_merge($_POST, $_GET);
$_COOKIE = $HTTP_COOKIE_VARS;
$_SESSION = $HTTP_SESSION_VARS;
}
if (!get_magic_quotes_gpc())
{
$_REQUEST = Add_Array($_REQUEST);
$_POST = Add_Array($_POST);
$_GET = Add_Array($_GET);
$_COOKIE = Add_Array($_COOKIE);
}
function to_abs($val)
{
if($val) return abs((int)$val);
}
$_REQUEST['id'] = to_abs(@$_REQUEST['id']);
$_REQUEST['galid'] = to_abs(@$_REQUEST['galid']);
$_REQUEST['hid'] = to_abs(@$_REQUEST['hid']);
$_REQUEST['categ'] = to_abs(@$_REQUEST['categ']);
$_REQUEST['catid'] = to_abs(@$_REQUEST['catid']);
$_REQUEST['limit'] = (isset($_REQUEST['limit']) && !empty($_REQUEST['limit'])) ? abs((int)$_REQUEST['limit']) : '';
$_REQUEST['pp'] = (isset($_REQUEST['pp']) && !empty($_REQUEST['pp'])) ? abs((int)$_REQUEST['pp']) : '';
$_REQUEST['prodid'] = (isset($_REQUEST['prodid']) && !empty($_REQUEST['prodid'])) ? abs((int)$_REQUEST['prodid']) : '0';
$_REQUEST['p'] = (isset($_REQUEST['p']) && $_REQUEST['p'] != '') ? preg_replace('/([^a-zA-Z]*)/', '', $_REQUEST['p']) : 'index';
$_REQUEST['t'] = (isset($_REQUEST['t']) && $_REQUEST['t'] != '') ? preg_replace('/([^-A-Za-zÀ-ÖØ-öø-ÿ0-9]*)/', '', $_REQUEST['t']) : '-';
$_REQUEST['sort'] = (isset($_REQUEST['sort']) && $_REQUEST['sort'] != '') ? preg_replace('/([^-A-Za-zÀ-ÖØ-öø-ÿ0-9]*)/', '', $_REQUEST['sort']) : '';
$_REQUEST['uid'] = (isset($_REQUEST['uid']) && !empty($_REQUEST['uid'])) ? abs((int)$_REQUEST['uid']) : '';
$_REQUEST['newsid'] = (isset($_REQUEST['newsid']) && !empty($_REQUEST['newsid'])) ? abs((int)$_REQUEST['newsid']) : '1';
$_REQUEST['page'] = (isset($_REQUEST['page']) && !empty($_REQUEST['page'])) ? abs((int)$_REQUEST['page']) : '1';
$_REQUEST['artpage']= (isset($_REQUEST['page']) && !empty($_REQUEST['artpage'])) ? abs((int)$_REQUEST['artpage']) : '1';
$_REQUEST['pp'] = (isset($_REQUEST['pp']) && !empty($_REQUEST['pp'])) ? abs((int)$_REQUEST['pp']) : '';
$_REQUEST['fid'] = (isset($_REQUEST['fid']) && !empty($_REQUEST['fid'])) ? abs((int)$_REQUEST['fid']) : '';
$_REQUEST['pid'] = (isset($_REQUEST['pid']) && !empty($_REQUEST['pid'])) ? abs((int)$_REQUEST['pid']) : '';
$_REQUEST['toid'] = (isset($_REQUEST['toid']) && !empty($_REQUEST['toid'])) ? abs((int)$_REQUEST['toid']) : '';
$_REQUEST['cid'] = (isset($_REQUEST['cid']) && !empty($_REQUEST['cid'])) ? abs((int)$_REQUEST['cid']) : '';
$_REQUEST['t_id'] = (isset($_REQUEST['t_id']) && !empty($_REQUEST['t_id'])) ? abs((int)$_REQUEST['t_id']) : '';
$_REQUEST['period'] = (isset($_REQUEST['period']) && !empty($_REQUEST['period'])) ? abs((int)$_REQUEST['period']) : '';
$_REQUEST['unit'] = (isset($_REQUEST['unit']) && !empty($_REQUEST['unit'])) ? eregi_replace('[^-A-Za-zÀ-ÖØ-öø-ÿ0-9]', '', $_REQUEST['unit']) : '';
$_REQUEST['forum_id'] = (isset($_REQUEST['forum_id']) && !empty($_REQUEST['forum_id'])) ?abs((int)$_REQUEST['forum_id']) : '';
$_REQUEST['posticon'] = (isset($_REQUEST['posticon']) && !empty($_REQUEST['posticon'])) ? abs((int)$_REQUEST['posticon']) : '';
$_REQUEST['group'] = (isset($_REQUEST['group']) && !empty($_REQUEST['group'])) ? abs((int)$_REQUEST['group']) : '';
$_REQUEST['high'] = (isset($_REQUEST['high']) && !empty($_REQUEST['high'])) ? preg_replace('/([^-A-Za-zÀ-ÖØ-öø-ÿ0-9_. ]*)/', '', $_REQUEST['high']) : '';
$_POST['posticon'] = (isset($_POST['posticon']) && !empty($_POST['posticon'])) ? abs((int)$_POST['posticon']) : '';
//=================================================================
// Haupt- und Smarty-Verzeichnis initialisieren
//=================================================================
define ('BASE_DIR', str_replace("\\","/",getcwd()));
define ('SMARTY_DIR', BASE_DIR . '/smarty/');
include_once(BASE_DIR.'/config/page.config.php');
//=================================================================
// Login
//=================================================================
if(isset($_REQUEST['b64redir']) && !empty($_REQUEST['b64redir']))
{
$red_to = base64_decode($_REQUEST['b64redir']);
$locati = str_replace("&", "&", $red_to);
refer($locati);
exit;
}
//=================================================================
// Nicht aendern!
//=================================================================
include_once(BASE_DIR.'/lib/copyright.php');
if(!@function_exists('X9sFDgifufiudfuiZZUz7897897978ed'))
{
echo('Koobi cannot be rund because of removing or modifying the file <em>lib/copyright.php</em>.<br />Please use the Original-File and place the Tag <em>{copyright}</em> at the End of your HTML-Template.');
exit;
}
//=================================================================
// Datenbank-Konfiguration laden
//=================================================================
include(BASE_DIR.'/lib/includes.php');
//=================================================================
// Verschluesselung aktiv?
//=================================================================
include(BASE_DIR.'/lib/ssl.php');
//=================================================================
// Url der Seite für weitere Aktionen festlegen
//=================================================================
if(!defined('HPURL')) define("HPURL", HTTPSSL . $_SERVER['HTTP_HOST'] . str_replace("/index.php", "", $_SERVER['PHP_SELF']) . "/");
session_start();
session_name('SID');
define('PREFIX', $config['dbprefix']);
define("SESSION", session_id());
//=================================================================
// Area definieren
//=================================================================
if(isset($_SESSION['area']) && is_numeric($_SESSION['area']) && $_SESSION['area'] >= 1 && !isset($_REQUEST['area']))
{
$area = preg_replace("/([^0-9]*)/", "", $_SESSION['area']);
$_SESSION['area'] = $area;
$_REQUEST['area'] = $area;
} elseif(isset($_REQUEST['area']) && is_numeric($_REQUEST['area']) && $_REQUEST['area'] >= 1) {
$area = preg_replace("/([^0-9]*)/", "", $_REQUEST['area']);
$_SESSION['area'] = $area;
$_REQUEST['area'] = $area;
} else {
$_SESSION['area'] = 1;
$_REQUEST['area'] = 1;
}
//=================================================================
// Smarty-Klasse einbinden
//=================================================================
include_once(BASE_DIR . '/smarty/Smarty.class.php');
include_once(BASE_DIR . '/smarty/Koobi_Config.class.php');
$GLOBALS['config'] = $config;
$GLOBALS['db'] = new DB($config['dbhost'], $config['dbuser'], $config['dbpass'], $config['dbname']);
//=================================================================
// Pruefen, ob Benutzer ausgesperrt werden soll. Ja, wenn IP
// in den EInstellungen fuer gesperrte Ip's eingetragen ist...
//=================================================================
checkIp();
// Aktive Bereiche
$active = $GLOBALS['db']->Query("SELECT * FROM " . PREFIX . "_bereiche");
while($row_active=$active->fetcharray())
{
$activ_sections[$row_active['Name']] = $row_active['Aktiv'];
}
$GLOBALS['Active'] = $activ_sections;
//=================================================================
// Fuer Sprachwahl-Menue: Sprachen aus der DB auslesen
//=================================================================
$langcodes = array();
$sql = $GLOBALS['db']->Query("SELECT Id,Sprachcode,Sprache FROM " . PREFIX . "_sprachen WHERE Aktiv = 1 ORDER BY Posi ASC");
while($row = $sql->fetcharray())
{
array_push($langcodes, $row);
$langlong[$row['Id']] = $row['Sprache'];
$config['lang'][$row['Id']] = $row['Sprachcode'];
}
//=================================================================
// Sprache laden. Ist eine Session gestartet?
//=================================================================
if(isset($_SESSION['lang']) && !empty($_SESSION['lang']) && !isset($_REQUEST['lang']) && (@file_exists(BASE_DIR . '/lang/' . $_SESSION['lang'] . '/main.txt')))
{
$Language = $_SESSION['lang'];
} else {
$Language = (isset($_REQUEST['lang']) && strlen($_REQUEST['lang']) == 2 && (@file_exists(BASE_DIR . '/lang/' . $_REQUEST['lang'] . '/main.txt')) ) ? $_REQUEST['lang'] : $config['lang'][1];
$_SESSION['lang'] = $Language;
if(isset($_REQUEST['lredirect']) && !empty($_REQUEST['lredirect']))
{
$redir = base64_decode($_REQUEST['lredirect']);
$redir = str_replace('&', '&', $redir);
refer("$redir");
exit;
}
}
//=================================================================
// Generell Einstellungen in Array legen
//=================================================================
$sql_globals = $GLOBALS['db']->Query("SELECT * FROM " . PREFIX . "_einstellungen LIMIT 1" );
$row_globals = $sql_globals->fetcharray();
$GLOBALS['settings'] = $row_globals;
define ('BBCODESITE', $row_globals['KoobiCode_Aktiv']);
define ('SMILIES', $row_globals['KoobiCode_Smilies']);
define ('IMAGECODE', $row_globals['KoobiCode_Bild']);
define ('STANDARDMAIL', $row_globals['Mail_Absender']);
//=================================================================
// Spracharray umkehren und Id an System uebergeben
//=================================================================
$Langcode = array_flip($config['lang']);
if(@!$Langcode[$_SESSION['lang']])
{
$res = $GLOBALS['db']->RowQuery("SELECT Id,Sprachcode FROM " . PREFIX . "_sprachen WHERE Aktiv = 1 ORDER BY Posi ASC LIMIT 1");
$_SESSION['lang'] = $res->Sprachcode;
}
$_SESSION['Langcode'] = $Langcode[$_SESSION['lang']];
//=================================================================
// Welche Sektion wird aufgerufen? Template-Ordner laden
//=================================================================
$area = $_REQUEST['area'];
$_SESSION['Area'] = $area;
$_SESSION['area'] = $area;
$sql_area = $GLOBALS['db']->Query("SELECT * FROM " . PREFIX . "_sektionen WHERE Id = '{$area}' AND Aktiv = '1'" );
$row_area = $sql_area->fetcharray();
//=================================================================
// Aufgerufene Sektion existiert nicht
//=================================================================
if(!is_array($row_area))
{
$sql_area_p = $GLOBALS['db']->Query("SELECT * FROM " . PREFIX . "_sektionen WHERE Id = '{$area}'" );
$row_area_p = $sql_area_p->fetcharray();
if(isset($_GET['pass']) && !empty($_GET['pass']) && $_GET['pass'] == $row_area_p['Passwort'] && $row_area_p['Passwort']!='')
{
$_SESSION['secpass'][$row_area_p['Id']] = $row_area_p['Passwort'];
}
if($row_area_p['Aktiv'] != 1)
{
if(isset($_SESSION['secpass'][$row_area_p['Id']]) && $_SESSION['secpass'][$row_area_p['Id']] == $row_area_p['Passwort'])
{
$row_area = $row_area_p;
} else {
echo "<pre>" . stripslashes($row_area_p['Meldung']) . "</pre>";
exit;
}
}
if(!is_array($row_area_p))
{
$sql_area = $GLOBALS['db']->Query("SELECT * FROM " . PREFIX . "_sektionen WHERE Id = '1'" );
$row_area = $sql_area->fetcharray();
$area = 1;
$_SESSION['Area'] = 1;
}
}
//=================================================================
// Rechte fuer User
//=================================================================
if(isset($_SESSION['user_group']) && $_SESSION['user_group'] != '2' && isset($_SESSION['benutzer_id']))
{
$group_settings = $GLOBALS['db']->RowQuery("SELECT KoobiCode_Signatur,Signatur_Erlaubt,Signatur_Laenge,Avatar_B,Avatar_H,MaxPn,MaxPn_Zeichen,MaxAnlagen,MaxZeichenPost FROM " . PREFIX . "_benutzer_gruppen WHERE Id = '" . $_SESSION['user_group'] . "'");
define('SIG_KOOBICODE', $group_settings->KoobiCode_Signatur);
define('SIG_ERLAUBT', $group_settings->Signatur_Erlaubt);
define('SIG_LAENGE', $group_settings->Signatur_Laenge);
define('AVATAR_W', $group_settings->Avatar_B);
define('AVATAR_H', $group_settings->Avatar_H);
define('MAXPN', $group_settings->MaxPn);
define('MAXPNLENGTH', $group_settings->MaxPn_Zeichen);
define('MAXATTCHMENT', $group_settings->MaxAnlagen);
define('MAXLENGTH_POST', $group_settings->MaxZeichenPost);
define('UID', $_SESSION['benutzer_id']);
define('UGROUP', $_SESSION['user_group']);
define('UNAME', koobispecialchars($_SESSION['user_name']));
define('ISLOGGED', 1);
if(isset($_SESSION['perm'])) unset($_SESSION['perm']);
if(isset($_SESSION['perm_admin'])) unset($_SESSION['perm_admin']);
$GLOBALS['db']->Query("UPDATE " . PREFIX . "_benutzer SET Zuletzt_Aktiv = '" . time() . "' WHERE Id = '" . $_SESSION['benutzer_id'] . "'");
$row_land = $GLOBALS['db']->RowQuery("SELECT LandCode FROM " . PREFIX . "_benutzer WHERE Id = '" . $_SESSION['benutzer_id'] . "' AND Kennwort = '" . $_SESSION['login_pass'] . "'");
if(is_object($row_land))
{
$_SESSION['user_country'] = $row_land->LandCode;
$row_perm = $GLOBALS['db']->RowQuery("SELECT Rechte,Rechte_Admin FROM " . PREFIX . "_berechtigungen WHERE Gruppe = '" . $_SESSION['user_group'] . "' AND Sektion = '$area'" );
if(is_object($row_perm))
{
$perms_arr = explode(',', $row_perm->Rechte);
foreach($perms_arr as $perm) $_SESSION['perm']["{$perm}{$area}"] = 1;
}
if(is_object($row_perm))
{
$perms_arr = explode(',', $row_perm->Rechte_Admin);
foreach($perms_arr as $perm) $_SESSION['perm_admin']["{$perm}{$area}"] = 1;
}
} else {
$_SESSION['user_country'] = $GLOBALS['settings']['Land'];
$_SESSION['user_group'] = 2;
$_SESSION['benutzer_id'] = 0;
if(!defined('UID') || UID == '') define('UID', 2);
if(!defined('UGROUP')) define('UGROUP', 2);
if(!defined('UNAME')) define('UNAME', 'UNAME');
if(!defined('ISLOGGED')) define('ISLOGGED', 0);
if(isset($_SESSION['perm'])) unset($_SESSION['perm']);
$row_perm = $GLOBALS['db']->RowQuery("SELECT Rechte FROM " . PREFIX . "_berechtigungen WHERE Gruppe = '2' AND Sektion = '$area'" );
$perms_arr = explode(',', @$row_perm->Rechte);
foreach($perms_arr as $perm) $_SESSION['perm']["{$perm}{$area}"] = 1;
}
} else {
$group_settings = $GLOBALS['db']->RowQuery("SELECT MaxPn,MaxPn_Zeichen,MaxAnlagen,MaxZeichenPost FROM " . PREFIX . "_benutzer_gruppen WHERE Id = '2'");
define('MAXPN', 0);
define('MAXPNLENGTH', 0);
define('MAXATTCHMENT', $group_settings->MaxAnlagen);
define('MAXLENGTH_POST', $group_settings->MaxZeichenPost);
$_SESSION['user_country'] = $GLOBALS['settings']['Land'];
$_SESSION['user_group'] = 2;
$_SESSION['benutzer_id'] = 0;
define('UID', 2);
define('UGROUP', 2);
define('UNAME', 'UNAME');
define('ISLOGGED', 0);
if(isset($_SESSION['perm'])) unset($_SESSION['perm']);
$row_perm = $GLOBALS['db']->RowQuery("SELECT Rechte FROM " . PREFIX . "_berechtigungen WHERE Gruppe = '2' AND Sektion = '$area'" );
$perms_arr = explode(',', @$row_perm->Rechte);
foreach($perms_arr as $perm) $_SESSION['perm']["{$perm}{$area}"] = 1;
}
//=================================================================
// Wer ist Online
//=================================================================
$expire = time() + (60 * 10);
$GLOBALS['db']->Query("DELETE FROM " . PREFIX . "_benutzer_online WHERE Expire <= '" . time() . "'");
$sql = $GLOBALS['db']->Query("SELECT Ip FROM " . PREFIX . "_benutzer_online WHERE Ip='" . $_SERVER['REMOTE_ADDR'] . "' limit 1");
$num = $sql->numrows();
if(@$_SESSION['loggedin'] == 1)
{
$user_id_logged = $_SESSION['benutzer_id'];
$ip = $_SERVER['REMOTE_ADDR'];
} else {
$user_id_logged = 0;
$ip = $_SERVER['REMOTE_ADDR'];
}
if ($num < 1)
$GLOBALS['db']->Query("INSERT INTO " . PREFIX . "_benutzer_online (Uid,Ip,Expire,Benutzername,Unsichtbar) VALUES ('" . $user_id_logged . "', '" . $ip . "','$expire','" . (defined("UNAME") ? UNAME : "UNAME") . "','" . (isset($_SESSION['unsichtbar']) && $_SESSION['unsichtbar'] == 1 ? 'INVISIBLE' : '0') . "')");
else
$GLOBALS['db']->Query("UPDATE " . PREFIX . "_benutzer_online set Uid = '" . $user_id_logged . "', Unsichtbar = '" . (isset($_SESSION['unsichtbar']) && $_SESSION['unsichtbar'] == 1 ? 'INVISIBLE' : '0') . "',Benutzername='" . (defined("UNAME") ? UNAME : "UNAME") . "' WHERE Ip='" . $_SERVER['REMOTE_ADDR'] . "'");
//=================================================================
// Exisitiert der Ordner fuer SMARTY?
//=================================================================
if(!is_dir(BASE_DIR.'/compiled/' . $area . '/'))
{
if(!@mkdir(BASE_DIR.'/compiled/' . $area . '/')) error('Cannot create directory "<b>/compiled/'.$area.'</b>". Please create this folder with your FTP-Program.');
else @chmod(BASE_DIR.'/compiled/' . $area . '/', 0777);
}
//=================================================================
// Ist der Ordner schreibgeschuetzt?
//=================================================================
if(@!is_writable(BASE_DIR.'/compiled/' . $area . '/')) error('The directory "<b>/compiled/'.$area.'</b>" is not writeable for SMARTY. Please set the Rights "<b>(CHMOD 777)</b>" to this folder with your FTP-Program.');
$GLOBALS['section'] = $row_area;
//=================================================================
// Theme-Switch?
//=================================================================
$_SESSION['tpl_current'] = (isset($_POST['tpl_current']) && !empty($_POST['tpl_current']) && is_dir('theme/' . $_POST['tpl_current'])) ? $_POST['tpl_current'] : ((isset($_SESSION['tpl_current']) && !empty($_SESSION['tpl_current'])) ? $_SESSION['tpl_current'] : '');
$row_area['Template'] = (isset($_SESSION['tpl_current']) && !empty($_SESSION['tpl_current']) && is_dir('theme/' . $_SESSION['tpl_current'])) ? $_SESSION['tpl_current'] : $row_area['Template'];
$config['std_theme'] = $row_area['Template'];
if(!is_dir(BASE_DIR.'/theme/' . $config['std_theme'])) error('Template-Folder does not exist!');
//=================================================================
// Eigenschaften fuer die Seite anhand der Sprache auslesen
//=================================================================
$sql_lang_settings = $GLOBALS['db']->Query("SELECT * FROM " . PREFIX . "_sprachen WHERE Id = '" . $_SESSION['Langcode'] . "' AND Aktiv = 1" );
$row_lang_settings = $sql_lang_settings->fetcharray();
$GLOBALS['sprachen'] = $row_lang_settings;
$locale_norma = $row_lang_settings['Sprachcode'];
$locale_upper = strtoupper($row_lang_settings['Sprachcode']);
//=================================================================
// Versuchen, das Zeitformat zu setzen
//=================================================================
setlocale (LC_ALL, "{$locale_norma}_{$locale_upper}");
setlocale (LC_ALL, "{$locale_norma}_{$locale_upper}@euro", "{$locale_norma}_{$locale_upper}", "{$locale_norma}", ($locale_norma == "de") ? "ge" : $locale_norma);
// Locale bei Windows-Systemen
if((substr(PHP_OS, 0, 3) == 'WIN'))
{
switch($locale_upper)
{
case 'DE': $winLc = 'german'; break;
case 'EN': $winLc = 'english'; break;
case 'RU': $winLc = 'russian'; break;
case 'ES': $winLc = 'spanish'; break;
case 'FR': $winLc = 'french'; break;
case 'SE': $winLc = 'swedish'; break;
case 'DK': $winLc = 'danish'; break;
default: $winLc = ''; break;
}
setlocale (LC_ALL,$winLc);
}
//=================================================================
// Wenn Cookie des Warenkorb existiert, Warenkorb in Session laden
//=================================================================
if(VERSION == 'PRO')
{
if(isset($_COOKIE['products_vars_cookie']) && !empty($_COOKIE['products_vars_cookie']) && (!isset($_SESSION['products']) || $_SESSION['products'] == ''))
{
$VarsCookie = explode('|||', base64_decode($_COOKIE['products_vars_cookie']));
foreach($VarsCookie as $varc => $varcId)
{
$newVarsCookie = unserialize($varcId);
$_SESSION['product_' . $newVarsCookie['ProdId']] = $newVarsCookie;
}
}
if(isset($_COOKIE['products_cookie']) && !empty($_COOKIE['products_cookie']) && (!isset($_SESSION['products']) || $_SESSION['products'] == ''))
{
$_SESSION['products'] = unserialize(stripslashes($_COOKIE['products_cookie']));
}
}
//=================================================================
// Das Template-System starten
//=================================================================
$tmpl = new Koobi_Smarty(BASE_DIR . '/theme/' . $config['std_theme'], $config['std_theme'], $area, $row_lang_settings);
$GLOBALS['tmpl'] = $tmpl;
$GLOBALS['theme'] = $config['std_theme'];
$GLOBALS['tmpl']->assign('koobiversion', KOOBI_VERSION);
$GLOBALS['tmpl']->register_function('koobi_encode', 'KoobiEncode');
$Source = BASE_DIR . '/theme/' . $config['std_theme'];
$GLOBALS['config']['source'] = $Source;
$tmpl->config_load(BASE_DIR . '/lang/' . $Language . '/main.txt');
$config_vars = $GLOBALS['tmpl']->get_config_vars();
$Koobi = new Koobi;
$Login = new Login;
$GLOBALS['tmpl']->assign('is_active', $GLOBALS['Active']);
$GLOBALS['tmpl']->assign('shop_is_startpage', ($GLOBALS['settings']['shop_is_startpage']==1 ? 1 : ''));
$GLOBALS['tmpl']->assign('sess', SESSION);
$GLOBALS['tmpl']->register_function('navi', 'Navi');
$GLOBALS['tmpl']->assign('koobi_version', VERSION);
$GLOBALS['tmpl']->assign('settings', $row_globals);
$GLOBALS['tmpl']->assign('config_vars', $config_vars);
$GLOBALS['tmpl']->assign('user_login', $Login->UserLogin($Source));
$GLOBALS['tmpl']->assign('social_bookmarks', getSocialBookmarks());
$GLOBALS['tmpl']->assign('langcount', count($config['lang']));
$GLOBALS['tmpl']->assign('languages', $config['lang']);
$GLOBALS['tmpl']->assign('langcodes', $langcodes);
$GLOBALS['tmpl']->assign('quicknavi', Quicknavi());
//=================================================================
// Counter
//=================================================================
include_once(BASE_DIR . '/lib/counter.php');
if(@$GLOBALS['Active']['langchooser']==1)
{
$GLOBALS['tmpl']->assign('langchooser', $tmpl->fetch($Source . '/langswitcher/switcher.tpl'));
}
//=================================================================
// Handelt es sich um eine Druckversion?
//=================================================================
$current = substr($_SERVER['REQUEST_URI'],-7); // Ohne mod_rewrite
$current_mr = substr($_SERVER['REQUEST_URI'],-10); // Mit mod_rewrite
$GLOBALS['tmpl']->assign('printversion', (@$current=='print=1' || @$current_mr=='print.html') ? 1 : 0);
$inc = (isset($_REQUEST['p']) && $_REQUEST['p'] != '') ? $_REQUEST['p'] : 'index';
//=================================================================
// Dinge Global machen
//=================================================================
include_once(BASE_DIR . '/lib/setglobal.php');
//=================================================================
// Aufgerufene Datei einbinden
//=================================================================
$inc = eregi_replace('[^_a-zA-Z0-9]', '', $inc);
//=================================================================
// Unterscheiden zwischen Druck- und normalem Template
//=================================================================
$tpl_fetch = BASE_DIR . '/theme/' . $config['std_theme'] . '/';
$_SESSION['Theme'] = $config['std_theme'];
//=================================================================
// Eigene Funktionen der Kunden
//=================================================================
include_once(BASE_DIR . '/functions/Func.Globals.php');
if(defined('OUTPUT'))
{
include_once((!file_exists("system/{$inc}.php") ? "system/index.php" : "system/{$inc}.php") );
$out = (defined('NOOUT')) ? OUTPUT : $tmpl->fetch($tpl_fetch . TPL);
} else {
if($current=='print' || $current=='print=1' || (isset($_REQUEST['print']) && $_REQUEST['print']==1) || @$current_mr=='print.html')
{
$GLOBALS['tmpl']->assign('printversion', 1);
define('PRINTVERSION',1);
$_REQUEST['print'] = 1;
}
$gtpl = (!isset($_REQUEST['p']) || $_REQUEST['p']=='') ? 'index' : $_REQUEST['p'];
if(!file_exists(BASE_DIR . "/addons/{$inc}/addon.{$inc}.php"))
{
if(!file_exists(BASE_DIR . "/system/{$inc}.php"))
{
$_REQUEST['p'] = "index";
$include = BASE_DIR . "/system/index.php";
} else {
$include = BASE_DIR . "/system/{$inc}.php";
}
} else {
$Front = 1;
$include = BASE_DIR . "/addons/{$inc}/addon.{$inc}.php";
}
//=================================================================
// Wenn Cookie des Warenkorb existiert, Warenkorb in Session laden
//=================================================================
if(VERSION == 'PRO')
{
include_once(BASE_DIR . '/lib/shopinit.php');
$shop = new Shop;
// Nach 14 Tagen werden alle gespeicherten Warenkoerbe geloescht
$TimeTill = 86400 * 14;
$GLOBALS['db']->Query("DELETE FROM " . PREFIX . "_shop_warenkorb WHERE ZeitBis+{$TimeTill} < '".time()."'");
if(!isset($_SESSION['unique_visitor_number']))
{
$_SESSION['unique_visitor_number'] = textrandom(10);
}
if(isset($_SESSION['benutzer_id']) && $_SESSION['loggedin'] == 1)
{
$ZeitBis = time() + $shop->_basket_cookietime;
$ZeitBisRaw = date('d.m.Y, H:i:s',$ZeitBis);
$check = $GLOBALS['db']->RowQuery("SELECT COUNT(Id) AS Bcount FROM " . PREFIX . "_shop_warenkorb WHERE Benutzer = '".$_SESSION['benutzer_id']."' AND Gesperrt != '1' AND EingeloestAm = '0' AND Code != '".$_SESSION['unique_visitor_number']."'");
if(is_object($check) && $check->Bcount >= 1)
{
$GLOBALS['tmpl']->assign('Bcc', $check);
$GLOBALS['tmpl']->assign('Baskets', true);
}
}
}
include_once($include);
if(!defined('AJAX_OUTPUT')) $out = (isset($_GET['blanc']) && $_GET['blanc']==1) ? $tmpl->fetch($tpl_fetch . '/page/popup.tpl') : $tmpl->fetch($tpl_fetch . (($current=='print' || $current=='print=1' || (isset($_REQUEST['print']) && $_REQUEST['print']==1) || @$current_mr=='print.html') ? 'page/print.tpl' : 'page/' . getTpl($_REQUEST['p'])) );
}
//=================================================================
// Die Seite in den Speicher laden
//=================================================================
if(!defined('AJAX_OUTPUT'))
{
echo X9sFDgifufiudfuiZZUz7897897978ed($out);
$Ausgabe = ob_get_contents();
ob_end_clean();
$Ausgabe = str_replace('index.php&lang=', 'index.php?lang=', $Ausgabe);
$base = substr($_SERVER['PHP_SELF'],0,-9);
$Ausgabe = str_replace('%%ECRUOS_GMI_IBOOK%%', $base, $Ausgabe);
$Ausgabe = str_replace('index.php&mode=rss', 'index.php?mode=rss', $Ausgabe);
$Ausgabe = str_replace('<br type="_moz" />', '', $Ausgabe);
//=================================================================
// Plugins (Replacements) Start
//=================================================================
$ordner = BASE_DIR . "/addons/";
{
$handle = opendir($ordner);
while ($file = readdir ($handle)){
if($file{0} != '.'){
if(is_dir($ordner.'/'.$file)) {
if(file_exists($ordner.'/'.$file.'/'.$file.'.rep')){
include_once("{$ordner}/{$file}/addon.{$file}.php");
}
}
}
}
}
//=================================================================
// Plugins (Replacements) Ende
//=================================================================
include_once(BASE_DIR . '/functions/Func.ReplacementIndex.php');
$Ausgabe = PageReplacements($Ausgabe);
$Ausgabe = IndexReplacement($Ausgabe);
if($GLOBALS['settings']['use_seo'] == 1)
{
include_once(BASE_DIR . '/functions/Func.Rewrite.php');
$Ausgabe = Seo($Ausgabe);
}
$endzeit=explode(" ", microtime());
$endzeit=$endzeit[0]+$endzeit[1];
$renderzeit = "Diese Seite wurde in ".round($endzeit - $startzeit,4)." Sekunden geladen...";
unset($_SESSION['queries']);
echo $Ausgabe;
}
?> |
|
|
|
|
|
|
|
|
|
Posted: Tue Sep 08, 2009 10:36 pm |
|
|
Cyko |
Moderator |
|
|
Joined: Jul 21, 2009 |
Posts: 375 |
|
|
|
|
|
|
|
|
Last edited by Cyko on Wed Sep 09, 2009 1:12 pm; edited 1 time in total |
|
|
|
Posted: Tue Sep 08, 2009 11:05 pm |
|
|
logo |
Regular user |
|
|
Joined: Oct 23, 2008 |
Posts: 19 |
|
|
|
|
|
|
|
Thank you very much, Cyko.
I'm going to test |
|
|
|
|
Posted: Wed Sep 09, 2009 7:06 pm |
|
|
logo |
Regular user |
|
|
Joined: Oct 23, 2008 |
Posts: 19 |
|
|
|
|
|
|
|
Hi, Cyko
setup.php decoded isn`t correctly, if you look the his size, at the entrance 400 kb and exit 40 kb?
Can you, repeat decoding?
Thanks. |
|
|
|
|
Posted: Wed Sep 09, 2009 7:09 pm |
|
|
Cyko |
Moderator |
|
|
Joined: Jul 21, 2009 |
Posts: 375 |
|
|
|
|
|
|
|
logo wrote: | Hi, Cyko
setup.php decoded isn`t correctly, if you look the his size, at the entrance 400 kb and exit 40 kb?
Can you, repeat decoding?
Thanks. |
Its correct, double check you have the right file, download the decoded at:
http://rapidshare.com/files/277674494/setup.php
When a file is encoded it adds some bytes on to the size, when its decoded the bytes get removed. |
|
|
|
|
Posted: Sat Sep 12, 2009 4:34 pm |
|
|
logo |
Regular user |
|
|
Joined: Oct 23, 2008 |
Posts: 19 |
|
|
|
|
|
|
|
This file is working properly.
Many thanks! |
|
|
|
|
www.waraxe.us Forum Index -> PHP script decode requests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 1 of 1
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|
|