<?php
/*
+------------------------------------------------------
| Write2Left
| (c) timdorr
| http://www.write2left.com
| hide@address.com
| See License.txt for license info
|------------------------------------------------------
| Script: NewPost.php
| Description:
| Contains the new post skin parts
| Created Jun-28-2003
+------------------------------------------------------
*/
/* Class: Skin_NewPost
* Description:
* The new post skin parts class.
*/
class Skin_NewPost
{
function body_top()
{
return <<<EOF
<td class="main" valign="top">
<big><b>New Post</b></big>
<br /><br />
EOF;
}
function body_top_comment()
{
return <<<EOF
<td class="main" valign="top">
<big><b>Editing Comment</b></big>
<br /><br />
EOF;
}
function body_form( $hidden, $title, $categories, $state, $body, $extended, $extra_fields, $extra_options, $notify = "checked", $comments = "checked", $pings = "checked" )
{
return <<<EOF
<form action="index.php?Action=NewPost&M=post" method="post" name="form">
$hidden
<table cellpadding="0" cellspacing="0"><tr>
<td>
Title:<br />
<input type="text" name="post_title" size="25" maxlength="128" value="$title" />
</td>
<td>
Category:<br />
<select name="post_cat">
$categories
</select>
</td>
<td>
Post Status:<br />
<select name="post_state">
$state
</select>
</td>
</tr></table>
Body:<br />
<textarea name="post_body" rows="10" cols="60">
$body</textarea>
<br />
$extra_fields
<br />
<input type="submit" name="post" value="Post" style="width: 100px;" />
<input type="submit" name="post" value="Preview" style="width: 100px;" /><br />
<br />
Options: <br />
<input type="checkbox" name="send_notify" value="1" $notify />Send Notification to Subscribers<br />
<input type="checkbox" name="post_allow_comments" value="1" $comments />Allow Comments<br />
<input type="checkbox" name="post_allow_pings" value="1" $pings />Allow TrackBack Pings<br />
$extra_options
<br />
<script language='javascript' type='text/javascript'>
<!--
function expand(id)
{
var item = null;
if ( document.getElementById )
{
item = document.getElementById( id );
}
else if ( document.all )
{
item = document.all[id];
}
else if ( document.layers )
{
item = document.layers[id];
}
if ( item )
if ( item.style )
{
if ( item.style.display == "none" )
{
item.style.display = "";
}
else
{
item.style.display = "none";
}
}
else
{
item.visibility = "show";
}
}
-->
</script>
<div id='ex_link' style='position:relative;'>
<a href="javascript:expand('ex_form');expand('ex_link');" title="Open Extended Entry">Open Extended Entry</a>
</div>
<div id='ex_form' style='display:none;position:relative;'>
<a href="javascript:expand('ex_form');expand('ex_link');" title="Close Extended Entry">Close Extended Entry</a>
<textarea name="post_extended" rows="10" cols="60">
$extended</textarea>
<br />
</div>
</form>
EOF;
}
function body_bottom()
{
return <<<EOF
</td>
<td class="space"> </td>
</tr>
EOF;
}
function comments_head()
{
return <<<EOF
<a name="comments">
<table width="85%" cellspacing="0" cellpadding="3" style="border: solid 1px black">
<tr class="dark">
<td colspan="3">Comments:</td>
</tr>
EOF;
}
function comments_row( $author, $date, $post_id, $comment_id )
{
return <<<EOF
<tr>
<td class="bevel">
<a href="?Action=NewPost&M=EditComment&post_id=$post_id&comment_id=$comment_id">$author</a>
</td>
<td class="bevel" width="20%">$date</td>
<td class="bevel" width="75" align="center">
<a href="?Action=NewPost&M=DeleteComment&post_id=$post_id&comment_id=$comment_id">Delete</a>
</td>
</tr>
EOF;
}
function comments_foot()
{
return <<<EOF
</table><br />
<br />
EOF;
}
function comment_edit_form( $post_id, $comment_id, $name, $email, $url, $ip, $body )
{
return <<<EOF
<form action="?Action=NewPost&M=DoEditComment&post_id=$post_id" method="Post">
<input type="hidden" name="comment_id" value="$comment_id" />
Author Name:<br />
<input type="text" name="author_name" maxlength="64" value="$name" /><br />
<br />
Author Email:<br />
<input type="text" name="author_email" maxlength="100" value="$email" /><br />
<br />
Author URL:<br />
<input type="text" name="author_url" maxlength="150" value="$url" /><br />
<br />
IP Address:<br />
$ip<br />
<br />
Comment Body:<br />
<textarea name="comment_body" rows="5" cols="25">$body</textarea><br />
<br />
<input type="submit" value="Edit Comment" />
</form>
EOF;
}
}
?>