PDA

View Full Version : Any one able to help with my <tr><td>'s please



runnerjp
Feb 16th, 2010, 05:30 PM
Ok this is driving me mad...

Im trying to validate my html... the think is my tables are all over the shop now!!!

can any on aid me with it as im going through loop after loop with no end in sight!


<?php
session_start();
include '../info.php';
/*
+-------------------------------------------------------------------+
| S H O U T B O X (v3.9) |
| |
| Copyright Gerd Tentler www.gerd-tentler.de/tools |
| Created: Jun. 1, 2004 Last modified: Jun. 14, 2009 |
+-------------------------------------------------------------------+
| This program may be used and hosted free of charge by anyone for |
| personal purpose as long as this copyright notice remains intact. |
| |
| Obtain permission before selling the code for this program or |
| hosting this software on a commercial website or redistributing |
| this software over the Internet or in any other medium. In all |
| cases copyright must remain intact. |
+-------------------------------------------------------------------+
*/
error_reporting(E_WARNING);

//==================================================================================================== ====
// Set variables, if they are not registered globally; needs PHP 4.1.0 or higher
//==================================================================================================== ====

if(isset($_SERVER['HTTP_HOST'])) $HTTP_HOST = $_SERVER['HTTP_HOST'];

//==================================================================================================== ====
// Includes
//==================================================================================================== ====

if($HTTP_HOST == 'localhost' || $HTTP_HOST == '127.0.0.1' || ereg('^192\.168\.0\.[0-9]+$', $HTTP_HOST)) {
include('shout/config_local.inc.php');
}
else {
include('shout/config_main.inc.php');
}
if(!isset($language)) $language = 'en';
include("shout/languages/lang_$language.inc");
include('shout/smilies.inc');

//==================================================================================================== ====
// Set session variables (message ID); needs PHP 4.1.0 or higher
//==================================================================================================== ====

if($enableIDs && !$_SESSION['msgID']) {
srand((double) microtime() * 1000000);
$_SESSION['msgID'] = md5(uniqid(rand()));
}

//==================================================================================================== ====
// Main
//==================================================================================================== ====

if($boxFolder && !ereg('/$', $boxFolder)) $boxFolder .= '/';
?>
<script type="text/javascript"><!--
var shout_popup = 0;

function newWindow(url, w, h, x, y, scroll, menu, tool, resizable) {
if(shout_popup && !shout_popup.closed) shout_popup.close();
if(!x && !y) {
x = Math.round((screen.width - w) / 2);
y = Math.round((screen.height - h) / 2);
}
shout_popup = window.open(url, "shout_popup", "width=" + w + ",height=" + h +
",left=" + x + ",top=" + y + ",scrollbars=" + scroll +
",menubar=" + menu + ",toolbar=" + tool + ",resizable=" + resizable);
shout_popup.focus();
}

function refreshBox() {
document.fShout.sbText.value = "";
document.fShout.admin.value = "";
document.fShout.submit();
setTimeout("document.fShout.Refresh.disabled=false", 1000);
}

function shoutIt() {
document.fShout.admin.value = "";
document.fShout.submit();
setTimeout("document.fShout.sbText.value=''", 1000);
setTimeout("document.fShout.Shout.disabled=false", 1000);
}

function login() {
var pass = prompt("<?php echo $msg['pass']; ?>", "");
if(pass) {
document.fShout.admin.value = pass;
document.fShout.submit();
}
document.fShout.Admin.disabled = false;
}
//--> </script>






















<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form name="fShout" action="shout/shout.php" target="ShoutBox" method="post">

<?php echo '<input type="hidden" name="sbID" value="'.$_SESSION['msgID'].'">'; ?>
<input type="hidden" name="admin">



<table>
<tr valign="top">
<?php
$inputsPosition = strtolower($inputsPosition);

if($inputsPosition == 'left' || $inputsPosition == 'right') {
$txtHeight = round($boxHeight * 0.65);
}
else $txtHeight = 50;

if($inputsPosition == 'right' || $inputsPosition == 'bottom') {
?>
<td>
<?php echo '<iframe name="ShoutBox" src="shout/shout.php" class="cssShoutBox"width="'.$boxWidth.'" height="'.$boxHeight.'" frameborder="0"></iframe>'; ?>
</td>
<?php
if($inputsPosition == 'bottom') {
?>
</tr>
<tr>
<td height="5">
</td>
</tr>

<tr>
<?php
}
else {
?>
<?php
}
}
?>

</tr>
<?php echo '<table border="0" cellspacing="0" cellpadding="0" width="'.$boxWidth.'">'?>
<tr>
<?php echo ' <textarea name="sbText" rows="3" style="width:'.$boxWidth.'px; height:'.$txtHeight.'px" wrap="virtual" class="cssShoutForm">Insert Text Here</textarea>'; ?>
</tr>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>
<?php echo '<input type="button" name="Refresh" value="'.$msg['refresh'].'" class="cssShoutButton" onClick="this.disabled=true; refreshBox()">'; ?>
</td>
<td align="center">
<?php echo '<input type="button" name="Shout" value="'.$msg['shout'].'" class="cssShoutButton" onclick="this.disabled=true; shoutIt()" />'; ?>
</td>
</tr>
<?php
if($inputsPosition == 'left' || $inputsPosition == 'top') {
if($inputsPosition == 'top') {
?>

</table>
</td>
</tr>
<?php
}
else {
?>
<td width="20">&nbsp;</td>
<?php
}
?>
<td>
<?php echo '
<iframe name="ShoutBox" src="shout/shout.php" class="cssShoutBox"
width="'.$boxWidth.'" height="'.$boxHeight.'" frameborder="0"></iframe>'?>
</td>
<?php
}
?>
</tr>

</table>
</form>
</td>
</tr>
</table>

tomws
Feb 16th, 2010, 08:05 PM
How about explaining your problem?

bazz
Feb 17th, 2010, 01:54 PM
Maybe this is an excellent example of why tables are bad for layout??! better to make the code semantic.

bazz