<?php require('vars.php') ?>
<?php include('topic.php') ?>
<?php include('nav.php') ?>

    <td  valign="top" bgcolor="#FFFFFF" align="left">
        <p><br>
        <font face="Arial" size="5"><?php echo $pagename ?></font></p>



<!-- bof Anzahl der Ergebnisse zählen -->
<?php
IF (!$page) {$page=startseite;};
$ergebnis = mysql_db_query($dbname, "SELECT * FROM $page ORDER BY rubric;");
$amount=mysql_num_rows($ergebnis);
for ($x=1;$x<=$amount;$x++){

IF ($page==kontakt) {
$result = mysql_db_query($dbname, "SELECT * FROM $page WHERE (rubric='1')");
$shown_text = mysql_result($result,0, "text");

?>
	        <table width="100%" align="center" cellspacing="0" cellpadding="0" border="0" class="main">
	          <tr valign="top">
	            <td width="60%">
	        		<form action="http://www.dr-david.de/cgi-bin/selfmail.pl" method="post">
		    		<input type="hidden" name="mailto" value="">
					<input type="hidden" name="return" value="http://www.dr-david.de/index.php?page=kontakt&send=true">
					<input type="hidden" name="delimiter" value=": ">
					<input type="hidden" name="subject" value="Dr-David">
					<!-- hier beliebige eigene Felder -->
					Name:<br>
					<input type="text" name="name"><br><br>
					E-Mail Adresse:<br>
					<input type="text" name="email"><br><br>
					Nachricht:<br>
					<textarea cols="30" rows="10" name="nachricht"></textarea><br><br>
					<input type="submit"><input type="reset">
			   		</form>
			    </td>
			    <td width="15">
			    </td>
			    <td class="text">
			      <?php echo $shown_text  ?>
			    </td>
			    </tr>
</table>
		<?php
} ELSE {

/* eof Anzahl der Ergebnisse zählen */

$result = mysql_db_query($dbname, "SELECT * FROM $page WHERE (rubric=$x)");
$shown_text = mysql_result($result,0, "text");
$shown_topic = mysql_result($result,0, "topic");
$shown_picture = mysql_result($result,0, "picture");
$shown_picture2 = mysql_result($result,0, "picture2");
$imgname = mysql_result($result,0, "imgname");
$imgname2 = mysql_result($result,0, "imgname2");
$shown_link1 = mysql_result($result,0, "link1");
$shown_link2 = mysql_result($result,0, "link2");
$shown_picture1lrg = mysql_result($result,0, "img1lrg");
$shown_picture2lrg = mysql_result($result,0, "img2lrg");

$shown_picture1lrg_link = 'img/' . $shown_picture1lrg;

IF ($shown_picture1lrg=='none') {$shown_picture1lrg='';};
IF ($shown_picture2lrg=='none') {$shown_picture2lrg='';};

IF ($shown_picture1lrg AND $shown_picture1lrg!='none') {
$size = getimagesize("$shown_picture1lrg_link");
	$height = $size[1];
	$width = $size[0];

$height = $height+20;
$width = $width+20;};


$shown_picture2lrg_link = 'img/' . $shown_picture2lrg;

IF ($shown_picture2lrg AND $shown_picture2lrg!='none') {

$size2 = getimagesize("$shown_picture2lrg_link");
	$height2 = $size2[1];
	$width2 = $size2[0];

$height2 = $height2+20;
$width2 = $width2+20;}


?>

<table width="90%" border="0" class="main">



          <?php IF ($shown_topic) {?>
          <tr>
            <td colspan="2" align="left" class="topic">
            <?php echo $shown_topic; ?><br><br><br>
            </td>
          </tr>
          <?php } ?>

          <tr valign="top">
            <?php if ($shown_picture AND $shown_picture!=none) {?>
            <td width="250">
            <?php IF ($shown_link1 AND !$shown_picture1lrg) {
            echo '<a href="' . $shown_link1  . '">';
            }?>
            <?php IF ($shown_picture1lrg) { ?>
            <a href="" onClick="window.open('img/<?php echo $shown_picture1lrg ?>','bild','scrollbars=no,resizable=no,width=<?php echo $width ?>,height=<?php echo $height ?>');" title="Titel" border="0">
            <?php }?>
            <?php echo '<img src=img/' . $shown_picture . ' alt="' . $imgname . '" border="0"></a>' ?></td>
            <?php } ?>

            <td class="text" width="60%"><?php echo $shown_text; ?></td>

            <?php if ($shown_picture2 AND $shown_picture2!=none) {?>
            <td width="250">
            <?php IF ($shown_link2 AND !$shown_picture2lrg) {
            echo '<a href="' . $shown_link2  . '">';
            }?>
            <?php IF ($shown_picture2lrg) { ?>
            <a href="" onClick="window.open('img/<?php echo $shown_picture2lrg ?>','bild','scrollbars=no,resizable=no,width=<?php echo $width2 ?>,height=<?php echo $height2 ?>');" title="Titel" border="0">
            <?php }?>
            <?php echo '<img src=img/' . $shown_picture2 . ' alt="' . $imgname2 . '" border="0">' ?></td>
            <?php }
            ELSEIF ($HTTP_USER_AGENT=='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)'
) { echo '<td width="150">&nbsp;</td>';};

            ?>

          </tr>

        </table>
        <br><br>

<?php
}}
?>




<?php include ('col_drdavid.php')?>
<?php include ('col_praxis.php')?>

<?php include ('footer.php') ?>
