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

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

<big><b>Templates</b></big>
<br /><br />
	

EOF;
	}
	
	function body_bottom()
	{
		return <<<EOF
		
</td>

<td class="space">&nbsp;</td>
</tr>		
EOF;
	}
	
	function temp_head()
	{
		return <<<EOF
<table width="85%" cellspacing="0" cellpadding="3" style="border: solid 1px black">	
<tr class="dark">
<td>Templates</td>
<td>&nbsp;</td>
<td width="20%">Filename</td>
</tr>		
EOF;
	}

	function temp_row( $name, $filename, $id )
	{
		return <<<EOF
<tr>
<td class="bevel" width="75" align="center">
<a href="?Action=Templates&amp;temp_id=$id">Edit</a> - 
<a href="?Action=Templates&amp;M=del&amp;temp_id=$id">Delete</a>
</td>
<td class="bevel">$name</td>
<td class="bevel" width="20%">$filename</td>
</tr>		
EOF;
	}

	function temp_foot()
	{
		return <<<EOF
</table><br />
<br />
EOF;
	}
	
	function add_form()
	{
		return <<<EOF
<form action="?Action=Templates&amp;M=add" method="Post">
<b>Add A Template:</b><br /><br />
<table>
<tr><td>Name:</td><td><input type="text" name="name" /></td></tr>
<tr><td>Filename:</td><td><input type="text" name="filename" /></td></tr>
</table>
<br />
<input type="submit" name="submit" value="Add Template" />
</form>		
EOF;
	}
	
	function edit_form( $name, $filename, $data, $id )
	{
		return <<<EOF
<form action="?Action=Templates&amp;M=edit&amp;temp_id=$id" method="Post">
<b>Editing template:</b> $name<br /><br />
Name:<br />
<input type="text" name="name" value="$name" /><br />
Filename:<br />
<input type="text" name="fname" value="$filename" /><br /><br />
Template:<br />
<textarea name="data" rows="20" style="font-family:tahoma, verdana, arial, sans-serif;font-size:9pt;width:600px;">$data</textarea><br />
<input type="submit" name="submit" value="Submit" />
</form>		
EOF;
	}
	
	function def_temps()
	{
		return <<<EOF
<table width="85%" cellspacing="0" cellpadding="3" style="border: solid 1px black">	
<tr class="dark">
<td colspan="2">Default Templates</td>
</tr>

<tr>
<td class="bevel" width="75" align="center">
<a href="?Action=Templates&amp;M=EditDef&amp;temp=error_template">Modify</a>
</td>
<td class="bevel">Form Error Template</td>
</tr>

<tr>
<td class="bevel" width="75" align="center">
<a href="?Action=Templates&amp;M=EditDef&amp;temp=notify_template">Modify</a>
</td>
<td class="bevel">Email Notification Template</td>
</tr>

</table><br />
<br />		
EOF;
	}
	
	function def_edit_form( $name, $data )
	{
		return <<<EOF
<form action="?Action=Templates&amp;M=DoEditDef&amp;temp=$name" method="Post">
<b>Editing template:</b> $name<br /><br />

Template:<br />
<textarea name="data" rows="20" style="font-family:tahoma, verdana, arial, sans-serif;font-size:9pt;width:600px;">$data</textarea><br />
<input type="submit" name="submit" value="Submit" />
</form>		
EOF;
	}

}

?>
Return current item: Write2Left