Location: PHPKode > projects > Write2Left > Skin/FindPosts.php
<?php
/*
+------------------------------------------------------
| Write2Left
| (c) timdorr
| http://www.write2left.com
| hide@address.com
| See License.txt for license info
|------------------------------------------------------
| Script: FindPosts.php
| Description:
|   Contains part of the interface's skin's default output parts
| Created Dec-21-2002
+------------------------------------------------------
*/

/* Class: Skin_FindPosts
 * Description:
 *   The generic skin parts class.
 */
class Skin_FindPosts
{
	function body_top()
	{
		return <<<EOF
<td class="main" valign="top">

<big><b>Find Posts</b></big>
<br /><br />
	
EOF;
	}
	
	function body_bottom()
	{
		return <<<EOF
</td>

<td class="space">&nbsp;</td>
</tr>		
EOF;
	}

	function search_form( $cats )
	{
		return <<<EOF
<form action="?Action=FindPosts&M=search" method="POST">
<b>Search Posts</b><br />
<br />
Keywords:<br />
<input type="text" name="keywords" size="40" /><br />
Require all words:
<input type="checkbox" name="all_words" value="1" /><br />
Category:<br />
<select name="cat_id">
$cats
</select><br />
<br />
<input type="submit" value="Search!" />
</form>
EOF;
	}
	
	function result_head( $number )
	{
		return <<<EOF
Found $number result(s):<br />
<br />
<table width="85%" cellspacing="0" cellpadding="3" style="border: solid 1px black">	

<tr class="dark">
<td width="75">&nbsp;</td>
<td width="40%">Title</td>
<td width="10%">Date</td>
<td>Author</td>
<td>Category</td>
</tr>
EOF;
	}
	
	function result_row( $id, $title, $date, $author, $category )
	{
		return <<<EOF
<tr>
<td class="bevel" align="Center">
<a href="index.php?Action=NewPost&amp;post_id=$id">Edit</a> 
<a href="index.php?Action=EditPosts&amp;M=del&amp;id=$id">Delete</a> 
</td>
<td class="bevel">$title</td>
<td class="bevel">$date</td>
<td class="bevel">$author</td>
<td class="bevel">&nbsp;$category</td>
</tr>	
EOF;
	}
	
	function result_foot()
	{
		return <<<EOF
</table>
EOF;
	}
}
?>
Return current item: Write2Left