<?php
defined('_JEXEC') or die('Restricted access');
$db	=& JFactory::getDBO();
$query="select * from `#__content_allarticleannounce`";
$db->setQuery($query);
$histories=$db->loadObjectList();
?>
<style>
div.header 
{
	padding-left: 0;
}
</style>
<link rel="stylesheet" href="components/com_allarticleannounce/js/style.css" type="text/css" />
<script type="text/javascript" src="components/com_allarticleannounce/js/ajax.js"></script>
<table width="100%"  border="0" cellspacing="4" cellpadding="6">
	<tr>
	
		<!-- side menu -->

		<td width="15%" valign="top" align="center">
			
			<div style="background-color:#F8F8F8" id="sideNav"><div class="t"><div class="t"><div class="t"></div></div></div><div class="m" style='padding:0;height:530px;'>				
				<table width="100%"  border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td>
						<div>
							<span title='If you require assistance with the installation or use of this product: '>
								<h3 align='left' style='position:relative; left:10px;'>Setting</h3>
							</span>
							<ul style="position:relative;left:-10px;">
								<li>
									<a href="index.php?option=com_allarticleannounce" title="Config Link">Global Configuration</a>
								</li>
								<li>
									History
								</li>
							</ul>
							<span title='If you require assistance with the installation or use of this product: '>
								<h3 align='left' style='position:relative; left:10px;'>Joomtraders Support</h3>
							</span>
							<ul style="position:relative;left:-10px;">
							<li> <a href="http://www.joomtraders.com/forum.html" target="_blank" title="External link to Our Forums">Our forums</a>
							</li><li><a href="mailto:support@joomtraders.com" target="_blank" title="Email Link">Email Support</a>
							</li><li><a href="http://www.joomtraders.com/tickets.html" target="_blank" title="Log a ticket">Log a ticket</a>
							</li>
							</ul>
						</div>														
					</td>											
				</tr>
			  </table>
			</div><div class="b"><div class="b"><div class="b"></div></div></div></div>
		</td>	
		
		
		<!-- right part -->
		<td style='vertical-align:top;'>
			<!-- short instruction -->
			<div style="background-color:#F8F8F8"><div class="t"><div class="t"><div class="t"></div></div></div><div class="m">				
				<h3>Instruction</h3>
				<p>
				Thank you for installing allArticleAnnounce from <a href="http://www.joomtraders.com" title="External link to Joomtraders" target="_blank">Joomtraders</a>.
				</p>
			</div><div class="b"><div class="b"><div class="b"></div></div></div></div>
			<div style='height:10px;'></div>
			
			<!-- control panel -->
			<div style="background-color:#F8F8F8"><div class="t"><div class="t"><div class="t"></div></div></div><div class="m">				
			<!-- mail list imformation-->
				<fieldset>
					<legend><?php echo JText::_( 'History' ); ?></legend>
						<table class="adminlist">
							<thead>
								<tr>
									<th width='20%'>
										Article ID
									</th>
									<th width='20%'>
										To Facebook
									</th>
									<th width='20%'>
										Date
									</th>
									<th width='20%'>
										To Twitter
									</th>
									<th width='20%'>
										Date
									</th>
								</tr>
							</thead>
							<tbody>
							<?php
							$k = 0;
							for ($i=0;$i < count($histories); $i++)
							{
								$row = $histories[$i];
								$url="index.php?option=com_allarticleannounce&task=detail&id=".$row ->content_id;
							?>
								<tr class="<?php echo "row$k"; ?>" style="text-align:center;">
									<td>
										<a href='<?php echo $url;?>'>
											<?php echo $row ->content_id;?>
										</a>
									</td>
									<td>
										<?php echo ($row ->published_f=='1')?'Yes':'No';?>
									</td>
									<td>
										<?php echo ($row ->published_f=='1')?$row->published_f_date:'';?>
									</td>
									<td>
										<?php echo ($row ->published_t=='1')?'Yes':'No';?>
									</td>
									<td>
										<?php echo ($row ->published_t=='1')?$row->published_t_date:'';?>
									</td>
								</tr>
								<?php
									$k = 1 - $k;
								}
								?>
							</tbody>
						</table>
				</fieldset>
			
			</div><div class="b"><div class="b"><div class="b"></div></div></div></div>
			<div style='height:10px;'></div>
		</td>	
	</tr>
</table>