read()) { if ($entry == '.' || $entry == '..') { continue; } if (is_dir("$source/$entry") && ($dest !== "$source/$entry")) { copyr("$source/$entry", "$dest/$entry"); } else { copy("$source/$entry", "$dest/$entry"); } } $dir->close(); return true; } function read_dir($folder) { $dir = opendir($folder); while ($file=readdir($dir)) { $realfile=realpath($folder).DIRECTORY_SEPARATOR.$file; if (is_dir($realfile) and $file!='.' and $file!='..') { $array[$file]=array('complete' => $realfile); $array[$file]['content']=read_dir($realfile); } } closedir($dir); return $array; } function redirect($subdomain){ include("set-conf-einst.php"); $subdomain = strtolower($subdomain); $requetes = "SELECT * FROM ".$prefix."User Where username='$subdomain'"; $results = mysql_query ($requetes,$dbb); $user = mysql_fetch_object($results); if($user->username == ""){ include_once("inc_main.php"); main(); }else{ $link = "http://www.".$SERVER_NAME.$UNTERORDNER."phpbb".$user->id; header("Location: $link"); } } function deldir($dir) { $handle = opendir($dir); while (false!==($FolderOrFile = readdir($handle))) { if($FolderOrFile != "." && $FolderOrFile != "..") { if(is_dir("$dir/$FolderOrFile")) { deldir("$dir/$FolderOrFile"); } // recursive else { unlink("$dir/$FolderOrFile"); } } } closedir($handle); if(rmdir($dir)){ $success = true; } return $success; } include("set-conf-einst.php"); if($_REQUEST['setlang'] != ""){ session_start; $_SESSION['lang'] = $_REQUEST['setlang']; $langu = $_REQUEST['setlang']; } foreach($_REQUEST as $key => $wert){ $$key = $wert; } switch($op) { default; if($SUBDOMAINS == "0"){ @session_start(); if($langu == "") $langu = $_SESSION['lang']; if($langu == "") $langu = $LANGUAGE; include("language/".$langu.".php"); include_once("inc_main.php"); main(); }else{ $full_url = sprintf($HTTP_HOST); $sub = explode(".", $SERVER_NAME); for($i = 0;$i<=strlen($full_url);$i++){ $dummy = substr($full_url,$i,1); if($dummy == "."){ break; } $subdomain = $subdomain.$dummy; } if ($subdomain != "www" and $subdomain != $sub[0]){ redirect($subdomain); }else{ @session_start(); if($langu == "") $langu = $_SESSION['lang']; if($langu == "") $langu = $LANGUAGE; include("language/".$langu.".php"); include_once("inc_main.php"); main(); } } break; case "beschreibung"; include_once("inc_sonstiges.php"); beschreibung(); break; case "news"; include_once("inc_news.php"); news(); break; case "anmelden"; include_once("inc_anmeldung.php"); anmelden(); break; case "statistik"; include_once("inc_stats.php"); statistik(); break; case "anmelden2"; include_once("inc_anmeldung.php"); anmelden2($name, $benutzername, $email, $vorname, $straße, $plz, $ort, $land, $agbs, $tag, $monat, $jahr, $kategorie, $url, $code, $masterforum); break; case "domain_frei"; include_once("inc_sonstiges.php"); domain_frei($benutzername); break; case "login"; include_once("inc_login.php"); login(); break; case "admini_demo"; include_once("inc_sadmin.php"); admini_demo($PHPSESSID, $u); break; case "admini_konfiguration"; include_once("inc_konfiguration.php"); admini_konfiguration($PHPSESSID, $u); break; case "admini_konfiguration_db"; include_once("inc_konfiguration.php"); admini_konfiguration_db($PHPSESSID, $u, $pfad, $server_name, $unterorder, $foren_user, $foren_passwort, $foren_email, $anmeldung_code, $language, $admin_mail, $email, $stats, $subdomains, $lizenz_kundennummer, $lizenz_seriennummer); break; case "admini_banner"; include_once("inc_banner.php"); admini_banner($PHPSESSID, $u); break; case "admini_banner_db"; include_once("inc_banner.php"); admini_banner_db($PHPSESSID, $u, $banner); break; case "passwort_vergessen"; include_once("inc_sonstiges.php"); passwort_vergessen(); break; case "passwort_send"; include_once("inc_sonstiges.php"); passwort_send($benutzername, $email); break; case "memberliste"; include_once("inc_stats.php"); memberliste(); break; case "login2"; include_once("inc_login.php"); login2($benutzername, $passwort); break; case "admin_main"; include_once("inc_admin.php"); admin_main($PHPSESSID, $u); break; case "logout"; include_once("inc_login.php"); logout($PHPSESSID, $u); break; case "admini_main"; include_once("inc_sadmin.php"); admini_main($PHPSESSID, $u); break; case "admini_db_backup"; include_once("inc_backup.php"); admini_db_backup($PHPSESSID, $u); break; case "admini_db_main"; include_once("inc_backup.php"); admini_db_main($PHPSESSID, $u); break; case "admini_edit"; include_once("inc_sadmin.php"); admini_edit($PHPSESSID, $u, $user); break; case "admini_delete"; include_once("inc_sadmin.php"); admini_delete($PHPSESSID, $u, $user); break; case "admini_del"; include_once("inc_sadmin.php"); admini_del($PHPSESSID, $u, $user); break; case "admini_ed"; include_once("inc_sadmin.php"); admini_ed($PHPSESSID, $u, $user, $name, $passwort, $passwortre, $email, $vorname, $straße, $plz, $ort, $land, $administrator, $kategorie, $url, $geburtstag, $werbung, $wb_frei_status, $wb_tag, $wb_monat, $wb_jahr, $limit_post, $limit_user); break; case "admini_user"; include_once("inc_sadmin.php"); admini_user($PHPSESSID, $u); break; case "admin_datenok"; include_once("inc_admin.php"); admin_datenok($PHPSESSID, $u, $name, $passwort, $passwortre, $vorname, $straße, $plz, $ort, $land, $kategorie, $url); break; case "admin_daten"; include_once("inc_admin.php"); admin_daten($PHPSESSID, $u); break; case "admin_forum"; include_once("inc_admin.php"); admin_forum($PHPSESSID, $u); break; case "admin_sync"; include_once("inc_admin.php"); admin_sync($PHPSESSID, $u); break; case "admini_user_sperren"; include_once("inc_sadmin.php"); admini_user_sperren($PHPSESSID, $u, $user); break; case "admini_user_entsperren_all"; include_once("inc_sadmin.php"); admini_user_entsperren_all($PHPSESSID, $u); break; case "admini_user_sperren_all"; include_once("inc_sadmin.php"); admini_user_sperren_all($PHPSESSID, $u); break; case "admini_user_entsperren"; include_once("inc_sadmin.php"); admini_user_entsperren($PHPSESSID, $u, $user); break; case "admini_newsletter_archiv"; include_once("inc_newsletter_archiv.php"); admini_newsletter_archiv($PHPSESSID, $u); break; case "admini_newsletter_archiv_detail"; include_once("inc_newsletter_archiv.php"); admini_newsletter_archiv_detail($PHPSESSID, $u, $did); break; case "admin_newsletter_archiv"; include_once("inc_newsletter_archiv.php"); admin_newsletter_archiv($PHPSESSID, $u); break; case "admin_newsletter_archiv_detail"; include_once("inc_newsletter_archiv.php"); admin_newsletter_archiv_detail($PHPSESSID, $u, $did); break; case "admini_newsletter"; include_once("inc_newsletter.php"); admini_newsletter($PHPSESSID, $u); break; case "admini_newsletter_send"; include_once("inc_newsletter.php"); admini_newsletter_send($PHPSESSID, $u, $betreff, $text, $forench, $userch, $kategorie, $versand); break; case "admini_kategorie"; include_once("inc_kategorien.php"); admini_kategorie($PHPSESSID, $u); break; case "admini_kategorie_neu"; include_once("inc_kategorien.php"); admini_kategorie_neu($PHPSESSID, $u, $kategorie, $banner); break; case "admini_kategorie_edit"; include_once("inc_kategorien.php"); admini_kategorie_edit($PHPSESSID, $u, $kategorie); break; case "admini_kategorie_edit_db"; include_once("inc_kategorien.php"); admini_kategorie_edit_db($PHPSESSID, $u, $kategorie, $kategorie_alt, $banner); break; case "admini_kategorie_delete"; include_once("inc_kategorien.php"); admini_kategorie_delete($PHPSESSID, $u, $kategorie); break; case "admini_news"; include_once("inc_news.php"); admini_news($PHPSESSID, $u); break; case "admini_news_neu"; include_once("inc_news.php"); admini_news_neu($PHPSESSID, $u, $titel, $nachricht); break; case "admini_news_edit"; include_once("inc_news.php"); admini_news_edit($PHPSESSID, $u, $news); break; case "admini_news_edit_db"; include_once("inc_news.php"); admini_news_edit_db($PHPSESSID, $u, $titel, $nachricht, $news_alt); break; case "admini_news_delete"; include_once("inc_news.php"); admini_news_delete($PHPSESSID, $u, $news); break; case "admini_masterforen"; include_once("inc_masterforen.php"); admini_masterforen($PHPSESSID, $u); break; case "admini_masterforen_neu"; include_once("inc_masterforen.php"); admini_masterforen_neu($PHPSESSID, $u, $name, $beschreibung, $werbung, $tage, $post_limit, $user_limit); break; case "admini_masterforen_edit"; include_once("inc_masterforen.php"); admini_masterforen_edit($PHPSESSID, $u, $masterforum); break; case "admini_masterforen_edit_db"; include_once("inc_masterforen.php"); admini_masterforen_edit_db($PHPSESSID, $u, $name, $beschreibung, $werbung, $masterforum, $tage, $post_limit, $user_limit); break; case "admini_masterforen_delete"; include_once("inc_masterforen.php"); admini_masterforen_delete($PHPSESSID, $u, $masterforum); break; case "kontakt"; include_once("inc_kontakt.php"); kontakt(); break; case "kontakt_send"; include_once("inc_kontakt.php"); kontakt_send($name, $email, $benutzername, $betreff, $nachricht, $kategorie); break; case "admini_database"; include_once("inc_databases.php"); admini_database($PHPSESSID, $u); break; case "admini_database_neu"; include_once("inc_databases.php"); admini_database_neu($PHPSESSID, $u, $name, $user, $pass, $host, $prefixx, $datenbank, $maximal); break; case "admini_database_edit"; include_once("inc_databases.php"); admini_database_edit($PHPSESSID, $u, $database); break; case "admini_database_edit_db"; include_once("inc_databases.php"); admini_database_edit_db($PHPSESSID, $u, $name, $user, $pass, $host, $prefixx, $datenbank, $maximal, $database_alt); break; case "admini_database_delete"; include_once("inc_databases.php"); admini_database_delete($PHPSESSID, $u, $database); break; case "admini_copy"; include_once("inc_sonstiges.php"); admini_copy($PHPSESSID, $u); break; case "admini_copy_do"; include_once("inc_sonstiges.php"); admini_copy_do($PHPSESSID, $u, $source, $overwrite); break; case "admin_logo"; include_once("inc_logo.php"); admin_logo($PHPSESSID, $u); break; case "admin_logo_neu"; include_once("inc_logo.php"); admin_logo_neu($PHPSESSID, $u, $template, $logo); break; case "admini_pwedit"; include_once("inc_sadmin.php"); admini_pwedit($PHPSESSID, $u); break; case "admini_pwed"; include_once("inc_sadmin.php"); admini_pwed($PHPSESSID, $u, $passwort, $passwortre); break; case "admini_update"; include_once("inc_update.php"); admini_update($PHPSESSID, $u); break; case "admini_update_2"; include_once("inc_update.php"); admini_update_2($PHPSESSID, $u); break; case "admini_update_3"; include_once("inc_update.php"); admini_update_3($PHPSESSID, $u, $lid); break; case "admini_update_4"; include_once("inc_update.php"); admini_update_4($PHPSESSID, $u, $lid); break; case "admini_templates"; include_once("inc_templates.php"); admini_templates($PHPSESSID, $u); break; case "admini_templates_edit"; include_once("inc_templates.php"); admini_templates_edit($PHPSESSID, $u, $templates); break; case "admini_templates_delete"; include_once("inc_templates.php"); admini_templates_delete($PHPSESSID, $u, $templates); break; case "admini_templates_neu"; include_once("inc_templates.php"); admini_templates_neu($PHPSESSID, $u, $name, $beschreibung); break; case "admini_templates_edit_db"; include_once("inc_templates.php"); admini_templates_edit_db($PHPSESSID, $u, $templates, $name, $beschreibung); break; case "admin_templates"; include_once("inc_admin.php"); admin_templates($PHPSESSID, $u); break; case "admin_templates_install"; include_once("inc_admin.php"); admin_templates_install($PHPSESSID, $u, $did); break; } $tag = date("d"); $tag3 = $tag; $tag = $tag - "1"; if($tag == "0") $tag = "99"; $tag2 = date("d", $configuration->cron_time); if($configuration->cron_status == "0" and $tag >= $tag2){ include("cron.php"); $now = time(); $abfrage = "UPDATE ".$prefix."Config SET cron_status='1', cron_time='$now'"; $ergebnis = mysql_query($abfrage); }elseif($configuration->cron_status == "1" and $tag2 == $tag3){ $abfrage = "UPDATE ".$prefix."Config SET cron_status='0'"; $ergebnis = mysql_query($abfrage); } ?>