<?php
$login_form = "loginform.php";
require "authorize.php"; 
if ($login == fail) {} else {
?> <span class="font1"><b>Your Articles</b></span><br> <span class="idevfont4"><b>You can edit, delete and modify your articles here.</b></span><br>
<br>
<?php
//-------------------------------------------------------------------------------------
$SQL = "SELECT * from PAGES WHERE OWNER = '$_SESSION[username]' ORDER BY ID DESC";
$result = @mysql_query( $SQL );
while( $row = @mysql_fetch_array( $result ) ) {

$pieces = explode("-", $row[CATEGORY]);
$row[CATEGORY] = $pieces[1];

//---------------------------------------------
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td class="greenbox">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td></td>
<td></td>
</tr>
<tr> 
<td width="100%"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td valign="top" colspan="3"> 
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr> </tr>
<tr> 
<td class="td4" valign="top"> 
<?PHP
$filename = "$svr_rootscript/product_images/$row[IMAGENAME].jpg";
if (file_exists($filename)) {
?>
<a href="index.php?page=account_add&id=<?php echo $row[ID]; ?>&qt=update"><img src="product_images/<?php echo "$row[IMAGENAME]"; ?>.jpg" border="1" width="128" /></a> 
<?PHP } else { ?>
<a href="index.php?page=account_add&id=<?php echo $row[ID]; ?>&qt=update"><img src="images/Sidebar-Photos-icon.png" width="128" height="128" border="0"></a> 
<?PHP } ?>
</td>
<td class="td4" width="100%" colspan="6
"><strong><span class="link2"> <a href = "index.php?page=account_add&id=<?php echo $row[ID]; ?>&qt=update"> 
<?php echo $row[HEADER]; ?>
</a></span></strong><br>
<br>
Article status: 
<?php echo $row[STATUS]; ?>
<b> </b></td>
</tr>
</table>
</td>
</tr>
</table>
</td>

<td class="td4"> 
<table cellpadding="0" cellspacing="0" border="0">
<tr> 
<td><a href="index.php?page=account_add&amp;id=<?php echo $row[ID]; ?>&amp;qt=update"><img src="images/edit_listing.jpg" width="22" height="22" border="0" alt="Edit Listing" /></a></td>
<td><a href="index.php?page=account_delete&amp;id=<?php echo $row[ID]; ?>"><img src="images/delete_listing.jpg" width="22" height="22" alt="Delete Listing" border="0" /></a></td>
</tr>
</table>
</td>

</tr>
</table>
</td>
</tr>
</table>
<br>
<?php $bgcolor = $nil; $there_is = $row[ID]; } if ($there_is == $nil) echo "You have no submissions.";  ?>
<?PHP } ?>

