<?php
if( !defined( 'ADMIN_PAGE' ) )
exit;
if( isset( $_POST['sOption'] ) ){
$oPage->savePages( $_POST );
$sOption = 'save';
}
require_once DIR_TEMPLATES.'admin/_header.php'; // include headers
require_once DIR_TEMPLATES.'admin/_menu.php'; // include menu
if( isset( $sOption ) ){
echo '<div id="msg">'.$lang['Operation_completed'].'</div>';
}
?>
<h1><img src="<?php echo $config['dir_templates']; ?>admin/img/ico_pages.gif" alt="<?php echo $lang['Pages']; ?>" /><?php echo $lang['Pages']; ?><a href="<?php echo $config['manual_link']; ?>instruction#1.3" title="<?php echo $lang['Manual']; ?>" target="_blank"></a></h1>
<form action="" method="get" id="search">
<fieldset>
<input type="hidden" name="p" value="<?php echo $p; ?>" />
<input type="hidden" name="sSort" value="<?php echo $sSort; ?>" />
<input type="text" name="sPhrase" value="<?php echo $sPhrase; ?>" class="input" size="50" />
<input type="submit" value="<?php echo $lang['search']; ?> »" />
</fieldset>
</form>
<?php
// get list of pages
$content = ( isset( $sPhrase ) && !empty( $sPhrase ) ) ? $oPage->listPagesAdminSearch( $sPhrase ) : $oPage->listPagesAdmin( );
// display pages in the table list
if( isset( $content ) ){
?>
<script type="text/javascript">
<!--
var aDelUrl = Array( '?p=pages-delete&iPage=', '?p=pages-delete&bWithoutFiles=true&iPage=' );
var bDeleteUnusedFiles = "<?php echo $config['delete_unused_files']; ?>";
//-->
</script>
<form action="?p=<?php echo $p; ?>&sPhrase=<?php echo $sPhrase; ?>&sSort=<?php echo $sSort; ?>" method="post">
<fieldset>
<table id="list" class="pages" cellspacing="1">
<thead>
<tr class="save">
<th colspan="5">
<input type="submit" name="sOption" value="<?php echo $lang['save']; ?> »" />
</th>
</tr>
<tr>
<td class="id"><a href="?p=<?php echo $p; ?>&sSort=id&sPhrase=<?php echo $sPhrase; ?>"><?php echo $lang['Id']; ?></a></td>
<td class="name"><a href="?p=<?php echo $p; ?>&sSort=name&sPhrase=<?php echo $sPhrase; ?>"><?php echo $lang['Name']; ?></a></td>
<td class="position"><a href="?p=<?php echo $p; ?>&sPhrase=<?php echo $sPhrase; ?>"><?php echo $lang['Position']; ?></a></td>
<td class="status"><?php echo $lang['Status']; ?></td>
<td class="options"> </td>
</tr>
</thead>
<tfoot>
<tr class="save">
<th colspan="5">
<input type="submit" name="sOption" value="<?php echo $lang['save']; ?> »" />
</th>
</tr>
</tfoot>
<tbody>
<?php echo $content; ?>
</tbody>
</table>
</fieldset>
</form>
<?php
}
else{
echo '<div id="msg" class="error">'.$lang['Data_not_found'].'</div>';
}
require_once DIR_TEMPLATES.'admin/_footer.php'; // include footer
?>