<?php if (!(defined('IN_HBS')) || IN_HBS !== TRUE) { header('Location: 404.php'); exit(); } ?>
<?php if (isset($posted) && $posted === TRUE) { ?>
<span class="comment_author">Comment by <a href="<?=$url ?>"><?=$name ?></a> on <?=$timestamp ?>
</div>
<div class="comments">
<?=$comment ?></div>
<div id="sep"></div>
<?php } else if (isset($error) && $error == TRUE) { ?>
<strong><?=$error ?></strong>
<?php } else { ?>
<script>
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
function prepareInputsForHints() {
var inputs = document.getElementsByTagName("input");
for (var i=0; i<inputs.length; i++){
inputs[i].onfocus = function () {
this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
}
inputs[i].onblur = function () {
this.parentNode.getElementsByTagName("span")[0].style.display = "none";
}
}
}
addLoadEvent(prepareInputsForHints);
addLoadEvent(prepareInputsForHints);
</script>
<br />
<div id="msg">Make a comment</div><br />
<div id="form">
<form method="post" action="process_comment.php">
<input type="hidden" name="check" id="check" value="<?=$rand ?>" />
<input type="hidden" name="entry" id="entry" value="<?=$id ?>" />
<input type="hidden" name="timestamp" id="timestamp" value="<?=$commenttimestamp ?>">
<strong><label for="name">Name: </label></strong><dt><input type="text" name="name" id="name" size="27" />
<span class="hint">Requried. Blog readers will be able to see your entered name.<span class="hint-pointer"> </span></span>
</dt>
<strong><label for="email">Email:</label></strong>
<dt><input type="text" name="email" id="email" size="27" />
<span class="hint">Requried. However, it will not be shared with anybody. <span class="hint-pointer"> </span></span>
</dt>
<strong><label for="url">URL: </label></strong>
<dt><input type="text" name="url" id="url" size="27" value="http://" />
<span class="hint">Not Requried. If you choose to enter your URL, readers will be able to click your name and visit your website.<span class="hint-pointer"> </span></span>
</dt>
<strong><label for="comment">Comment:</label></strong>
<textarea cols="20" rows="5" name="comment" id="comment"></textarea>
<div style="visibility: hidden;"><input type="textbox" name="firstname" value="" /></div>
<dt><input type="submit" name="submit_comment" id="submit_comment" value="Add Comment" /></dt>
</form></div></div></div> <br />
<?php } ?>