Willkommen auf dem Portal für Mediengestalter
|
|
Autor |
Nachricht |
tobiTOBSEN
Threadersteller
Dabei seit: 19.08.2002
Ort: -
Alter: 45
Geschlecht:
|
Verfasst Do 18.03.2004 20:42
Titel Problem mit include und Positionierung |
|
|
also ich hab n Gästebuch in nem iFrame laufen und auf der linken seite im iFrame soll ein Bild im HG erscheinen, soweit so gut, das Gästebuch, also der Inhalt soll absolut auf 250px von links positioniert erscheinen, hab das mal über ein include gemacht, dass Problem ist jetzt aber, dass er mir meinen leftmargin überhaupt nicht berücksichtig, die phpgb.php läuft immer auf 100% breite...
hier mal der code
Code: | <!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>
<html>
<head>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta http-equiv=Page-Enter content=progid:DXImageTransform.Microsoft.Fade(duration=0.5,enabled=false)>
<meta http-equiv=Page-Exit content=progid:DXImageTransform.Microsoft.Fade(duration=0.5,enabled=false)>
<title>Unser Gauml;stebuch</title>
<link href=../css/global_text.css rel=stylesheet>
</head>
<body leftmargin=250 marginheight=0 marginwidth=0 topmargin=0>
<style type=text/css>
body { background-image:url(../cafe.jpg); background-repeat:no-repeat;
background-attachment:fixed; padding:0px;background-position:0px 0px }
</style>
<br>
<? include(phpgb.php); ?>
</body>
</html> |
ich glaub ich bin schon wieder zu bl d
|
|
|
|
|
Account gelöscht
Ort: -
Alter: -
|
Verfasst Do 18.03.2004 22:08
Titel
|
|
|
Beitrag gelöscht.
|
|
|
|
|
Anzeige
|
|
|
tobiTOBSEN
Threadersteller
Dabei seit: 19.08.2002
Ort: -
Alter: 45
Geschlecht:
|
Verfasst Do 18.03.2004 22:14
Titel
|
|
|
das
Code: | <?
include(settings.php);
if(!$mode || $mode == ) $mode = view;
// Den Eintrag überprüfen und schreiben
if ($mode == write) {
$checker = 0;
if (strlen(trim($name)) < 1) header(Location: phpgb.php?mode=newentryfehler=1);
if (strlen(trim($eintrag)) < 1) header(Location: phpgb.php?mode=newentryfehler=2);
$gb_file = file(data.gb); $gb_file_size = sizeof($gb_file); $entry_id = explode(þ, $gb_file[$gb_file_size - 1]); $entry_id = $entry_id[0] + 1; // Neue ID herausfinden
if (strlen(trim($mail)) < 1) $mail = ØnoØ;
$mailname = stripslashes($name); $maileintrag = stripslashes($eintrag);
$name = htmlspecialchars(stripslashes($name)); $datum = date(YmdHis);
$eintrag = str_replace(\r\n,<br>,htmlspecialchars(stripslashes($eintrag)));
$towrite = $entry_id . þ$name . þ$mail . þ$icq . þ$eintrag . þ$datum . þþþþþ\r\n;
$fp = fopen(data.gb, a); flock($fp,LOCK_EX); fwrite($fp,$towrite); flock($fp,LOCK_UN); fclose($fp);
// Hier beginnt der Mail-Abschnitt
if ($mailq == yes) {
$mailfrom = Haus Birken Gästebuch;
$mailmessage = In unserem Gästebuch gibt es einen neuen Eintrag und zwar von $mailname. Er/Sie schreibt das folgende:\n$maileintrag;
mail($mailofwm, $mailfrom, $mailmessage);
}
// Hier endet der Mail-Abschnitt
header(Location: phpgb.php?mode=view);
}
?>
<html><head>
<style>
body { background-image:url(<? echo $bpicture ?>); background-attachment:fixed; background-position:center; color: #696969; font-size: 8pt; font-family: Verdana; margin-top: 0px; margin-right: 0px; margin-left: 0px; scrollbar-3dlight-color: FFFFFF; scrollbar-arrow-color: 1F275A; scrollbar-darkshadow-color: E1EFFA; scrollbar-face-color: C4DEF6; scrollbar-highlight-color: FFFFFF; scrollbar-shadow-color: FFFFFF; scrollbar-track-color: E1EFFA }
a:link { color: #1f275a; font-weight: Verdana; font-size: 8pt; bold; font-family: Verdana; text-decoration: none }
a:visited { color: #1f275a; font-weight: Verdana; font-size: 8pt; font-family: Verdana; text-decoration: none }
a:hover { color: white; font-weight: bold; font-size: 8pt; text-decoration: none; background-color: #1f275a }
a:active { color: white; font-weight: bold; font-size: 8pt; text-decoration: none; background-color: transparent }
.mengentext { color: #1f275a; font-style: normal; font-size: 8pt; font-family: Verdana; text-align: justify }
</style>
<script language=JavaScript>
window.defaultStatus = ;
</script>
</head>
<body leftmargin=250 marginheight=0 marginwidth=0 topmargin=0 bgcolor=<? echo $bcolor ?> text=<? echo $fcolor ?>>
<center>
<?
if (trim($bannerscr) != ) echo <img border=0 src=\$bannerscr\>;
if (trim($uptext) != ) echo <font size=6 face=\$fface\ color=\$fcolor\><b>$uptext</b></font><br><br><br>;
?>
<span class=mengentext><font face=<? echo $fface ?>>
<?
// Formular für neuen Eintrag
if ($mode == newentry) {
if($fehler == 1) $fehler = Bitte geben Sie Ihren Namen ein!;
elseif($fehler == 2) $fehler = Bitte geben Sie ein Nachricht ein!;
?>
<form method=post action=phpgb.php><input type=hidden value=write name=mode>
<table border=0 width=100%>
<tr><td colspan=2 width=100%><span class=mengentext><font face=<? echo $fface ?> color=red><? echo $fehler ?></td></tr>
<tr>
<td width=7% valign=top><span class=mengentext><font face=Verdana>Name:</font></td>
<td width=93%><input type=text name=name size=20>nbsp;nbsp;</td>
</tr><tr>
<td width=7% valign=top><span class=mengentext><font face=Verdana>eMail:</font></td>
<td width=93%><input type=text name=mail size=20></td>
</tr><!--<tr>
<td width=7% valign=top><font size=8px face=Verdana>ICQ:</font></td>
<td width=93%><input type=text name=icq size=20></td>
</tr>--><tr>
<td width=7% valign=top><span class=mengentext><font face=Verdana>Eintrag:</font></td>
<td width=93%><textarea rows=8 name=eintrag cols=45></textarea></td>
</tr></table><br><input type=submit value=Eintragen onfocus=this.blur()></form>
<?
}
// Gästebuch lesen
elseif ($mode == view) {
echo <center>;
$entrys = file(data.gb); $entrys_size = sizeof($entrys);
$seiten = ceil($entrys_size / $numofentrys); $entrys = array_reverse($entrys);
if (!$z) $z = 1; $y = $z * $numofentrys; $x = $y - $numofentrys;
if ($y > $entrys_size) $y = $entrys_size;
if ($entrys_size > 0) {
for ($i = $x; $i < $y; $i++) {
$aktuell = explode(þ, $entrys[$i]);
// Beginn des Datumsformatieren
$datum = $aktuell[5];
$jahr = substr($datum,0,4);
$monat = substr($datum,4,2);
$tag = substr($datum,6,2);
$stunde = substr($datum,8,2);
$minute = substr($datum,10,2);
$datum = $tag.$monat.$jahr | $stunde:$minute;
// Ende des Datumsformatieren
if($aktuell[2] == ØnoØ) $aktuell[2] = ;
else $aktuell[2] = <a href=mailto:$aktuell[2] onfocus=\this.blur()\><img src=email2.gif border=0></a>;
?>
<table width=100% style=border:1px solid;border-color: #1f275a; width=<? echo $twidth ?> cellspacing=<? echo $tzabstand ?> cellpadding=2>
<tr>
<td width=100%bgcolor=<? echo $tback1 ?>><table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td><span class=mengentext><font color=<? echo $ttcolor1 ?>><b><? echo $aktuell[1] ?>nbsp;nbsp;<? echo $aktuell[2] ?></b></font></td><td align=right bgcolor=<? echo $tback1 ?>><span class=mengentext><font color=<? echo $ttcolor1 ?>><b><? echo $datum ?></b></font></td></tr></table></td>
</tr>
<tr><td width=100% background=bg.gif bgcolor=<? echo $tback2 ?> colspan=2><span class=mengentext><font color=<? echo $ttcolor2 ?>><p align=justify><? echo $aktuell[4] ?></p><? if(!strlen($aktuell[6]) < 1) { echo <p align=\justify\><i>Kommentar:<br>$aktuell[6]</i></p>; } ?></font></td></tr>
</table><br>
<?
}
}
else echo --Keine Einträge vorhanden--<br>;
?> <a href=phpgb.php?mode=newentry onmouseover=status='Eintragen';return true onfocus=this.blur()><? if (!strlen($picnewentry) < 1) echo <img src=\$picnewentry\ border=\0\>; else echo <br>Eintragen; ?></a> <?
echo </center>;
if ($entrys_size > $numofentrys) {
echo <br><br><b><center><font size=\1\>;
$vor = $z - 1;
$next = $z + 1;
if ($vor != 0) echo <a href=\phpgb.php?z=$vor\ onfocus=\this.blur()\>;
echo << Vorherige;
if ($vor != 0) echo </a>;
echo | ;
if ($next <= $seiten) echo <a href=\phpgb.php?z=$next\ onfocus=\this.blur()\>;
echo Weitere >>;
if ($next <= $seiten) echo </a>;
echo </b></center></font>;
}
}
?>
</font>
</body>
</html> |
|
|
|
|
|
Achim M.
Dabei seit: 17.03.2003
Ort: -
Alter: -
Geschlecht:
|
Verfasst Do 18.03.2004 23:06
Titel Re: Problem mit include und Positionierung |
|
|
Dein Code steckt voller Fehler. Schreib einen validen Quellcode und es sollte gehen:
Code: | <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd>
<html>
<head>
<title>Unser Gauml;stebuch</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta http-equiv=Page-Enter content=progid:DXImageTransform.Microsoft.Fade(duration=0.5,enabled=false)>
<meta http-equiv=Page-Exit content=progid:DXImageTransform.Microsoft.Fade(duration=0.5,enabled=false)>
<link href=../css/global_text.css rel=stylesheet type=text/css>
<style type=text/css>
body {
background-image: url(../cafe.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 0 0;
padding: 10px 0 0 250px;
margin: 0;
}
</style>
</head>
<body>
<?php include(phpgb.php); ?>
</body>
</html> |
Gruß
Achim
|
|
|
|
|
pRiMUS
Dabei seit: 09.09.2003
Ort: Vienna
Alter: 48
Geschlecht:
|
Verfasst Fr 19.03.2004 09:50
Titel
|
|
|
die datei die included wird hat nochmals <html> und <body>
also ist es in deinem tatsächlichen code auch 2x drinnen, ned gut.
|
|
|
|
|
|
|
|
Ähnliche Themen |
Div Positionierung Problem...
Problem mit include in php
css Problem Positionierung
problem mit php include
include Problem
Include Switch Problem
|
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
|