Gedichte
Getextebuch
Aneinandergereiht
ne 'Story
Zusatz
Thematik
Dazu
Helpers
Links
Spiele
Eddie Live
Was passiert
Programmierung


Autor: Eddie
Letzte Änderung am: 01.12.2011

Zu der Erklärung
<?php
//////// Funktion: menue   - Menue Anzeige - ////////////////
function menue($menu)
{
$menue=preg_split("/;/",$menu);
$anzahl=count($menue)-1;
    
    if(
$anzahl)
    {
        for(
$i=0;$i $anzahl;$i++)
        {
    
$array=preg_split("/,/",$menue[$i],3);
        echo 
"\t\t<tr><td align=center height=19>
        <a href=\"thetuxworld.php?datei="
.trim($array[0])."&amp;id=".$array[1]."\">
        <img src=\"./bilder/menue/"
.trim($array[0]).".jpg\" border=\"0\" alt=\"".$array[2]."\"></a>
        </td></tr>\n"
;
        }
    }
    else
    {
    echo 
"<tr><td align=center>
        <a class=\"nounderline\" href=\"thetuxworld.php?datei=blank&id=5\">
        <font color=red>zurck zur Seite</font></a>
        </td></tr>"
;
    }
}

/////// Inhaltsfunktionen:   - aufruf je nach Art des Inhalts - //////

//////////// HTML Inhalt /////////
function inhaltsfunktion_html($inhalt)
{
echo 
$inhalt;
}

////////// Normaler TEXT Inhalt //////////
function inhaltsfunktion_text($inhalt)
{
echo 
str_replace("\n""<br>"$inhalt);
}

////////////// Fuer Quelltexte ////////////
function inhaltsfunktion_pro($inhalt,$info)
{
echo 
$inhalt.str_replace("<br />","<br>",@highlight_file($quell=$info[3].".php",true));
}

//////////// die Plugins //////////////////
function inhaltsfunktion_url($inhalt,$info)
{
$dir=$info[3];
echo 
$inhalt;
@include 
$dir.$info[4];
}

/////// Funktion: reader   - liest vielleicht 1. Zeile + rest einer Datei /////////
function reader($datei,$zeile="aktiv")
{
    if(
file_exists($datei))
    {
    
$fp fopen($datei,"r");
    if(
$zeile == "aktiv")$zurueck[0]=fgets($fp,300);
    
$zurueck[1]=fread($fp,filesize($datei));
    
fclose($fp);
    return 
$zurueck;
    }

return 
FALSE;
}

//// Funktion: dir_decoder   - gibt den Verzeichnisnamen zurck, der gesucht wird - ///
function dir_decoder($search,$diranz,$dirinf)
{
$dirinfo=preg_split("/;/",$dirinf,$diranz);
    for(
$i=0;$i $diranz;$i++)
        {
    
$array=preg_split("/,/",$dirinfo[$i]);
    if(
$search == $array[0])return $array[1];
    }
}

/////////Funktion: counter   - Setzt den Counter um eine Stelle weiter - ///
function counter()
{
    
$count=reader("counter.txt","alle");
    
$fp fopen("counter.txt","w");
    
$count=$count[1]+1;
        if(
$count != 1)
        {
        
flock($fp,2);
        
fputs($fp,$count);
        
flock($fp,3);
        }
    
fclose($fp);
return 
$count;
}



///////////////////////////////////// THE TUX WORLD //////////////////////////////////
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>thetuxworld</title>
    <link title="thetuxworld" type="text/css" rel="stylesheet" href="./css/thetuxworld1.css">
    <link rel="SHORTCUT ICON" href="./bilder/tuxwelt.ico">
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <?php


    
////////////////// Welt Generierung /////////////////////////
    
    /////////////// Füllen und leeren ////////////    
    
$id=$_GET['id'];
    
$datei=$_GET['datei'];
    
$dirinf=$diranz=$info=$vlb=$dir=$menu="";

    
/////////// Independens Var's ///////////////
    
$server=$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
    
$wo=preg_split("/thetuxworld.php/",$server);

    
    
////////////////// dirinfo in Speicher///////////////////
    
$dirinf=reader("./dirinfo/dirinfo".floor($id/10).".txt");
    
$diranz=$dirinf[0];


    
/////// Datei in Speicher//////////
    
$dir=dir_decoder($id,$diranz,$dirinf[1]);
    
