Files
friendshiptours.org/site/en/admin/home.php
2015-11-12 19:58:50 -06:00

69 lines
2.3 KiB
PHP

<h2>Administrate FTI</h2>
<p>
Welcome, John.
</p>
<div class='admin_summary_box' id='news_summary'>
<h3>Recent News Items</h3>
<p>
<a href='/admin/news.php?do=add'>Add news post</a>
</p>
<?php if(count($this->data['news']) > 0): ?>
<table class='summary_table'>
<?php for($c = 0; ($c < 10 && $c < count($this->data['news'])); $c++): ?>
<tr>
<td class='summary_data'><?php echo $this->data['news'][$c]->title ?></td>
<td class='summary_actions'>
<a href='/admin/news.php?do=edit&id=<?php echo $this->data['news'][$c]['id'] ?>'>Edit</a>
<a href='/admin/news.php?do=delete&id=<?php echo $this->data['news'][$c]['id'] ?>'>Delete</a>
</td>
</tr>
<?php endfor; ?>
</table>
<?php else: ?>
<p>There are currently no news posts on the home page.</p>
<?php endif; ?>
</div>
<div class='admin_summary_box' id='creditcards_summary'>
<h3>Recent Credit Card Information</h3>
<?php if(count($this->data['creditcards']) > 0): ?>
<table class='summary_table'>
<?php for($c = 0; ($c < 10 && $c < count($this->data['creditcards'])); $c++): ?>
<tr>
<td class='summary_data'>
<?php echo $this->data['creditcards'][$c]->card_name ?>
</td>
<td class='summary_actions'>
<a href='/admin/creditcards.php?do=view&id=<?php echo $this->data['creditcards'][$c]['id'] ?>'>View</a>
<a href='/admin/creditcards.php?do=delete&id=<?php echo $this->data['creditcards'][$c]['id'] ?>'>Delete</a>
</td>
</tr>
<?php endfor; ?>
</table>
<?php else: ?>
<p>There is currently no credit card information on file.</p>
<?php endif; ?>
</div>
<div class='admin_summary_box'>
<h3>Recent Passport Information</h3>
<?php if(count($this->data['passports']) > 0): ?>
<table class='summary_table'>
<?php for($c = 0; ($c < 10 && $c < count($this->data['passports'])); $c++): ?>
<tr>
<td class='summary_data'>
<?php echo $this->data['passports'][$c]->name ?>
</td>
<td class='summary_actions'>
<a href='/admin/passports.php?do=view&id=<?php echo $this->data['passports'][$c]['id'] ?>'>View</a>
<a href='/admin/passports.php?do=delete&id=<?php echo $this->data['passports'][$c]['id'] ?>'>Delete</a>
</td>
</tr>
<?php endfor; ?>
</table>
<?php else: ?>
<p>There are currently no passports on file.</p>
<?php endif; ?>
</div>