switch( $task ){
case 'view':
viewHello($option);
break;
default:
showPublishedHello($option);
break;
}
function viewHello($option)
{
$id = JRequest::getVar('id', 0);
$row =& JTable::getInstance( 'hello', 'Table');
$row->load($id);
if(!$row->published)
{
JError::raiseError( 404, JText::_('Invalid ID Provided'));
}
HTML_hello::viewHello($row, $option);
}
function viewHello($row, $option)
{ ?>
<p class="contentheading"><?php echo "ID: <b>". $row->id ."</b>";?></p>
<p><?php echo "Message: <br><b>". $row->message . "</b>";?></p>
<?php $link = 'index.php?option='. $option; ?>
<p><a href="<?php echo $link;?>">< return to the hello frontpage</a></p>
<?php
}
