Timur: CODE - TEXTAREA TEIL 1

Beitrag lesen

Hallo ChrisB,

so, jetzt kommt es. also zuerst der header.php von der index.php:

<script type="text/javascript">
<?PHP

$abfrage1 = "SELECT * FROM `haber` ORDER BY `nr` DESC LIMIT 0,1";
$ergebnis1 = mysql_query($abfrage1);
while($row1 = mysql_fetch_object($ergebnis1))
{
$pfad1=$row1->IMG1;
$ubers1=$row1->baslik;
$betim1=$row1->betimleme;
$hn1=$row1->haberarsivno;
}

... usw.. bis $abfrage7 ...

<script type="text/javascript">
/* <![CDATA[ */
function haber1() // HABERUEBERGANG 1 -> 2
{
var e = document.getElementById("ortaresim");
e.src = document.getElementById("img1").src;
document.getElementById("ueber").innerHTML = "<?PHP echo "$ubers1"; ?>";
document.getElementById("betim").innerHTML = '<?PHP echo "<a href=\"haberler.php?haberarsivno=$hn1\">$betim1</a>"; ?>';
document.getElementById("img4").style.border = 'none';
document.getElementById("img1").style.border = '2px solid red';
window.setTimeout("haber2()", 10000);
}

function haber2() // HABERUEBERGANG 2 -> 3
{
var e = document.getElementById("ortaresim");
e.src = document.getElementById("img2").src;
document.getElementById("ueber").innerHTML = "<?PHP echo "$ubers2"; ?>";
document.getElementById("betim").innerHTML = '<?PHP echo "<a href=\"haberler.php?haberarsivno=$hn2\">$betim2</a>"; ?>';
document.getElementById("img1").style.border = 'none';
document.getElementById("img2").style.border = '2px solid red';
window.setTimeout("haber3()", 10000);
}

function haber3() // HABERUEBERGANG 3 -> 4
{
var e = document.getElementById("ortaresim");
e.src = document.getElementById("img3").src;
document.getElementById("ueber").innerHTML = "<?PHP echo "$ubers3"; ?>";
document.getElementById("betim").innerHTML = '<?PHP echo "<a href=\"haberler.php?haberarsivno=$hn3\">$betim3</a>"; ?>';
document.getElementById("img2").style.border = 'none';
document.getElementById("img3").style.border = '2px solid red';
window.setTimeout("haber4()", 10000);
}

function haber4() // HABERUEBERGANG 4 -> 1
{
var e = document.getElementById("ortaresim");
e.src = document.getElementById("img4").src;
document.getElementById("ueber").innerHTML = "<?PHP echo "$ubers4"; ?>";
document.getElementById("betim").innerHTML = '<?PHP echo "<a href=\"haberler.php?haberarsivno=$hn4\">$betim4</a>"; ?>';
document.getElementById("img3").style.border = 'none';
document.getElementById("img4").style.border = '2px solid red';
window.setTimeout("haber1()", 10000);
}
/* ]]> */
</script>

So, nun die index.php wo es beim insert angezeigt wird und beim update nicht mehr.

<?PHP
$abfrage1 = "SELECT * FROM `haber` ORDER BY `nr` DESC LIMIT 0,1";
$ergebnis1 = mysql_query($abfrage1);
while($row1 = mysql_fetch_object($ergebnis1))
{
$pfad1=$row1->IMG1;
$ubers1=$row1->baslik;
$betim1=$row1->betimleme;
$hn1=$row1->haberarsivno;
}