$inhalt=reader($dir.$datei.".txt");
    
$info=preg_split("/§/",$inhalt[0]);

    
/////// War einlesen der Daten ok ???? //////
    
if($info[0] != $inhalt[0])
    {
        
///////////// Menue in Speicher ////////////
        
$menu=reader($info[0]);
        
$navfarbe=$menu[0];

    }
    else
    {
    
///////// Text Fuer Fehlerseite //////////////////
    
$info[1]="<font color=\"gold\">ERROR</font>";
    
$info[2]="html";
    
$inhalt[1]="Ein Fehler: irgendwo!";
    }

    
////// Kein Browser- und Proxycache, wenn gebraucht ////////
    
if(@$info[5]=="nocach")
    {
    echo 
"<meta http-equiv=\"cache-control\" content=\"no-cache\">\n
    <meta http-equiv=\"pragma\" content=\"no-cache\">\n"
;
    }
    
    
///// weiteres Stylecheat einbinden (vers. 0.1) /////
     
if(@$info[6]=="newstyle")
    {
    @include(
$info[3].$info[7]);
    }

    
////////// Schaf Vollbild ///////////
    
$vollbild=array("blank"=>array("bild",""),
            
"tag2"=>array("bild",""),
            
"thetuxworld"=>array("bild",""),
            
"gereiht"=>array("bild",""));
            
    

echo 
"</head>";
//////////////////// Inhalte laden //////////////////////////////////////////
    
?>


<body>
<!-- thetuworld -->

<?php
$bild
="\t\t\t<a href=\"./bilder/Schaf_org.jpg\" target=_blank><img src=\"./bilder/schaf.jpg\" border=\"0\" alt=\"\"></a>";
$text="Immer wieder TheTuxWorld.net, wohin du auch gehst *thetuxworld.de* !!!";
$bereich=$info[1];
$navfarbe=trim($navfarbe);
@
$vlb=$vollbild[$datei][0];
@$
$vlb=$vollbild[$datei][1];
?>
        <!-- Bild -->
        <div class="bild">
        <table width="120px" bgcolor="#fefefe" cellpadding="0" cellspacing="0">
        <tr><td height="75px" align="center" valign="middle">
<?php
echo $bild."\n";
?>
        </td></tr>
        </table>
        </div>
        <!-- ENDE Bild -->

<?php

    
//////////////////// Nur fuer Startseite !!! /////////////////////////////
    
if($datei == "startseite")$bereich="Du bist, was du willst, wenn du willst,. immer";


?>
        <!-- Navigation -->
        <div class="navigation">
        <table width="100%" cellpadding="0" cellspacing="0" bgcolor="black">
        <tr><td height="75px" valign="middle" align="center">
        <table cellpadding="2">
<?php
            
//////////////////////// WO /////////////////////////////////////////
echo"            <tr><td align=\"center\"><img src=\"./bilder/navi/thetuxworld.jpg\" border=\"0\" alt=\"".$text."\"></td></tr>
             <tr><td align=\"center\"><font color=\""
.$navfarbe."\">".$bereich."</font></td></tr>";
?>

        </table>
        </td></tr>
        </table>
        </div>
        <!-- ENDE Navigation -->


<div class="unten">
<table height="100%" width="100%" cellpadding="0" cellspacing="0">
<tr>
    <td height="100%" bgcolor="black" valign="middle">

        <!-- Menue -->
        <table width="120" cellpadding="0" cellspacing="0">

<?php
        
/// Menue Anzeigen ///
        
menue($menu[1]);
?>
        <tr><td height="75px"><!-- Trick 75 --></td></tr>
        </table>
        <!-- ENDE Menue -->

    </td>

    <td height="100%" width="100%" valign="top" align="center" bgcolor="#f0f0f0">

        <!-- Inhalte -->
        <table cellpadding="10px" cellspacing="0px">
        <tr>
            <td bgcolor="#f0f0f0">
            <br><br>
            <!-- Geladene Datei -->

<?php
        
///////////////////////// Inhalte ///////////////////////////
        
call_user_func('inhaltsfunktion_'.$info[2],$inhalt[1],$info);
?>

            <!-- ENDE geladene Datei -->

            <br><br><br>
            </td>
        </tr>
        </table>
        <!-- ENDE Inhalte -->

    </td>
</tr>
</table>
</div>

<!-- Ende thetuxworld -->
</body>
</html>