Test
Test
den bliver nemlig sendt sådan her :
test test
ville gerne have den sådan her
test
test
Kode :
Kode: Vælg alt
<?php session_start(); ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Forum Series - View Topic</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript">
function nl2br (str, is_xhtml) {
var breakTag = '<br />';
if (typeof is_xhtml != 'undefined' && !is_xhtml) {
breakTag = '<br>';
}
return (str + '').replace(/([^>]?)\n/g, '$1'+ breakTag +'\n');
}
</script>
<style>
#div2 {
-webkit-animation-name: rotateThis;
-webkit-animation-duration:2s;
-webkit-animation-iteration-count:infinite;
-webkit-animation-timing-function:linear;
}
@-webkit-keyframes rotateThis {
from {-webkit-transform:scale(0.5) rotate(0deg);}
to {-webkit-transform:scale(0.5) rotate(360deg);}
}
</style>
</head>
<div id="warper">
<div id="header">
<ul id="ulnav">
<li id="linav"><a href="index.php" class="nav">Forside</a></li>
<li id="linav"><a href="http://dragonegcraft.dk/Forum/insert.php" class="nav">Opret dig som bruger</a></li>
</ul>
</div>
<div id="indhold">
<?php
if (!isset($_SESSION['uid'])) {
echo "<form action='login_parse.php' method='post'>
Username: <input type='text' name='username' />
Password: <input type='password' name='password' />
<input type='submit' name='submit' value='Log In' />
";
} else {
echo "<p>You are logged is as ".$_SESSION['username']." • <a href='logout_parse.php'>Logout</a>";
}
?>
<hr />
<div id="content">
<?php
include_once("connect.php");
$cid = $_GET['cid'];
$tid = $_GET['tid'];
$sql = "SELECT * FROM topics WHERE category_id='".$cid."' AND id='".$tid."' LIMIT 1";
$res = mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($res) == 1) {
echo "<table width='100%'>";
if ($_SESSION['uid']) { echo "<tr><td colspan='2'><input type='submit' value='Opret indlæg i denne tråd' onClick=\"window.location = 'post_reply.php?cid=".$cid."&tid=".$tid."'\" /><hr />"; } else { echo "<tr><td colspan='2'><p>Please log in to add your reply.</p><hr /></td></tr>"; }
while ($row = mysql_fetch_assoc($res)) {
$sql2 = "SELECT * FROM posts WHERE category_id='".$cid."' AND topic_id='".$tid."'";
$res2 = mysql_query($sql2) or die(mysql_error());
while ($row2 = mysql_fetch_assoc($res2)) {
echo "<tr><td valign='top' style='border: 1px solid #000000;'><div style='min-height: 125px;'>".$row['topic_title']."<br />by ".$row2['post_creator']." - ".$row2['post_date']."<hr />".$row2['post_content']."</div></td><td width='200' valign='top' align='center' style='border: 1px solid #000000;'>Bruger info her :<p></p><img src='Billed.png' width='64' height='80' /></td></tr><tr><td colspan='2'><hr /></td></tr>";
}
$old_views = $row['topic_views'];
$new_views = $old_views + 1;
$sql3 = "UPDATE topics SET topic_views='".$new_views."' WHERE category_id='".$cid."' AND id='".$tid."' LIMIT 1";
$res3 = mysql_query($sql3) or die(mysql_error());
}
} else {
echo "<p>This topic does not exist.</p>";
}
?>
<?php $textAreaText = "This is a test\nThis is a test\nThis is a test";
echo $textAreaText;
echo "<br /><br />";
echo nl2br($testAreaText);?>
<div id="floatingCirclesG">
<div class="f_circleG" id="frotateG_01">
</div>
<div class="f_circleG" id="frotateG_02">
</div>
<div class="f_circleG" id="frotateG_03">
</div>
<div class="f_circleG" id="frotateG_04">
</div>
<div class="f_circleG" id="frotateG_05">
</div>
<div class="f_circleG" id="frotateG_06">
</div>
<div class="f_circleG" id="frotateG_07">
</div>
<div class="f_circleG" id="frotateG_08">
</div>
</div>
</div>
<div id="foother">
</div>
<body>
</body>
</html>