... usw.. bis $abfrage7 ...

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<?php include "../headerbir.php"; ?>
</head>
<body onload="javascript:haber1();">
<form method="post" action="...ist was anders hier...">
	<!-- GANZE SEITE IM DIV -->
	<div id="tumsayfa">
		<!-- BANNER -->
		<div id="banner">
		</div>
		<!-- LEISTE NACH BANNER -->
		<div id="ara">
			<?php include "../ara.php";?>
		</div>
		<!-- GLEIMAESSIGER HINTERGRUND ANFANG -->
		<div id="arkaekran">
			<!-- NAVIGATION LINKS -->
			<div id="solnav">
				<!-- DATUMSANZEIGE -->
				<div id="datum" align="center">
					<?php include "../tarih.php";?>
				</div>
				<!-- MENUE -->
				<a href="index.php">Ana Sayfa</a>
				<a href="biyografi.php">Biyografi</a>
				<a href="koseyazilari.php">&#351;e Yaz&#305;lar&#305;</a>
				<a href="projelerdosyalar.php">Projeler ve Dosyalar</a>
				<a href="fotografgaleri.php">Foto&#287;raf Galerisi</a>
				<a href="iletisim.php">&#304;leti&#351;im</a>
				<a href="kunye.php">Künye</a>
				<a href="siteharitasi.php">Site Haritas&#305;</a>
				<!-- NEWSLETTER  -->
				<div id="bulten">
					<!-- NEWSLETTER UEBERSCHRIFT -->
					<div class="ab">E-Bülten</div>
					<!-- AUSRICHTUNG TEXTBOX UND BUTTONS -->
					<div class="fb">
						<input type="text" name="bulten" class="textfeld1" />
						<br />
						<input type="submit" name="gonder" value="Kay&#305;t ol" class="button1" />&nbsp;<input type="submit" class="button1" name="sil" value="Kayd&#305; sil" />
					</div>
				</div>
				<!-- FOTOS LINKE SEITE -->
				<div id="fotolinks">
					<img id="fotolk" width="170px" height="170px" src="../lale1.jpg" alt="" border="0" onclick="javascript:popup()" style="padding: 11px 0px 0px 11px;" />
				</div>
			</div>
			<!-- MITTE DER SEITE -->
			<div id="orta">
				<!-- MITTE DER SEITE - OBEN -->
				<div id="ortaresimbir">
					<!-- UEBERSCHRIFT + FORMATIERUNG -->
					<div class="yazibir">
						<div id="ueber">
						</div>
					</div>
					<!-- TABELLE FÜR GROSSES BILD UND DIE 4 KLEINEN BILDER -->
					<table width="380px" align="center" cellspacing="0" cellpadding="0">
						<tr>
						<td colspan="7" align="center" valign="middle" class="tablo1"><img id="ortaresim" name="ortaresim" width="379" height="285" src="" alt="" /></td>
						</tr>
						<tr>
						<td colspan="7" align="left" valign="top" class="tablo2"><div id="betim"> </div>
						</td>
						</tr>
						<tr>
						<td width="89px" align="center" valign="middle" class="tablo4"><a href="haberler.php?haberarsivno=<?PHP echo"$hn1";?>"><img id="img1" name="img1" width="84" height="64" src="<?PHP echo "$pfad1"; ?>" alt="" border="0" /></a></td>
						<td width="9px" align="center" valign="middle" class="tablo4">&nbsp;</td>
						<td width="89px" align="center" valign="middle" class="tablo4"><a href="haberler.php?haberarsivno=<?PHP echo"$hn2";?>"><img id="img2" name="img2" width="84" height="64" src="<?PHP echo "$pfad2"; ?>" alt="" border="0" /></a></td>
						<td width="9px" align="center" valign="middle" class="tablo4">&nbsp;</td>
						<td width="89px" align="center" valign="middle" class="tablo4"><a href="haberler.php?haberarsivno=<?PHP echo"$hn3";?>"><img id="img3" name="img3" width="84" height="64" src="<?PHP echo "$pfad3"; ?>" alt="" border="0" /></a></td>
						<td width="9px" align="center" valign="middle" class="tablo4">&nbsp;</td>
						<td width="89px" align="center" valign="middle" class="tablo4"><a href="haberler.php?haberarsivno=<?PHP echo"$hn4";?>"><img id="img4" name="img4" width="84" height="64" src="<?PHP echo "$pfad4"; ?>" alt="" border="0" /></a></td>
						</tr>
					</table>
				</div>
				<!-- MITTE DER SEITE - UNTEN -->
				<div id="ortaresimiki">
					<!-- TABELLE FÜR DIE 3 KLEINEN BILDER -->
					<table width="380px" align="center" cellspacing="0" cellpadding="0">
					<tr>
						<td width="85px" height="64" align="center" valign="middle" class="tablo5"><a href="haberler.php?haberarsivno=<?PHP echo "$hn5";?>"><img id="img5" name="img5" width="84" height="64" src="<?PHP echo "$pfad5"; ?>" alt="" border="0" /></a></td>
						<td width="13px" height="64" align="center" valign="middle" class="tablo5">&nbsp;</td>
						<td width="282px" height="64" align="left" valign="middle" class="tablo5"><b><a href="haberler.php?haberarsivno=<?PHP echo"$hn5";?>"><?PHP echo"$ubers5"; ?></a></b> <br /> <font color="#B2B2B2"><?PHP echo "$dat5"; ?></font></td>
					</tr>
					<tr>
						<td width="85px" height="64" align="center" valign="middle" class="tablo5"><a href="haberler.php?haberarsivno=<?PHP echo "$hn6";?>"><img id="img6" name="img6" width="84" height="64" src="<?PHP echo "$pfad6"; ?>" alt="" border="0" /></a></td>
						<td width="13px" height="64" align="center" valign="middle" class="tablo5">&nbsp;</td>
						<td width="282px" height="64" align="left" valign="middle" class="tablo5"><b><a href="haberler.php?haberarsivno=<?PHP echo"$hn6";?>"><?PHP echo"$ubers6"; ?></a></b> <br /> <font color="#B2B2B2"><?PHP echo "$dat6"; ?></font> </td>
					</tr>
					<tr>
						<td width="85px" height="64" align="center" valign="middle" class="tablo5"><a href="haberler.php?haberarsivno=<?PHP echo "$hn7";?>"><img id="img7" name="img7" width="84" height="64" src="<?PHP echo "$pfad7"; ?>" alt="" border="0" /></a></td>
						<td width="13px" height="64" align="center" valign="middle" class="tablo5">&nbsp;</td>
						<td width="282px" height="64" align="left" valign="middle" class="tablo5"><b><a href="haberler.php?haberarsivno=<?PHP echo"$hn7";?>"><?PHP echo"$ubers7"; ?></a></b> <br /> <font color="#B2B2B2"><?PHP  echo "$dat7"; ?></font> </td>
					</tr>
					<tr>
						<td colspan="3" height="32px" align="center" valign="middle" class="tablo6"><a href="haberarsiv.php">Haber Ar&#351;ivi</a></td>
					</tr>
					</table>
				</div>
			</div>
			<!-- NAVIGATION RECHTS  -->
			<div id="sagnav">
				<!-- HANDSCHRIFT RECTE SEITE -->
				<div id="elyazirechts">
					<a class="elyazi" href="#"><img src="../yazi.jpg" alt="" border="0" onmouseover="javascript:fadeelyazi();javascript:zindexelyazi()" /><span><img id="elyazibuyuk" src="../yazibuyuk.jpg" alt="" border="0" /></span></a>
				</div>
				<!-- FOTOS RECHTE SEITE -->
				<div id="fotorechts">
					<!-- SKRIPT FÜR DAS BLENDEN -->
					<?php include "../fotork.php"; ?>
					<!-- PSEUDO IMG -->
					<script type="text/javascript">
						function fotorbzeigen()
						{
							var a = document.getElementById("fotor");
							a.style.visibility = "visible";
						}
					</script>
					<img id="fotork" width="170px" height="170px" src="" alt="" border="0" style="padding:11px 0px 0px 10px;" />
				</div>
			</div>
		<!-- GLEIMAESSIGER HINTERGRUND ENDE mit CLEAR -->
		<div style="clear:both;"></div>
		</div>
		<!-- FUSSZEILE -->
		<div id="altyazi" align="center">
			<?php include "../altyazi.php";?>
		</div>
	</div>
</form>
</body>
</html>