Initial commit

This commit is contained in:
Ben Ramey
2015-11-12 19:58:50 -06:00
commit 4eb7f46e4c
86 changed files with 4341 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<h2>Administrate FTI: Credit Cards</h2>
<p>
Are you sure you want to delete credit card information for
<?php echo $this->data['card']->card_name ?>?
</p>
<p>
<form action="creditcards.php" method="post" accept-charset="utf-8">
<input type="hidden" name="id" value="<?php echo $this->data['card']['id'] ?>" id="id"/>
<input type="hidden" name="do" value="reallydelete" id="do"/>
<p>
<input type="submit" value="Yes, delete info"/>
No, return to <a href='/admin/creditcards.php'>credit card list</a>.
</p>
</form>
</p>

View File

@@ -0,0 +1,29 @@
<h2>Administrate FTI: Credit Cards</h2>
<p>
Below is a list of all the credit cards you have on file. You can view
the full credit card information, or delete the information.
</p>
<p>
Remember to delete credit card information as soon as possible to reduce to
risk of information being stolen.
</p>
<div class='admin_summary_box'>
<h3>All Credit Card Information</h3>
<?php if(count($this->data['creditcards']) > 0): ?>
<table class='summary_table'>
<?php for($c = 0; $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 are currently no credit cards on file.</p>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,24 @@
<h2>Administrate FTI: Credit Cards</h2>
<p>
Below is the credit card information for the card you selected.
</p>
<p>
Return to
<a href='/admin/creditcards.php'>credit card list</a>.
</p>
<p>
<a href='/admin/creditcards.php?do=delete&id=<?php echo $this->data['card']['id'] ?>'>
Delete this card
</a>
</p>
<div class='admin_summary_box' id='creditcards_summary'>
<h3>Credit Card Information</h3>
<table class='data_table'>
<?php foreach($this->data['card'] as $key => $val): ?>
<tr>
<td class='data_key'><?php echo ucfirst(str_replace('_',' ',$key)) ?></td>
<td class='data_value'><?php echo $val ?></td>
</tr>
<?php endforeach; ?>
</table>
</div>

68
site/en/admin/home.php Normal file
View File

@@ -0,0 +1,68 @@
<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>

View File

@@ -0,0 +1,74 @@
<h2>Administrate FTI: Links and Numbers</h2>
<p>
<?php if(isset($this->data['editing'])): ?>
Edit the links and numbers item below and click on "Save item" at the bottom
of the page when you are done.
<?php else: ?>
Add a links and numbers item to the links and numbers page by filling out the form below.
<?php endif; ?>
</p>
<p>
You make bold and italics text by selecting the text that you want to make
bold or italics inside the "News text" box and clicking either the bold (b)
button or the italics (i) button on the top right of the news box.
</p>
<p>
Similarly, select any text that you want to make a link and click on
the link button. A window will pop up and prompt you for the URL
that you would like that text to link to.
</p>
<p>
You can create two types of Links and Numbers items: Pages and External links.
To create an External link, select that option from the "Type" list, enter
a title for the link and put the URL for the link (only the URL) in the "Text"
box.
</p>
<p>
To create a regular Page, select that option for the "Type" list, enter a
title that will appear on the Links and Numbers page and put the
text for the page in the "Text" page.
</p>
<div class='admin_summary_box'>
<h3><?php echo isset($this->data['editing']) ? 'Edit' : 'Add' ?> Links and Numbers Item</h3>
<form action="linksandnumbers.php" method="post" id='linksandnumbers_form' accept-charset="utf-8">
<input type="hidden" name="do" value="really<?php echo isset($this->data['item']) ? 'edit' : 'add' ?>" id="do"/>
<?php if(isset($this->data['editing'])): ?>
<input type='hidden' name='id' value='<?php echo $this->data['item']['id'] ?>' id='id'/>
<?php endif; ?>
<p class='field'>
<label for='title'>Title</label>
<input type="text" name="title"
value="<?php echo isset($this->data['editing']) ? htmlspecialchars($this->data['item']->title) : '' ?>"
id="title" class='long' />
</p>
<p class='field'>
<label for='subtitle'>Subtitle</label>
<input type="text" name="subtitle"
value="<?php echo isset($this->data['editing']) ? htmlspecialchars($this->data['item']->subtitle) : '' ?>"
id="subtitle" class='long' />
</p>
<p class='field'>
<label for='type'>Type</label>
<select name='type' id='type'>
<?php
foreach(array('External link','Page') as $type):
$xmlType = strtolower(str_replace(' ','_',$type));
if(isset($this->data['editing']) && $xmlType == (string)$this->data['item']->type):
echo "<option value='$xmlType' selected='selected'>".$type."</option>";
else:
echo "<option value='$xmlType'>".$type."</option>";
endif;
endforeach;
?>
</select>
</p>
<p class='field'>
<label for='text'>Links and numbers text</label>
<?php include 'textboxbuttons.php' ?>
<textarea id='text' name='text'><?php
echo isset($this->data['editing']) ? preg_replace("#<!\[\CDATA\[(.*)]]>#","$1",(string)$this->data['item']->text) : ''
?></textarea>
</p>
<p><input type="submit" value="<?php echo isset($this->data['editing']) ? 'Save' : 'Add' ?> item"></p>
</form>
</div>

View File

@@ -0,0 +1,19 @@
<h2>Administrate FTI: Links and Number</h2>
<p>
Please decide if you really want to delete this links and numbers item below.
</p>
<div class='admin_summary_box'>
<h3>Delete Links and Numbers Item</h3>
<p>
Do you really want to delete the links and numbers item
"<?php echo $this->data['item']->title ?>"?
</p>
<form action="linksandnumbers.php" method="post" id='linksandnumbers_form' accept-charset="utf-8">
<input type="hidden" name="do" value="reallydelete" id="do"/>
<input type="hidden" name="id" value="<?php echo $this->data['item']['id'] ?>" id="id"/>
<p>
<input type="submit" value="Delete news item">
<a href='linksandnumbers.php' title="Don't delete links and numbers item">No, return to links and numbers items list</a>
</p>
</form>
</div>

View File

@@ -0,0 +1,22 @@
<h2>Administrate FTI: Links and Numbers</h2>
<p>
Below is a list of all the links and numbers items on the Links and
Numbers page of FTI. You can add, edit or delete links and numbers items.
</p>
<div class='admin_summary_box' id='news_summary'>
<h3>All Links and Numbers Items</h3>
<p>
<a href='/admin/linksandnumbers.php?do=add'>Add Links and Number Item</a>
</p>
<table class='summary_table'>
<?php for($c = 0; $c < count($this->data['linksandnumbers']); $c++): ?>
<tr>
<td class='summary_data'><?php echo $this->data['linksandnumbers'][$c]->title ?></td>
<td class='summary_actions'>
<a href='/admin/linksandnumbers.php?do=edit&id=<?php echo $this->data['linksandnumbers'][$c]['id'] ?>'>Edit</a>
<a href='/admin/linksandnumbers.php?do=delete&id=<?php echo $this->data['linksandnumbers'][$c]['id'] ?>'>Delete</a>
</td>
</tr>
<?php endfor; ?>
</table>
</div>

17
site/en/admin/login.php Normal file
View File

@@ -0,0 +1,17 @@
<div class='login-box'>
<h2>Login</h2>
<form action="login.php" method="post" accept-charset="utf-8">
<p class='field'>
<label for='username'>Username</label>
<input type="text" name="username" value="" id="username"/>
</p>
<p class='field'>
<label for='password'>Password</label>
<input type="password" name="password" value="" id="password"/>
</p>
<p><input type="submit" value="Login &rarr;"></p>
</form>
<p>
&laquo; <a href='/' title='Home page'>Go to home page</a>
</p>
</div>

7
site/en/admin/menu.php Normal file
View File

@@ -0,0 +1,7 @@
<ul id='admin_nav'>
<li id='index_link'><a href='index.php'>Home</a></li>
<li id='news_link'><a href='news.php'>News</a></li>
<li id='creditcards_link'><a href='creditcards.php'>Credit Card Information</a></li>
<li id='passports_link'><a href='passports.php'>Passports</a></li>
<li id='linksandnumbers_link'><a href='linksandnumbers.php'>Links and Numbers</a></li>
</ul>

View File

@@ -0,0 +1,42 @@
<h2>Administrate FTI: News</h2>
<p>
<?php if(isset($this->data['editing'])): ?>
Edit the news post below and click on "Save news item" at the bottom
of the page when you are done.
<?php else: ?>
Add a news post to the front page by filling out the form below.
<?php endif; ?>
</p>
<p>
You make bold and italics text by selecting the text that you want to make
bold or italics inside the "News text" box and clicking either the bold (b)
button or the italics (i) button on the top right of the news box.
</p>
<p>
Similarly, select any text that you want to make a link and click on
the link button. A window will pop up and prompt you for the URL
that you would like that text to link to.
</p>
<div class='admin_summary_box'>
<h3><?php echo isset($this->data['editing']) ? 'Edit' : 'Add' ?> News Item</h3>
<form action="news.php" method="post" id='news_form' accept-charset="utf-8">
<input type="hidden" name="do" value="really<?php echo isset($this->data['newsitem']) ? 'edit' : 'add' ?>" id="do"/>
<?php if(isset($this->data['editing'])): ?>
<input type='hidden' name='id' value='<?php echo $this->data['newsitem']['id'] ?>' id='id'/>
<?php endif; ?>
<p class='field'>
<label for='title'>Title</label>
<input type="text" name="title"
value="<?php echo isset($this->data['editing']) ? htmlspecialchars($this->data['newsitem']->title) : '' ?>"
id="title" class='long' />
</p>
<p class='field'>
<label for='text'>News text</label>
<?php include 'textboxbuttons.php' ?>
<textarea id='text' name='text'><?php
echo isset($this->data['editing']) ? preg_replace("#<!\[\CDATA\[(.*)]]>#","$1",(string)$this->data['newsitem']->text) : ''
?></textarea>
</p>
<p><input type="submit" value="<?php echo isset($this->data['editing']) ? 'Save' : 'Add' ?> news item"></p>
</form>
</div>

View File

@@ -0,0 +1,19 @@
<h2>Administrate FTI: News</h2>
<p>
Please decide if you really want to delete this item below.
</p>
<div class='admin_summary_box'>
<h3>Delete News Item</h3>
<p>
Do you really want to delete the news item
"<?php echo $this->data['newsitem']->title ?>"?
</p>
<form action="news.php" method="post" id='news_form' accept-charset="utf-8">
<input type="hidden" name="do" value="reallydelete" id="do"/>
<input type="hidden" name="id" value="<?php echo $this->data['newsitem']['id'] ?>" id="id"/>
<p>
<input type="submit" value="Delete news item">
<a href='news.php' title="Don't delete news item">No, don't delete news item</a>
</p>
</form>
</div>

22
site/en/admin/news.php Normal file
View File

@@ -0,0 +1,22 @@
<h2>Administrate FTI: News</h2>
<p>
Below is a list of all the news posts on the front page of FTI. You
can add a news post, edit current news posts or delete current news posts.
</p>
<div class='admin_summary_box' id='news_summary'>
<h3>All News Items</h3>
<p>
<a href='/admin/news.php?do=add'>Add news post</a>
</p>
<table class='summary_table'>
<?php for($c = 0; $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>
</div>

View File

@@ -0,0 +1,15 @@
<h2>Administrate FTI: Passports</h2>
<p>
Are you sure you want to delete passport information for
<?php echo $this->data['passport']->name ?>?
</p>
<p>
<form action="passports.php" method="post" accept-charset="utf-8">
<input type="hidden" name="id" value="<?php echo $this->data['passport']['id'] ?>" id="id"/>
<input type="hidden" name="do" value="reallydelete" id="do"/>
<p>
<input type="submit" value="Yes, delete info"/>
No, return to <a href='/admin/passports.php'>passport list</a>.
</p>
</form>
</p>

View File

@@ -0,0 +1,29 @@
<h2>Administrate FTI: Passports</h2>
<p>
Below is a list of all the passports you have on file. You can view
the full passport information, or delete the information.
</p>
<p>
Remember to delete passport information as soon as possible to reduce to
risk of information being stolen.
</p>
<div class='admin_summary_box'>
<h3>All Passport Information</h3>
<?php if(count($this->data['passports']) > 0): ?>
<table class='summary_table'>
<?php for($c = 0; $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>

View File

@@ -0,0 +1,24 @@
<h2>Administrate FTI: Passports</h2>
<p>
Below is the passport information for the passport you selected.
</p>
<p>
Return to
<a href='/admin/passports.php'>passport list</a>.
</p>
<p>
<a href='/admin/passports.php?do=delete&id=<?php echo $this->data['passport']['id'] ?>'>
Delete this passport
</a>
</p>
<div class='admin_summary_box' id='passports_summary'>
<h3>Passport Information</h3>
<table class='data_table'>
<?php foreach($this->data['passport'] as $key => $val): ?>
<tr>
<td class='data_key'><?php echo ucfirst(str_replace('_',' ',$key)) ?></td>
<td class='data_value'><?php echo $val ?></td>
</tr>
<?php endforeach; ?>
</table>
</div>

View File

@@ -0,0 +1,5 @@
<div class='form_button_group'>
<a href='javascript:void(0);' id='bold_btn' class='form_button' title='bold'><strong>b</strong></a>
<a href='javascript:void(0);' id='italics_btn' class='form_button' title='Italics'><em>i</em></a>
<a href='javascript:void(0);' id='link_btn' class='form_button' title='Link'>link</a>
</div>