Page 1 of 1

Convert!

Posted: Tue Jun 04, 2002 1:13 pm
by Aaron

Code: Select all

<table width="500" border="0" cellspacing="0" cellpadding="0"><tr> 
<td bgcolor="#000000"><font color="#FFFFFF"> :: Title // Catogory :: Poster</font></td></tr>
<tr><td bgcolor="#999999">News</td></tr><tr> 
<td bgcolor="#999999"><div align="right">no of comments :: Add // View</div></td></tr></table>
Is how the I want the news displayed...but this is how it looks =/

Code: Select all

echo "	<h1>news</h1>\n";

$query = mysql_query("SELECT * FROM $table_news WHERE approved = 'Yes' ORDER BY id DESC LIMIT $ppp");
while($result = mysql_fetch_array($query)) &#123;
	$result&#1111;body] = zap($result&#1111;body]);

	$date = date("F d, Y", $result&#1111;time]);
	$time = date("h:i a", $result&#1111;time]);
	
	$date = strtolower($date);
	$time = strtolower($time);
	
	if($result&#1111;numcom] > 1) &#123;
		$word = "comments";
	&#125; else &#123;
		$word = "comment";
	&#125;

	if($result&#1111;extended]) &#123;
		$size = number_format(strlen($result&#1111;extended]));
		$morelink = "<br /><br /><a href='truth.php?id=$result&#1111;id]'>read more ($size bytes)</a>";
	&#125; else &#123;
		$morelink = "";
	&#125;
	
	echo "	<p>\n";
	echo "		<b> :: <a href='users.php?name=$result&#1111;aname]'>$result&#1111;aname]</a> // <a href='truth.php?id=$result&#1111;id]'>$result&#1111;title]</a></b><br />\n";
	echo "		for <a href='topics.php?name=$result&#1111;topic]'>$result&#1111;topic]</a> on $date at $time ($result&#1111;numcom] $word: <a href='truth.php?id=$result&#1111;id]#addcomments'>add</a> // <a href='truth.php?id=$result&#1111;id]#comments'>view</a>)<br /><br /></p>\n";
	echo "		<blockquote>$result&#1111;body]\n";
	echo "		$morelink</blockquote>\n";
	echo "	<br />\n";
&#125;

Can anyone combine them without causing a parse error =/

Posted: Tue Jun 04, 2002 2:26 pm
by jason
What program is this from?

Posted: Tue Jun 04, 2002 2:47 pm
by Aaron
nos. not public, brought it.

Posted: Tue Jun 04, 2002 4:47 pm
by volka
oh sorry,
just signed a non-disclosure agreement about this problem ;)

Posted: Tue Jun 04, 2002 4:56 pm
by Aaron
=(

Posted: Thu Jun 06, 2002 7:06 am
by hex

Code: Select all

echo "   <h1>news</h1>\n"; 

$query = mysql_query("SELECT * FROM $table_news WHERE approved = 'Yes' ORDER BY id DESC LIMIT $ppp"); 
while($result = mysql_fetch_array($query)) &#123; 
   $result&#1111;body] = zap($result&#1111;body]); 

   $date = date("F d, Y", $result&#1111;time]); 
   $time = date("h:i a", $result&#1111;time]); 
    
   $date = strtolower($date); 
   $time = strtolower($time); 
    
   if($result&#1111;numcom] > 1) &#123; 
      $word = "comments"; 
   &#125; else &#123; 
      $word = "comment"; 
   &#125; 

   if($result&#1111;extended]) &#123; 
      $size = number_format(strlen($result&#1111;extended])); 
      $morelink = "<br /><br /><a href='truth.php?id=$result&#1111;id]'>read more ($size bytes)</a>"; 
   &#125; else &#123; 
      $morelink = ""; 
   &#125; 

   echo "<table width='500' border='0' cellspacing='0' cellpadding='0'><tr>";
   echo "<td bgcolor='#000000'><font color='#FFFFFF'> :: ";
   echo "<a href='truth.php?id=$result&#1111;id]'>$result&#1111;title]</a> // <a href='topics.php?name=$result&#1111;topic]'>$result&#1111;topic]</a> :: ";
   echo "<a href='users.php?name=$result&#1111;aname]'>$result&#1111;aname]</a></font></td></tr>";
   echo "<tr><td bgcolor='#999999'>$result&#1111;body]\n$morelink\n";
   echo "<td bgcolor='#999999'><div align='right'>($result&#1111;numcom] $word: <a href='truth.php?id=$result&#1111;id]#addcomments'>add</a> // ";
   echo "<a href='truth.php?id=$result&#1111;id]#comments'>view</a>)</div></td></tr></table>";
&#125;

Posted: Thu Jun 06, 2002 9:44 am
by Aaron
it looks alittle borxed....www.unknownzone.org/index2