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

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

<big><b>Manage Categories</b></big>
<br /><br />
	
EOF;
	}
	
	function cats_head()
	{
		return <<<EOF
<table width="85%" cellspacing="0" cellpadding="3" style="border: solid 1px black">	

<tr class="dark">
<td>Categories:</td>
<td></td>
<td width="20">Posts</td>
</tr>		

EOF;
	}
	
	function cats_row( $name, $posts, $id )
	{
		return <<<EOF
<tr>
<td class="bevel" width="75" align="center">
<a href="?Action=Cats&amp;M=edit&amp;id=$id">Edit</a>
<a href="?Action=Cats&amp;M=del&amp;id=$id">Delete</a>
</td>

<td class="bevel">$name</td>
<td class="bevel" align="center">$posts</td>

</tr>		
EOF;
	}
	
	function cats_foot()
	{
		return <<<EOF
</table>
<br />
<form action="?Action=Cats&amp;M=doadd" method="Post">
<b>Add Category:</b><br /><br />
Name: <br /><input type="text" name="name" /><br /><br />
Desciption: <br /><input type="text" name="desc" size="50" /><br /><br />
<input type="submit" name="submit" value="Add Category" />
</form>		
EOF;
	}
	
	function cat_edit_form( $id, $name, $desc )
	{
		return <<<EOF
<form action="?Action=Cats&amp;M=doedit" method="Post">
<input type="hidden" name="id" value="$id" />

<table width="85%" cellspacing="0" cellpadding="3" style="border: solid 1px black">	

<tr class="dark">
<td>Edit category</td>
</tr>

<tr>
<td class="bevel">
Name: <br />
<input type="text" name="name" value="$name" /><br />
<br />
Desciption: <br />
<input type="text" name="desc" size="50" value="$desc" /><br />
<br />
</td>
</tr>

</table>
<br />
<input type="submit" name="submit" value="Save Changes" />
</form>			
EOF;
	}
	
	function body_bottom()
	{
		return <<<EOF
</td>

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

}

?>
Return current item: Write2Left