<?php
/*
+------------------------------------------------------
| Write2Left
| (c) timdorr
| http://www.write2left.com
| hide@address.com
| See License.txt for license info
|------------------------------------------------------
| Script: Editor.php
| Description:
| Contains part of the interface's skin's default output parts
| Created Jun-18-2003
+------------------------------------------------------
*/
/* Class: Skin_Editor
* Description:
* The generic skin parts class.
*/
class Skin_Editor
{
function body_top()
{
return <<<EOF
<td class="main" valign="top">
<big><b>Template Editor</b></big>
<br /><br />
EOF;
}
function body_bottom( $error )
{
return <<<EOF
$error
</td>
<td class="space"> </td>
</tr>
EOF;
}
function edit_head( $name )
{
return <<<EOF
<table width="85%" cellpadding="3">
<tr class="dark">
<td>$name</td>
</tr>
</table>
<table width="85%" cellspacing="0" cellpadding="3" style="border: solid 1px black">
EOF;
}
function section( $bit_id, $page_id, $set_id, $name, $type )
{
return <<<EOF
<tr>
<td class="bevel" width="75" align="center">
<a href="?Action=Editor&M=Edit&bit_id=$bit_id&page_id=$page_id&set_id=$set_id">Edit</a>
<a href="?Action=Editor&M=Delete&bit_id=$bit_id&page_id=$page_id&set_id=$set_id">Delete</a>
</td>
<td class="bevel">$name ($type)</td>
<td class="bevel" width="60" align="center">
<a href="?Action=Editor&M=U&bit_id=$bit_id&page_id=$page_id&set_id=$set_id">Up</a>
<a href="?Action=Editor&M=D&bit_id=$bit_id&page_id=$page_id&set_id=$set_id">Down</a>
</td>
</tr>
EOF;
}
function edit_foot()
{
return <<<EOF
</table>
<br />
EOF;
}
function add_form( $page_id, $set_id, $type_options, $after_options )
{
return <<<EOF
<form action="?Action=Editor&M=Add&page_id=$page_id&set_id=$set_id" method="post" >
<b>Add New Bit:</b><br />
Name:
<input type="text" name="newname" size="10" maxlength="25" />
Type:
<select name="newtype">
$type_options
</select>
After:
<select name="after_bit_id">
$after_options
</select>
<input type="submit" value="Add Bit" />
</form>
EOF;
}
function text_form( $bit_id, $page_id, $set_id, $data )
{
return <<<EOF
<div style="border: solid 1px black; width: 75%;">
<div class="editor">
<b>Edit Text:</b>
<form action="?Action=Editor&M=Save&bit_id=$bit_id&page_id=$page_id&set_id=$set_id" method="post">
<textarea name="newdata" rows="7" cols="50">$data</textarea><br />
<br />
<input type="submit" value="Save Text" />
</form>
</div></div>
<br />
EOF;
}
}
?>