<?php
require_once('admin.php');
//____________________________________________________
$Display->Title = 'Options';
$Display->Subtitle = 'Manage Blocks';
//_____________________________________________________
require('./admin-display-header.php');
?>
<h2> Manage Your Blocks » </h2>
<p> Blocks are little code snippets which may contain some HTML or PHP code or both, You can add these blocks to your Profile page. For example to track visitors you may add a <a href="http://www.google.com/analytics/">Google Analytics</a> code in footer or an <a href="http://www.google.com/adsense/">Adsense</a> code in sidebar. </p>
<a href="option-block-edit.php?action=new">Click here to add a new Block</a>
<p> </p>
<hr />
<table>
<?php
$Blocks = $DC->Select('block'); //Get all the rows of the block table
if(!$Blocks)
{
?>
<tr> <td> No Blocks defined. <a href="option-block-edit.php?action=new">Create a new Block</a> </td> </tr>
<?php
}
else
{
?>
<tr> <th> Block Name </th>
<th> Category </th>
<th> Status </th>
<th> Edit </th>
<th> Delete </th>
</tr>
<?php
foreach($Blocks as $Key => $KeyValue)
{
?>
<tr> <td> <?php _P($KeyValue['block_name']); ?> </td>
<td> <?php _P($KeyValue['block_category']); ?> </td>
<td> <?php _P($KeyValue['block_status']); ?> </td>
<td> <a href="option-block-edit.php?action=edit&id=<?php _P($KeyValue['block_id']); ?>">Edit</a> </td>
<td> <a href="option-block-update.php?action=delete">Delete</a> </td>
</tr>
<?php
}
}
?>
</table>
<?php _foot(); ?>