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

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

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

<td class="space">&nbsp;</td>
</tr>		
EOF;
	}	
	
	function subs_head()
	{
		return <<<EOF
<table width="85%" cellspacing="0" cellpadding="3" style="border: solid 1px black">	
<tr class="dark">
<td>Current Subscribers:</td>
<td></td>
</tr>		
EOF;
	}
	
	function sub_row( $sub_id, $name, $addy, $type )
	{
		return <<<EOF
<tr>
<td class="bevel">$name - $addy</td>
<td class="bevel" width="75" align="center">
<a href="?Action=Subs&amp;M=EditSub&amp;sub_id=$sub_id">Edit</a> -
<a href="?Action=Subs&amp;M=DeleteSub&amp;sub_id=$sub_id">Delete</a>  
</td>

</tr>		
EOF;
	}
	
	function subs_foot()
	{
		return <<<EOF
</table><br />
<br />	

<form action="?Action=Subs&amp;M=AddSub" method="Post">
<b>Add Subscriber:</b><br /><br />
Name: <br /><input type="text" name="name" /><br /><br />
Address: <br /><input type="text" name="addy" size="50" /><br /><br />
<input type="hidden" name="type" value="Email" />
<input type="submit" name="submit" value="Add Subscriber" />
</form>	
EOF;
	}

	function sub_edit_form( $id, $name, $addy, $type )
	{
		return <<<EOF
<form action="?Action=Subs&amp;M=DoEditSub" method="Post">
<input type="hidden" name="sub_id" value="$id" />

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

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

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

</table>
<br />
<input type="submit" name="submit" value="Save Changes" />
</form>			
EOF;
	}

	function send_form()
	{
		return <<<EOF
<form action="?Action=Subs&amp;M=SendMessage" method="Post">
<b>Send a message to subscribers:</b><br />
<br />
Subject: <br />
<input type="text" name="subject" /><br />
Message: <br />
<textarea rows="10" cols="50" name="message"></textarea><br />
<br />
<input type="submit" name="submit" value="Send Message" />
</form>	
EOF;
	}
}

?>
Return current item: Write2Left