Gerch2003: Bild wir über Text gelegt

Hallo Leute,

schaut euch mal bitte folgende Seite einmal im Firefox und einmal im Internetexplorer an.
Ihr werdet sehen, dass das Bild vom Artikel über dem Text liegt.
Das war sicher nicht im Sinne des Erfinders..und nein, ich hab den Code nicht geschrieben...aber ich darf es wie so oft ausbügeln.

http://hauswelt.de/index.php?main=news&sub=rdnews

Vielleicht hat ja jemand nen guten Rat, ansonsten werd ich mal ein bischen herum tüfteln.

Hier der Code

<?php  
		//---------- Einträge auf Laufzeit überprüfen ----------  
		$mysql_action		= "DELETE FROM hauswelt_news WHERE (runtime>0 && written<".time()."-(runtime*30*24*60*60));";  
		//echo( "ACTION: ".$mysql_action."<br>" );  
		mysql_query( $mysql_action );  
		//---------- Verbindung zur Hauswelt-News-Tabelle herstellen ----------  
		$mysql_select = "SELECT category, COUNT(*) FROM hauswelt_news WHERE (publish='on') GROUP BY category ORDER BY category;";  
		$ressource_id_1	= mysql_query( $mysql_select );  
		//echo( "ID 1: ".$ressource_id_1."<br>".$mysql_select."<br>" );  
		//---------- Prüfe ob Vertriebspartner freigeschaltete wurde ----------  
		if ($ressource_id_1 && mysql_num_rows($ressource_id_1) > 0)  {  
			echo("<table width=\"430\"  bgcolor=\"#E2EDC7\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" class=\"navig\" style=\"margin-bottom:10px;\">");  
				for ($i=0; $i < mysql_num_rows($ressource_id_1); $i++)  {  
					$output 																																				= mysql_fetch_array($ressource_id_1);  
					$category_count[substr($output['category'], 0, 3)]	= $output['COUNT(*)'];  
					echo("<tr>  
						<td width=\"1%\" style=\"padding-left:5px;\"><a href=\"?main=news&sub=rdnews&item=".$output['category']."\" target=\"_self\" class=\"navig\">");  
						if ($item == $output['category'])  
							echo("<strong>");  
							//---------- Platzhalter in der Kategorie ersetzen ----------  
							$text = $output['category'];  
							include("include/text.php");  
							$output['category'] = $text;  
							echo(substr($output['category'], 3)."</a></strong>  
						</td>  
						<td><a href=\"?main=news&sub=rdnews&item=".$output['category']."\" target=\"_self\" class=\"navig\">(".$output['COUNT(*)'].")</a></td>  
					</tr>");  
					}  
				//---------- MySQL-Speicher leeren ----------  
				mysql_free_result($ressource_id_1);  
			echo("</table>");  
			}  
		//---------- Seitennavigation anzeigen ----------  
		if ($item && is_array($category_count) && array_key_exists(substr($item, 0, 3), $category_count) && $category_count[substr($item, 0, 3)] > $max_list)  {  
			echo("<table width=\"430\"  bgcolor=\"#E2EDC7\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" class=\"navig\" style=\"margin-bottom:10px;\">  
				<tr>");  
					if ($list > 0)  
						echo("<td><a href=\"?main=news&sub=rdnews&item=".$item."&list=".($list-$max_list)."\" target=\"_self\" class=\"navig\">zur&uuml;ck</a></td>");  
					if (($list+$max_list) < $category_count[substr($item, 0, 3)])  
						echo("<td align=\"right\"><a href=\"?main=news&sub=rdnews&item=".$item."&list=".($list+$max_list)."\" target=\"_self\" class=\"navig\">weiter</a></td>");  
				echo("</tr>  
			</table>");  
			}  
		//---------- Verbindung zur Hauswelt-News-Tabelle herstellen ----------  
		if (!$item)  
			$mysql_select = "SELECT written,headline,txt,pic,download FROM hauswelt_news WHERE publish='on' ORDER BY written DESC LIMIT 0,".$max_list.";";  
		else  
			$mysql_select = "SELECT written,headline,txt,pic,download FROM hauswelt_news WHERE (publish='on' AND category='".$item."') ORDER BY written DESC LIMIT ".(int)$list.",".$max_list.";";  
		$ressource_id_1	= mysql_query( $mysql_select );  
		// echo( "ID 1: ".$ressource_id_1."<br>".$mysql_select."<br>" );  
		//---------- Hauswelt-News anzeigen ----------  
		if ($ressource_id_1 && mysql_num_rows($ressource_id_1) > 0)  {  
			echo("<table width=\"430\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\" class=\"navig\" style=\"\">");  
				for ($i=0; $i < mysql_num_rows($ressource_id_1); $i++)  {  
					$output = mysql_fetch_array($ressource_id_1);  
					//---------- Platzhalter in der Überschrift ersetzen ----------  
					$text = $output['headline'];  
					include("include/text.php");  
					$output['headline'] = $text;  
					//---------- Platzhalter im Text ersetzen ----------  
					$text = $output['txt'];  
					include("include/text.php");  
					$output['txt'] = $text;  
					//---------- Bild einfügen ----------  
					if (strlen($output['pic']) > 1)  {  
						$position	=substr($output['pic'], 0, 1);  
						$picture		="pictures/".substr($output['pic'], 1);  
						if (file_exists($picture))  {  
							$size	=getimagesize($picture);  
							if ($position == "t")  
								$output['txt']="<img src=\"".$picture."\" ".$size[3]." border=\"0\" style=\"margin-bottom:3px;\"><br>".$output['txt'];  
							elseif ($position == "r" || $position == "-")  
								$output['txt']="<img src=\"".$picture."\" ".$size[3]." border=\"0\" align=\"right\" style=\"margin-left:5px;margin-bottom:3px;\">".$output['txt'];  
							elseif ($position == "l")  
								$output['txt']="<img src=\"".$picture."\" ".$size[3]." border=\"0\" align=\"left\" style=\"margin-right:5px;margin-bottom:3px;\">".$output['txt'];  
							elseif ($position == "b")  
								$output['txt'].="<br><img src=\"".$picture."\" ".$size[3]." border=\"0\" style=\"margin-top:3px;\">";  
							}  
						}  
					echo("<tr>  
						<td");  
						if ($i > 0)  
							echo(" style=\"border-top:solid 1px #BEDCF9;\"");  
						echo("><strong>".$output['headline']."</strong><br><em>".date("d", $output['written']).". ".$month[date("n", $output['written'])]." ".date("Y", $output['written'])."</em></td>  
					</tr>  
					<tr>  
						<td style=\"padding-top:0px;\">".nl2br($output['txt'])."</td>  
					</tr>");  
					if ($output['download'] && file_exists("download/".$output['download']))  {  
						echo("<tr>  
							<td style=\"padding-top:0px;\">  
								<a href=\"download/".$output['download']."\" target=\"_blank\" class=\"navig\"><img src=\"images/icons/popup.gif\" width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\"> ".$output['download']."</a><br><font style=\"font-size:9px;\">");  
								if (filesize("download/".$output['download']) < 1000000000)  
									echo(round((filesize("download/".$output['download'])/1000), 1)." K");  
								else  
									echo(round((filesize("download/".$output['download'])/1000000000), 2)." M");  
								echo("B ge&auml;ndert am ".date("d.m.Y", filemtime("download/".$output['download']))."</font>  
							</td>  
						</tr>");  
						}  
					}  
				//---------- MySQL-Speicher leeren ----------  
				mysql_free_result($ressource_id_1);  
			echo("</table>");  
			}  
		//---------- Keine News vorhanden----------  
		else  {  
			echo("<table width=\"430\" border=\"0\" cellspacing=\"5\" cellpadding=\"0\" bgcolor=\"#EEEEEE\" class=\"main\" style=\"border:dashed 2px #CCCCCC;\">  
				<tr>  
					<td>Zur Zeit haben wir keine aktuellen News f&uuml;r Sie.</td>  
				</tr>  
			</table>");  
			}  
	?>
  1. Hello,

    schaut euch mal bitte folgende Seite einmal im Firefox und einmal im Internetexplorer an.
    Ihr werdet sehen, dass das Bild vom Artikel über dem Text liegt.
    Das war sicher nicht im Sinne des Erfinders..und nein, ich hab den Code nicht geschrieben...aber ich darf es wie so oft ausbügeln.

    http://hauswelt.de/index.php?main=news&sub=rdnews

    Der Validator sagt: Warning Unable to Determine Parse Mode!

    Da kann man den Browsern dann unterschiedliches Verhalten auch nicht übel nehmen.

    Liebe Grüße aus dem schönen Oberharz

    Tom vom Berg

    --
    Nur selber lernen macht schlau
    http://bergpost.annerschbarrich.de
    1. hi,

      http://hauswelt.de/index.php?main=news&sub=rdnews

      Der Validator sagt: Warning Unable to Determine Parse Mode!

      Dann ist dein Validator aber nicht so Gesprächig wie meiner -- meiner zählt 240 Errors und 20 warnings auf.

      mfg

      --
      マルコム ベック`秒 エイリアス エJ Ñ - ĜわたしÑ
      1. Hello,

        http://hauswelt.de/index.php?main=news&sub=rdnews

        Der Validator sagt: Warning Unable to Determine Parse Mode!

        Dann ist dein Validator aber nicht so Gesprächig wie meiner -- meiner zählt 240 Errors und 20 warnings auf.

        Das hat er mir auch gesagt.

        Nur halte ich die zweite Aussage (Anzahl der Fehler) nach der ersten für relativ wertlos. Das sind zum großen Teil Folgefehler aufgrund des fehlenden oder fehlerhaften Dokumenttyps.

        Liebe Grüße aus dem schönen Oberharz

        Tom vom Berg

        --
        Nur selber lernen macht schlau
        http://bergpost.annerschbarrich.de
  2. Hai,

    found on webmasterworld.com

    100 Signs that I May Be Writing Spaghetti Code

    100. I have no idea where this constant is defined.

    99. I have echo stmts littered throughout my code.

    98. There is an error but it isn't handled, and I can't find it to figure out what's wrong.

    97. Spelling 'referer' wrong everywhere so it matches the PHP $HTTP_REFERER syntax and then adding a comment everywhere it's used so everyone knows you did it on purpose.

    96. Passing variables directly to 635 functions and using 'global' on 453 functions.

    95. I have to modify the same function 10 times because I have not moved it into an include script...yet.

    94. Finding out that the 2 libraries you need to include also happen to include each other

    93. trying to edit html content on the index page and not being able to find the template until you go through 10 scripts (gotta love horde).

    92. No comments.

    91. You lose track of what include to use for what functions.

    90. You edit an include and realize you've already written that function or something very similar...somewhere.

    89. Opening and closing tags for an element like <p>, <table>, etc are in different files.

    88. Can't find the include file anywhere in the folder I am examining.

    87. Includes? What are includes? (This is a corollary to 91).

    86. Everything looks the same, as in:
    Top of page:

    include "include.php";  
    include "include1.php":  
    include "include2.php":
    

    85. I find that rewriting is quicker and easier than modifying the original design.

    84. You have a library of small functions that you wrote yourself, and will cut'n'paste them into almost every project you work on... Whether they're needed or not...

    82. I'm at that precipice where I suddenly realize that the whole application would be a lot better if I made a certain change - a fundamental change - one that would allow me to streamline my code, perhaps combine functions, and save me time and hassle later on. But it requires me to dump a day's (or more) work and because of a lack of time - I press on and ignore it.

    81. Every time you want to change a variable you have to use grep to find it ;)

    80. you have so many "for" loops you've declared a variable for each letter in the alphabet.

    79. Dreamweaver starts to lag when you open the file.

    78. You realize there is no possible way to unwind your cross included files and in your great wisdom you used include and require. You now have to replace all of them with include_once and require_once just to stop the contamination.

    77. there are enough "if" statements to make you scroll to the right.

    76. Your GET query string is so long it can crash a browser.

    75. Your class object includes are stored on a single server and aliased on all your webservers...but you don't know which server those files are REALLY on anymore.

    74. You curse at your co-worker's terrible logic just before you realise you wrote that code last week.

    73. You see comments in the code that read something like:
    Your Name: Don't ask me how or why this works, I know it looks overly complex and it appears there IS a simpler solution, but this works, it fixed a bug from the 'simpler code'...just leave it be...don't touch it, I've hired a voodoo witch doctor to place a curse on anybody who alters this code...trust me, just leave it alone!

    72. Following on from 81 - you know you're digging through a bowl of the stuff when, as a regular tool, you're using the windoz's search feature to find functions, variables and other bits of code.

    71. Following of from 80 and 77 - having to "peel" your way through while/for loops and a chunks of IF and ELSE statements because the original author (probably in all his haste) couldn't be bothered to use brackets. The code works but not always for the right reasons.

    70. out of the 50 arrays used 49 are 3 dimensional.

    69. You crash your SQL server more then 5 times while testing your queries

    68. After uploading your scripts to the server you find that you've exceded your allotted bandwidth for the month

    67. I use every imaginable variation of the word "foobar" in variable names

    66. My enter key doesn't work, so I just put everything on one line, it works anyways.

    65. [editor note: This one is not so much a sign, as an example. See Message #35].

    64. You're not using Python instead. ;)

    63. Some functions work even though you know they shouldn't as you haven't finished them yet. Being unable to make them fail as expected, you are left with only one conclusion: your code has spontaneously become self-aware - and worse, it *knows* you want to shut it down...

    62. You sit down, open your PHP script, and wonder where to begin with debugging... (ooh boy, I know the feeling of that!)

    61. Your final page doesn't validate. You look at the HTML source and see the problem clearly, but you decide not to fix it because you have no idea where this output comes from.

    60. When you have to grep for a var from / because you have no idea where in your directory structure the file is, all you know is it is above the root of the site. (I've had to do this a few times)

    59 - When a simple HELLO WORLD takes up 40 lines of code...

    58. Nothing like throwing in a hierarchy of javascripts that are all dependent on each other. Something along the lines of "this script must be defined after variables hd,hm and hy are defined".

    57. You find comments like this in your code:
    This code, while convoluted and apparantly redundant fixes a bug in a M$ dll/function/object/etc.

    56. When every time the boss and artist come walking through the door, you know you are going to have to change 50 lines of code.

    55. You wrap it up and realize that there are 20 funtions in the include files which are never called, although at some point, they were all required.

    54. The project scope continues to creep, but the timeline scope continues to deminish (don't care who you are, if you are keeping up with that, you are hacking dough)

    53. You are using database structure changes in the middle of the project

    52. In an attempt to same time, you are making system calls for OS functions.

    51. Changing database is (e.g MS SQL to MySQL) requires the rewrite of SQL statments.

    50. There is HTML in your functions. (this is a little debatable, but it is a watch sign for me). [editor wants to change this to: 50. Your functions output HTML directly (either through switching out of PHP or via echo)].

    1. Hai,

      49. On the weekend you find yourself testing the effects of gzip on include files.

      48. The white board in your office is clean.

      47. You've run out of meaningful variable names, and you are now reduced to using the names of family pets.

      46. The ratio between the number of variable names, and the number of field names in the database, is 5 to 1

      45. You realize that the only differance between three functions is the number of variables being passed.

      44. You realize that you are changing global variables with functions inside include files

      43. Your SQL statments have SELECT * in them

      42. You know that the algorythm you just created to check the data coming back from the database is a O((N2 -N)/2) .. but you just don't care anymore.

      41. While writing a new function, you are background thinking justifications for the last one you just wrote.

      40: You surf over to WW to see how many queries per page others dare to use & scoff at the low number.

      39: you plan your vacation using if-else complete with curly brackets.

      38. You've worn paint off the "$" and "4" key on your keyboard.

      37. You are using classes, but create a "miscellaneous" class where you put all those odds and ends. Finally you realize the "misc" class has become your main class and needs to be included in every script.

      36. You create a separate class for every single function.

      35. You have an include file called "stuff.inc"

      34. Your for loop pops a query and sends the results to a funtion, which runs a for loop across the array you sent with the results from the query, sending the 3, 5 and 10 cells to seperate funtions, and formats the htmml for the 1, 2, 4, 5, 6, 7, 9 values of the array, sending those to a function, which has a for loop, ...

      33. You have come up with 5 blistering hot ideas for the program you are working on, which have taken you the last 3 weeks to bring to reality, only to find, now that they are all working, and they work even better than you could have imagined 3 weeks ago, they also block the original functionality of the program spec, and are in conflict with the main idea of the client.

      32. Your hands are bruised and cut from the shards of exploding classes after hours of trying to shove the client’s feature requests, into your well thought out architecture.

      31. You have no idea what a CRC Card is ...

      31. You don't understand classes.

      31. You can't count down from 100.

      30. You know someone else is writing spaghetti code when.... you find

      if (1==0) {  
      ...  
      }
      

      29. When you have more cases then a court house

      28: reading this list you think.. "Hmmm what's so bad about that? Or that? Or that?

      27. Infinitely cascading includes like:

      index.php:

      <?php include("menu.php");?>  
      ...  
      menu.php:  
      <?php include("navigation.php");?>  
      ...  
      navigation.php:  
      <?php include("newmenu.php");?>  
      ...  
      newmenu.php:  
      <?php include("newmenu_final.php");?>  
      ...  
      newmenu_final.php:  
      <?php include("menu_newer_version.php");?>  
      ... etc
      

      26. if your included file "stuff.inc" has become deprecated in favour of "newer-stuff.inc"

      25. Parse error: parse error in /home/index.php on line 140
      20 minutes later
      Parse error: parse error in /home/index.php on line 141
      20 minutes later
      Parse error: parse error in /home/index.php on line 142

      24. When the first line of your code is:
      ini_set(max_execution_time,"99999");

      23. And the last line of your codes is:
      ini_set(max_execution_time,"30");

      22. When you open the same db 11 times in the same file.

      21. When you have to do your includes in a page being called as in mypage.php?page=somedullpage.

      20. You include a file that includes the original file...

      <!-- file1.php -->  
      <? include("file2.php"); //other stuff?>  
        
      <!-- file2.php -->  
      <? echo "stuff"; include("file1.php");?>
      

      19. You have so many custom fucntions that you try to redifine the nl2br function

      18. You have so many custom functions that the WhatDoTheseFunctionsDo.txt file is 20MB

      17. Your kids understand the code...after college.

      16. You have to grep for all occurences of include() or require() and replace them with include_once() and require_once() just to get your app to run.

      15. You're still using extract, cause well, those security folks are all just anal anyways.

      14. You need to write a Perl script to check your PHP code.

      13. When your orignal project was to recreate a windows desktop application in php/html/javascript to run on windows desktops.

      12.You start trying to recreat a windows app with php...and end up making another form to e-mail app.

      11. You realise you have three functions with the exactly the same name, but which do completely different things, scattered across several includes.

      10. When your control script forgets that it is handling the return from one of many scripts it calls and re initializes all the vars... and you don't figure it out for a month.

      9. You have read through this whole thread so far and said to yourself "I don't do any of those" and patted yourself on the back.

      8. You've read this whole thread and patted yourself on the back for only doing half of them.

      7. You post your code to WW looking for some answers and the responses run longer then the Google update threads.

      6. goto 5.

      5. GOSUB 100:REM In case we missed anything on the first pass...

      4.

      if ($status == "awake"){  
      $actitivity = "Writing spaghetti code";  
      }elseif($healthstatus == "OK"){  
      $activity = "Sleep";  
      }else{  
      print "CALL 911 IMMEDIATELY!";  
      }
      

      3. You work alone, but have to use CVS to keep track of your project.

      2. You took over a project that was so convoluted you had to just scrap it and start over. Now, after three weeks, you find you have the exact same directory structure as the original and most filenames are the same.

      1. You've been watching this thread the entire time and haven't thought of a single thing you could add.

      ;-)

      Fehler
      Sie sind wohl etwas geschwätzig?

      PS: Hehe.. die Forumssoftware wirft mir vor, ich sei zu geschwaetzig ;-) Daher die Unterteilung in zwei Posts..

      MfG,
      Sympatisant
      --
      "Only half the World is Teflon and Asbestos, the Rest is burnable"

      MfG,
      Sympatisant

      --
      "Only half the World is Teflon and Asbestos, the Rest is burnable"
      1. Hi ihr,

        schön das ihr euch solche Mühe macht. Aber das mit den Fehlern weis ich selbst. Der Validator is ja wohl das erste, was man aufsuchen sollte :-P

        Ja und wie schon gesagt hab ich den Code nicht geschrieben, sondern muss nur mit ihm arbeiten. Und die ganze Seite mit eigenem Code neu aufsetzen ist Zeitlich für mich unmöglich..

        Gruß

        1. Hello,

          Ja und wie schon gesagt hab ich den Code nicht geschrieben, sondern muss nur mit ihm arbeiten. Und die ganze Seite mit eigenem Code neu aufsetzen ist Zeitlich für mich unmöglich..

          Es wird schon eine Menge bringen, wenn Du erst einmal den Document-Type eindeutig festlegst und den Quirks-Mode beseitigst. Dann erübrigt sich vermutlich schon eine ganze Menge.

          Liebe Grüße aus dem schönen Oberharz

          Tom vom Berg

          --
          Nur selber lernen macht schlau
          http://bergpost.annerschbarrich.de
        2. Hallo,

          schön das ihr euch solche Mühe macht. Aber das mit den Fehlern weis ich selbst. Der Validator is ja wohl das erste, was man aufsuchen sollte :-P

          Ja und wie schon gesagt hab ich den Code nicht geschrieben, sondern muss nur mit ihm arbeiten. Und die ganze Seite mit eigenem Code neu aufsetzen ist Zeitlich für mich unmöglich..

          wenn Du Dir die Fehler durchschaust, zunächst die fehlenden oder fehlerhaften Attribute ignorierst, so kommst Du irgendwann (um Zeile 180 herum) zu dem Fehler, bei dem der IE (verständlicherweise) die Orientierung verliert, ich kopiere es heraus:

          <td style="background-color:#E5E5E5;padding-bottom:15px;padding-top:15px;">  
              <table width="150" border="0" align="left" cellpadding="0" cellspacing="0" class="navig">  
          </td>  
          
          

          Du beginnst eine neue Tabelle, doch gleich danach schließt Du das umgebende Element. Wo ist der Inhalt der Tabelle, wo das Ende?

          Es liegt eine fehlerhafte Schachtelung vor, spätestens hier musst Du eingreifen. Ich weiß aus Erfahrung, dass speziell der IE bei fehlerhaft geschachtelten Tabellen sich selbst im Ratemodus sehr schwer tut. Eine sehr gute Voraussetzung, um eine fehlerhafte Darstellung sinnvoll in den Griff zu bekommen, ist fehlerfreier, d.h. validierender Code.

          Tief verschachtelte Tabellen sind übrigens nicht besonders übersichtlich und wartbar; ihre Zeiten (in der Praxis gab es diese) sind inzwischen lange vorbei.

          Freundliche Grüße

          Vinzenz

        3. Hai Gerch,

          Ja und wie schon gesagt hab ich den Code nicht geschrieben, sondern muss nur mit ihm arbeiten. Und die ganze Seite mit eigenem Code neu aufsetzen ist Zeitlich für mich unmöglich..

          'tschuldigung. Habe dein Posting zu schnell ueberflogen.. ich war von dem "Code"-Beispiel ganz schoen abgelenkt ;)

          MfG,
          Sympatisant

          --
          "Only half the World is Teflon and Asbestos, the Rest is burnable"
          1. Hallo,

            Ja und wie schon gesagt hab ich den Code nicht geschrieben, sondern muss nur mit ihm arbeiten. Und die ganze Seite mit eigenem Code neu aufsetzen ist Zeitlich für mich unmöglich..

            1. I find that rewriting is quicker and easier than modifying the original design.

            85. trifft somit nicht zu :-)

            'tschuldigung. Habe dein Posting zu schnell ueberflogen.. ich war von dem "Code"-Beispiel ganz schoen abgelenkt ;)

            passte aber durchaus. Finde bitte in dem Code den Teil, der für den Verschachtelungsfehler verantwortlich ist:

            <table width="150" border="0" align="left" cellpadding="0" cellspacing="0" class="navig">  
            
            

            Ich fand im veröffentlichten Code keine passende Zeile, d.h. diese Ausgabe erfolgt wohl in einem der Includes, sieht nach 93

            1. trying to edit html content on the index page and not being able to find the template until you go through 10 scripts (gotta love horde).93. trying to edit html content on the index page and not being able to find the template until you go through 10 scripts (gotta love horde).

            in Verbindung mit 61 aus:

            1. Your final page doesn't validate. You look at the HTML source and see the problem clearly, but you decide not to fix it because you have no idea where this output comes from.

            Mir fiele beim vorhandenen Code noch ein weiteres Anzeichen für Spaghetticode ein:

            0.: Im gesamten Code wird keine einzige selbstgeschriebene Funktion/Methode definiert ...

            Freundliche Grüße

            Vinzenz